:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #68726f;
  --line: #dce4df;
  --paper: #fbf8f2;
  --panel: #ffffff;
  --sea: #2f7e89;
  --sage: #8ba889;
  --coral: #d96f54;
  --gold: #c5a45d;
  --pink: #f79bd0;
  --rose: #7e3943;
  --shadow: 0 24px 60px rgba(23, 33, 29, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.preview-locked .app-shell {
  display: none;
}

.preview-gate {
  min-height: 100vh;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(90, 35, 45, 0.42), rgba(90, 35, 45, 0.1) 48%, rgba(90, 35, 45, 0.26)),
    url("assets/login-hero-generated.png") center / cover;
}

.preview-locked .preview-gate {
  display: grid;
}

.preview-card {
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 8px;
  background: rgba(255, 246, 237, 0.95);
  box-shadow: var(--shadow);
}

.preview-card img {
  width: min(330px, 82vw);
  height: auto;
}

.preview-card h1,
.preview-card p {
  margin: 0;
}

.preview-card h1 {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.9;
}

.preview-card p:not(.section-kicker):not(.small-note):not(.login-error) {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.access-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(90, 35, 45, 0.42), rgba(90, 35, 45, 0.1) 48%, rgba(90, 35, 45, 0.26)),
    url("assets/login-hero-generated.png") center / cover;
}

.access-card {
  width: min(620px, 100%);
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 8px;
  background: rgba(255, 246, 237, 0.94);
  box-shadow: var(--shadow);
}

.access-card h1,
.access-card p {
  margin: 0;
}

.access-card h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.96;
}

.access-card p:not(.section-kicker) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(24px, 5vw, 64px);
  background:
    linear-gradient(90deg, rgba(90, 35, 45, 0.42), rgba(90, 35, 45, 0.1) 48%, rgba(90, 35, 45, 0.26)),
    url("assets/login-hero-generated.png")
      center / cover;
}

.login-view::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(30, 11, 17, 0.42), transparent);
}

.login-content {
  position: relative;
  z-index: 1;
  width: min(1760px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
}

.brand-panel {
  color: #fff;
  max-width: min(980px, 100%);
  padding: 0 0 70px;
  text-shadow: 0 10px 28px rgba(74, 21, 28, 0.24);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 800;
}

.brand-panel h1 {
  margin: 0;
  line-height: 0.82;
  font-weight: 950;
  letter-spacing: 0;
  max-width: 100%;
}

.headline-main,
.headline-sub {
  display: block;
}

.headline-main {
  font-size: clamp(5.8rem, 9vw, 11.4rem);
  line-height: 0.75;
  text-transform: uppercase;
}

.headline-sub {
  margin-top: clamp(6px, 1vw, 14px);
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  line-height: 0.9;
  text-transform: lowercase;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 1.55vw, 1.65rem);
  line-height: 1.22;
  color: rgba(255, 255, 255, 0.96);
}

.trust-strip {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-strip span {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  border-radius: 8px;
  color: #fff;
}

.login-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background: rgba(255, 246, 237, 0.94);
  backdrop-filter: blur(18px);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card > div,
.login-card .small-note {
  grid-column: auto;
}

.login-card h2,
.topbar h2,
.hero-copy h1,
.panel-heading h3,
.now-playing h3 {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 750;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.contact-button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  font-weight: 850;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--ink);
  padding: 0 18px;
}

.login-card .primary-button,
.contact-button {
  min-height: 56px;
  border-radius: 999px;
  color: var(--rose);
  background: var(--pink);
  font-size: 1.05rem;
  font-weight: 650;
}

.contact-button {
  border: 0;
}

.secondary-button {
  color: var(--ink);
  background: #edf3ef;
  border: 1px solid var(--line);
  padding: 0 16px;
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
}

.icon-button {
  width: 44px;
  background: #fff;
  border: 1px solid var(--line);
}

button:hover {
  transform: translateY(-1px);
}

.small-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(217, 111, 84, 0.3);
  border-radius: 6px;
  color: #7e3943;
  background: rgba(217, 111, 84, 0.1);
  font-size: 0.88rem;
  font-weight: 750;
}

.login-footer-logo {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 1;
  width: min(520px, 48vw);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 18px rgba(80, 20, 40, 0.2));
}

.admin-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: #f7f2ea;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #fffaf2;
}

.admin-logo {
  width: 100%;
  max-width: 230px;
  height: auto;
}

.admin-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-nav a {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
}

.admin-nav a:hover {
  border-color: var(--line);
  background: #fff;
}

.admin-content {
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 24px;
}

