#app-view {
  --dash-bg: #101015;
  --dash-card: #17171f;
  --dash-card-raised: #1d1c27;
  --dash-line: #34313e;
  --dash-text: #f5f1f8;
  --dash-muted: #c1bacb;
  --dash-pink: #ff6b9d;
  --dash-cyan: #68d8ef;
  --dash-green: #72e1b1;
  --dash-amber: #f4c26b;
}

#app-view .workspace {
  width: auto;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(15px, 1.7vw, 30px) clamp(14px, 2vw, 38px) 24px;
  overflow-x: hidden;
}

#app-view .side-nav {
  display: grid;
  gap: 7px;
}
#app-view .nav-group {
  display: grid;
  gap: 4px;
  padding: 12px 0 0;
  border-top: 1px solid #38323e;
}
#app-view .nav-group:first-child { padding-top: 0; border-top: 0; }
#app-view .nav-group-label {
  display: block;
  padding: 0 10px 5px;
  color: #c5b8c9;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .13em;
}
#app-view .nav-item { min-height: 39px; }

#overview-dashboard {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: clamp(13px, 1.15vw, 20px);
  margin: 0 auto;
}
#overview-dashboard > * { min-width: 0; }
#overview-dashboard .dashboard-cinema-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 152px;
  margin: 0;
  padding: clamp(21px, 2vw, 34px);
  overflow: hidden;
  border: 1px solid #543040;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 90% 0, #7e31513f 0, transparent 36%),
    linear-gradient(115deg, #24151f 0%, #17151e 58%, #191923 100%);
  box-shadow: 0 14px 36px #08070b55, inset 0 1px #ffffff0b;
}
#overview-dashboard .dashboard-cinema-copy { max-width: 880px; }
#overview-dashboard .dashboard-cinema-copy .eyebrow {
  margin: 0 0 9px;
  color: var(--dash-pink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}
#overview-dashboard .dashboard-cinema-copy .dashboard-title {
  margin: 0;
  color: var(--dash-text);
  font-size: clamp(25px, 2.7vw, 42px);
  font-weight: 820;
  line-height: 1.1;
  letter-spacing: -.035em;
  text-align: left;
}
#overview-dashboard .dashboard-cinema-copy > p:last-child {
  max-width: 720px;
  margin: 10px 0 0;
  color: #d2cbd7;
  font-size: clamp(12px, .95vw, 14px);
  line-height: 1.6;
}
#overview-dashboard .dashboard-hero-side {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 12px;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #68d8ef3d;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 100% 0, #68d8ef17, transparent 62%),
    linear-gradient(145deg, #1a1b25, #15151d);
  box-shadow: inset 0 1px #ffffff0b, 0 10px 24px #08070b42;
  text-align: right;
}
#overview-dashboard .dashboard-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #72e1b14a;
  border-radius: 99px;
  background: linear-gradient(135deg, #163126, #17241f);
  color: #b6f8d5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  white-space: nowrap;
}
#overview-dashboard .dashboard-live-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dash-green);
  box-shadow: 0 0 12px #72e1b1a6;
}
#overview-dashboard #dashboard-clock {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-style: normal;
}
#overview-dashboard .dashboard-clock-date {
  color: #c9c4d2;
  font-size: clamp(10px, .82vw, 12px);
  font-weight: 650;
  letter-spacing: .035em;
  line-height: 1.4;
  text-transform: capitalize;
}
#overview-dashboard .dashboard-clock-time {
  justify-self: center;
  color: #f5f8ff;
  font-size: clamp(27px, 2.15vw, 36px);
  font-weight: 820;
  letter-spacing: .075em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-shadow: 0 0 22px #68d8ef36;
}

#overview-dashboard > #stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 0;
}
#overview-dashboard > #stats .stat-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 0;
  min-height: 130px;
  padding: 16px 13px;
  overflow: hidden;
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  background: linear-gradient(145deg, #201e29, #16161d 80%);
  text-align: center;
}
#overview-dashboard > #stats .stat-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c65785aa, transparent);
  content: "";
}
#overview-dashboard > #stats .stat-icon { margin-bottom: 8px; }
#overview-dashboard > #stats .stat-label {
  min-height: 28px;
  color: #d0c8d5;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
#overview-dashboard > #stats .stat-number {
  margin-top: 4px;
  color: #fff;
  font-size: clamp(21px, 1.8vw, 29px);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-align: center;
}
#overview-dashboard > #stats .stat-detail {
  max-width: 100%;
  margin-top: 7px;
  color: var(--dash-muted);
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

#overview-dashboard .dashboard-performance-grid,
#overview-dashboard .dashboard-live-grid,
#overview-dashboard .dashboard-popular-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(12px, 1.15vw, 18px);
  margin: 0;
}
#overview-dashboard .disk-capacity-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; }
#overview-dashboard .panel {
  min-width: 0;
  min-height: 0;
  padding: clamp(15px, 1.3vw, 22px);
  border: 1px solid var(--dash-line);
  border-radius: 15px;
  background: linear-gradient(145deg, #1b1a23, #15151c 78%);
  box-shadow: 0 10px 26px #08070b33, inset 0 1px #ffffff08;
}
#overview-dashboard .panel-heading {
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  margin-bottom: 13px;
  text-align: center;
}
#overview-dashboard .panel-heading > div { justify-content: center; text-align: center; }
#overview-dashboard .panel-heading .eyebrow { margin: 0 0 4px; color: #d0a5b9; font-size: 9px; letter-spacing: .12em; }
#overview-dashboard .panel-heading h3 { margin: 0; color: var(--dash-text); font-size: clamp(14px, 1.05vw, 17px); line-height: 1.35; }
#overview-dashboard .resource-panel,
#overview-dashboard .traffic-panel { height: auto; }
#overview-dashboard .resource-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#overview-dashboard .resource-metric {
  min-width: 0;
  min-height: 94px;
  padding: 13px;
  border: 1px solid #383440;
  border-radius: 11px;
  background: #ffffff;
}
#overview-dashboard .resource-metric-heading { color: #d8d1df; }
#overview-dashboard .resource-metric-heading strong { color: #fff; font-size: 17px; font-variant-numeric: tabular-nums; }
#overview-dashboard .resource-metric small { color: #c1bacb; font-size: 10px; line-height: 1.45; }
#overview-dashboard .resource-track { height: 8px; margin: 9px 0 7px; background: #312d39; }
#overview-dashboard .resource-network {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #383440;
  border-radius: 11px;
  background: #ffffff;
}
#overview-dashboard .resource-network > div { display: grid; justify-items: center; gap: 4px; text-align: center; }
#overview-dashboard .resource-network span { color: #d1c9d8; font-size: 10px; }
#overview-dashboard .resource-network strong { color: var(--dash-cyan); font-size: 14px; font-variant-numeric: tabular-nums; }
#overview-dashboard .resource-network > small { grid-column: 1 / -1; color: #bdb5c7; font-size: 9px; text-align: center; }
#overview-dashboard .resource-summary { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 7px; }
#overview-dashboard .resource-summary span { min-height: 48px; display: grid; align-content: center; gap: 4px; text-align: center; }
#overview-dashboard .resource-summary strong { color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
#overview-dashboard .resource-chart,
#overview-dashboard .bandwidth-chart { width: 100%; height: 150px; min-height: 120px; max-height: 190px; flex: none; }
#overview-dashboard .resource-chart-heading,
#overview-dashboard .traffic-chart-heading { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; color: #d0c8d5; font-size: 10px; }
#overview-dashboard .traffic-current { justify-items: center; text-align: center; }
#overview-dashboard .traffic-current strong { color: var(--dash-cyan); font-size: clamp(25px, 2.4vw, 35px); font-variant-numeric: tabular-nums; }
#overview-dashboard .traffic-current span { color: #c1bacb; font-size: 11px; line-height: 1.45; }
#overview-dashboard .traffic-stats { justify-content: center; gap: clamp(16px, 3vw, 40px); text-align: center; }
#overview-dashboard .traffic-stats span { color: #c1bacb; }
#overview-dashboard .traffic-stats strong { color: #fff; font-size: 14px; }
#overview-dashboard .footnote { color: #bcb5c5; font-size: 9px; line-height: 1.55; text-align: center; }

#overview-dashboard .apk-bandwidth-head,
#overview-dashboard .apk-bandwidth-row { grid-template-columns: minmax(0, 1.4fr) minmax(95px, .8fr) minmax(110px, .9fr); gap: 9px; }
#overview-dashboard .apk-bandwidth-head { color: #c8c0d0; }
#overview-dashboard .apk-bandwidth-row { border-color: #383440; background: #ffffff; }
#overview-dashboard .apk-bandwidth-device strong { color: #fff; font-size: 11px; }
#overview-dashboard .apk-bandwidth-device small,
#overview-dashboard .apk-bandwidth-value small { color: #c1bacb; font-size: 9px; }
#overview-dashboard .apk-bandwidth-value strong { color: #ffe1a6; }
#overview-dashboard .dashboard-playing-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 9px; }
#overview-dashboard .dashboard-playing-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #44313e;
  border-radius: 12px;
  background: linear-gradient(135deg, #251923, #19171f 72%);
}
#overview-dashboard .dashboard-playing-item-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#overview-dashboard .dashboard-media-kind,
#overview-dashboard .dashboard-playing-live { color: #e8cfde; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
#overview-dashboard .dashboard-media-kind { padding: 5px 7px; border-radius: 6px; background: #44283b; }
#overview-dashboard .dashboard-media-kind.is-movie { color: #b8e4f4; background: #1b3440; }
#overview-dashboard .dashboard-playing-live { color: #8eebbb; }
#overview-dashboard .dashboard-playing-title { display: block; margin-top: 10px; color: #fff; font-size: 14px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
#overview-dashboard .dashboard-playing-subtitle { display: block; margin-top: 4px; color: #c9c0ce; font-size: 10px; line-height: 1.45; text-align: center; }
#overview-dashboard .dashboard-playing-metrics { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-top: 12px; padding-top: 9px; border-top: 1px solid #3d303c; }
#overview-dashboard .dashboard-playing-metrics span { color: #cbc3d0; font-size: 9px; }
#overview-dashboard .dashboard-playing-metrics strong { color: var(--dash-cyan); font-size: 12px; font-variant-numeric: tabular-nums; }
#overview-dashboard .dashboard-playing-viewers { display: block; margin-top: 8px; color: #c1bacb; font-size: 9px; text-align: center; overflow-wrap: anywhere; }
#overview-dashboard .dashboard-empty { padding: 17px 12px; border: 1px dashed #514957; border-radius: 11px; color: #d0c8d5; font-size: 11px; line-height: 1.6; text-align: center; }

#overview-dashboard .system-disk-summary-card,
#overview-dashboard .library-disk-card {
  border-color: #3a3542;
  border-radius: 12px;
  background: #ffffff;
}
#overview-dashboard .library-disk-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 10px; }
#overview-dashboard .library-disk-card { min-width: 0; padding: 13px; }
#overview-dashboard .library-disk-heading { align-items: center; }
#overview-dashboard .library-disk-title { min-width: 0; text-align: center; }
#overview-dashboard .library-disk-title strong { color: #fff; }
#overview-dashboard .library-disk-title small { color: #c1bacb; overflow-wrap: anywhere; }
#overview-dashboard .library-disk-space,
#overview-dashboard .library-disk-capacity { color: #d0c8d5; text-align: center; }
#overview-dashboard .library-disk-metrics { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); text-align: center; }
#overview-dashboard .library-disk-metrics span,
#overview-dashboard .library-disk-metrics strong { color: #d2cbd7; }
#overview-dashboard .library-disk-metrics strong { color: var(--dash-cyan); }
#overview-dashboard .library-disk-activity { text-align: center; }
#overview-dashboard .library-disk-root { overflow-wrap: anywhere; }

#overview-dashboard .dashboard-popular-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  align-items: start;
}
#overview-dashboard .dashboard-popular-item { min-width: 0; overflow: hidden; border: 1px solid #393440; border-radius: 11px; background: #ffffff; }
#overview-dashboard .dashboard-popular-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #63334d, #28222f 70%);
}
#overview-dashboard .dashboard-poster-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #e2c8d6; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
#overview-dashboard .dashboard-popular-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#overview-dashboard .dashboard-play-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  padding: 6px 4px;
  border: 1px solid #ffffff28;
  border-radius: 7px;
  background: #100e16e8;
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  text-align: center;
}
#overview-dashboard .dashboard-popular-details { display: grid; gap: 5px; min-height: 58px; align-content: start; padding: 8px; text-align: center; }
#overview-dashboard .dashboard-popular-details strong { display: -webkit-box; overflow: hidden; color: #f5eff8; font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#overview-dashboard .dashboard-popular-details small { color: #c3bbcc; font-size: 8px; line-height: 1.35; }
#overview-dashboard .dashboard-recent-panel { margin: 0; }
#overview-dashboard .dashboard-recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 9px; }
#overview-dashboard .dashboard-recent-list .recent-movie { min-width: 0; border-color: #3b3542; background: #ffffff; }
#overview-dashboard .dashboard-recent-list .recent-movie-details { min-width: 0; text-align: center; }
#overview-dashboard .dashboard-recent-list .recent-movie-title { color: #fff; }
#overview-dashboard .dashboard-recent-list .recent-movie-meta,
#overview-dashboard .dashboard-recent-list .recent-movie-date,
#overview-dashboard .dashboard-recent-list .recent-movie-episode { color: #c7bfce; }

@media (min-width: 1900px) {
  #overview-dashboard > #stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #overview-dashboard .dashboard-popular-list { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
}
@media (max-width: 1250px) {
  #overview-dashboard > #stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #overview-dashboard .dashboard-performance-grid,
  #overview-dashboard .dashboard-live-grid,
  #overview-dashboard .dashboard-popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #app-view .workspace { padding: 18px 16px 24px; }
  #overview-dashboard > #stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #overview-dashboard .dashboard-performance-grid,
  #overview-dashboard .dashboard-live-grid,
  #overview-dashboard .dashboard-popular-grid { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 760px) {
  #app-view .nav-group-label { display: block; }
  #app-view .nav-group { min-width: 160px; padding: 8px 0 0; }
  #app-view .nav-group-label { font-size: 8px; }
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); gap: 15px; text-align: center; }
  #overview-dashboard .dashboard-cinema-copy .dashboard-title { text-align: center; }
  #overview-dashboard .dashboard-cinema-copy > p:last-child { margin-inline: auto; }
  #overview-dashboard .dashboard-hero-side { justify-items: center; min-width: 0; text-align: center; }
  #overview-dashboard .resource-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  #app-view .workspace { padding: 13px 10px 20px; }
  #overview-dashboard { gap: 11px; }
  #overview-dashboard .dashboard-cinema-hero { min-height: 0; padding: 18px 14px; }
  #overview-dashboard .dashboard-cinema-copy .dashboard-title { font-size: 25px; }
  #overview-dashboard > #stats { gap: 7px; }
  #overview-dashboard > #stats .stat-card { min-height: 118px; padding: 11px 8px; }
  #overview-dashboard > #stats .stat-label { font-size: 9px; }
  #overview-dashboard > #stats .stat-detail { font-size: 8px; }
  #overview-dashboard .panel { padding: 13px 11px; border-radius: 12px; }
  #overview-dashboard .resource-metrics { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .apk-bandwidth-head { display: none; }
  #overview-dashboard .apk-bandwidth-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #overview-dashboard .apk-bandwidth-device { grid-column: 1 / -1; }
  #overview-dashboard .apk-bandwidth-value { text-align: center; }
  #overview-dashboard .dashboard-playing-list { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .dashboard-popular-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #overview-dashboard .dashboard-recent-list { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .dashboard-recent-list .recent-movie { grid-template-columns: 58px minmax(0, 1fr); }
  #overview-dashboard .dashboard-recent-list .recent-movie-details { text-align: left; }
  #overview-dashboard .traffic-stats { gap: 14px; }
  #overview-dashboard .traffic-stats strong { font-size: 12px; }
  #overview-dashboard .resource-network strong { font-size: 12px; }
  #overview-dashboard .resource-chart,
  #overview-dashboard .bandwidth-chart { height: 110px; min-height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  #overview-dashboard *, #app-view .nav-item { scroll-behavior: auto; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* Centered TVSpainZone identity, live diagnosis, and expanded Dropbox reading metrics. */
