:root {
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #1c2f5f;
  --muted: #6d7ea3;
  --line: #d9e2f2;
  --accent: #1948b8;
  --accent-2: #0f2f83;
  --ok: #1f7a52;
  --warn: #b76d1f;
  --danger: #b74747;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7f9fd 0%, #eef2f9 100%);
}

.hidden {
  display: none !important;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 21, 56, 0.72);
}

.login-card {
  width: min(440px, 96vw);
  padding: 24px;
  border: 1px solid #cfd9ec;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 26px 70px rgba(7, 21, 56, 0.35);
}

.login-logo {
  width: 100%;
  max-height: 100px;
  object-fit: contain;
  margin-bottom: 8px;
}

.login-card h2 {
  margin: 6px 0 4px;
  color: #163b9c;
}

.login-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.layout {
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  padding: 18px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid #d3dcf0;
  border-radius: 16px;
  background: #edf2fb;
}

.brand-card {
  padding: 10px;
  text-align: center;
  border: 1px solid #d6dff1;
  border-radius: 14px;
  background: #fff;
}

.brand-card img {
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
}

.menu {
  display: grid;
  gap: 8px;
}

.menu a {
  padding: 10px 12px;
  border: 1px solid #dbe4f5;
  border-radius: 10px;
  background: #f8faff;
  color: #31508f;
  font-weight: 600;
  text-decoration: none;
}

.menu a.active,
.menu a:hover {
  border-color: #1948b8;
  background: #1948b8;
  color: #fff;
}

.sidebar-foot {
  margin-top: auto;
  padding: 10px;
  border: 1px dashed #c4d1ea;
  border-radius: 10px;
  color: #6a7a9f;
  font-size: 12px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 24px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent-2) 0%, #194dbd 60%, #1f62df 100%);
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

.hero p {
  margin: 0;
  color: #cfe0ff;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
}

.audit-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faff;
}

.audit-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.audit-meta,
.audit-detail {
  font-size: 13px;
}

.audit-detail {
  margin-top: 4px;
}

.filters select {
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.user-form {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.user-form h3 {
  margin: 0 0 12px;
}

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.user-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.user-form-grid select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

.user-form-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.user-form-checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin: 0;
  font-weight: 600;
  color: #3c5f9e;
  font-size: 13px;
}

.user-form-checkbox input {
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
}

.user-form-checkbox span {
  line-height: 1.4;
}

.user-form-options button[type="submit"] {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .user-form-grid {
    grid-template-columns: 1fr;
  }
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.4fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faff;
}

.user-row.inactive {
  opacity: 0.65;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.user-actions button {
  padding: 8px 10px;
  font-size: 12px;
}

.status-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #e8eef9;
}

.status-pill.inactive {
  background: #fdeaea;
  color: #9b3030;
}

@media (max-width: 960px) {
  .user-row {
    grid-template-columns: 1fr;
  }

  .user-actions {
    justify-content: flex-start;
  }
}

.panel {
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 6px 18px rgba(12, 36, 91, 0.08);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.health-card,
.disk-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(12, 36, 91, 0.09);
}

.health-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #1f7a52, #37b979, #1948b8);
}

.disk-card {
  display: grid;
  align-content: start;
  justify-items: center;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  color: #1a44a6;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #3c5f9e;
  font-size: 13px;
  font-weight: 600;
}

input {
  padding: 10px 12px;
  border: 1px solid #cfd9eb;
  border-radius: 8px;
  background: #fbfdff;
  color: #16315d;
}

input:focus {
  outline: 2px solid rgba(25, 72, 184, 0.25);
  border-color: #4d72ca;
}

button {
  min-height: 40px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  border: 1px solid #c8d7f2;
  background: #eaf0fb;
  color: #2d4f94;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 160px 160px auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.playback-filters {
  grid-template-columns: minmax(140px, 1fr) 140px minmax(140px, 1fr) 140px auto auto;
}

.player-wrap {
  overflow: hidden;
  border: 1px solid #d7e0ef;
  border-radius: 12px;
  background: #071538;
}