.admin-hero {
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 33, 29, 0.94), rgba(126, 57, 67, 0.68)),
    url("assets/login-hero-generated.png") center / cover;
  box-shadow: var(--shadow);
}

.admin-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.86;
}

.admin-hero p:not(.section-kicker) {
  max-width: 650px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.55;
}

.admin-hero-card {
  min-width: 260px;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(23, 33, 29, 0.58);
  backdrop-filter: blur(16px);
}

.admin-hero-card span,
.admin-hero-card small {
  color: rgba(255, 255, 255, 0.72);
}

.admin-hero-card strong {
  font-size: 1.15rem;
}

.admin-stats,
.admin-grid,
.admin-security-grid {
  display: grid;
  gap: 16px;
}

.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-stat,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(23, 33, 29, 0.07);
}

.admin-stat {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.admin-stat span {
  color: var(--muted);
  font-weight: 750;
}

.admin-stat strong {
  font-size: 2.2rem;
  line-height: 1;
}

.admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.admin-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-panel-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-table,
.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 120px 120px 150px auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.admin-row.header {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-row strong,
.admin-item strong {
  display: block;
}

.admin-row span,
.admin-item span,
.admin-security-grid span {
  color: var(--muted);
}

.status-pill {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--sea);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill.expired,
.status-pill.suspended,
.status-pill.cancelled {
  background: var(--coral);
}

.status-pill.trial {
  background: var(--gold);
}

.admin-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.admin-item-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.admin-security-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-security-grid div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #fbfdfb;
}

.client-console-label {
  margin: 0;
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 800;
}

.area-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.area-button {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.area-button.active {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 10px 28px rgba(23, 33, 29, 0.08);
}

.area-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.area-button strong,
.area-button span {
  display: block;
}

.area-button span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.area-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sage);
}

.area-badge.offline {
  background: #a7ada9;
}

.area-badge.warning {
  background: var(--gold);
}

.area-badge.error {
  background: var(--coral);
}

.offline-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3bb273;
  box-shadow: 0 0 0 5px rgba(59, 178, 115, 0.14);
}

.offline .dot {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(217, 111, 84, 0.14);
}

.meter,
.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece8;
}

.meter span,
.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--sea), var(--gold));
  transition: width 250ms ease;
}

.offline-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.content {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 24px 24px 0;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-area {
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(9, 24, 25, 0.06), rgba(9, 24, 25, 0.78)),
    var(--hero-image) center / cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 0.96;
}

.hero-copy p:last-child {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-status {
  flex: 0 0 auto;
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(10, 25, 24, 0.48);
  backdrop-filter: blur(18px);
}

.hero-status span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.86rem;
}

.hero-status strong {
  font-size: 1.1rem;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.client-brand-footer {
  display: grid;
  place-items: center;
  margin: 28px -24px 0;
  padding: 30px 24px 36px;
  background: #fbf8f2;
  border-top: 1px solid var(--line);
}

.client-footer-logo {
  display: block;
  width: min(720px, 74vw);
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(23, 33, 29, 0.08));
}

.player-panel,
.schedule-panel,
.ops-panel {
  display: grid;
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.player-panel {
  min-height: 230px;
}

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

.now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pulse {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 25%, transparent 26%),
    conic-gradient(from 120deg, var(--sea), var(--gold), var(--coral), var(--sea));
  box-shadow: 0 0 0 12px rgba(47, 126, 137, 0.1);
}

.playing .pulse {
  animation: breathe 1.8s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 18px rgba(47, 126, 137, 0.08);
  }
}

.now-playing h3 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.now-playing p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.play-button {
  min-width: 160px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.slot {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.slot:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.slot time {
  color: var(--sea);
  font-weight: 900;
}

.slot strong,
.slot span {
  display: block;
}

.slot span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.ops-panel ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ops-panel li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.ops-panel strong {
  color: var(--sea);
}

@media (max-width: 980px) {
  .login-view,
  .dashboard,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .login-view {
    padding: 24px 18px 110px;
  }

  .login-content {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .brand-panel {
    max-width: 680px;
    padding: 0;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .area-list {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .hero-area {
    min-height: 440px;
    align-items: flex-end;
    flex-direction: column;
    justify-content: flex-end;
  }

  .hero-status {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .login-content {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .brand-panel {
    max-width: 760px;
    padding: 0;
  }

  .login-card {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .brand-panel {
    padding: 0;
  }

  .brand-panel h1 {
    max-width: 100%;
  }

  .headline-main {
    font-size: clamp(4.1rem, 18vw, 5.8rem);
  }

  .headline-sub {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  .lead {
    font-size: 1.25rem;
  }

  .content,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .ops-panel li {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy h1 {
    font-size: 2.25rem;
  }
}