#overview-dashboard .dashboard-cinema-hero {
  grid-template-columns: minmax(0, 1fr) 142px minmax(190px, .8fr);
  align-items: center;
  gap: 18px;
  min-height: 190px;
  padding: clamp(18px, 2vw, 30px);
}
#overview-dashboard .dashboard-cinema-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}
#overview-dashboard .dashboard-cinema-copy .eyebrow { margin-bottom: 7px; text-align: center; }
#overview-dashboard .dashboard-cinema-copy .dashboard-title {
  width: fit-content;
  max-width: 100%;
  color: transparent;
  background: linear-gradient(105deg, #fff5e8 0%, #efadca 28%, #fff5e8 48%, #ffd28d 70%, #fff5e8 100%);
  background-size: 220% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(27px, 3vw, 43px);
  letter-spacing: .015em;
  text-align: center;
  animation: dashboard-title-shimmer 6s linear infinite;
}
#overview-dashboard .dashboard-brand-subtitle {
  display: block;
  margin-top: 3px;
  color: #fff0de;
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 800;
  letter-spacing: .27em;
  text-align: center;
}
#overview-dashboard .dashboard-hero-description {
  max-width: 650px;
  margin: 8px 0 0;
  color: #d2cbd7;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
#overview-dashboard .cinema-reel-art {
  grid-column: 2;
  grid-row: 1;
  width: 140px;
  height: 140px;
  justify-self: center;
  margin: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #bd557a42 0%, #f1c08418 45%, transparent 72%);
  filter: drop-shadow(0 0 19px #d5638a44);
}
#overview-dashboard .cinema-reel-image {
  width: min(100%, 132px);
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 9px 20px #000c);
}
#overview-dashboard .dashboard-hero-side {
  grid-column: 3;
  grid-row: 1;
  justify-items: center;
  min-width: 0;
  padding: 14px;
  border-left: 1px solid #ffffff1a;
  text-align: center;
}
#overview-dashboard .dashboard-hero-side #dashboard-clock { color: #fff2e6; font-size: 13px; }
@keyframes dashboard-title-shimmer {
  to { background-position: 220% center; }
}

#overview-dashboard > #stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#overview-dashboard .dashboard-health-grid { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; margin: 0; }
#overview-dashboard .dashboard-health-panel { display: grid; gap: 12px; }
#overview-dashboard .dashboard-health-panel .panel-heading { margin-bottom: 0; }
#overview-dashboard .dashboard-health-status {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 13px 16px;
  border: 1px solid #41404b;
  border-radius: 12px;
  background: #181820;
  text-align: center;
}
#overview-dashboard .dashboard-health-status strong { color: #e9e4ef; font-size: 14px; }
#overview-dashboard .dashboard-health-status span { color: #c8c0d0; font-size: 10px; line-height: 1.5; }
#overview-dashboard .dashboard-health-status.is-healthy { border-color: #2e644a; background: #14251e; }
#overview-dashboard .dashboard-health-status.is-healthy strong { color: #a4f0c5; }
#overview-dashboard .dashboard-health-status.is-warning { border-color: #73592d; background: #2a2115; }
#overview-dashboard .dashboard-health-status.is-warning strong { color: #ffe09a; }
#overview-dashboard .dashboard-health-status.is-critical { border-color: #843948; background: #2c171d; }
#overview-dashboard .dashboard-health-status.is-critical strong { color: #ff9eaa; }
#overview-dashboard .dashboard-health-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#overview-dashboard .dashboard-health-metrics > div {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 64px;
  padding: 9px;
  border: 1px solid #383440;
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
}
#overview-dashboard .dashboard-health-metrics span { color: #c9c1d0; font-size: 9px; line-height: 1.4; }
#overview-dashboard .dashboard-health-metrics strong { color: #f8f2fa; font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#overview-dashboard .dashboard-apk-errors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; }
#overview-dashboard .dashboard-apk-error-row {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #654631;
  border-radius: 10px;
  background: #241b17;
}
#overview-dashboard .dashboard-apk-error-row strong { color: #ffe1bc; font-size: 11px; overflow-wrap: anywhere; }
#overview-dashboard .dashboard-apk-error-row span { color: #d2c5b8; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
#overview-dashboard .dashboard-apk-error-row small { color: #c5b1a1; font-size: 8px; }
#overview-dashboard .dashboard-apk-error-row .dashboard-apk-error-diagnostics { color: #f0c98e; line-height: 1.4; }
#overview-dashboard .apk-bandwidth-row.is-stalled { border-color: #805c33; background: #241e17; }
#overview-dashboard .apk-bandwidth-row.is-stalled .apk-bandwidth-value:first-of-type strong { color: #ffd28a; }

@media (min-width: 1900px) {
  #overview-dashboard > #stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) 110px minmax(145px, .75fr); gap: 10px; }
  #overview-dashboard .cinema-reel-art { width: 108px; height: 108px; }
  #overview-dashboard .cinema-reel-image { width: 102px; }
}
@media (max-width: 900px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) 100px; }
  #overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
  #overview-dashboard .cinema-reel-art { grid-column: 2; grid-row: 1; width: 94px; height: 94px; }
  #overview-dashboard .cinema-reel-image { width: 88px; }
  #overview-dashboard .dashboard-hero-side { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 0 0; border-top: 1px solid #ffffff1a; border-left: 0; }
  #overview-dashboard .dashboard-health-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  #overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
  #overview-dashboard .cinema-reel-art { grid-column: 1; grid-row: 2; width: 100px; height: 100px; }
  #overview-dashboard .cinema-reel-image { width: 94px; }
  #overview-dashboard .dashboard-hero-side { grid-column: 1; grid-row: 3; }
  #overview-dashboard .dashboard-hero-description { font-size: 10px; }
  #overview-dashboard .dashboard-health-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #overview-dashboard .dashboard-title,
  #overview-dashboard .cinema-reel-image { animation: none !important; }
}


#overview-dashboard .traffic-live-indicators {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
#overview-dashboard .traffic-live-indicator {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #373541;
  border-radius: 11px;
  background: linear-gradient(145deg, #1c1b24, #ffffff);
}
#overview-dashboard .traffic-live-indicator-title {
  color: #d9d1df;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
#overview-dashboard .traffic-live-indicator > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
#overview-dashboard .traffic-live-indicator > div span {
  color: #bdb6c6;
  font-size: 9px;
}
#overview-dashboard .traffic-live-indicator > div strong {
  color: #f6f0f8;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  #overview-dashboard .traffic-live-indicators { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .traffic-live-indicator { padding: 9px 10px; }
}


#app-view .topbar[hidden] { display: none; }
#app-view.app-layout {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 100vh;
}
#app-view .workspace {
  width: 100%;
  max-width: none;
  min-width: 0;
}
#app-view #overview-dashboard {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-inline: 0;
  box-sizing: border-box;
}
.dashboard-account-placement {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.dashboard-account-placement .topbar-account {
  width: min(100%, 360px);
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
}


#overview-dashboard .dashboard-cinema-hero {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 260px) minmax(190px, .8fr);
}
#overview-dashboard .cinema-reel-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  height: auto;
  min-width: 0;
  margin: 0;
  border-radius: 0;
  background: none;
  filter: none;
}
#overview-dashboard .cinema-reel-image {
  width: min(100%, 128px);
  max-height: 128px;
  padding: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #bd557a42 0%, #f1c08418 60%, transparent 78%);
  filter: drop-shadow(0 0 19px #d5638a44) drop-shadow(0 9px 20px #000c);
}
#overview-dashboard #dashboard-account-placement {
  width: min(100%, 260px);
  margin-inline: auto;
}
#overview-dashboard .dashboard-account-placement .topbar-account {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 7px 9px;
  gap: 7px;
}
@media (max-width: 1200px) {
  #overview-dashboard .dashboard-cinema-hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 240px) minmax(145px, .75fr);
  }
}
@media (max-width: 900px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) 225px; }
  #overview-dashboard .cinema-reel-art { grid-column: 2; grid-row: 1; }
  #overview-dashboard .dashboard-hero-side { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .cinema-reel-art { grid-column: 1; grid-row: 2; }
  #overview-dashboard .dashboard-hero-side { grid-column: 1; grid-row: 3; }
}
#app-view.app-layout {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}
#app-view .workspace {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  padding-inline: clamp(12px, 1.6vw, 30px);
}
#overview-dashboard {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}
#overview-dashboard > * { min-width: 0; }
#overview-dashboard .dashboard-cinema-hero {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px) minmax(170px, .72fr);
}
#overview-dashboard .dashboard-cinema-copy {
  min-width: 0;
  margin-inline: auto;
  text-align: center;
}
#overview-dashboard .dashboard-hero-description {
  max-width: 65ch;
  margin-inline: auto;
  text-wrap: balance;
}
#overview-dashboard .dashboard-hero-side { min-width: 0; }
#overview-dashboard .dashboard-hero-side #dashboard-clock {
  max-width: 100%;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
#overview-dashboard > #stats .stat-label {
  font-size: clamp(10px, .72vw, 13px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#overview-dashboard > #stats .stat-number {
  font-size: clamp(20px, 1.55vw, 30px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
#overview-dashboard > #stats .stat-detail {
  font-size: clamp(9px, .62vw, 11px);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#overview-dashboard .panel-heading { min-width: 0; }
#overview-dashboard .panel-heading > div { min-width: 0; }
#overview-dashboard .panel-heading h3 {
  font-size: clamp(14px, .9vw, 18px);
  line-height: 1.25;
  text-wrap: balance;
}
#overview-dashboard .panel-heading .eyebrow {
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .1em;
}
#overview-dashboard .traffic-current {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  margin: 10px 0 4px;
  padding: 15px clamp(10px, 1.4vw, 20px);
  border: 1px solid #3a4651;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 0, #68d8ef20, transparent 72%),
    linear-gradient(120deg, #ffffff, #1b242b 52%, #ffffff);
  background-size: 100% 100%, 220% 100%;
  animation: dashboard-traffic-glow 9s ease-in-out infinite alternate;
  text-align: center;
}
#overview-dashboard .traffic-current-label {
  color: #c8c0d0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1.35;
  text-wrap: balance;
}
#overview-dashboard .traffic-current strong {
  color: var(--dash-cyan);
  font-size: clamp(27px, 2.4vw, 40px);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px #68d8ef35;
  overflow-wrap: anywhere;
}
#overview-dashboard .traffic-current span:not(.traffic-current-label) {
  color: #c1bacb;
  font-size: 11px;
  line-height: 1.4;
}
#overview-dashboard .traffic-live-indicator-title {
  font-size: 10px;
  letter-spacing: .08em;
  line-height: 1.4;
  text-wrap: balance;
}
#overview-dashboard .traffic-live-indicator > div span {
  font-size: 10px;
  line-height: 1.35;
}
#overview-dashboard .traffic-live-indicator > div strong {
  font-size: 13px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#overview-dashboard .traffic-chart-heading {
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 5px;
  font-size: 11px;
  line-height: 1.4;
}
#overview-dashboard .traffic-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
#overview-dashboard .traffic-stats > div {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 62px;
  padding: 10px;
  border: 1px solid #34313e;
  border-radius: 10px;
  background: #ffffff;
}
#overview-dashboard .traffic-stats span {
  font-size: 10px;
  line-height: 1.35;
  text-wrap: balance;
}
#overview-dashboard .traffic-stats strong {
  font-size: 15px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#overview-dashboard .dashboard-health-metrics span {
  font-size: 10px;
  line-height: 1.4;
  text-wrap: balance;
}
#overview-dashboard .dashboard-health-metrics strong {
  font-size: 13px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
#overview-dashboard .apk-bandwidth-head { font-size: 9px; }
#overview-dashboard .apk-bandwidth-device strong { font-size: 12px; }
#overview-dashboard .apk-bandwidth-device small,
#overview-dashboard .apk-bandwidth-value small { font-size: 10px; line-height: 1.4; }
#overview-dashboard .apk-bandwidth-value strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
@keyframes dashboard-traffic-glow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 100% 0; }
}
@media (max-width: 1200px) {
  #overview-dashboard .dashboard-cinema-hero {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 220px) minmax(145px, .7fr);
  }
}
@media (max-width: 900px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) minmax(145px, 205px); }
  #overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
  #overview-dashboard .cinema-reel-art { grid-column: 2; grid-row: 1; }
  #overview-dashboard .dashboard-hero-side {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-items: center;
    text-align: center;
  }
}
@media (max-width: 760px) {
  #app-view.app-layout { grid-template-columns: minmax(0, 1fr); }
  #app-view .workspace { padding-inline: clamp(10px, 3vw, 18px); }
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) minmax(120px, 180px); }
}
@media (max-width: 560px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
  #overview-dashboard .cinema-reel-art { grid-column: 1; grid-row: 2; }
  #overview-dashboard .dashboard-hero-side { grid-column: 1; grid-row: 3; }
  #overview-dashboard .traffic-live-indicators { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  #overview-dashboard .traffic-current { animation: none; }
}
#overview-dashboard .dashboard-cinema-hero {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px) minmax(0, .75fr);
  overflow: hidden;
}
#overview-dashboard .dashboard-cinema-hero > * {
  min-width: 0;
  max-width: 100%;
}
#overview-dashboard .cinema-reel-art {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  width: min(100%, 230px);
  max-width: 100%;
  height: auto;
  min-width: 0;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #ffffff1a;
  border-radius: 18px;
  background: linear-gradient(155deg, #261923, #17151e);
  filter: none;
  overflow: hidden;
}
#overview-dashboard .cinema-reel-image {
  display: block;
  width: min(100%, 132px);
  max-width: 100%;
  height: auto;
  max-height: 132px;
  aspect-ratio: 1;
  object-fit: contain;
}
#overview-dashboard #dashboard-account-placement {
  width: min(100%, 240px);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}
#overview-dashboard .dashboard-account-placement .topbar-account {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-content: center;
  white-space: normal;
}
#overview-dashboard .dashboard-account-placement .topbar-account-info {
  min-width: 0;
  max-width: 100%;
}
#overview-dashboard .dashboard-account-placement .topbar-account-info strong,
#overview-dashboard .dashboard-account-placement .topbar-account-info small {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
#overview-dashboard .dashboard-performance-grid {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: stretch;
}
#overview-dashboard .traffic-panel { min-width: 0; }
@media (max-width: 1200px) {
  #overview-dashboard .dashboard-cinema-hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 210px) minmax(0, .7fr);
  }
  #overview-dashboard .cinema-reel-art { width: min(100%, 210px); }
}
@media (max-width: 1100px) {
  #overview-dashboard .dashboard-performance-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 200px); }
  #overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
  #overview-dashboard .cinema-reel-art { grid-column: 2; grid-row: 1; width: min(100%, 200px); }
  #overview-dashboard .dashboard-hero-side { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .cinema-reel-art { grid-column: 1; grid-row: 2; width: min(100%, 230px); }
  #overview-dashboard .dashboard-hero-side { grid-column: 1; grid-row: 3; }
}
#overview-dashboard .dashboard-cinema-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 190px) minmax(0, .8fr);
  overflow: hidden;
}
#overview-dashboard .dashboard-cinema-hero > * {
  min-width: 0;
  max-width: 100%;
}
#overview-dashboard .cinema-reel-art {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  width: min(100%, 180px);
  max-width: 100%;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  filter: none;
  overflow: visible;
}
#overview-dashboard .cinema-reel-image {
  display: block;
  width: min(100%, 132px);
  max-width: 100%;
  height: auto;
  max-height: 132px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  background: radial-gradient(circle, #bd557a42 0%, #f1c08418 60%, transparent 78%);
  filter: drop-shadow(0 0 19px #d5638a44) drop-shadow(0 9px 20px #000c);
}
#overview-dashboard #dashboard-account-placement {
  display: flex;
  justify-content: center;
  width: min(100%, 168px);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}