.video-js {
  width: 100%;
  min-height: 420px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dashboard-metrics {
  grid-column: 1 / -1;
}

.metric {
  padding: 14px;
  border: 1px solid #d7e0ef;
  border-radius: 10px;
  background: #f8fbff;
}

.metric small {
  display: block;
  margin-top: 5px;
  color: #7b8aaa;
  font-size: 11px;
  font-weight: 600;
}

.metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric strong {
  font-size: 20px;
  color: #16315d;
}

.actions {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.health-visual {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 126px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #d7e0ef;
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 15%, rgba(31, 122, 82, 0.13), transparent 34%),
    linear-gradient(135deg, #f8fbff, #eef4ff);
}

.health-visual strong {
  display: block;
  margin-bottom: 5px;
  color: #153775;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1;
}

.health-visual span {
  color: #5d719d;
  font-weight: 600;
}

.recording-pulse {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #b9c6de;
  box-shadow: 0 0 0 12px rgba(185, 198, 222, 0.18);
}

.recording-pulse.recording {
  background: #23a267;
  box-shadow: 0 0 0 12px rgba(35, 162, 103, 0.14), 0 0 32px rgba(35, 162, 103, 0.35);
  animation: pulse-recording 1.8s ease-out infinite;
}

.recording-pulse.error {
  background: var(--danger);
  box-shadow: 0 0 0 12px rgba(183, 71, 71, 0.13);
}

.recording-pulse.stopped {
  background: var(--warn);
  box-shadow: 0 0 0 12px rgba(183, 109, 31, 0.13);
}

@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 0 0 rgba(35, 162, 103, 0.34), 0 0 28px rgba(35, 162, 103, 0.25);
  }

  75% {
    box-shadow: 0 0 0 18px rgba(35, 162, 103, 0), 0 0 32px rgba(35, 162, 103, 0.33);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(35, 162, 103, 0), 0 0 28px rgba(35, 162, 103, 0.25);
  }
}

.disk-horizontal {
  width: 100%;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d7e0ef;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #eef4ff);
}

.disk-horizontal-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.disk-horizontal strong {
  color: #16315d;
  font-size: 42px;
  line-height: 1;
}

.disk-horizontal span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.capacity-bar,
.mini-bar {
  overflow: hidden;
  width: 100%;
  height: 20px;
  border-radius: 999px;
  background: #dfe7f4;
}

.capacity-bar span,
.mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1948b8, #2d70e8);
  transition: width 0.5s ease, background 0.3s ease;
}

.disk-horizontal.warn .capacity-bar span {
  background: linear-gradient(90deg, #b76d1f, #e39b3c);
}

.disk-horizontal.danger .capacity-bar span {
  background: linear-gradient(90deg, #b74747, #e05f5f);
}

.capacity-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.days-panel {
  grid-column: 1 / -1;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 2px;
}

.timeline-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.timeline-list .item {
  position: relative;
  padding-left: 16px;
  flex-shrink: 0;
  min-height: 76px;
  box-sizing: border-box;
}

.timeline-list .item::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: #1948b8;
}

.mini-bar {
  margin-top: 10px;
  height: 6px;
}

.programs-day-label {
  margin: 4px 0 12px;
}

.programs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.programs-empty {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed #d7e0ef;
  border-radius: 10px;
  background: #f8fbff;
}

.programs-loading {
  grid-column: 1 / -1;
  padding: 18px 14px;
  text-align: center;
  border: 1px dashed #d7e0ef;
  border-radius: 10px;
  background: #f8fbff;
}

.program-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 140px;
  padding: 14px 14px 12px;
  border: 1px solid #d7e0ef;
  border-radius: 12px;
  background: #f8fbff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.program-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.program-card-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  min-width: 0;
}

.program-card-time {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #5573af;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.program-card-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dbe4f4;
  padding: 3px;
}

.program-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.program-card-foot {
  margin-top: auto;
  padding-top: 12px;
}

.program-card-foot button {
  width: 100%;
  margin: 0;
}

.program-card.has-recording {
  cursor: pointer;
}

.program-card.has-recording:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.program-card.has-partial {
  cursor: pointer;
}

.program-card.has-partial:hover {
  border-color: #fcd34d;
  background: #fffbeb;
}

