:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-muted: #f0f1f5;
  --surface: #ffffff;
  --surface-strong: #f8f9fd;
  --text: #20222b;
  --text-soft: #676b76;
  --text-faint: #9ea3af;
  --line: #ececf2;
  --line-strong: #e0e2ea;
  --accent: #e60000;
  --accent-strong: #ff3b30;
  --accent-soft: rgba(230, 0, 0, 0.08);
  --shadow-soft: 0 12px 28px rgba(24, 32, 56, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --left-rail: 260px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #f8f9fc;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.layout {
  display: grid;
  grid-template-columns: var(--left-rail) minmax(0, 1fr);
  min-height: 100vh;
}

.left-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  padding: 20px 22px 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand--rail {
  margin-bottom: 6px;
}

.brand__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand__logo {
  height: 20px;
  width: auto;
  display: block;
}

.brand__text {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand__text--strong {
  font-weight: 900;
}

.brand__text--light {
  font-weight: 300;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.icon-button--light:hover {
  background: var(--bg-soft);
}

.admin-badge,
.panel,
.hero-panel,
.stat-card,
.auth-card,
.not-found-card {
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.admin-badge {
  padding: 18px;
  border-radius: var(--radius-lg);
}

.admin-badge__eyebrow,
.section-heading__eyebrow,
.auth-showcase__eyebrow,
.auth-card__eyebrow,
.mode-card__eyebrow,
.metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-badge p,
.hero-panel__copy,
.panel__copy,
.stat-card p,
.activity-item p,
.mode-card p,
.auth-showcase__copy,
.auth-feature p,
.auth-card__header p,
.not-found-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.rail-nav {
  display: grid;
  gap: 4px;
}

.rail-nav__title {
  margin: 12px 14px 4px;
  color: var(--text-faint);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rail-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text-soft);
  transition: 160ms ease;
}

.rail-nav__item:hover,
.rail-nav__item--active {
  color: var(--text);
  background: var(--bg-soft);
}

.rail-nav__icon {
  width: 22px;
  text-align: center;
}

.rail-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rail-section__title {
  margin: 0 0 12px;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.setting-list {
  display: grid;
  gap: 14px;
}

.setting-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-pill,
.operator-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.86rem;
}

.status-pill--good {
  background: rgba(25, 174, 93, 0.1);
  color: #127246;
}

.status-pill--danger {
  background: rgba(220, 53, 69, 0.1);
  color: #a8202e;
}

.operator-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #19ae5d;
}

.rail-footer {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.text-link {
  color: var(--text-soft);
}

.text-link--danger {
  color: var(--accent);
}

.main-stage {
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar--admin {
  padding-bottom: 6px;
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.admin-main {
  display: grid;
  gap: 24px;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.hero-panel__title {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1.1;
}

.hero-panel__meta {
  display: grid;
  gap: 16px;
  min-width: 220px;
}

.hero-panel__meta strong,
.stat-card strong,
.preview-meta strong,
.mode-card h4 {
  font-size: 1.6rem;
  line-height: 1.1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.stats-section {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.stats-section--weekly {
  background: #ffffff;
}

.stats-section--today {
  background: #ffffff;
}

.stats-section--cumulative {
  background: #f6f7fb;
}

.stats-section__intro {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.today-summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
}

.today-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.today-summary__row:first-child {
  border-top: 0;
}

.today-summary__label,
.today-summary__hint {
  margin: 0;
}

.today-summary__label {
  font-weight: 700;
  color: var(--text);
}

.today-summary__hint {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.today-summary__split {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.today-summary__split strong {
  color: var(--text);
}

.today-summary__value {
  flex-shrink: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);
}

.stats-grid--weekly {
  margin-top: 0;
}

.stats-grid--weekly .stat-card {
  background: var(--surface-strong);
  box-shadow: none;
  backdrop-filter: none;
}

.stats-section--cumulative .stat-card {
  background: rgba(255, 255, 255, 0.92);
}

.stat-card,
.panel {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.stat-split {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.stat-split__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.stat-split__item strong {
  font-size: 1rem;
  color: var(--text);
}

.user-list {
  display: grid;
  gap: 14px;
}

.user-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.user-list__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.user-list__item--deleted {
  opacity: 0.6;
}

.user-list__identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-list__avatar {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eef1f8;
  color: var(--text);
  font-weight: 700;
}

.user-list__identity strong,
.video-card__body strong {
  display: block;
  margin-bottom: 4px;
}

.user-list__identity p,
.user-list__meta span,
.video-card__body p {
  margin: 0;
  color: var(--text-soft);
}

.user-list__meta {
  display: grid;
  gap: 4px;
  text-align: right;
}

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

.users-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.users-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.users-search__input {
  min-width: 240px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}

.users-search__input:focus {
  border-color: rgba(230, 0, 0, 0.35);
  box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.08);
}

.users-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.users-filter__label {
  white-space: nowrap;
}

.users-filter__select {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
  cursor: pointer;
}

.users-filter__select:focus {
  border-color: rgba(230, 0, 0, 0.35);
  box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.08);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 16px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.data-table thead th {
  padding-top: 0;
  border-top: 0;
  color: var(--text-faint);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-table tbody td {
  color: var(--text);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.video-card__thumb {
  min-height: 150px;
  position: relative;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.video-card__thumb--red {
  background: #d92b2b;
}

.video-card__thumb--blue {
  background: #1f5f9c;
}

.video-card__thumb--gold {
  background: #c98614;
}

.video-card__thumb--charcoal {
  background: #1f2431;
}

.video-card__thumb--fallback {
  background: linear-gradient(180deg, #2c3446 0%, #171d2a 100%);
}

.video-card__thumb--image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.video-card__duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 19, 27, 0.78);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.video-card__body {
  padding: 16px;
}

.video-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.video-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.video-card__actions {
  margin-top: 14px;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.comment-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.comment-item__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-item__head strong {
  color: var(--text);
}

.comment-item__head span,
.comment-item__meta span {
  color: var(--text-soft);
}

.comment-item__body {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.6;
}

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

.comment-item__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.dashboard-grid--billboard {
  align-items: start;
}

.dashboard-grid--billboard .panel--feature {
  grid-column: 1 / -1;
}

.panel--feature {
  min-height: 100%;
}

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

.panel__header h3,
.auth-card__header h2,
.not-found-card h1 {
  margin: 0;
  font-size: 1.4rem;
}

.progress-stack,
.activity-list,
.mode-stage {
  display: grid;
  gap: 16px;
}

.progress-row__label,
.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-muted);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.activity-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.activity-item__dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.mode-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  margin: 22px 0;
  border-radius: 999px;
  background: var(--bg-soft);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
}

.live-indicator__label {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.live-indicator__badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e7f8ee;
  color: #127246;
  font-size: 0.86rem;
  font-weight: 600;
}

.mode-toggle__button {
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: 160ms ease;
}

.mode-toggle__button--active {
  color: #fff;
  background: var(--accent);
}

.mode-card {
  display: none;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.mode-card--active {
  display: block;
}

.mode-card h4 {
  margin: 0 0 10px;
}

.mode-detail {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.mode-detail__label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mode-detail strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.05rem;
}

.mode-detail p {
  margin: 0;
  color: var(--text-soft);
}

.mode-detail__mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
  word-break: break-all;
}

.mode-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.mode-field span {
  color: var(--text);
  font-weight: 600;
}

.mode-field input,
.mode-field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}

.mode-field select {
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6773' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}

.mode-field input:focus,
.mode-field select:focus {
  border-color: rgba(230, 0, 0, 0.35);
  box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.08);
}

.mode-player {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #111722;
}

.mode-player--compact {
  max-width: 360px;
}

.mode-player__empty {
  padding: 18px;
  color: #c9d3e5;
  font-size: 0.94rem;
}

.mode-player__video {
  width: 100%;
  min-height: 180px;
  background: #000;
}

.mode-player .video-js {
  width: 100%;
  min-height: 180px;
}

.mode-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.mode-feedback {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.mode-feedback--success {
  color: #1f6b3a;
  background: rgba(31, 107, 58, 0.12);
}

.mode-feedback--error {
  color: var(--accent);
  background: rgba(230, 0, 0, 0.08);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-modal[hidden] {
  display: none !important;
}

.admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 19, 27, 0.48);
  backdrop-filter: blur(6px);
}

.admin-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 40px rgba(24, 32, 56, 0.16);
}

.admin-modal__eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-modal__title {
  margin: 0;
  font-size: 1.35rem;
}

.admin-modal__copy {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.admin-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.billboard-preview {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: #eef1f8;
}

.billboard-preview__screen {
  width: 100%;
  min-height: 240px;
  padding: 24px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: #1f2431;
}

.billboard-preview__screen--video-ads {
  background: #d92b2b;
}

.billboard-preview__screen--live-tv {
  background: #1f5f9c;
}

.billboard-preview__screen--image-ads {
  background: #c98614;
}

.billboard-preview__badge {
  display: inline-block;
  padding: 7px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.billboard-preview__screen strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.9rem;
}

.preview-meta {
  margin-top: 18px;
}

.auth-page {
  min-height: 100vh;
  padding: 24px;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.auth-topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-topbar__text {
  color: var(--text-soft);
}

.auth-layout {
  display: grid;
  grid-template-columns: 40% 40%;
  gap: 24px;
  align-items: stretch;
  justify-content: center;
}

.auth-showcase,
.auth-card,
.not-found-card {
  padding: 34px;
  border-radius: var(--radius-xl);
}

.auth-showcase {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("../images/auth-showcase.png") center/cover no-repeat;
  background-color: #0c2741;
  color: #fff;
}

.auth-showcase--admin::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.auth-showcase h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.auth-showcase__copy,
.auth-feature p {
  color: rgba(255, 255, 255, 0.82);
}

.auth-showcase__feature-list {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auth-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
}

.auth-feature__icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.auth-card__header {
  margin-bottom: 20px;
}

.demo-credentials,
.alert {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--bg-soft);
}

.alert--error {
  color: #9d1c1c;
  background: rgba(230, 0, 0, 0.08);
}

.demo-credentials p {
  margin: 0;
}

.demo-credentials p + p {
  margin-top: 8px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(230, 0, 0, 0.08);
  color: var(--accent);
  font-size: 0.92rem;
}

.auth-error[hidden] {
  display: none;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  outline: none;
}

.auth-field input:focus {
  border-color: rgba(230, 0, 0, 0.35);
  box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.button--primary {
  color: #fff;
  background: var(--accent);
}

.button--dark {
  color: #fff;
  background: #12141b;
}

.button--danger-outline {
  padding: 10px 14px;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(230, 0, 0, 0.22);
}

.auth-submit {
  width: 100%;
}

.not-found-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.not-found-card {
  max-width: 420px;
  text-align: center;
}

@media (max-width: 1100px) {
  .stats-grid,
  .dashboard-grid,
  .auth-layout,
  .layout {
    grid-template-columns: 1fr;
  }

  .left-rail {
    position: static;
    height: auto;
  }

  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 1101px) {
  .billboard-preview__screen--live-tv {
    width: min(100%, 520px);
    min-height: 260px;
    margin: 0 auto;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .main-stage,
  .auth-page {
    padding: 18px;
  }

  .topbar,
  .auth-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .mode-toggle {
    width: 100%;
    flex-wrap: wrap;
  }

  .mode-toggle__button {
    flex: 1 1 160px;
  }

  .today-summary__row {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-list__item {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-list__meta,
  .user-list__actions {
    text-align: left;
  }

  .users-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .users-search {
    width: 100%;
  }

  .users-search__input {
    min-width: 100%;
  }

  .users-filter {
    width: 100%;
    justify-content: space-between;
  }

  .users-filter__select {
    flex: 1;
  }
}

.channels-form__textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  outline: none;
  font: inherit;
  resize: vertical;
}

.channels-form__textarea:focus {
  border-color: rgba(230, 0, 0, 0.35);
  box-shadow: 0 0 0 4px rgba(230, 0, 0, 0.08);
}

.channels-empty {
  margin: 16px 0 0;
  color: var(--text-muted, #6b7280);
}

.user-list__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-list__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.creators-cell__identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creators-cell__identity strong {
  display: block;
}

.creators-cell__handle {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.creators-cell__sub {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.creators-cell__actions {
  display: flex;
  justify-content: flex-end;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-header__identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-header__avatar {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #eef1f8;
  color: var(--text);
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-header__identity h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.profile-header__handle {
  margin: 4px 0 0;
  color: var(--text-soft);
}

.profile-header__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.profile-header__counts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.profile-header__count {
  display: grid;
  gap: 2px;
  min-width: 90px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  text-align: left;
}

.profile-header__count strong {
  font-size: 1.2rem;
  line-height: 1.1;
}

.profile-header__count span {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.profile-details {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.profile-details__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.profile-details__row:first-child {
  border-top: 0;
}

.profile-details dt {
  color: var(--text-soft);
  font-weight: 600;
}

.profile-details dd {
  margin: 0;
  word-break: break-word;
}

.panel__header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-modal__dialog--wide {
  max-width: 560px;
  width: calc(100% - 32px);
}

.upload-form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.upload-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.upload-progress {
  display: grid;
  gap: 6px;
}

.upload-progress__bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.upload-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 120ms ease;
}

.upload-progress__label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.app-updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.app-updates-intro {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.app-updates-intro__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-updates-intro__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.app-updates-intro__title {
  margin: 4px 0 0;
  font-size: 1.4rem;
  line-height: 1.2;
}

.app-updates-card__details {
  margin-bottom: 18px;
}

.app-updates-card__form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.user-list__tail {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-list__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.users-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.users-pagination__page {
  color: var(--text-soft);
  font-size: 14px;
}

/* Weekly daily-activity bar chart (rendered into [data-weekly-chart]). */
.weekly-chart {
  margin-top: 20px;
  padding: 22px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.weekly-chart__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.weekly-chart__title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.weekly-chart__subtitle {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.weekly-chart__legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.weekly-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.weekly-chart__legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.weekly-chart__legend-swatch--users,
.weekly-chart__bar--users {
  background: #4267d6;
}

.weekly-chart__legend-swatch--long-videos,
.weekly-chart__bar--long-videos {
  background: #19ae5d;
}

.weekly-chart__legend-swatch--clips,
.weekly-chart__bar--clips {
  background: #f59e0b;
}

.weekly-chart__body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  height: 220px;
}

.weekly-chart__day {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
}

.weekly-chart__day-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}

.weekly-chart__bar {
  flex: 1 1 0;
  max-width: 22px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  transition: height 280ms ease;
}

.weekly-chart__day-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

/* Hamburger-toggled rail collapse (driven by .layout--rail-collapsed from
   shared/side-menu.js). Collapsed state hides everything except the
   hamburger button — on desktop the rail shrinks to a narrow column,
   on mobile (≤1100px) the rail hugs its content as a slim banner.
   Mobile also defaults to collapsed when no localStorage preference
   exists yet (the JS handles the default — see shared/side-menu.js). */
.layout--rail-collapsed {
  --left-rail: 56px;
}

.layout--rail-collapsed .left-rail {
  padding: 20px 8px;
  align-items: center;
}

.layout--rail-collapsed .brand--rail {
  justify-content: center;
}

.layout--rail-collapsed .brand__link,
.layout--rail-collapsed .admin-badge,
.layout--rail-collapsed .rail-nav,
.layout--rail-collapsed .rail-footer {
  display: none;
}

@media (max-width: 1100px) {
  .layout--rail-collapsed {
    --left-rail: auto;
  }

  .layout--rail-collapsed .left-rail {
    padding: 12px 14px;
    align-items: stretch;
  }
}

/* Economy supply map (driven by economy-admin.js). The SVG silos fill from
   the bottom up to reflect each silo's share of total minted; mini-metrics
   render the same numbers in tabular form below. */
.economy-chart {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  color: var(--text);
}

.economy-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
}

.economy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.economy-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.economy-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.economy-metric:first-child {
  border-top: 0;
}

.economy-metric span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.economy-metric strong {
  color: var(--text);
  font-size: 1rem;
}

/* Stars dashboard — daily-issued bar chart container (the SVG is sized via
   viewBox so it scales responsively). The bars are emitted by JS at runtime
   into [data-stardash-chart]. */
.stardash-chart {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  color: var(--text);
}

.stardash-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
}

.stardash-chart__bar {
  fill: #4267d6;
  transition: height 280ms ease, y 280ms ease;
}

.stardash-chart__axis-label {
  fill: var(--text-soft);
  font-size: 11px;
}

.stardash-chart__value-label {
  fill: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.stardash-legend {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.stardash-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.stardash-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #4267d6;
  display: inline-block;
}

/* ── KYC review (dedicated /kyc console + user-profile panel) ────────────── */
.kyc-queue {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kyc-queue__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.kyc-queue__item span {
  color: #6b7280;
  font-size: 0.85em;
}
.kyc-queue__item--active {
  border-color: #4267d6;
  background: #f3f6ff;
}
.kyc-row {
  padding: 12px 0;
  border-top: 1px solid #eef0f5;
}
.kyc-row:first-child {
  border-top: 0;
}
.kyc-row__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kyc-row__value {
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.kyc-row__image {
  display: inline-block;
  margin-top: 8px;
}
.kyc-row__image img {
  max-width: 240px;
  max-height: 180px;
  border-radius: 6px;
  border: 1px solid #e2e6ef;
  object-fit: cover;
}
.kyc-row__meta {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 0.85em;
}
.kyc-row__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