#overview-dashboard .dashboard-account-placement .topbar-account {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 5px 7px;
  box-sizing: border-box;
  gap: 6px;
  justify-content: center;
  white-space: normal;
}
#overview-dashboard .dashboard-account-placement .topbar-account-info {
  min-width: 0;
  max-width: 100%;
}
#overview-dashboard .dashboard-account-placement .topbar-account-info strong,
#overview-dashboard .dashboard-account-placement .topbar-account-info small {
  max-width: 100%;
  font-size: 9px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
#overview-dashboard .dashboard-performance-grid {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
}
#overview-dashboard .traffic-live-indicators {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
#overview-dashboard .traffic-live-indicator {
  align-content: center;
  justify-items: center;
  min-height: 90px;
  padding: 12px;
  text-align: center;
}
#overview-dashboard .traffic-live-indicator-title {
  color: #c9c1d0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1.35;
  text-wrap: balance;
}
#overview-dashboard .traffic-live-indicator > strong {
  color: #f6f0f8;
  font-size: clamp(16px, 1.2vw, 22px);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#overview-dashboard .traffic-live-indicator > small {
  color: #bdb6c6;
  font-size: 9px;
  line-height: 1.35;
  text-wrap: balance;
}
@media (max-width: 1200px) {
  #overview-dashboard .dashboard-cinema-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 180px) minmax(0, .7fr);
  }
  #overview-dashboard .cinema-reel-art { width: min(100%, 170px); }
}
@media (max-width: 900px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 170px); }
  #overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
  #overview-dashboard .cinema-reel-art { grid-column: 2; grid-row: 1; }
  #overview-dashboard .dashboard-hero-side { grid-column: 1 / -1; grid-row: 2; }
  #overview-dashboard .dashboard-performance-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .cinema-reel-art { grid-column: 1; grid-row: 2; width: min(100%, 180px); }
  #overview-dashboard .dashboard-hero-side { grid-column: 1; grid-row: 3; }
  #overview-dashboard .traffic-live-indicators { grid-template-columns: minmax(0, 1fr); }
}
#overview-dashboard .dashboard-cinema-hero {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 250px);
  grid-template-rows: auto;
}
#overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
#overview-dashboard .dashboard-hero-side {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  max-width: 100%;
  min-width: 0;
  text-align: right;
}
@media (max-width: 1200px) {
  #overview-dashboard .dashboard-cinema-hero {
    grid-template-columns: minmax(0, 1fr) minmax(145px, 220px);
  }
}
@media (max-width: 900px) {
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .dashboard-cinema-copy { grid-column: 1; grid-row: 1; }
  #overview-dashboard .dashboard-hero-side {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    justify-items: center;
    width: min(100%, 340px);
    text-align: center;
  }
}

.session-restore-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 42%, #281824, #0b0a0f 72%);
}
.session-restore-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(380px, 100%);
  padding: 28px;
  border: 1px solid #49364a;
  border-radius: 16px;
  background: linear-gradient(145deg, #211923, #14121a);
  color: #f5edf5;
  text-align: center;
  box-shadow: 0 18px 55px #0009;
}
.session-restore-card > span:last-child {
  color: #c3aebe;
  font-size: 13px;
  line-height: 1.5;
}
.session-restore-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #ffffff2e;
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: session-restore-spin .8s linear infinite;
}
@keyframes session-restore-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .session-restore-spinner { animation: none; }
}

#app-view .connected-clients-panel { overflow: hidden; }
#app-view .connected-clients-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 21px;
  border-bottom: 1px solid var(--dash-line);
}
#app-view .connected-clients-heading .eyebrow { margin-bottom: 5px; color: var(--dash-cyan); }
#app-view .connected-clients-heading h3 { font-size: 16px; }
#app-view .connected-clients-hint {
  color: var(--dash-muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}
#app-view .connected-session-list { display: grid; gap: 15px; padding: 18px; }
#app-view .connected-session-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid #383440;
  border-radius: 14px;
  background: linear-gradient(140deg, #1a1821, #15141b);
  box-shadow: inset 0 1px #ffffff08;
}
#app-view .connected-session-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ffffff12;
}
#app-view .connected-session-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
#app-view .connected-session-account {
  min-width: 0;
  color: var(--dash-text);
  font-size: 15px;
  font-weight: 760;
  overflow-wrap: anywhere;
}
#app-view .connected-session-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}
#app-view .connected-session-status.is-playing { border-color: #315746; background: #152a22; color: #9bf0c4; }
#app-view .connected-session-status.is-online { border-color: #41404c; background: #24232d; color: #d1cbd8; }
#app-view .connected-session-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding-top: 15px;
}
#app-view .connected-session-field {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
  padding: 12px 13px;
  border: 1px solid #ffffff10;
  border-radius: 10px;
  background: #0d0c12a8;
}
#app-view .connected-session-label {
  color: #a79eaf;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .1em;
  text-transform: uppercase;
}
#app-view .connected-session-value {
  min-width: 0;
  color: #f3eef5;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}
#app-view .connected-session-detail {
  color: #b7aebd;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  #app-view .connected-session-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  #app-view .connected-clients-heading { align-items: flex-start; flex-direction: column; padding: 16px; }
  #app-view .connected-clients-hint { text-align: left; }
  #app-view .connected-session-list { gap: 11px; padding: 11px; }
  #app-view .connected-session-card { padding: 14px; }
  #app-view .connected-session-heading { align-items: flex-start; }
  #app-view .connected-session-fields { grid-template-columns: minmax(0, 1fr); gap: 9px; }
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.1); }
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Center catalog posters in overview zone */
#overview-dashboard .dashboard-recent-list {
  justify-items: center;
}
#overview-dashboard .dashboard-recent-list .recent-movie {
  width: 100%;
  max-width: 260px;
}
#overview-dashboard .dashboard-recent-list .recent-movie-poster {
  display: flex;
  align-items: center;
  justify-content: center;
}
#overview-dashboard .dashboard-recent-list .recent-movie-poster img {
  object-fit: contain;
}

@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.sim-lines-refresh-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.sim-lines-refresh-status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #795066;
  border-radius: 9px;
  background: linear-gradient(135deg, #392433, #241c29);
  color: #f4d6e3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px #ff6b9d12;
}

.sim-lines-refresh-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--dash-pink);
  box-shadow: 0 0 9px #ff6b9d88;
}

.sim-lines-refresh-status.is-error {
  border-color: #8b4e59;
  background: linear-gradient(135deg, #3c2529, #241c29);
  color: #ffd2d2;
}

.sim-lines-refresh-status.is-error::before {
  background: #f17b83;
  box-shadow: 0 0 9px #f17b8388;
}

.sim-lines-stats .stat-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-color: #684456;
  border-top: 2px solid #a8587a;
  background: linear-gradient(145deg, #2a2029, #19181c);
  box-shadow: 0 10px 24px #00000020;
  text-align: center;
}

.sim-lines-stats .stat-icon.neutral {
  float: none;
  margin: 0 auto 10px;
  border: 1px solid #795066;
  background: #392433;
  color: var(--dash-pink);
}

.sim-lines-stats .stat-label { color: #c6c1ca; }
.sim-lines-stats .stat-number { color: #f5f2f7; }
.sim-lines-stats .stat-detail { color: #aaa5af; line-height: 1.45; }

#app-view .workspace > .topbar,
#app-view .workspace > #notice,
#app-view .workspace > [data-section] {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
}

#app-view .workspace > #overview-dashboard {
  max-width: 1680px;
}

#app-view .section-intro {
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

#app-view .section-intro > div:first-child {
  flex: 1 1 420px;
  text-align: center;
}

#app-view .section-intro > div:first-child > .muted {
  max-width: 960px;
  margin-inline: auto;
  line-height: 1.55;
}

#app-view .section-intro .button {
  min-width: 144px;
}

#app-view .actions,
#app-view .credit-actions,
#app-view .form-actions,
#app-view .dialog-actions,
#app-view .account-panel-actions,
#app-view .announcement-form-actions,
#app-view .announcement-item-actions,
#app-view .emule-job-actions,
#app-view .sim-lines-actions,
#app-view .sim-lines-import-actions,
#app-view .sim-source-actions,
#app-view .sim-catalog-selection-actions,
#app-view .sim-catalog-card-actions,
#app-view .m3u-selection-actions,
#app-view .m3u-selection-submit,
#app-view .downloads-actions,
#app-view .library-filters,
#app-view .library-delete-actions,
#app-view .dropbox-token-actions,
#app-view .dropbox-connection-actions,
#app-view .m3u-actions,
#app-view .m3u-loaded-playlist-actions,
#app-view .tv-control-actions,
#app-view .dashboard-quick-actions,
#app-view .pagination,
#app-view .platform-pagination,
#app-view .downloads-pagination,
#app-view .downloads-pagination > div,
#app-view .sim-lines-refresh-tools {
  justify-content: center;
}

#app-view .m3u-active-actions {
  justify-items: center;
}

#app-view .sim-source-create-form > .button {
  justify-self: center;
  min-width: 180px;
}

@media (max-width: 760px) {
  [data-section="simultaneous-lines"] .section-intro {
    align-items: center;
    flex-direction: column;
  }

  #app-view .sim-lines-refresh-tools {
    width: 100%;
    justify-content: center;
  }

  .sim-lines-refresh-status {
    white-space: normal;
  }

  #app-view .section-intro > div:first-child {
    flex-basis: 100%;
  }
}


/* Videoclub release redesign */
:root {
  --bg: #090c12;
  --sidebar: #0c111a;
  --surface: #121926;
  --surface-raised: #182131;
  --surface-input: #0d1420;
  --border: #263246;
  --border-soft: #1d2736;
  --text: #f3f6fb;
  --muted: #9aa8bb;
  --quiet: #6f8097;
  --green: #55d9a5;
  --blue: #70a7ff;
  --violet: #ad97ff;
  --amber: #f7c66e;
  --pink: #f28fb3;
  --cyan: #62d7e5;
  --red: #f27b86;
  --radius: 16px;
  --control-radius: 10px;
}

body {
  background:
    radial-gradient(circle at 85% -15%, #315c9e22, transparent 31rem),
    radial-gradient(circle at 4% 42%, #62367318, transparent 30rem),
    var(--bg);
}

#app-view.app-layout {
  grid-template-columns: 262px minmax(0, 1fr);
  min-height: 100dvh;
}

#app-view .sidebar {
  z-index: 20;
  gap: 0;
  padding: 22px 14px 14px;
  border-right-color: #26344a;
  background: linear-gradient(180deg, #0d1420 0%, #090e16 100%);
  box-shadow: 14px 0 42px #0000001a;
}

#app-view .brand {
  min-height: 56px;
  margin: 0 5px 25px;
  padding: 9px;
  border: 1px solid #2a3c55;
  border-radius: 14px;
  background: linear-gradient(135deg, #152944, #101927 72%);
}

#app-view .brand-wordmark { font-size: 13px; letter-spacing: .11em; }
#app-view .brand-subtitle { color: #87a7ce; }
#app-view .side-nav { gap: 12px; overflow-y: auto; padding: 0 2px 12px; scrollbar-width: thin; }
#app-view .nav-group { gap: 3px; padding-top: 13px; border-top-color: #1f2c3c; }
#app-view .nav-group-label { padding: 0 10px 6px; color: #7f92ab; font-size: 9px; }
#app-view .nav-item {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: #a7b5c5;
  font-weight: 630;
}
#app-view .nav-item:hover { border-color: #2a3e57; background: #152131; color: #eff5ff; }
#app-view .nav-item.active {
  border-color: #3a5e8a;
  background: linear-gradient(100deg, #24466e, #182d46);
  box-shadow: inset 3px 0 #72b4ff, 0 7px 18px #00000026;
}
#app-view .nav-icon { color: #88a6cc; }
#app-view .nav-count { border: 1px solid #2d6555; background: #12362f; }

#app-view .workspace {
  min-height: 100dvh;
  padding: clamp(18px, 2.2vw, 36px) clamp(18px, 3vw, 58px) 36px;
  background: linear-gradient(180deg, #0c111a99, transparent 24rem);
}

#app-view .topbar {
  min-height: 61px;
  margin-bottom: 20px;
  padding: 0 0 18px;
  border-bottom-color: #243044;
}
#app-view .topbar-actions { gap: 10px; }
#app-view .topbar-account {
  min-height: 42px;
  padding: 6px 11px;
  border: 1px solid #2b3c52;
  border-radius: 12px;
  background: #ffffff;
}

#app-view .page-section { max-width: 1800px; margin: 0 auto; }
#app-view .section-intro {
  min-height: 58px;
  margin: 0 0 14px;
  padding: 12px 15px;
  border: 1px solid #263449;
  border-radius: 13px;
  background: #101824b8;
}

#overview-dashboard .dashboard-cinema-hero {
  min-height: 178px;
  border-color: #385676;
  border-radius: 20px;
  background:
    radial-gradient(circle at 87% 2%, #4386d14d, transparent 27rem),
    linear-gradient(112deg, #142945 0%, #141d2e 54%, #111722 100%);
  box-shadow: 0 20px 46px #00000040, inset 0 1px #ffffff12;
}
#overview-dashboard .dashboard-cinema-copy .eyebrow { color: #8abfff; }
#overview-dashboard .dashboard-cinema-copy .dashboard-title {
  font-size: clamp(28px, 3vw, 48px);
  letter-spacing: -.05em;
}
#overview-dashboard .dashboard-brand-subtitle { color: #8aadd6; letter-spacing: .16em; }
#overview-dashboard .dashboard-hero-side {
  min-width: 230px;
  border-color: #4a739d;
  background: linear-gradient(145deg, #122941, #101a28);
}
#overview-dashboard .dashboard-live-badge { border-color: #3b8c70; background: #133229; color: #a9efd1; }
#overview-dashboard > #stats { gap: 14px; }
#overview-dashboard > #stats .stat-card {
  min-height: 144px;
  align-content: start;
  justify-items: start;
  padding: 19px;
  border-color: #2b3a50;
  border-radius: 15px;
  background: linear-gradient(145deg, #172436, #111a27);
  text-align: left;
}
#overview-dashboard > #stats .stat-card::after {
  height: 3px;
  background: linear-gradient(90deg, #4f9cf5, #66dac1, transparent);
}
#overview-dashboard > #stats .stat-label,
#overview-dashboard > #stats .stat-detail { text-align: left; }
#overview-dashboard > #stats .stat-label { color: #000; }
#overview-dashboard > #stats .stat-number {
  font-size: clamp(25px, 2.15vw, 35px);
}
#overview-dashboard #overview-hero {
  border-color: #375675 !important;
  border-radius: 17px !important;
  background: linear-gradient(130deg, #152a45, #111b29) !important;
  box-shadow: 0 15px 34px #00000032, inset 0 1px #ffffff0d !important;
}
#overview-dashboard #overview-hero [style*="background:linear-gradient"] {
  border-color: #30455f !important;
  background: #122033 !important;
}
#overview-dashboard #overview-hero [style*="font-size:30px"] { color: #8cc4ff !important; }
#overview-dashboard .dashboard-live-sessions { margin: 0; }
#overview-dashboard .panel,
#app-view .panel,
#app-view .stat-card {
  border-color: #29394e;
  background: linear-gradient(145deg, #152131, #101722);
  box-shadow: 0 13px 30px #00000021, inset 0 1px #ffffff08;
}
#overview-dashboard .panel { border-radius: 16px; }
#overview-dashboard .panel-heading { justify-content: space-between; text-align: left; }
#overview-dashboard .panel-heading > div { justify-content: flex-start; text-align: left; }
#overview-dashboard .resource-metric,
#overview-dashboard .resource-network,
#overview-dashboard .traffic-live-indicator,
#overview-dashboard .dashboard-playing-item {
  border-color: #2c3c51;
  background: #ffffff;
}

#app-view .flush-panel { border-radius: 15px; }
#app-view .panel-inset { padding: 17px 19px; border-bottom-color: #26354a; }
#app-view table { min-width: 760px; }
#app-view th {
  padding: 13px 16px;
  background: #0f1723;
  color: #8196b1;
  font-size: 9px;
}
#app-view td { padding: 14px 16px; border-top-color: #243247; color: #c1ccda; }
#app-view tbody tr:hover { background: #18253680; }
#app-view .table-scroll { border-radius: inherit; }
#app-view .empty-state {
  margin: 0;
  padding: 35px 20px;
  color: #99a9bc;
  text-align: center;
}