.program-card.no-recording {
  opacity: 0.88;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.schedule-days-fieldset {
  border: 1px solid #d7e0ef;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
}

.schedule-days-fieldset legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
}

.schedule-days-mode,
.schedule-custom-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.schedule-single-wrap {
  margin-top: 10px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.schedule-logo-field input[type="file"] {
  font-size: 13px;
}

.schedule-logo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px dashed #d7e0ef;
  border-radius: 10px;
  background: #f8fbff;
}

.schedule-logo-preview img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dbe4f4;
  padding: 3px;
}

.item {
  padding: 12px;
  border: 1px solid #d7e0ef;
  border-radius: 10px;
  background: #f8fbff;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dce5f7;
  color: #5573af;
  font-size: 12px;
  font-weight: 700;
}

.badge.recording {
  background: #dff2e6;
  color: var(--ok);
}

.badge.error {
  background: #fce3e3;
  color: var(--danger);
}

.badge.stopped {
  background: #fff2d9;
  color: var(--warn);
}

.badge.idle {
  background: #e2e8f0;
  color: #64748b;
}

.badge.online {
  background: rgba(35, 162, 103, 0.14);
  color: #1a7a4a;
}

.badge.parcial {
  background: #fff2d9;
  color: var(--warn);
}

.badge.offline {
  background: rgba(183, 71, 71, 0.14);
  color: var(--danger);
}

#recording-detail {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  font-size: 13px;
}

.health-visual > div:last-child {
  min-width: 0;
  flex: 1;
}

.badge.partial {
  background: #fff2d9;
  color: var(--warn);
}

.live-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  border: 1px solid #d7e0ef;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.live-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.live-header h2 {
  margin: 10px 0 6px;
}

.live-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-camera-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.live-camera-select select {
  min-width: 180px;
}

.camera-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.camera-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.camera-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.camera-status-dot.online {
  background: #23a267;
  box-shadow: 0 0 0 3px rgba(35, 162, 103, 0.18);
}

.camera-status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(183, 71, 71, 0.14);
}

.camera-status-dot.inactive {
  background: #b9c6de;
  box-shadow: none;
}

.camera-status-dot.recording {
  box-shadow: 0 0 0 3px rgba(35, 162, 103, 0.18), 0 0 0 6px rgba(35, 162, 103, 0.12);
}

.cameras-overview-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.status-cameras-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 12px;
}

.status-cameras-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.legend-dot.online {
  background: #23a267;
}

.legend-dot.offline {
  background: var(--danger);
}

.legend-dot.inactive {
  background: #b9c6de;
}

.status-cameras-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
}

.status-cameras-empty {
  grid-column: 1 / -1;
  padding: 18px 12px;
  text-align: center;
  border: 1px dashed #d7e0ef;
  border-radius: 12px;
  background: #f8fbff;
}

.status-camera-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  padding: 14px 10px;
  border: 1px solid #d7e0ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(12, 36, 91, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.status-camera-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(12, 36, 91, 0.08);
}

.status-camera-card .camera-status-dot {
  width: 14px;
  height: 14px;
}

.status-camera-card-name {
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: #274684;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: live-pulse 1.6s infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.live-stream-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.live-stat {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d7e0ef;
  border-radius: 10px;
  background: #fff;
}

.live-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.live-stat strong {
  font-size: 16px;
  color: var(--text);
}

.live-player-shell {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #0f172a;
  background: #020617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.live-player-shell .video-js {
  width: 100%;
  min-height: min(62vh, 560px);
}

.live-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.live-meta-card {
  padding: 12px 14px;
  border: 1px solid #d7e0ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.live-meta-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.live-meta-card strong {
  font-size: 15px;
  color: var(--text);
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .content {
    order: 1;
  }

  .filters,
  .metric-grid,
  .dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .playback-filters {
    grid-template-columns: 1fr 1fr;
  }

  .live-meta {
    grid-template-columns: 1fr;
  }

  .live-header {
    flex-direction: column;
  }

  .health-card,
  .dashboard-metrics,
  .days-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero,
  .panel-head,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero h1 {
    font-size: 22px;
  }

  .filters,
  .metric-grid,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .health-visual {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-js {
    min-height: 260px;
  }
}