#app-view input:not([type="checkbox"]):not([type="radio"]),
#app-view select,
#app-view textarea {
  border-color: #2b3c52;
  background: #0c141f;
  color: #eff5fb;
}
#app-view input:focus,
#app-view select:focus,
#app-view textarea:focus { border-color: #68aaff; box-shadow: 0 0 0 3px #68aaff22; }
#app-view .button { border-radius: 10px; font-weight: 700; }
#app-view .button.primary {
  border-color: #4d83d0;
  background: linear-gradient(135deg, #4d86dc, #3564ba);
  box-shadow: 0 7px 17px #366dc537;
}
#app-view .button.secondary { border-color: #344961; background: #172435; }
#app-view .button.danger { border-color: #864a58; background: #3a202a; }
#app-view .mini-button { border-color: #31455d; background: #152233; }

.permissions-dialog,
.editor-dialog,
.confirmation-dialog {
  width: min(590px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid #3c5370;
  border-radius: 18px;
  background: linear-gradient(150deg, #172437, #101824);
  color: var(--text);
  box-shadow: 0 28px 90px #000000a8;
}
.permissions-dialog::backdrop,
.editor-dialog::backdrop,
.confirmation-dialog::backdrop { background: #03070cbf; backdrop-filter: blur(5px); }
.permissions-dialog form,
.editor-dialog form,
.confirmation-dialog form { display: grid; gap: 17px; padding: clamp(20px, 3vw, 30px); }
.dialog-actions { gap: 10px; margin-top: 4px; }
.dialog-actions .button { min-width: 132px; }

.confirmation-dialog form { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.confirmation-dialog-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #9a5d50;
  border-radius: 13px;
  background: #45272a;
  color: #ffc2b5;
  font-size: 21px;
  font-weight: 800;
}
.confirmation-dialog-copy { min-width: 0; }
.confirmation-dialog-copy .eyebrow { margin-bottom: 5px; color: #d7a8a2; }
.confirmation-dialog-copy h2 { margin: 0 0 8px; font-size: 20px; }
.confirmation-dialog-copy p:last-child { margin: 0; white-space: pre-line; line-height: 1.55; }
.confirmation-dialog-input,
.confirmation-dialog .dialog-actions { grid-column: 1 / -1; }
.confirmation-dialog-input { gap: 7px; }

@media (max-width: 1200px) {
  #app-view.app-layout { grid-template-columns: 226px minmax(0, 1fr); }
  #app-view .workspace { padding-inline: 22px; }
  #overview-dashboard > #stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  #app-view.app-layout { display: block; }
  #app-view .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid #26344a;
  }
  #app-view .brand { width: fit-content; min-height: 44px; margin: 0 0 11px; }
  #app-view .side-nav { display: flex; gap: 7px; overflow-x: auto; overflow-y: hidden; padding-bottom: 3px; }
  #app-view .nav-group { display: contents; }
  #app-view .nav-group-label, #app-view .sidebar-bottom { display: none; }
  #app-view .nav-item { width: max-content; min-height: 38px; flex: 0 0 auto; }
  #app-view .workspace { min-height: calc(100dvh - 120px); padding: 18px; }
}

@media (max-width: 680px) {
  #app-view .workspace { padding: 15px 12px 24px; }
  #app-view .topbar { align-items: flex-start; flex-direction: column; gap: 11px; }
  #app-view .topbar-actions { width: 100%; justify-content: space-between; }
  #app-view .topbar-account { flex: 1; justify-content: center; }
  #app-view .sidebar.mobile-nav-open .side-nav { grid-template-columns: 1fr; }
  #app-view .sidebar.mobile-nav-open .nav-item { min-height: 42px; }
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: 1fr; min-height: 0; padding: 21px; }
  #overview-dashboard .dashboard-hero-side { width: 100%; min-width: 0; justify-items: center; text-align: center; }
  #overview-dashboard .dashboard-performance-grid,
  #overview-dashboard .dashboard-live-grid,
  #overview-dashboard .dashboard-popular-grid { grid-template-columns: 1fr; }
  #overview-dashboard > #stats { grid-template-columns: 1fr; }
  #app-view .section-intro { align-items: flex-start; flex-direction: column; }
  #app-view .section-badge { white-space: normal; }
  #app-view .panel-heading { align-items: flex-start; flex-direction: column; }
  #app-view .panel-heading > div { align-items: flex-start; }
  #app-view .library-filters, #app-view .actions, #app-view .downloads-actions { width: 100%; }
  #app-view .library-filters > *, #app-view .actions > *, #app-view .downloads-actions > * { flex: 1 1 130px; }
  .confirmation-dialog form { grid-template-columns: 1fr; }
  .confirmation-dialog-icon { display: none; }
  .confirmation-dialog-input, .confirmation-dialog .dialog-actions { grid-column: auto; }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dialog-actions .button { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Full Videoclub interface redesign */
:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --sidebar: #111827;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --surface-input: #ffffff;
  --border: #dce3ec;
  --border-soft: #e8edf3;
  --text: #172235;
  --muted: #627186;
  --quiet: #8390a2;
  --green: #16835d;
  --blue: #356bd6;
  --violet: #7354c9;
  --amber: #a9680c;
  --pink: #ba4772;
  --cyan: #168397;
  --red: #bd3948;
  --radius: 14px;
  --control-height: 42px;
  --control-radius: 9px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

html { min-width: 320px; background: var(--bg); }
body {
  min-width: 320px;
  min-height: 100dvh;
  background: #f3f5f8;
  color: #172235;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-screen {
  min-height: 100dvh;
  padding: clamp(18px, 4vw, 48px);
  background:
    radial-gradient(ellipse at 82% 15%, #527bd62a, transparent 30rem),
    radial-gradient(ellipse at 5% 90%, #b7507820, transparent 28rem),
    #111827;
}
.login-screen::before { opacity: .35; background-size: 64px 64px; }
.login-card {
  width: min(460px, 100%);
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid #ffffff20;
  border-radius: 20px;
  background: linear-gradient(155deg, #1d293a, #131c2a);
  box-shadow: 0 32px 90px #05091280, inset 0 1px #ffffff12;
}
.login-card::before { background: linear-gradient(90deg, transparent, #8cb8ff, transparent); }
.login-brand-label { color: #f4f7fc; }
.login-brand-label small { color: #a7bddb; }
.login-eyebrow { color: #adbed4; }
.login-eyebrow span, .login-lock { color: #79b4ff; }
.login-card h1 { color: #fff; font-size: 30px; }
.login-card > .muted { color: #becadd; }
.login-card label { color: #e0e7f0; }
.login-card input { border-color: #44546a; background: #101928; color: white; }
.login-card input:focus { border-color: #85b7ff; box-shadow: 0 0 0 3px #85b7ff25; }
.login-card .login-submit {
  border-color: #80aeff;
  background: linear-gradient(125deg, #4778df, #6855c8);
  box-shadow: 0 9px 24px #466fd044;
}
.login-footnote { color: #a9b5c5; }

#app-view.app-layout {
  min-height: 100dvh;
  grid-template-columns: 258px minmax(0, 1fr);
  background: var(--bg);
}
#app-view .sidebar {
  position: sticky;
  top: 0;
  width: 258px;
  height: 100dvh;
  overflow: hidden;
  padding: 18px 13px 13px;
  border: 0;
  border-right: 1px solid #263142;
  background: #111827;
  box-shadow: 8px 0 26px #1421360c;
}
#app-view .brand {
  min-height: 62px;
  flex: 0 0 auto;
  margin: 0 3px 18px;
  padding: 10px;
  border: 1px solid #334056;
  border-radius: 12px;
  background: #192437;
  box-shadow: none;
}
#app-view .brand .brand-mark {
  border-color: #536e9a;
  background: #223b61;
  color: #a9d2ff;
  box-shadow: none;
}
#app-view .brand-wordmark { color: #f6f8fc; font-size: 12px; letter-spacing: .12em; text-shadow: none; }
#app-view .brand-subtitle { color: #a3b2c8; }
#app-view .side-nav {
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 2px 12px;
  scrollbar-color: #43516a transparent;
  scrollbar-width: thin;
}
#app-view .nav-group {
  display: grid;
  gap: 3px;
  padding-top: 11px;
  border-top: 1px solid #2a3445;
}
#app-view .nav-group:first-child { padding-top: 0; border-top: 0; }
#app-view .nav-group-label {
  padding: 1px 9px 5px;
  color: #97a6bc;
  font-size: 9px;
  letter-spacing: .12em;
}
#app-view .nav-item {
  width: 100%;
  min-height: 39px;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #c1ccda;
  font-size: 11px;
  font-weight: 590;
  white-space: normal;
}
#app-view .nav-item:hover { border-color: #36445a; background: #1b2739; color: white; }
#app-view .nav-item.active {
  border-color: #405a7c;
  background: #243b5a;
  color: #fff;
  box-shadow: inset 3px 0 #83b5ff;
}
#app-view .nav-icon { flex: 0 0 18px; color: #9db8db; font-size: 15px; }
#app-view .nav-item.active .nav-icon { color: #a9ceff; }
#app-view .nav-count { border-radius: 6px; background: #164a3e; color: #a5f0d2; }
#app-view .sidebar-bottom { flex: 0 0 auto; margin-top: 8px; }
#app-view .profile { margin: 0; padding: 10px 0 0; border-top-color: #303b4e; }
#app-view .sidebar-logout {
  width: 100%;
  min-height: 39px;
  justify-content: flex-start;
  padding-inline: 10px;
  border-color: #39465b;
  border-radius: 8px;
  background: #192437;
  color: #d5deeb;
  font-size: 11px;
}
#app-view .sidebar-logout:hover { border-color: #7185a3; background: #22314a; color: white; }

#app-view .workspace {
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  padding: clamp(18px, 2.2vw, 34px) clamp(18px, 2.3vw, 38px) 36px;
  overflow-x: clip;
  background: #f3f5f8;
}
#app-view .page-section { width: 100%; max-width: none; margin: 0; }
#app-view .topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 0 0 15px;
  border-bottom: 1px solid #dfe5ec;
  background: transparent;
}
#app-view .topbar > div:first-child { min-width: 0; }
#app-view .topbar h1 {
  margin: 0;
  color: #172235;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 750;
  letter-spacing: -.04em;
}
#app-view .topbar-actions { flex: 0 0 auto; gap: 10px; }
#app-view .topbar-account {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px;
  border: 1px solid #dce3ec;
  border-radius: 10px;
  background: #fff;
  color: #243247;
}
#app-view .topbar-account-role { color: #46638c; }
#app-view .topbar-account-info small { color: #76859a; }
#app-view #dashboard-fullscreen-toggle { border-color: #d9e1eb; background: #fff; color: #33435a; }
#app-view .notice { min-height: 0; margin: 0 0 12px; color: #147253; font-weight: 600; }
#app-view .notice.bad { color: #b83242; }

#overview-dashboard {
  width: 100%;
  gap: 16px;
  margin: 0;
}
#overview-dashboard .dashboard-cinema-hero {
  min-height: 168px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  padding: clamp(23px, 3vw, 40px);
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 84% 3%, #648bd64c, transparent 27rem),
    linear-gradient(116deg, #142239 0%, #1b2b45 60%, #263952 100%);
  box-shadow: 0 15px 32px #1a2a3d20;
}
#overview-dashboard .dashboard-cinema-copy .eyebrow { color: #a7c4e9; letter-spacing: .15em; }
#overview-dashboard .dashboard-cinema-copy .dashboard-title {
  color: #fff;
  font-size: clamp(28px, 3.2vw, 45px);
  letter-spacing: -.05em;
}
#overview-dashboard .dashboard-brand-subtitle { color: #adc5e2; letter-spacing: .17em; }
#overview-dashboard .dashboard-hero-description { color: #d0daea !important; }
#overview-dashboard .dashboard-hero-side {
  min-width: 228px;
  padding: 15px 18px;
  border-color: #ffffff32;
  border-radius: 13px;
  background: #101c2db3;
  box-shadow: inset 0 1px #ffffff0c;
}
#overview-dashboard .dashboard-live-badge {
  border-color: #4a9179;
  background: #173c34;
  color: #b4f1d7;
}
#overview-dashboard .dashboard-clock-date { color: #c5d2e3; }
#overview-dashboard .dashboard-clock-time { color: #fff; text-shadow: none; }
#overview-dashboard > #stats,
#overview-dashboard .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
#overview-dashboard > #stats .stat-card {
  min-height: 112px;
  justify-items: start;
  align-content: center;
  padding: 17px 18px;
  border: 1px solid #dfe5ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 9px #13213a09;
  text-align: left;
}
#overview-dashboard > #stats .stat-card::after {
  right: auto;
  width: 42px;
  height: 3px;
  background: #4c78c8;
}
#overview-dashboard > #stats .stat-label { min-height: 0; color: #627186; text-align: left; }
#overview-dashboard > #stats .stat-number { margin-top: 7px; color: #182841; font-size: 29px; text-align: left; }
#overview-dashboard > #stats .stat-detail { color: #8290a1; text-align: left; }
#overview-dashboard #overview-hero {
  margin: 0 !important;
  padding: 13px !important;
  border: 1px solid #dfe5ec !important;
  border-radius: 13px !important;
  background: #e8eef6 !important;
  box-shadow: none !important;
}
#overview-dashboard #overview-hero > div[style*="position:absolute"] { display: none; }
#overview-dashboard #overview-hero > div[style*="grid-template-columns"] { gap: 8px !important; }
#overview-dashboard #overview-hero > div[style*="grid-template-columns"] > div {
  min-width: 0;
  padding: 12px !important;
  border: 1px solid #d5dfeb !important;
  border-radius: 9px !important;
  background: #fff !important;
  box-shadow: none !important;
  text-align: left !important;
}
#overview-dashboard #overview-hero > div[style*="grid-template-columns"] > div > div:first-child {
  justify-content: flex-start !important;
  color: #63748b !important;
  font-size: 9px !important;
}
#overview-dashboard #overview-hero [style*="font-size:30px"] {
  color: #1c3150 !important;
  font-size: 23px !important;
}
#overview-dashboard .panel,
#app-view .panel,
#app-view .stat-card {
  border: 1px solid #dfe5ec;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 13px #1b2a4009;
}
#overview-dashboard .panel { padding: 19px; }
#overview-dashboard .panel-heading { justify-content: space-between; gap: 12px; text-align: left; }
#overview-dashboard .panel-heading > div { justify-content: flex-start; text-align: left; }
#overview-dashboard .panel-heading h3,
#app-view .panel-heading h3 { color: #1d2b40; font-size: 15px; }
#overview-dashboard .panel-heading .eyebrow { color: #77869a; }
#overview-dashboard .dashboard-performance-grid,
#overview-dashboard .dashboard-live-grid,
#overview-dashboard .dashboard-popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
#overview-dashboard .dashboard-live-sessions { padding: 0; overflow: hidden; }
#overview-dashboard .dashboard-live-sessions .panel-heading { margin: 0; }
#overview-dashboard .dashboard-live-sessions .panel-inset { padding: 17px 19px; }
#overview-dashboard .resource-metric,
#overview-dashboard .resource-network,
#overview-dashboard .traffic-live-indicator,
#overview-dashboard .dashboard-playing-item {
  border-color: #e0e6ed;
  border-radius: 10px;
  background: #f7f9fb;
}
#overview-dashboard .resource-metric-heading,
#overview-dashboard .resource-network span,
#overview-dashboard .resource-metric small,
#overview-dashboard .traffic-current span,
#overview-dashboard .traffic-stats span,
#overview-dashboard .resource-chart-heading,
#overview-dashboard .traffic-chart-heading { color: #66758a; }
#overview-dashboard .resource-metric-heading strong,
#overview-dashboard .resource-summary strong,
#overview-dashboard .traffic-stats strong { color: #1e2d43; }
#overview-dashboard .resource-track { background: #e2e8ef; }
#overview-dashboard .resource-network strong,
#overview-dashboard .traffic-current strong { color: #285fbd; }
#overview-dashboard .resource-summary span { border-color: #e4e9ef; color: #66758a; }
#overview-dashboard .footnote { color: #718096; }
#overview-dashboard .dashboard-empty { color: #77869a; }

#app-view .section-intro {
  min-height: 58px;
  gap: 15px;
  margin: 0 0 14px;
  padding: 12px 15px;
  border: 1px solid #dfe5ec;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 7px #1b2a4006;
}
#app-view .section-intro p { color: #627186; line-height: 1.55; }
#app-view .section-badge,
#app-view .credit-chip,
#app-view .unlimited-chip {
  padding: 7px 10px;
  border-color: #dce4ed;
  border-radius: 8px;
  background: #f4f7fa;
  color: #53657c;
}
#app-view .credit-chip { border-color: #ecd8ab; background: #fff8e9; color: #91600e; }
#app-view .unlimited-chip { border-color: #bfe3d2; background: #eef9f3; color: #20734e; }
#app-view .panel { min-width: 0; padding: 19px; margin-bottom: 14px; }
#app-view .flush-panel { padding: 0; overflow: hidden; }
#app-view .panel-inset { padding: 16px 19px; border-bottom-color: #e6ebf1; }
#app-view .panel-heading { min-width: 0; gap: 14px; }
#app-view .panel-heading > div:first-child { min-width: 0; }
#app-view .panel-heading .eyebrow { color: #74839a; }
#app-view .panel-icon { border-radius: 9px; }
#app-view .muted { color: #6b798d; }
#app-view .footnote { color: #738197; line-height: 1.55; }
#app-view .empty-state { padding: 30px 18px; color: #738197; text-align: center; }

#app-view input:not([type="checkbox"]):not([type="radio"]),
#app-view select,
#app-view textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #d4dde7;
  border-radius: 8px;
  background: #fff;
  color: #1c293c;
  box-shadow: inset 0 1px 2px #17223508;
}
#app-view input:not([type="checkbox"]):not([type="radio"]):focus,
#app-view select:focus,
#app-view textarea:focus { border-color: #5b86d2; box-shadow: 0 0 0 3px #5b86d220; }
#app-view input::placeholder,
#app-view textarea::placeholder { color: #98a3b2; }
#app-view label { color: #425169; font-size: 11px; font-weight: 650; }
#app-view .button {
  min-height: 39px;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 680;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
#app-view .button.primary {
  border-color: #315eb1;
  background: #356bd1;
  color: #fff;
  box-shadow: 0 3px 8px #356bd126;
}
#app-view .button.primary:hover { border-color: #244b94; background: #2e5fbd; }
#app-view .button.secondary { border-color: #d5dee8; background: #fff; color: #40516a; }
#app-view .button.secondary:hover { border-color: #aebdd0; background: #f6f8fb; }
#app-view .button.danger { border-color: #eccbd0; background: #fff5f5; color: #ae3443; }
#app-view .button.danger:hover { border-color: #d99aa2; background: #ffebed; }
#app-view .mini-button { border-color: #d5dee8; border-radius: 7px; background: #fff; color: #42536a; }
#app-view .text-button { color: #356bd1; }
#app-view .text-button:hover { color: #234f9e; }
#app-view .badge { border: 1px solid #dce4ed; background: #f3f6f9; color: #53657a; }
#app-view .badge.active { border-color: #bfe5d3; background: #edf9f2; color: #16724c; }
#app-view .badge.online { border-color: #c9dafa; background: #eef4ff; color: #315fa8; }
#app-view .badge.failed { border-color: #efc8cd; background: #fff1f2; color: #a73342; }

#app-view .table-scroll { width: 100%; overflow: auto; overscroll-behavior-x: contain; }
#app-view table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
#app-view th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 14px;
  border-bottom: 1px solid #e1e7ee;
  background: #f6f8fb;
  color: #66768b;
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .07em;
}
#app-view td { padding: 12px 14px; border-top: 0; border-bottom: 1px solid #edf0f4; color: #46546a; font-size: 10px; }
#app-view tbody tr:last-child td { border-bottom: 0; }
#app-view tbody tr:hover { background: #f6f9fd; }
#app-view td strong { color: #1d2b40; font-size: 11px; }
#app-view .table-caption { color: #77869a; line-height: 1.45; }
#app-view .search-input { min-width: min(220px, 100%); }
#app-view .library-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
#app-view .library-filters > input,
#app-view .library-filters > select { width: auto; min-width: min(180px, 100%); flex: 1 1 170px; }
#app-view .actions,
#app-view .credit-actions,
#app-view .account-panel-actions,
#app-view .downloads-actions,
#app-view .sim-catalog-selection-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#app-view .sim-catalog-toolbar,
#app-view .m3u-selection-tools,
#app-view .downloads-selection-tools,
#app-view .library-delete-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
#app-view .sim-catalog-toolbar > input,
#app-view .sim-catalog-toolbar > select { width: auto; flex: 1 1 170px; }
#app-view .sim-catalog-toolbar > button { flex: 0 1 auto; }
#app-view .sim-source-create-form,
#app-view .m3u-import-form,
#app-view .emule-download-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}
#app-view .sim-source-create-form > label,
#app-view .m3u-import-form > label,
#app-view .emule-download-form > label { min-width: 0; }
#app-view .tv-live-form-grid,
#app-view .account-form-grid,
#app-view .editor-dialog-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
#app-view .tv-live-form-wide { grid-column: 1 / -1; }
#app-view .form-stack { gap: 14px; }
#app-view .account-form-heading { align-items: center; }
#app-view .account-panel-actions { justify-content: flex-end; }
#app-view .resource-summary,
#app-view .traffic-stats { color: #69798e; }
#app-view .pagination,
#app-view .m3u-page-controls,
#app-view .downloads-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 15px; }
#app-view .library-list,
#app-view .m3u-stream-grid,
#app-view .recent-movies,
#app-view .dropbox-items { gap: 12px; }
#app-view .library-card,
#app-view .m3u-item,
#app-view .m3u-stream-item,
#app-view .download-card,
#app-view .dropbox-item {
  border-color: #dfe5ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px #16263d0a;
}

.permissions-dialog,
.editor-dialog,
.confirmation-dialog {
  position: fixed;
  inset: 0;
  width: min(620px, calc(100vw - 28px));
  max-width: 620px;
  max-height: min(82dvh, 820px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d6deea;
  border-radius: 16px;
  background: #fff;
  color: #172235;
  box-shadow: 0 24px 80px #0f172a40;
}
.permissions-dialog[open],
.editor-dialog[open],
.confirmation-dialog[open] { display: block; }
.permissions-dialog::backdrop,
.editor-dialog::backdrop,
.confirmation-dialog::backdrop { background: #10182780; backdrop-filter: blur(4px); }
.permissions-dialog form,
.editor-dialog form,
.confirmation-dialog form { display: grid; gap: 16px; padding: clamp(21px, 4vw, 31px); }
.permissions-dialog h2,
.editor-dialog h2,
.confirmation-dialog h2 { color: #17253b; font-size: 22px; }
.permissions-dialog .muted,
.editor-dialog .muted,
.confirmation-dialog .muted { color: #66758a; }
.permissions-dialog .dialog-actions,
.editor-dialog .dialog-actions,
.confirmation-dialog .dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding-top: 12px; border-top: 1px solid #e6ebf1; }
.confirmation-dialog form { grid-template-columns: 42px minmax(0, 1fr); align-items: start; }
.confirmation-dialog-icon { border-color: #efc6c6; background: #fff0ef; color: #b8474f; }
.confirmation-dialog-copy .eyebrow { color: #9b5960; }
.confirmation-dialog-input,
.confirmation-dialog .dialog-actions { grid-column: 1 / -1; }

@media (min-width: 1500px) {
  #app-view .workspace { padding-right: clamp(36px, 3vw, 64px); padding-left: clamp(36px, 3vw, 64px); }
  #overview-dashboard .dashboard-performance-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  #overview-dashboard > #stats .stat-card { min-height: 122px; }
}
@media (max-width: 1200px) {
  #app-view.app-layout { grid-template-columns: 238px minmax(0, 1fr); }
  #app-view .sidebar { width: 238px; }
  #app-view .workspace { padding-inline: 22px; }
  #overview-dashboard > #stats,
  #overview-dashboard .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #app-view.app-layout { display: block; }
  #app-view .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    height: auto;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand toggle profile" "nav nav nav";
    align-items: center;
    gap: 0 8px;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid #2a3445;
  }
  #app-view .brand { grid-area: brand; min-height: 42px; margin: 0; padding: 4px 5px; border: 0; background: transparent; }
  #app-view .mobile-nav-toggle { grid-area: toggle; display: inline-flex; }
  #app-view .side-nav {
    grid-area: nav;
    display: none;
    width: 100%;
    max-height: calc(100dvh - 72px);
    overflow-x: hidden;
    overflow-y: auto;
    margin-top: 9px;
    padding: 10px 0 4px;
    border-top: 1px solid #303b4e;
    scrollbar-color: #53627a transparent;
    scrollbar-width: thin;
  }
  #app-view .sidebar.mobile-nav-open .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px 14px;
  }
  #app-view .nav-group { display: grid; align-content: start; gap: 3px; padding-top: 8px; border-top: 1px solid #303b4e; }
  #app-view .nav-group:first-child { padding-top: 0; border-top: 0; }
  #app-view .nav-group-label { display: block; padding: 1px 9px 5px; }
  #app-view .nav-item { width: 100%; min-height: 39px; padding: 0 9px; white-space: normal; }
  #app-view .sidebar-bottom { grid-area: profile; position: static; display: block; margin: 0; }
  #app-view .profile { margin: 0; padding: 0; border: 0; }
  #app-view .sidebar-logout { width: 38px; min-width: 38px; min-height: 38px; justify-content: center; padding: 0; }
  #app-view .sidebar-logout span { display: none; }
  #app-view .workspace { min-height: calc(100dvh - 105px); padding: 18px; }
}
@media (max-width: 680px) {
  #app-view .workspace { padding: 14px 11px 24px; }
  #app-view .topbar { align-items: flex-start; flex-direction: column; gap: 10px; padding-bottom: 12px; }
  #app-view .topbar-actions { width: 100%; justify-content: space-between; }
  #app-view .topbar-account { flex: 1; justify-content: center; }
  #app-view .dashboard-cinema-hero { grid-template-columns: 1fr !important; min-height: 0 !important; padding: 21px !important; }
  #overview-dashboard .dashboard-hero-side { width: 100%; min-width: 0; justify-items: center; text-align: center; }
  #overview-dashboard > #stats,
  #overview-dashboard .stats-grid,
  #overview-dashboard .dashboard-performance-grid,
  #overview-dashboard .dashboard-live-grid,
  #overview-dashboard .dashboard-popular-grid { grid-template-columns: 1fr; }
  #overview-dashboard > #stats .stat-card { min-height: 96px; }
  #overview-dashboard #overview-hero > div[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #app-view .section-intro { align-items: flex-start; flex-direction: column; }
  #app-view .section-badge { white-space: normal; }
  #app-view .panel { padding: 14px; }
  #app-view .flush-panel { padding: 0; }
  #app-view .panel-inset { padding: 13px; }
  #app-view .panel-heading { align-items: flex-start; flex-wrap: wrap; }
  #app-view .panel-heading > div:first-child { align-items: flex-start; }
  #app-view .library-filters,
  #app-view .actions,
  #app-view .downloads-actions,
  #app-view .account-panel-actions { width: 100%; justify-content: flex-start; }
  #app-view .library-filters > *,
  #app-view .actions > *,
  #app-view .downloads-actions > *,
  #app-view .account-panel-actions > * { min-width: 0; flex: 1 1 135px; }
  #app-view .sim-source-create-form,
  #app-view .m3u-import-form,
  #app-view .emule-download-form,
  #app-view .tv-live-form-grid,
  #app-view .account-form-grid,
  #app-view .editor-dialog-fields { grid-template-columns: 1fr; }
  #app-view .tv-live-form-wide { grid-column: auto; }
  #app-view .resource-metrics,
  #app-view .resource-network { grid-template-columns: 1fr; }
  .permissions-dialog .dialog-actions,
  .editor-dialog .dialog-actions,
  .confirmation-dialog .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .permissions-dialog .dialog-actions .button,
  .editor-dialog .dialog-actions .button,
  .confirmation-dialog .dialog-actions .button { width: 100%; min-width: 0; }
  .confirmation-dialog form { grid-template-columns: 1fr; }
  .confirmation-dialog-icon { display: none; }
  .confirmation-dialog-input,
  .confirmation-dialog .dialog-actions { grid-column: auto; }
}
@media (max-width: 380px) {
  #app-view #dashboard-fullscreen-toggle { display: none; }
  #overview-dashboard #overview-hero > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  #app-view .topbar-actions { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

#app-view .workspace,
#app-view #overview-dashboard { background: #f3f5f8 !important; }
#app-view .topbar-account-info strong { color: #23334a !important; }
#app-view .topbar-account-info small { color: #687990 !important; }
#overview-dashboard .dashboard-cinema-copy {
  justify-items: start;
  align-content: center;
  text-align: left;
}
#overview-dashboard .dashboard-cinema-copy .dashboard-title {
  background: none !important;
  color: #fff !important;
  text-align: left;
}
#overview-dashboard > #stats .stat-card {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}
#overview-dashboard > #stats .stat-label,
#overview-dashboard > #stats .stat-number,
#overview-dashboard > #stats .stat-detail { width: 100%; text-align: left; }
#overview-dashboard .traffic-live-indicator-title { color: #687990 !important; }
#overview-dashboard .traffic-live-indicator strong { color: #233f66 !important; }
#overview-dashboard .traffic-live-indicator small { color: #74839a !important; }
#overview-dashboard { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
#overview-dashboard .dashboard-cinema-copy {
  display: grid !important;
  justify-items: start !important;
  align-content: center !important;
  justify-self: stretch !important;
  width: 100%;
  max-width: none !important;
  text-align: left !important;
}
#overview-dashboard .dashboard-cinema-copy .dashboard-title {
  -webkit-text-fill-color: #fff !important;
  text-align: left !important;
}

@media (max-width: 900px) {
  #app-view.app-layout { display: block !important; }
  #app-view .sidebar {
    position: sticky !important;
    top: 0;
    z-index: 30;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 8px;
    overflow: visible !important;
    padding: 8px 12px !important;
  }
  #app-view .brand { order: 0; width: auto; min-width: 0; max-width: none; flex: 1 1 auto; min-height: 42px; margin: 0; padding: 4px 5px; border: 0; background: transparent; }
  #app-view .brand-wordmark { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #app-view #mobile-nav-toggle { position: static; order: 0; flex: 0 0 auto; display: inline-flex !important; }
  #app-view .side-nav {
    order: 2;
    flex: 0 0 100%;
    display: none !important;
    width: 100%;
    max-height: calc(100dvh - 72px);
    overflow-x: hidden;
    overflow-y: auto;
    margin-top: 9px;
    padding: 10px 0 4px;
    border-top: 1px solid #303b4e;
    scrollbar-color: #53627a transparent;
    scrollbar-width: thin;
  }
  #app-view .sidebar.mobile-nav-open .side-nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start;
    gap: 8px 14px;
  }
  #app-view .nav-group { display: grid !important; align-content: start; gap: 3px; padding-top: 8px; border-top: 1px solid #303b4e; }
  #app-view .nav-group:first-child { padding-top: 0; border-top: 0; }
  #app-view .nav-group-label { display: block !important; padding: 1px 9px 5px; }
  #app-view .nav-item { width: 100%; min-height: 39px; padding: 0 9px; white-space: normal; }
  #app-view .sidebar-bottom { order: 1; position: static !important; flex: 0 0 auto; display: block !important; margin: 0; }
  #app-view .profile { margin: 0; padding: 0; border: 0; }
  #app-view .sidebar-logout { width: 38px; min-width: 38px; min-height: 38px; justify-content: center; padding: 0; }
  #app-view .sidebar-logout span { display: none; }
}
@media (max-width: 680px) {
  #app-view .sidebar.mobile-nav-open .nav-item { min-height: 42px; }
}
#app-view .mobile-nav-toggle {
  display: none;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #43516a;
  border-radius: 8px;
  background: #192437;
  color: #eef4fc;
  font-size: 11px;
  font-weight: 650;
}
#app-view .mobile-nav-toggle svg { width: 18px; height: 18px; }
#app-view .mobile-nav-toggle:hover,
#app-view .mobile-nav-toggle:focus-visible { border-color: #8db9f3; background: #243650; }

/* Full-screen operations workspace */
:root {
  --panel-page: #f2f5f9;
  --panel-card: #fff;
  --panel-ink: #1b2a3e;
  --panel-muted: #68798e;
  --panel-line: #dce4ed;
  --panel-blue: #2364c5;
  --panel-sidebar: #13263c;
}

body.panel-layout-active {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#app-view.app-layout {
  position: relative;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--panel-page);
}

#app-view .sidebar {
  position: fixed !important;
  z-index: 50;
  inset: 0 auto 0 0;
  width: 264px !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden !important;
  padding: 22px 16px 14px !important;
  border: 0;
  border-right: 1px solid #263a50;
  background: var(--panel-sidebar);
  box-shadow: 8px 0 24px #10243b0b;
  transform: none;
}

#app-view .brand {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0 0 23px;
  padding: 3px 4px 17px;
  border-bottom: 1px solid #ffffff17;
}

#app-view .brand-mark.small {
  width: 42px;
  height: 42px;
  border: 1px solid #426b95;
  border-radius: 12px;
  background: #1d3854;
  color: #b7dcff;
}

#app-view .brand-wordmark { color: #f4f8fc; font-size: 13px; letter-spacing: .08em; }
#app-view .brand-subtitle { color: #9db1c7; font-size: 9px; }

#app-view .side-nav {
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 2px 12px;
  scrollbar-color: #536b82 transparent;
  scrollbar-width: thin;
}

#app-view .nav-group {
  display: grid;
  gap: 4px;
  padding: 12px 0 0;
  border-top: 1px solid #ffffff17;
}

#app-view .nav-group:first-child { padding-top: 0; border-top: 0; }
#app-view .nav-group-label { padding: 0 10px 5px; color: #a7bbd0; font-size: 10px; letter-spacing: .12em; }
#app-view .nav-item {
  min-height: 41px;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #ced9e5;
  font-size: 12px;
}
#app-view .nav-item:hover { border-color: #ffffff19; background: #ffffff0d; color: #fff; }
#app-view .nav-item.active { border-color: #83b9ff45; background: #23476a; color: #fff; box-shadow: inset 3px 0 #79b4ff; }
#app-view .nav-icon { flex: 0 0 18px; color: #a4bdd6; }
#app-view .nav-item.active .nav-icon { color: #c2e0ff; }
#app-view .nav-count { border-radius: 6px; background: #154e44; color: #b0f2d4; }

#app-view .sidebar-bottom {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 11px;
  border-top: 1px solid #ffffff17;
}

#app-view .profile { margin: 0; padding: 0; border: 0; }
#app-view .sidebar-logout {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  padding: 0 10px;
  border-color: #ffffff24;
  border-radius: 8px;
  background: #ffffff0c;
  color: #e0e8f1;
  font-size: 11px;
}
#app-view .sidebar-logout:hover { border-color: #f2a5a5; background: #452e3a; color: #fff; }

#app-view .workspace {
  width: calc(100% - 264px);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin-left: 264px;
  padding: 23px clamp(20px, 2.5vw, 42px) 32px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: var(--panel-page);
  scrollbar-color: #b8c5d3 transparent;
  scrollbar-width: thin;
}

#app-view .workspace > .topbar,
#app-view .workspace > #notice,
#app-view .workspace > [data-section],
#app-view .workspace > #overview-dashboard {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

#app-view .topbar {
  min-height: 62px;
  margin: 0 0 22px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--panel-line);
  background: transparent;
}

#app-view .topbar-title { min-width: 0; display: flex; align-items: center; gap: 13px; }
#app-view .topbar h1 { margin: 0; color: var(--panel-ink); font-size: clamp(21px, 1.8vw, 28px); font-weight: 760; letter-spacing: -.04em; }
#app-view .topbar-actions { gap: 10px; }
#app-view .topbar-account { min-height: 42px; padding: 6px 11px; border: 1px solid var(--panel-line); border-radius: 10px; background: #fff; }
#app-view .topbar-account-role { border-color: #d8e6f4; background: #edf5fd; color: #3b6590; }
#app-view .topbar-account-info strong { color: var(--panel-ink); }
#app-view .topbar-account-info small { color: var(--panel-muted); }
#app-view #dashboard-fullscreen-toggle { min-height: 38px; }
#app-view .mobile-nav-toggle { display: none; }
#app-view .sidebar-backdrop { display: none; }

#app-view .notice { margin: 0 0 12px; }
#app-view .page-section { width: 100%; max-width: none; margin: 0; }
#app-view .page-section > * { min-width: 0; }
#app-view .section-intro {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 0 0 13px;
  border: 0;
  border-bottom: 1px solid var(--panel-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
#app-view .section-intro > div:first-child { flex: 1 1 auto; text-align: left; }
#app-view .section-intro > div:first-child > .muted { max-width: 82ch; margin: 0; text-align: left; }
#app-view .section-intro p { margin: 0; color: var(--panel-muted); font-size: 12px; line-height: 1.55; }
#app-view .section-badge,
#app-view .credit-chip,
#app-view .unlimited-chip { border-color: var(--panel-line); border-radius: 7px; background: #fff; color: #465a70; }

#app-view .panel,
#app-view .stat-card {
  min-width: 0;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  background: var(--panel-card);
  box-shadow: 0 3px 12px #20354b08;
}
#app-view .panel { padding: 18px; margin-bottom: 15px; }
#app-view .flush-panel { padding: 0; overflow: hidden; }
#app-view .panel-inset { padding: 16px 18px; border-color: #e8edf2; }
#app-view .panel-heading { gap: 12px; }
#app-view .panel-heading h3 { color: #26374c; font-size: 15px; }
#app-view .panel-heading .eyebrow { color: #718198; }
#app-view .panel-icon { border: 0; border-radius: 8px; }
#app-view .muted { color: var(--panel-muted); }
#app-view .footnote { color: #748399; line-height: 1.55; }
#app-view .empty-state { padding: 30px 18px; color: #748399; }

#overview-dashboard { gap: 15px; }
#overview-dashboard .dashboard-cinema-hero {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 19px 22px;
  border: 1px solid #dce4ed;
  border-left: 4px solid #3676ca;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px #20354b08;
}
#overview-dashboard .dashboard-cinema-copy { min-width: 0; margin: 0; text-align: left; }
#overview-dashboard .dashboard-cinema-copy .eyebrow { margin-bottom: 5px; color: #4f78a5; font-size: 10px; }
#overview-dashboard .dashboard-cinema-copy .dashboard-title {
  margin: 0;
  color: #1b2a3e !important;
  -webkit-text-fill-color: #1b2a3e !important;
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: 760;
  letter-spacing: -.035em;
  line-height: 1.2;
  -webkit-text-fill-color: currentColor;
}
#overview-dashboard .dashboard-brand-subtitle { margin-top: 5px; color: #65788e; font-size: 10px; letter-spacing: .12em; }
#overview-dashboard .dashboard-hero-description { margin: 7px 0 0; color: #68798e; font-size: 12px; line-height: 1.5; }
#overview-dashboard .dashboard-hero-side {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 0 0 0 18px;
  border: 0;
  border-left: 1px solid var(--panel-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: right;
}
#overview-dashboard .dashboard-live-badge { border-color: #c6e7d5; background: #eef9f3; color: #24744d; }
#overview-dashboard .dashboard-live-badge i { box-shadow: none; }
#overview-dashboard .dashboard-clock-date { color: #69798e; }
#overview-dashboard .dashboard-clock-time { color: #1d395a; font-size: 25px; text-shadow: none; }

#overview-dashboard > #stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
#overview-dashboard > #stats .stat-card {
  min-height: 113px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-content: center;
  align-items: center;
  justify-items: stretch;
  padding: 14px 16px;
  text-align: left;
}
#overview-dashboard > #stats .stat-icon { grid-column: 2; grid-row: 1 / span 3; float: none; margin: 0; }
#overview-dashboard > #stats .stat-label { grid-column: 1; grid-row: 1; min-height: 0; padding: 0; color: #6a7a8f; font-size: 11px; text-align: left; }
#overview-dashboard > #stats .stat-number { grid-column: 1; grid-row: 2; margin-top: 7px; color: #1b2f48; font-size: clamp(23px, 2vw, 30px); line-height: 1.05; text-align: left; }
#overview-dashboard > #stats .stat-detail { grid-column: 1 / -1; margin-top: 7px; color: #78889a; font-size: 10px; text-align: left; }
#overview-dashboard > #stats .stat-card::after { height: 2px; background: #4a88d5; }

#overview-dashboard .dashboard-live-sessions { margin: 0; }
#overview-dashboard .dashboard-performance-grid,
#overview-dashboard .dashboard-live-grid,
#overview-dashboard .dashboard-popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 0; }
#overview-dashboard .resource-panel,
#overview-dashboard .traffic-panel { height: 100%; }
#overview-dashboard .resource-metric,
#overview-dashboard .resource-network,
#overview-dashboard .traffic-live-indicator,
#overview-dashboard .dashboard-playing-item { border-color: #e2e8ef; border-radius: 9px; background: #f8fafc; }
#overview-dashboard .traffic-current {
  border-color: #dfe7ef;
  border-radius: 9px;
  background: #f5f8fc;
  animation: none;
}
#overview-dashboard .traffic-current-label,
#overview-dashboard .traffic-current span:not(.traffic-current-label) { color: #68798e; }
#overview-dashboard .resource-metric-heading strong,
#overview-dashboard .resource-summary strong,
#overview-dashboard .traffic-stats strong { color: #233b58; }
#overview-dashboard .resource-track { background: #e7edf3; }
#overview-dashboard .resource-fill { background: #4384d2; }
#overview-dashboard .memory-fill { background: #39a88d; }
#overview-dashboard .traffic-current strong,
#overview-dashboard .resource-network strong { color: #235fae; text-shadow: none; }
#overview-dashboard .traffic-live-indicator-title,
#overview-dashboard .traffic-stats span,
#overview-dashboard .resource-chart-heading,
#overview-dashboard .traffic-chart-heading { color: #68798e; }
#overview-dashboard .resource-summary span { border-color: #e2e8ef; color: #66798e; }
#overview-dashboard .footnote { color: #748399; }
#overview-dashboard .recent-movie,
#overview-dashboard .recent-movie-poster { border-color: #e2e8ef; background-color: #f5f8fb; }
#overview-dashboard .recent-movie-title { color: #26374c; }
#overview-dashboard .recent-movie-meta,
#overview-dashboard .recent-movie-date { color: #6d7d91; }

#app-view input:not([type="checkbox"]):not([type="radio"]),
#app-view select,
#app-view textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #cbd6e2;
  border-radius: 7px;
  background: #fff;
  color: #1b2a3e;
  box-shadow: inset 0 1px 2px #20354b07;
}
#app-view input:not([type="checkbox"]):not([type="radio"]):focus,
#app-view select:focus,
#app-view textarea:focus { border-color: #4384d2; box-shadow: 0 0 0 3px #4384d21c; }
#app-view input::placeholder,
#app-view textarea::placeholder { color: #8a98a9; }
#app-view label { color: #41536a; font-size: 12px; }
#app-view .button { min-height: 38px; border-radius: 7px; font-size: 12px; }
#app-view .button.primary { border-color: #215bab; background: #2869bd; color: #fff; box-shadow: none; }
#app-view .button.primary:hover { border-color: #194d91; background: #205da9; }
#app-view .button.secondary { border-color: #d1dbe5; background: #fff; color: #40546b; }
#app-view .button.secondary:hover { border-color: #9fb3c9; background: #f6f9fc; }
#app-view .button.danger { border-color: #e8c8cb; background: #fff5f5; color: #a83943; }
#app-view .button.danger:hover { border-color: #d49da1; background: #ffeded; }
#app-view .text-button { color: #2869bd; }
#app-view .badge { border-color: #dce4ed; background: #f3f6f9; color: #52657a; }
#app-view .badge.active { border-color: #bde3ce; background: #edf9f2; color: #19724c; }
#app-view .badge.online { border-color: #c8dafa; background: #eef4ff; color: #315fa8; }
#app-view .badge.failed { border-color: #efc8cd; background: #fff1f2; color: #a73342; }

#app-view .table-scroll { width: 100%; overflow: auto; overscroll-behavior-x: contain; }
#app-view table { width: 100%; min-width: 740px; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
#app-view th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid #dce4ed;
  background: #f5f8fb;
  color: #60738a;
  font-size: 10px;
  font-weight: 740;
  letter-spacing: .06em;
  text-align: left;
}
#app-view td { padding: 12px 14px; border-bottom: 1px solid #e9eef3; color: #45566b; font-size: 11px; }
#app-view tbody tr:last-child td { border-bottom: 0; }
#app-view tbody tr:hover { background: #f5f9fd; }
#app-view td strong { color: #1d3048; font-size: 11px; }

#app-view .library-filters,
#app-view .actions,
#app-view .credit-actions,
#app-view .account-panel-actions,
#app-view .downloads-actions,
#app-view .sim-catalog-toolbar,
#app-view .m3u-selection-tools,
#app-view .downloads-selection-tools,
#app-view .library-delete-actions,
#app-view .tv-control-actions,
#app-view .pagination,
#app-view .platform-pagination,
#app-view .downloads-pagination {
  min-width: 0;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

#app-view .library-card,
#app-view .m3u-item,
#app-view .m3u-stream-item,
#app-view .download-card,
#app-view .dropbox-item {
  border-color: var(--panel-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px #20354b08;
}

dialog[open] {
  position: fixed;
  inset: 0;
  width: min(660px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(88dvh, 840px);
  margin: auto;
  overflow: auto;
  border: 1px solid #d4dee8;
  border-radius: 14px;
  background: #fff;
  color: #1b2a3e;
  box-shadow: 0 24px 70px #11243b33;
}
dialog::backdrop { background: #10233d78; backdrop-filter: blur(3px); }
.permissions-dialog form,
.editor-dialog form,
.confirmation-dialog form { gap: 15px; }
.permissions-dialog h2,
.editor-dialog h2,
.confirmation-dialog h2 { color: #1b2a3e; }
.permissions-dialog .muted,
.editor-dialog .muted,
.confirmation-dialog .muted { color: #68798e; }
.permissions-dialog .dialog-actions,
.editor-dialog .dialog-actions,
.confirmation-dialog .dialog-actions { justify-content: flex-end; gap: 8px; border-top-color: #e2e8ef; }

@media (max-width: 1100px) and (min-width: 761px) {
  #app-view .sidebar { width: 236px !important; }
  #app-view .workspace { width: calc(100% - 236px); margin-left: 236px; padding-right: 20px; padding-left: 20px; }
  #overview-dashboard > #stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #app-view .sidebar {
    z-index: 70;
    width: min(86vw, 304px) !important;
    transform: translateX(-105%);
    transition: transform .22s ease;
  }
  #app-view .sidebar.mobile-nav-open { transform: translateX(0); }
  #app-view .sidebar-backdrop {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: none;
    border: 0;
    background: #0e2038a3;
    backdrop-filter: blur(2px);
  }
  #app-view .sidebar.mobile-nav-open + .sidebar-backdrop { display: block; }
  #app-view .workspace { width: 100%; margin-left: 0; padding: 14px 16px 24px; }
  #app-view .topbar { min-height: 52px; align-items: center; gap: 10px; margin-bottom: 17px; }
  #app-view .topbar-title { flex: 1 1 auto; gap: 10px; }
  #app-view .topbar h1 { font-size: 20px; }
  #app-view .mobile-nav-toggle {
    min-width: 40px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #cbd7e3;
    border-radius: 7px;
    background: #fff;
    color: #25415f;
    font-size: 11px;
    font-weight: 680;
  }
  #app-view .mobile-nav-toggle svg { width: 18px; height: 18px; }
  #app-view .topbar-actions { flex: 0 1 auto; gap: 7px; }
  #app-view .topbar-account { min-height: 38px; padding: 5px 8px; }
  #app-view .topbar-account-role { display: none; }
  #app-view .section-intro { align-items: flex-start; flex-direction: column; gap: 8px; }
  #overview-dashboard .dashboard-cinema-hero { grid-template-columns: minmax(0, 1fr); }
  #overview-dashboard .dashboard-hero-side { justify-content: space-between; padding: 12px 0 0; border-top: 1px solid var(--panel-line); border-left: 0; text-align: left; }
  #overview-dashboard .dashboard-performance-grid,
  #overview-dashboard .dashboard-live-grid,
  #overview-dashboard .dashboard-popular-grid { grid-template-columns: minmax(0, 1fr); }
  #app-view .tv-live-form-grid,
  #app-view .account-form-grid,
  #app-view .editor-dialog-fields,
  #app-view .sim-source-create-form,
  #app-view .m3u-import-form,
  #app-view .emule-download-form { grid-template-columns: minmax(0, 1fr); }
  #app-view .tv-live-form-wide { grid-column: auto; }
  #app-view .panel { padding: 14px; }
  #app-view .flush-panel { padding: 0; }
  #app-view .panel-inset { padding: 13px 14px; }
}

@media (max-width: 520px) {
  #app-view .workspace { padding: 12px 11px 20px; }
  #app-view .topbar { align-items: flex-start; flex-wrap: wrap; }
  #app-view .topbar-title { flex-basis: 100%; }
  #app-view .topbar-actions { width: 100%; justify-content: space-between; }
  #app-view .topbar-account { flex: 1 1 auto; justify-content: center; }
  #app-view #dashboard-fullscreen-toggle { display: inline-flex; min-height: 36px; }
  #overview-dashboard > #stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #overview-dashboard > #stats .stat-card { min-height: 96px; padding: 11px; }
  #overview-dashboard > #stats .stat-detail { font-size: 8px; }
  #overview-dashboard .dashboard-cinema-hero { padding: 15px; }
  #overview-dashboard .dashboard-hero-side { align-items: flex-start; flex-direction: column; gap: 9px; }
  #app-view .library-filters > *,
  #app-view .actions > *,
  #app-view .downloads-actions > *,
  #app-view .account-panel-actions > * { min-width: 0; flex: 1 1 135px; }
  dialog[open] { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: 90dvh; }
  .permissions-dialog .dialog-actions,
  .editor-dialog .dialog-actions,
  .confirmation-dialog .dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permissions-dialog .dialog-actions .button,
  .editor-dialog .dialog-actions .button,
  .confirmation-dialog .dialog-actions .button { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #app-view .sidebar { transition: none; }
}

#overview-dashboard > #stats,
#overview-dashboard .stats-grid {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: stretch;
  justify-items: stretch;
  gap: 0;
}
#overview-dashboard > #stats .stat-card { border-radius: 0; }
#overview-dashboard > #stats .monthly-account-stat {
  min-height: 136px;
  align-content: start;
}
.monthly-account-trend {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  width: 100%;
  margin-top: 6px;
}
.monthly-account-column {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 22px auto;
  justify-items: center;
  gap: 2px;
}
.monthly-account-count,
.monthly-account-label {
  overflow: hidden;
  max-width: 100%;
  color: #8290a1;
  font-size: 7px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monthly-account-track {
  width: 100%;
  height: 22px;
  display: flex;
  align-items: end;
  border-radius: 4px;
  background: #edf1f6;
}
.monthly-account-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 4px;
  background: linear-gradient(180deg, #76a9e8, #426daf);
}
@media (max-width: 760px) {
  #overview-dashboard > #stats,
  #overview-dashboard .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #overview-dashboard > #stats .monthly-account-stat { min-height: 136px; }
}

#app-view .tv-live-source-panel .sim-source-create-form,
#app-view .tv-live-source-panel .tv-live-form-grid {
  width: 100%;
  max-width: 1020px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 16px 24px;
  margin: 0 auto;
}
#app-view .tv-live-source-panel > .panel-heading {
  justify-content: center;
  text-align: center;
}
#app-view .tv-live-source-panel > .panel-heading > div { width: 100%; }
#app-view .tv-live-source-panel > .footnote,
#app-view .tv-live-source-panel details > .footnote { text-align: center; }
#app-view .tv-live-source-panel details { text-align: center; }
#app-view .tv-live-source-panel .sim-source-create-form > label,
#app-view .tv-live-source-panel .tv-live-form-grid > label {
  width: 100%;
  max-width: 520px;
  justify-self: center;
  text-align: left;
}
#app-view .tv-live-source-panel .tv-live-form-grid > .tv-live-form-wide {
  grid-column: 1 / -1;
  max-width: none;
}
#app-view .tv-live-source-panel .sim-source-create-form > .tv-live-form-centered,
#app-view .tv-live-source-panel .tv-live-form-grid > .tv-live-form-centered {
  grid-column: 1 / -1;
  max-width: 520px;
  justify-self: center;
}
#app-view .tv-live-source-panel .sim-source-create-form > .button,
#app-view .tv-live-source-panel .tv-live-form-grid > .button {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 220px;
}
#app-view .tv-live-source-panel #tv-live-source-status,
#app-view .tv-live-source-panel #tv-live-sources-batch-status { text-align: center; }

@media (max-width: 760px) {
  #app-view .tv-live-source-panel .sim-source-create-form,
  #app-view .tv-live-source-panel .tv-live-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #app-view .tv-live-source-panel .sim-source-create-form > label,
  #app-view .tv-live-source-panel .tv-live-form-grid > label {
    max-width: none;
  }
  #app-view .tv-live-source-panel .sim-source-create-form > .tv-live-form-centered,
  #app-view .tv-live-source-panel .tv-live-form-grid > .tv-live-form-centered,
  #app-view .tv-live-source-panel .sim-source-create-form > .button,
  #app-view .tv-live-source-panel .tv-live-form-grid > .button {
    grid-column: auto;
    width: min(100%, 320px);
  }
}

#overview-dashboard > #stats .stat-number,
#overview-dashboard #overview-hero [style*="font-size:30px"] {
  color: #000 !important;
  font-variant-numeric: tabular-nums;
}

#overview-dashboard > #stats .stat-number { font-size: clamp(24px, 2vw, 31px); }
#overview-dashboard > #stats .stat-label {
  font-size: clamp(10px, 1vw, 12px);
  line-height: 1.35;
}
#overview-dashboard > #stats .stat-detail {
  font-size: clamp(9px, .9vw, 11px);
  line-height: 1.4;
}
#overview-dashboard #overview-hero [style*="font-size:30px"] { font-size: 25px !important; }
#overview-dashboard .resource-metric-heading strong,
#overview-dashboard .resource-summary strong,
#overview-dashboard .traffic-stats strong,
#overview-dashboard .resource-network strong,
#overview-dashboard .traffic-current strong {
  color: #000 !important;
}

/* override: fondo blanco en tarjetas de CPU/memoria/tráfico */
#overview-dashboard .resource-metric,
#overview-dashboard .resource-network,
#overview-dashboard .resource-summary span,
#overview-dashboard .traffic-live-indicator {
  background: #ffffff !important;
}

/* override: fondo blanco en tarjetas de tráfico */
.traffic-stats,
.traffic-stats div {
  background: #ffffff !important;
}


#overview-dashboard #reseller-stats{grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px}
#overview-dashboard #reseller-stats .stat-card{min-height:110px;justify-items:start;align-content:center;padding:16px;border:1px solid #dfe5ec;border-radius:12px;background:#fff;box-shadow:0 3px 9px #13213a09;text-align:left}
#overview-dashboard #reseller-stats .stat-label,#overview-dashboard #reseller-stats .stat-detail{color:#66758a;text-align:left}
#overview-dashboard #reseller-stats .stat-number{margin-top:7px;color:#182841!important;font-size:clamp(22px,1.8vw,29px);text-align:left}
#overview-dashboard .reseller-dashboard-panel{overflow:hidden;border:1px solid #dfe5ec;border-radius:13px;background:#fff;box-shadow:0 5px 16px #13213a0c}
#overview-dashboard .reseller-dashboard-wide{grid-column:1/-1}
#overview-dashboard .reseller-dashboard-panel .panel-heading{justify-content:space-between;padding:16px 18px;border-bottom:1px solid #e8edf3;background:linear-gradient(120deg,#f8fbff,#fff)}
#overview-dashboard .reseller-dashboard-panel .panel-heading>div{justify-content:flex-start;text-align:left}
#overview-dashboard .reseller-dashboard-panel .panel-heading h3{color:#1b2b42}
#overview-dashboard .reseller-dashboard-panel .panel-heading .eyebrow{color:#607da7}
#overview-dashboard .reseller-dashboard-panel .table-scroll{padding:0 16px}
#overview-dashboard .reseller-dashboard-panel table{min-width:720px}
#overview-dashboard .reseller-dashboard-panel th{color:#66758a;font-size:9px;letter-spacing:.06em;text-transform:uppercase}
#overview-dashboard .reseller-dashboard-panel td,#overview-dashboard .reseller-dashboard-panel td strong{color:#26364b}
#overview-dashboard .reseller-dashboard-panel .table-caption{color:#718096}
#overview-dashboard .reseller-dashboard-panel .footnote{margin:0;padding:0 18px 14px;color:#718096}
#overview-dashboard .reseller-usage-total-wrap{display:grid;justify-items:end;gap:3px;color:#6b7b90;font-size:10px}
#overview-dashboard .reseller-usage-total-wrap strong{color:#1f5a8b;font-size:22px;font-variant-numeric:tabular-nums}
#overview-dashboard .reseller-dashboard-panel .empty-state{margin:12px 16px;color:#69798e}
@media(max-width:760px){#overview-dashboard #reseller-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#overview-dashboard #reseller-stats .stat-card{min-height:100px;padding:11px}#overview-dashboard .reseller-dashboard-panel .panel-heading{align-items:flex-start;padding:13px}#overview-dashboard .reseller-usage-total-wrap{font-size:9px}#overview-dashboard .reseller-usage-total-wrap strong{font-size:18px}}


#overview-dashboard #reseller-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin: 0 0 22px;
}
#overview-dashboard #reseller-stats .stat-card {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-areas: "icon label" "number number" "detail detail";
  align-items: center !important;
  justify-items: stretch !important;
  gap: 5px 12px;
  min-width: 0;
  min-height: 158px !important;
  padding: 19px !important;
  border: 1px solid #cbd7e3 !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, #fff, #f3f7fb) !important;
  box-shadow: 0 7px 20px #13213a16, inset 0 1px #fff !important;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}
#overview-dashboard #reseller-stats .stat-card:hover { transform: translateY(-2px); }
#overview-dashboard #reseller-stats .stat-icon {
  grid-area: icon; width: 42px; height: 42px; border-radius: 12px; font-size: 19px;
}
#overview-dashboard #reseller-stats .stat-label {
  grid-area: label; align-self: center; padding: 0; color: #3c4d63 !important;
  font-size: 12px; font-weight: 750; line-height: 1.35; text-align: left;
}
#overview-dashboard #reseller-stats .stat-number {
  grid-area: number; min-width: 0; margin: 7px 0 0 !important; color: #14243a !important;
  font-size: clamp(30px, 2.6vw, 40px) !important; font-weight: 820; line-height: 1.05; text-align: left;
}
#overview-dashboard #reseller-stats .stat-detail {
  grid-area: detail; margin: 0 !important; color: #506177 !important;
  font-size: 12px; line-height: 1.4; text-align: left;
}
#overview-dashboard #reseller-stats .card-pulse { top: 20px; right: 20px; }
#overview-dashboard .reseller-sales-panel { margin-bottom: 20px; }
#overview-dashboard .reseller-sales-chart {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end;
  gap: 14px; min-height: 155px; padding: 20px 22px 18px;
}
#overview-dashboard .reseller-sales-month { display: grid; gap: 9px; min-width: 0; }
#overview-dashboard .reseller-sales-month-heading {
  display: flex; align-items: baseline; justify-content: space-between; gap: 5px;
  color: #52647a; font-size: 11px;
}
#overview-dashboard .reseller-sales-month-count {
  color: #192b44; font-size: 14px; font-variant-numeric: tabular-nums;
}
#overview-dashboard .reseller-sales-track {
  height: 88px; display: flex; align-items: end; overflow: hidden;
  border: 1px solid #d8e1eb; border-radius: 9px; background: #edf2f7;
}
#overview-dashboard .reseller-sales-bar {
  display: block; width: 100%; min-height: 4px; border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #4c9cf5, #2364b5); transition: height .25s ease;
}
#overview-dashboard .reseller-best-month { display: grid; justify-items: end; gap: 3px; text-align: right; }
#overview-dashboard .reseller-best-month > span { color: #64758a; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
#overview-dashboard .reseller-best-month > strong { color: #173c68; font-size: 17px; line-height: 1.2; }
#overview-dashboard .reseller-best-month > small { color: #5d7087; font-size: 11px; }
@media (max-width: 760px) {
  #overview-dashboard #reseller-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  #overview-dashboard #reseller-stats .stat-card { min-height: 145px !important; padding: 14px !important; }
  #overview-dashboard #reseller-stats .stat-number { font-size: clamp(27px, 6vw, 34px) !important; }
  #overview-dashboard #reseller-stats .stat-detail { font-size: 11px; }
  #overview-dashboard .reseller-dashboard-panel .panel-heading { align-items: flex-start; padding: 13px; }
  #overview-dashboard .reseller-sales-chart { gap: 7px; padding: 15px 11px; }
  #overview-dashboard .reseller-sales-month-heading { display: grid; gap: 2px; font-size: 9px; }
  #overview-dashboard .reseller-sales-month-count { font-size: 12px; }
  #overview-dashboard .reseller-best-month > strong { max-width: 140px; font-size: 13px; }
  #overview-dashboard .reseller-usage-total-wrap { font-size: 9px; }
  #overview-dashboard .reseller-usage-total-wrap strong { font-size: 18px; }
}
@media (max-width: 420px) {
  #overview-dashboard #reseller-stats { grid-template-columns: minmax(0, 1fr) !important; }
  #overview-dashboard #reseller-stats .stat-card { min-height: 132px !important; }
  #overview-dashboard .reseller-sales-chart { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

#overview-dashboard #reseller-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
#overview-dashboard #reseller-stats .stat-card {
  min-height: 142px !important;
}
#overview-dashboard #reseller-stats .stat-card:nth-child(-n+4) {
  min-height: 166px !important;
  background: linear-gradient(145deg, #fff, #eef5fc) !important;
}
#overview-dashboard .reseller-analytics-panel { margin-bottom: 20px; }
#overview-dashboard .reseller-analytics-heading { align-items: center; }
#overview-dashboard .reseller-period-control {
  display: grid;
  gap: 5px;
  min-width: 170px;
  color: #607087;
  font-size: 10px;
  font-weight: 750;
}
#overview-dashboard .reseller-period-control > label {
  color: #607087;
  font-size: 10px;
  font-weight: 750;
}
#overview-dashboard .reseller-period-control select {
  width: 100%;
  min-height: 36px;
  padding: 7px 30px 7px 10px;
  border: 1px solid #d5deea;
  border-radius: 8px;
  background: #fff;
  color: #22354d;
  font: inherit;
}
#overview-dashboard .reseller-custom-range {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  margin-top: 5px;
}
#overview-dashboard .reseller-custom-range[hidden] { display: none; }
#overview-dashboard .reseller-custom-range label {
  align-self: center;
  color: #687990;
  font-size: 9px;
}
#overview-dashboard .reseller-custom-range input {
  min-width: 0;
  min-height: 34px;
  padding: 5px;
  border: 1px solid #d5deea;
  border-radius: 7px;
  background: #fff;
  color: #22354d;
  font: inherit;
}
#overview-dashboard .reseller-custom-range .button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}
#overview-dashboard .reseller-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}
#overview-dashboard .reseller-analytics-card {
  min-width: 0;
  padding: 14px 14px 10px;
  border: 1px solid #e1e8f0;
  border-radius: 11px;
  background: linear-gradient(145deg, #fff, #f8fafd);
}
#overview-dashboard .reseller-analytics-card-wide { grid-column: 1 / -1; }
#overview-dashboard .reseller-analytics-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}
#overview-dashboard .reseller-analytics-card-heading h4 {
  margin: 0;
  color: #263a53;
  font-size: 13px;
  font-weight: 800;
}
#overview-dashboard .reseller-analytics-card-heading small {
  display: block;
  margin-top: 4px;
  color: #75849a;
  font-size: 10px;
  line-height: 1.35;
}
#overview-dashboard .reseller-analytics-card-heading > strong {
  flex: 0 0 auto;
  color: #1c3d66;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
#overview-dashboard .reseller-trend-chart {
  display: grid;
  align-items: end;
  gap: 3px;
  height: 152px;
  margin-top: 10px;
  overflow: hidden;
  border-bottom: 1px solid #d9e2ec;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 37px, #e8edf3 38px);
}
#overview-dashboard .reseller-trend-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 17px;
  align-items: end;
  min-width: 0;
  height: 100%;
}
#overview-dashboard .reseller-trend-track {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 0;
  height: 100%;
}
#overview-dashboard .reseller-trend-bar {
  display: block;
  width: min(72%, 16px);
  min-height: 0;
  border-radius: 4px 4px 1px 1px;
  transition: height .2s ease;
}
#overview-dashboard .reseller-bar-signups { background: linear-gradient(180deg, #7a9cfb, #4a64cb); }
#overview-dashboard .reseller-bar-bandwidth { background: linear-gradient(180deg, #58c8d8, #1689a3); }
#overview-dashboard .reseller-trend-label {
  overflow: hidden;
  color: #738198;
  font-size: 8px;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}
#overview-dashboard .reseller-session-stack {
  display: flex;
  flex-direction: column-reverse;
  width: min(72%, 18px);
  min-height: 0;
  overflow: hidden;
  border-radius: 4px 4px 1px 1px;
}
#overview-dashboard .reseller-session-part {
  display: block;
  flex-basis: 0;
  min-height: 0;
}
#overview-dashboard .reseller-legend-vod { background: #6758c9; }
#overview-dashboard .reseller-legend-live { background: #28a18a; }
#overview-dashboard .reseller-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 9px;
  color: #687990;
  font-size: 10px;
}
#overview-dashboard .reseller-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#overview-dashboard .reseller-chart-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
#overview-dashboard .reseller-chart-note {
  margin: 8px 0 0;
  color: #79879a;
  font-size: 10px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  #overview-dashboard #reseller-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  #overview-dashboard .reseller-analytics-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 11px; }
  #overview-dashboard .reseller-analytics-card-wide { grid-column: auto; }
  #overview-dashboard .reseller-analytics-heading { flex-direction: column; align-items: stretch !important; }
  #overview-dashboard .reseller-period-control { min-width: 0; width: 100%; }
}
@media (max-width: 420px) {
  #overview-dashboard #reseller-stats { grid-template-columns: minmax(0, 1fr) !important; }
  #overview-dashboard #reseller-stats .stat-card:nth-child(-n+4) { min-height: 150px !important; }
  #overview-dashboard .reseller-analytics-card { padding: 11px 9px 9px; }
  #overview-dashboard .reseller-analytics-card-heading > strong { font-size: 15px; }
  #overview-dashboard .reseller-custom-range { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
  #overview-dashboard .reseller-custom-range .button { grid-column: 1 / -1; }
}

#overview-dashboard .reseller-dashboard-wide,
#overview-dashboard #reseller-recent-clients-panel,
#overview-dashboard #reseller-connected-panel,
#overview-dashboard #reseller-announcements-panel {
  grid-area: auto;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}
#app-view .nav-group.reseller-only[hidden],
#overview-dashboard .reseller-dashboard-panel[hidden],
#credit-ledger[hidden] { display: none !important; }
#overview-dashboard .reseller-dashboard-panel .reseller-dashboard-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}
#credit-ledger .credit-ledger-panel { min-width: 0; }
#credit-ledger .reseller-credit-ledger-table {
  width: 100%;
  table-layout: auto;
}
#credit-ledger .reseller-credit-ledger-table[hidden],
#credit-ledger .credit-ledger-pagination[hidden] { display: none; }
#credit-ledger .reseller-credit-ledger-table th,
#credit-ledger .reseller-credit-ledger-table td {
  padding: 12px 14px;
  overflow-wrap: anywhere;
}
#credit-ledger .credit-ledger-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

@media (max-width: 760px) {
  #overview-dashboard .reseller-dashboard-table,
  #credit-ledger .reseller-credit-ledger-table,
  #overview-dashboard .reseller-dashboard-table tbody,
  #credit-ledger .reseller-credit-ledger-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  #overview-dashboard .reseller-dashboard-table thead,
  #credit-ledger .reseller-credit-ledger-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  #overview-dashboard .reseller-dashboard-table tbody tr,
  #credit-ledger .reseller-credit-ledger-table tbody tr {
    display: grid;
    gap: 0;
    margin: 0 0 12px;
    padding: 8px 12px;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    background: #fff;
  }
  #overview-dashboard .reseller-dashboard-table tbody td,
  #credit-ledger .reseller-credit-ledger-table tbody td {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr);
    gap: 10px;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid #e8edf3;
    overflow-wrap: anywhere;
  }
  #overview-dashboard .reseller-dashboard-table tbody td::before,
  #credit-ledger .reseller-credit-ledger-table tbody td::before {
    content: attr(data-label);
    color: #66758a;
    font-weight: 700;
  }
  #overview-dashboard .reseller-dashboard-table tbody td:last-child,
  #credit-ledger .reseller-credit-ledger-table tbody td:last-child { border-bottom: 0; }
  #credit-ledger .credit-ledger-pagination { gap: 9px; padding: 12px; }
}

#overview-dashboard #reseller-stats,
body.role-reseller #overview-dashboard #reseller-stats {
  display: grid !important;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
}
#overview-dashboard #reseller-stats .reseller-kpi-card,
body.role-reseller #overview-dashboard #reseller-stats .reseller-kpi-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 166px !important;
  box-sizing: border-box;
  margin: 0 !important;
}
@media (min-width: 1100px) and (max-width: 1399px) {
  #overview-dashboard #reseller-stats,
  body.role-reseller #overview-dashboard #reseller-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}
@media (min-width: 700px) and (max-width: 1099px) {
  #overview-dashboard #reseller-stats,
  body.role-reseller #overview-dashboard #reseller-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}
@media (max-width: 699px) {
  #overview-dashboard #reseller-stats,
  body.role-reseller #overview-dashboard #reseller-stats {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }
}

#app-view .workspace > .tv-live-section,
#app-view .tv-live-section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

#app-view .tv-live-intro {
  justify-content: space-between;
  text-align: left;
}

#app-view .tv-live-intro > div:first-child {
  flex: 1 1 700px;
  text-align: left;
}

#app-view .tv-live-intro > div:first-child > .muted {
  max-width: 1100px;
  margin-inline: 0;
}

#app-view .tv-live-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1200px) {
  #app-view .tv-live-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #app-view .tv-live-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  #app-view .tv-live-stats-grid { grid-template-columns: minmax(0, 1fr); }
}

#app-view .tv-live-workspace {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

#app-view .tv-live-source-panel,
#app-view .tv-live-sources-panel,
#app-view .tv-live-catalog-panel {
  width: 100%;
  min-width: 0;
}

#app-view .tv-live-source-panel > .panel-heading {
  justify-content: flex-start;
  text-align: left;
}

#app-view .tv-live-source-panel > .panel-heading > div {
  width: auto;
}

#app-view .tv-live-source-panel > .footnote,
#app-view .tv-live-source-panel details > .footnote,
#app-view .tv-live-source-panel details {
  text-align: left;
}

#app-view .tv-live-source-panel .sim-source-create-form,
#app-view .tv-live-source-panel .tv-live-form-grid {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 14px 18px;
  margin: 0;
}

#app-view .tv-live-source-panel .sim-source-create-form > label,
#app-view .tv-live-source-panel .tv-live-form-grid > label {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

#app-view .tv-live-source-panel .tv-live-form-grid > .tv-live-form-wide {
  grid-column: 1 / -1;
}

#app-view .tv-live-source-panel .sim-source-create-form > .tv-live-form-centered,
#app-view .tv-live-source-panel .tv-live-form-grid > .tv-live-form-centered {
  grid-column: auto;
  max-width: none;
  justify-self: stretch;
}

#app-view .tv-live-source-panel .sim-source-create-form > .button,
#app-view .tv-live-source-panel .tv-live-form-grid > .button {
  grid-column: auto;
  justify-self: stretch;
  min-width: 0;
}

#app-view .tv-live-source-panel #tv-live-source-status,
#app-view .tv-live-source-panel #tv-live-sources-batch-status {
  text-align: left;
}

#app-view .tv-live-source-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  padding-block: 14px;
}

#app-view .tv-live-source-toolbar .tv-live-toolbar-field {
  min-width: 0;
}

#app-view .tv-live-source-table {
  width: 100%;
  min-width: 1220px;
  table-layout: fixed;
}

#app-view .tv-live-source-table th:nth-child(1) { width: 20%; }
#app-view .tv-live-source-table th:nth-child(2) { width: 15%; }
#app-view .tv-live-source-table th:nth-child(3) { width: 13%; }
#app-view .tv-live-source-table th:nth-child(4) { width: 15%; }
#app-view .tv-live-source-table th:nth-child(5) { width: 15%; }
#app-view .tv-live-source-table th:nth-child(6) { width: 10%; }
#app-view .tv-live-source-table th:nth-child(7) { width: 12%; }

#app-view .tv-live-source-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

#app-view .tv-live-source-table td > strong,
#app-view .tv-live-source-table td > .badge,
#app-view .tv-live-source-table td > .table-caption {
  display: block;
  margin-bottom: 5px;
}

#app-view .tv-live-source-table .sim-source-actions {
  min-width: 0;
  gap: 6px;
}

#app-view .tv-live-source-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-width: 1180px;
  max-height: min(92vh, 1000px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #39465a;
  border-radius: 14px;
  background: #111923;
  color: #e7edf5;
  box-shadow: 0 24px 80px #000b;
}

#app-view .tv-live-source-dialog::backdrop {
  background: #05080dcc;
  backdrop-filter: blur(3px);
}

.tv-live-source-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #2b3747;
}

.tv-live-source-dialog-heading h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.tv-live-source-dialog-heading .eyebrow {
  margin: 0 0 4px;
}

.tv-live-source-dialog-content {
  display: grid;
  max-height: calc(min(92vh, 1000px) - 78px);
  gap: 16px;
  padding: 18px 22px 24px;
  overflow: auto;
}

.tv-live-source-url,
.tv-live-detail-stat,
.tv-live-detail-session {
  min-width: 0;
  padding: 12px;
  border: 1px solid #2b3747;
  border-radius: 9px;
  background: #17212d;
}

.tv-live-source-url {
  display: grid;
  gap: 5px;
  overflow-wrap: anywhere;
}

.tv-live-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.tv-live-detail-stat {
  display: grid;
  align-content: start;
  gap: 6px;
}

.tv-live-detail-stat strong {
  overflow-wrap: anywhere;
}

.tv-live-detail-section {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.tv-live-detail-section h3 {
  margin: 0;
}

.tv-live-detail-session-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.tv-live-detail-session {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-wrap: anywhere;
}

.tv-live-check-chart {
  display: grid;
  height: 110px;
  grid-template-columns: repeat(30, minmax(3px, 1fr));
  gap: 4px;
  align-items: stretch;
}

.tv-live-check-column {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: 100%;
}

.tv-live-check-bar {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: 3px;
  background: #243142;
}

.tv-live-check-bar.empty {
  height: 3px;
  margin-top: auto;
}

.tv-live-check-ok,
.tv-live-check-fail {
  display: block;
  flex: 0 0 auto;
  width: 100%;
}

.tv-live-check-ok { background: #48ad74; }
.tv-live-check-fail { background: #d65b63; }

.tv-live-check-legend {
  display: flex;
  gap: 16px;
  color: #a7b3c2;
  font-size: 11px;
}

.tv-live-check-legend > span::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 2px;
  content: "";
}

.tv-live-check-legend > span:first-child::before { background: #48ad74; }
.tv-live-check-legend > span:last-child::before { background: #d65b63; }

.tv-live-detail-error {
  color: #ff9a9a;
}

@media (max-width: 1100px) {
  #app-view .tv-live-source-panel .sim-source-create-form,
  #app-view .tv-live-source-panel .tv-live-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #app-view .tv-live-source-panel .sim-source-create-form,
  #app-view .tv-live-source-panel .tv-live-form-grid,
  #app-view .tv-live-source-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  #app-view .tv-live-source-panel .tv-live-form-grid > .tv-live-form-wide {
    grid-column: auto;
  }

  #app-view .tv-live-source-panel .sim-source-create-form > .button,
  #app-view .tv-live-source-panel .tv-live-form-grid > .button {
    width: 100%;
  }

  .tv-live-source-dialog-heading,
  .tv-live-source-dialog-content {
    padding-inline: 14px;
  }
}

#app-view .tv-direct-stats {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

#app-view .tv-direct-system-panel { width: 100%; }
#app-view .tv-direct-system-panel .panel-heading { justify-content: space-between; }
#app-view .tv-direct-system-panel > p { max-width: none; }
#app-view .tv-direct-provider-traffic {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-block: 12px;
}
.tv-direct-provider-chip {
  padding: 5px 9px;
  border: 1px solid #dfe5ec;
  border-radius: 999px;
  color: #536175;
  background: #f7f9fb;
  font-size: 11px;
  overflow-wrap: anywhere;
}
#app-view .tv-direct-filters { display: flex; flex-wrap: wrap; }
#app-view .tv-direct-filters > input { flex: 2 1 280px; min-width: 220px; }
#app-view .tv-direct-filters > select { flex: 1 1 190px; min-width: 170px; }

#app-view .tv-direct-channels-table {
  min-width: 1260px;
  table-layout: auto;
}

#app-view .tv-direct-channels-table td { vertical-align: middle; }
#app-view .tv-direct-title-content {
  display: flex;
  min-width: 170px;
  align-items: center;
  gap: 10px;
  white-space: normal;
}

#app-view .tv-direct-title-content img {
  width: 48px;
  height: 34px;
  flex: 0 0 48px;
  object-fit: contain;
  border-radius: 5px;
  background: #edf1f5;
}

#app-view .tv-direct-title-content > div:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#app-view .tv-direct-title-content strong,
#app-view .tv-direct-origin,
#app-view .tv-direct-traffic { overflow-wrap: anywhere; }
#app-view .tv-direct-origin { white-space: normal; }
#app-view .tv-direct-actions { min-width: 220px; white-space: normal; }
#app-view .tv-direct-actions .mini-button { margin: 2px; }

.tv-direct-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #d6dde7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.tv-direct-status.good { color: #176a43; border-color: #b7dfc7; background: #edf9f1; }
.tv-direct-status.failed { color: #a72d3d; border-color: #efc4ca; background: #fff0f2; }
.tv-direct-status.neutral { color: #657185; border-color: #d7dce4; background: #f3f5f8; }

.tv-direct-dialog {
  width: min(920px, calc(100vw - 24px));
  max-width: 920px;
  max-height: min(90vh, 900px);
  padding: 20px;
  overflow: auto;
  border: 1px solid #dbe2eb;
  border-radius: 14px;
  color: #172338;
  background: #fff;
  box-shadow: 0 24px 80px #10203340;
}

.tv-direct-dialog::backdrop { background: #101927a8; backdrop-filter: blur(2px); }
.tv-direct-dialog-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tv-direct-dialog-heading h2 { margin: 0; }
.tv-direct-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tv-direct-detail-item {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e4e9ef;
  border-radius: 9px;
  background: #f8fafc;
}
.tv-direct-detail-item strong { overflow-wrap: anywhere; }
.tv-direct-check-history { display: grid; gap: 8px; margin-top: 18px; }
.tv-direct-check-history > h3 { margin: 0 0 2px; }
.tv-direct-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #e4e9ef;
  border-radius: 8px;
}
.tv-direct-history-row > span:first-child { overflow-wrap: anywhere; }

@media (max-width: 1200px) {
  #app-view .tv-direct-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #app-view .tv-direct-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-direct-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .tv-direct-dialog { padding: 14px; }
  .tv-direct-history-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tv-direct-history-row > span:last-child { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  #app-view .tv-direct-stats { grid-template-columns: minmax(0, 1fr); }
}
