:root {
  color-scheme: light;
  --topbar-height: 92px;
  --ink: #071126;
  --muted: #607089;
  --line: #cfd8ea;
  --panel: #ffffff;
  --soft: #f2f5fb;
  --brand: #7137f1;
  --brand-dark: #4c2bc6;
  --accent: #cc1ea6;
  --blue: #2464dc;
  --cyan: #2b9fa8;
  --gold: #e09a24;
  --ok: #2ecb6f;
  --warn: #d89220;
  --bad: #d0446f;
  --shadow: 0 16px 36px rgba(7, 17, 38, 0.12);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.shell {
  display: grid;
  height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  background:
    radial-gradient(circle at 0 0, rgba(204, 30, 166, 0.22), transparent 28%),
    linear-gradient(180deg, #071126, #08182d 58%, #06111f);
  color: #eff4ff;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: 48px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 9px;
  color: #d8e7e7;
  font-size: 12px;
  line-height: 1.15;
}

.nav {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 0;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 35px;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: #d9e5ff;
  font-size: 13px;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: linear-gradient(90deg, rgba(204, 30, 166, 0.4), rgba(36, 100, 220, 0.26));
  color: white;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 7px;
}

.sidebar-update {
  width: 100%;
  min-height: 36px;
  letter-spacing: 0.02em;
}

.main {
  min-width: 0;
  height: 100vh;
  overflow: auto;
  padding: 0 24px 24px;
  scroll-padding-top: 98px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 18px 0 14px;
  background: rgba(238, 242, 247, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(207, 216, 234, 0.75);
}

.title h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.05;
}

.title {
  min-width: 0;
  padding-right: 12px;
}

.title p {
  margin: 7px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 13px;
  background: #e3e9ee;
  color: var(--ink);
  font-weight: 700;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--brand), var(--blue));
  color: white;
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.btn.danger {
  background: #f5dcda;
  color: #8c2c2c;
}

.btn.live {
  background: linear-gradient(135deg, #1ca967, #2b9fa8);
  color: white;
}

.btn.ghost {
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
}

.btn.small {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 13px;
}

.sidebar .btn {
  min-height: 35px;
  padding: 7px 10px;
  font-size: 12px;
}

.map-toolbar .btn.small {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
  background: linear-gradient(135deg, #6a32ff, #c42fd6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(106, 50, 255, 0.22);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.grid.two.even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.two.booking-map-grid {
  grid-template-columns: minmax(300px, 0.65fr) minmax(720px, 1.35fr);
}

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

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

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.panel,
.card,
.auth-box,
.modal-body {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.panel h2,
.panel h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.stat {
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat b {
  display: block;
  font-size: 27px;
  margin-bottom: 4px;
}

.stat span,
.hint,
.meta {
  color: var(--muted);
  font-size: 13px;
}

.setup-warning {
  margin-top: 16px;
  border-color: #f4c36e;
  background: #fff9ed;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8eef3;
}

.language-toggle button {
  border: 0;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.language-toggle button.active {
  background: var(--green);
  color: white;
}

.auth-box .language-toggle {
  margin-bottom: 14px;
}

.locked-section {
  opacity: 0.38;
  filter: grayscale(0.85);
}

.locked-section input,
.locked-section textarea,
.locked-section select,
.locked-section button {
  cursor: not-allowed;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.player-url {
  overflow-wrap: anywhere;
}

.decision-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.decision-bar div {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  background: #fffdf6;
}

.decision-bar span {
  color: var(--muted);
  font-size: 12px;
}

.decision-bar b {
  font-size: 20px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
}

.auth-visual {
  min-height: 100vh;
  padding: 42px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(rgba(8, 31, 38, 0.22), rgba(8, 31, 38, 0.4)),
    url("https://images.unsplash.com/photo-1528181304800-259b08848526?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.auth-visual h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.95;
}

.auth-visual p {
  max-width: 520px;
  font-size: 18px;
  line-height: 1.55;
}

.auth-pane {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}

.auth-box {
  width: min(460px, 100%);
  padding: 22px;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
}

.tabs button {
  flex: 1;
  border-radius: 7px;
  padding: 10px;
  background: transparent;
  font-weight: 800;
}

.tabs button.active {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  color: #3c4b58;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.map-wrap {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 118, 110, 0.18), transparent 38%),
    linear-gradient(45deg, transparent 48%, rgba(20, 35, 45, 0.08) 49%, rgba(20, 35, 45, 0.08) 51%, transparent 52%),
    #dfe8e9;
}

.google-map-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  background: #dfe8e9;
}

.map-toolbar {
  position: absolute;
  inset: 14px 14px auto 14px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  pointer-events: none;
}

.map-tools {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
  pointer-events: auto;
}

.map-key-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 620px);
}

.map-key-input {
  width: min(320px, 42vw);
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.map-toolbar .map-key-panel .btn.ghost {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}

.map-label {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(320px, 38%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: auto;
}

.google-map-canvas {
  width: 100%;
  min-height: 520px;
}

.map-key-hint {
  position: absolute;
  top: 62px;
  left: 14px;
  z-index: 3;
  max-width: calc(100% - 28px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.map-status {
  position: absolute;
  top: 88px;
  left: 14px;
  right: 14px;
  z-index: 3;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

.map-status[data-tone="warning"] {
  background: #fff7e8;
  border-color: #f5c87a;
  color: #875700;
}

.map-status[data-tone="success"] {
  background: #eef9f2;
  border-color: #a6d9b4;
  color: #1e6d45;
}

.map-fallback {
  position: absolute;
  inset: 0;
}

.map-fallback-copy {
  position: absolute;
  top: 152px;
  left: 14px;
  z-index: 2;
  max-width: min(420px, calc(100% - 28px));
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

@media (max-width: 900px) {
  .map-toolbar {
    flex-wrap: wrap;
  }

  .map-label {
    max-width: 100%;
    white-space: normal;
  }

  .map-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .map-key-panel {
    width: 100%;
    flex-wrap: wrap;
  }

  .map-key-input {
    width: 100%;
  }

  .map-status {
    top: 146px;
  }

  .map-fallback-copy {
    top: 198px;
  }

  .map-key-hint {
    top: 112px;
  }
}

.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 8px;
  rotate: -45deg;
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 18px rgba(142, 44, 31, 0.28);
  border: 3px solid white;
}

.pin span {
  rotate: 45deg;
  font-weight: 900;
  font-size: 12px;
}

.pin.selected {
  background: var(--brand);
  scale: 1.12;
}

.screen-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.screen-side-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.booking-screen-list {
  max-height: none;
  overflow: visible;
}

.screen-card,
.cart-card,
.order-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.screen-card.selected {
  border-color: var(--brand);
  outline: 2px solid rgba(13, 118, 110, 0.16);
}

.screen-inspector {
  display: grid;
  gap: 14px;
}

.screen-inspector h2 {
  margin: 8px 0 2px;
}

.screen-status-grid,
.screen-stat-grid {
  display: grid;
  gap: 10px;
}

.screen-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-status-grid > div {
  display: grid;
  gap: 3px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.screen-status-grid span,
.screen-url-box span,
.rate-band-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.screen-status-grid b {
  font-size: 20px;
}

.screen-status-grid small {
  color: var(--muted);
}

.screen-status-grid small.ok {
  color: #17623d;
}

.screen-status-grid small.warn {
  color: #865000;
}

.screen-status-grid small.bad {
  color: #8f2626;
}

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

.screen-url-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.screen-url-box code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #28436b;
  font-size: 13px;
}

.screen-empty-panel {
  min-height: 220px;
}

.in-basket-card {
  border-color: rgba(31, 138, 82, 0.34);
  background: #f3fbf6;
}

.screen-card > .row .btn {
  display: none;
}

.display-detail {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.photo-viewer {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  background: #dfe8e9;
}

.photo-viewer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 42px;
  border-radius: 7px;
  background: rgba(20, 35, 45, 0.76);
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.photo-arrow.left {
  left: 8px;
}

.photo-arrow.right {
  right: 8px;
}

.photo-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(20, 35, 45, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.full-booking-calendar {
  position: sticky;
  top: var(--topbar-height);
  z-index: 10;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--topbar-height) - 24px);
  margin-top: 16px;
  overflow: hidden;
  scroll-margin-top: calc(var(--topbar-height) + 12px);
}

.screen-head,
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  min-height: 25px;
  padding: 4px 8px;
  background: #edf2f5;
  color: #344452;
  font-size: 12px;
  font-weight: 800;
}

.badge.ok {
  background: #e2f4ea;
  color: #17623d;
}

.badge.warn {
  background: #fff0d9;
  color: #865000;
}

.badge.bad {
  background: #f9dfdf;
  color: #8f2626;
}

.upload-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  border: 2px dashed #b6c3cd;
  border-radius: 8px;
  background: #f8fafb;
  text-align: center;
  padding: 18px;
}

.compact-upload {
  min-height: 130px;
}

.file-input {
  display: none;
}

.media-preview {
  width: 100%;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.media-preview video,
.media-preview img {
  width: min(100%, 520px);
  max-height: 260px;
  border-radius: 8px;
  object-fit: contain;
  background: #071113;
}

.advert-thumb {
  width: 180px;
  height: 100px;
  margin-top: 8px;
  border-radius: 6px;
  object-fit: cover;
  background: #071113;
}

.sticker-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sticker-upload-panel {
  position: sticky;
  top: 18px;
}

.sticker-drop {
  min-height: 360px;
}

.sticker-source-preview,
.sticker-empty-preview {
  width: min(100%, 230px);
  aspect-ratio: 1;
  border-radius: 8px;
}

.sticker-source-preview {
  object-fit: cover;
  border: 1px solid var(--line);
  background: white;
}

.sticker-empty-preview {
  display: grid;
  place-items: center;
  border: 1px solid #d8e0e7;
  background:
    linear-gradient(45deg, #f0f3f6 25%, transparent 25%),
    linear-gradient(-45deg, #f0f3f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f3f6 75%),
    linear-gradient(-45deg, transparent 75%, #f0f3f6 75%),
    white;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  color: #5f6d7b;
  font-weight: 900;
}

.sticker-results-panel {
  min-width: 0;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px;
}

.sticker-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sticker-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #e2e8ee;
  background:
    linear-gradient(45deg, #f3f6f8 25%, transparent 25%),
    linear-gradient(-45deg, #f3f6f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f6f8 75%),
    linear-gradient(-45deg, transparent 75%, #f3f6f8 75%),
    #ffffff;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
  color: #526172;
  text-align: center;
  font-weight: 900;
}

.sticker-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sticker-card-head {
  min-height: 38px;
}

.sticker-card-head b {
  min-width: 0;
}

.default-pool {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.screen-defaults {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.screen-default-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  align-content: start;
}

.screen-default-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.screen-default-item .screen-head,
.screen-default-item .screen-head > div,
.screen-default-item b,
.screen-default-item .meta {
  min-width: 0;
}

.screen-default-item b,
.screen-default-item .meta,
.screen-default-preview span {
  overflow-wrap: anywhere;
}

.screen-default-preview {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.screen-default-preview video,
.screen-default-preview img {
  display: block;
  width: 100%;
  height: 100px;
  max-height: 100px;
  object-fit: contain;
  border-radius: 6px;
  background: #0b1418;
}

.capacity-layout {
  grid-template-columns: minmax(520px, 1fr) minmax(360px, 0.78fr);
}

.capacity-list {
  display: grid;
  gap: 10px;
}

.capacity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.capacity-meter {
  display: grid;
  gap: 6px;
}

.capacity-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf0;
}

.capacity-track div {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.capacity-track .warn,
.coverage-pin.warn {
  background: #d89220;
}

.capacity-track .bad,
.coverage-pin.bad {
  background: #b84235;
}

.capacity-track .ok,
.coverage-pin.ok {
  background: var(--brand);
}

.coverage-map {
  height: 460px;
}

.coverage-summary {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.network-filter-panel {
  margin-bottom: 14px;
}

.network-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
}

.network-performance {
  padding: 18px;
  border: 1px solid rgba(126, 93, 255, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 8%, rgba(132, 52, 230, 0.18), transparent 26%),
    radial-gradient(circle at 82% 30%, rgba(30, 148, 196, 0.14), transparent 26%),
    linear-gradient(135deg, #071126, #08172e 55%, #07101f);
  color: #f4f7ff;
  box-shadow: 0 20px 44px rgba(5, 12, 24, 0.2);
}

.network-title {
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 900;
}

.network-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.network-kpi {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(130, 152, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.network-kpi span {
  grid-row: span 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2540e8, #d81992);
  font-size: 22px;
}

.network-kpi b {
  font-size: 24px;
}

.network-kpi small {
  color: #c5d2ef;
}

.network-kpi em {
  color: #7ee36d;
  font-size: 12px;
  font-style: normal;
}

.network-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.15fr;
  gap: 12px;
  margin-top: 14px;
}

.network-card {
  min-height: 220px;
  padding: 14px;
  border: 1px solid rgba(130, 152, 255, 0.28);
  border-radius: 8px;
  background: rgba(4, 13, 30, 0.64);
}

.network-card h3 {
  margin: 0 0 12px;
  text-align: center;
  text-transform: uppercase;
  font-size: 14px;
}

.trend-chart {
  position: relative;
  height: 170px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 100% 34px, 38px 100%;
}

.trend-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.trend-chart polyline {
  fill: none;
  stroke: #9257ff;
  stroke-width: 2.5;
}

.trend-chart i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #b26cff;
  box-shadow: 0 0 18px #a15cff;
}

.trend-chart b {
  position: absolute;
  right: 10px;
  top: 8px;
  display: grid;
  padding: 8px;
  border: 1px solid #a15cff;
  border-radius: 8px;
  background: rgba(95, 36, 146, 0.28);
}

.donut-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  width: 150px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(#7439f5 0 68%, #315dff 68% 86%, #40bde3 86% 95%, #8395ff 95% 100%);
}

.donut b {
  width: 82px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: #08172e;
  text-align: center;
}

.donut small {
  display: block;
  color: #c5d2ef;
}

.legend {
  display: grid;
  gap: 10px;
  color: #d6def2;
  font-size: 13px;
}

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 999px;
  background: #8b5cf6;
}

.network-card .coverage-map {
  height: 168px;
  min-height: 168px;
}

.coverage-count {
  margin-top: 8px;
  text-align: center;
}

.coverage-count b {
  display: block;
  color: #ff4cc4;
  font-size: 30px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-top: 14px;
  border-radius: 8px;
}

.pipeline div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 16px;
  background: linear-gradient(135deg, #e31984, #832bd5);
}

.pipeline div:nth-child(2) {
  background: linear-gradient(135deg, #7c2ed5, #2848d8);
}

.pipeline div:nth-child(3) {
  background: linear-gradient(135deg, #264fd8, #1477d7);
}

.pipeline div:nth-child(4) {
  background: linear-gradient(135deg, #1986b7, #2a9c8e);
}

.pipeline b {
  grid-row: span 2;
  font-size: 28px;
}

.screen-performance-list {
  display: grid;
  gap: 10px;
}

.screen-performance-card {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(5, minmax(90px, 0.7fr)) minmax(160px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.screen-performance-card div {
  display: grid;
  gap: 3px;
}

.screen-performance-card span {
  color: var(--muted);
  font-size: 12px;
}

.history-list,
.screen-history-list {
  display: grid;
  gap: 10px;
}

.history-row {
  display: grid;
  grid-template-columns: 88px minmax(260px, 1.7fr) repeat(6, minmax(86px, 0.55fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.history-row > div,
.screen-history-item > div {
  display: grid;
  gap: 3px;
}

.history-row span,
.screen-history-item span {
  color: var(--muted);
  font-size: 12px;
}

.history-media {
  width: 82px;
  height: 82px;
  overflow: hidden;
  border-radius: 8px;
  background: #0b1418;
}

.history-media.mini {
  width: 58px;
  height: 58px;
}

.history-media video,
.history-media img,
.history-media .advert-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.empty-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.screen-history {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.screen-history-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.missing-zone {
  position: absolute;
  padding: 6px 8px;
  border: 1px dashed rgba(20, 35, 45, 0.34);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  color: #526172;
  font-size: 12px;
  font-weight: 800;
}

.missing-zone.north {
  left: 24%;
  top: 18%;
}

.missing-zone.east {
  right: 12%;
  top: 52%;
}

.missing-zone.south {
  left: 42%;
  bottom: 9%;
}

.calendar {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.full-day-calendar {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 8px;
}

.calendar-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f3f6f8;
  border-bottom: 1px solid var(--line);
}

.date-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--brand);
  color: white;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.date-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 7px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.date-picker span {
  color: #526172;
  font-size: 12px;
  font-weight: 800;
}

.date-picker input {
  min-height: 24px;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-weight: 800;
}

.house-ad-strip,
.calendar-cost-strip {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff8e6;
  color: #5e430c;
  font-size: 12px;
}

.calendar-cost-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(180px, 0.8fr);
  gap: 1px;
  padding: 0;
  background: var(--line);
  color: var(--ink);
}

.calendar-cost-strip div {
  display: grid;
  gap: 2px;
  padding: 10px;
  background: #fffdf6;
}

.calendar-cost-strip span,
.calendar-cost-strip small {
  color: var(--muted);
  font-size: 12px;
}

.calendar-cost-strip b {
  font-size: 20px;
}

.calendar-action-cell {
  align-content: center;
  gap: 7px;
}

.update-basket-btn {
  width: 100%;
  background: var(--ok);
}

.update-basket-btn.updated {
  background: #146c3e;
}

.week-slot-grid {
  display: grid;
  grid-template-columns: 76px repeat(7, minmax(112px, 1fr));
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overflow-anchor: none;
  background: var(--line);
  gap: 1px;
}

.calendar-row {
  display: contents;
}

.calendar-spacer {
  grid-column: 1 / -1;
  min-height: 1px;
  background: transparent;
}

.calendar-progress {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.progress-head b {
  color: var(--ink);
  font-size: 13px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ec;
}

.progress-track div {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 120ms ease;
}

.week-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 50px;
  padding: 7px;
  background: #f3f6f8;
  color: #344452;
  font-size: 12px;
}

.week-head b {
  font-size: 14px;
}

.week-head span {
  color: var(--muted);
  font-weight: 800;
}

.time-head {
  left: 0;
  z-index: 5;
}

.week-time {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 7px;
  background: #f8fafb;
  color: #526172;
  font-size: 11px;
  font-weight: 900;
  contain: layout paint style;
}

.week-time.hour-start,
.week-slot.hour-start {
  border-top: 2px solid #b8c5cf;
}

.week-slot {
  display: grid;
  gap: 1px;
  align-content: center;
  min-height: 30px;
  padding: 5px 6px;
  border-radius: 0;
  background: #e8f2f1;
  color: #2f6761;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 30px 112px;
}

.week-slot small {
  color: inherit;
  font-size: 10px;
  font-weight: 700;
}

.tier-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.tier-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tier-form input {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px;
  background: white;
}

.manage-grid {
  align-items: start;
  margin-bottom: 16px;
}

.manage-pricing-panel {
  margin-bottom: 16px;
}

.screen-settings-form {
  margin-top: 14px;
}

.settings-panel {
  max-width: 760px;
}

.settings-form {
  margin-top: 14px;
}

.rate-band-form {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.rate-band-head {
  display: grid;
  gap: 2px;
}

.rate-band-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(130px, 0.9fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr);
  gap: 8px;
}

.rate-band-row input,
.rate-band-row select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  background: white;
}

.traffic-warning {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #f1b94e;
  border-radius: 8px;
  background: #fff8e8;
  color: #7a4b00;
  font-size: 12px;
  font-weight: 800;
}

.traffic-warning[hidden] {
  display: none;
}

.traffic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.traffic-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.traffic-pill.high {
  background: #dbe8ff;
  color: #173f9b;
}

.traffic-pill.low {
  background: #e8f7ee;
  color: #17623d;
}

.traffic-pill.none {
  background: #edf1f5;
  color: #647082;
}

.week-slot:hover {
  background: #cfe5e2;
}

.week-slot.traffic-high {
  background: #e5edff;
  color: #1d4fb5;
}

.week-slot.traffic-low {
  background: #e8f7ee;
  color: #17623d;
}

.week-slot.traffic-none,
.week-slot.unavailable {
  background: #f0f2f5;
  color: #7b8796;
  cursor: not-allowed;
}

.week-slot.selected {
  background: var(--brand);
  color: white;
}

.week-slot.in-basket {
  background: #e4f2e9;
  color: #17623d;
  box-shadow: inset 0 0 0 2px rgba(31, 138, 82, 0.28);
}

.week-slot.in-basket.selected {
  background: var(--brand);
  color: white;
}

.week-slot.booked {
  background: #f4e3df;
  color: #9a392b;
  cursor: not-allowed;
}

.hour-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.hour-row:last-child {
  border-bottom: 0;
}

.hour-label {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafb;
  border-right: 1px solid var(--line);
  color: #526172;
  font-size: 12px;
  font-weight: 900;
}

.slot-strip {
  display: grid;
  grid-template-columns: repeat(240, 30px);
  gap: 2px;
  overflow-x: auto;
  padding: 7px;
}

.slot-dot {
  width: 30px;
  height: 22px;
  border-radius: 5px;
  background: #e8f2f1;
  color: #2f6761;
  font-size: 9px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
}

.slot-dot:hover {
  background: #cfe5e2;
}

.slot-dot.selected {
  background: var(--brand);
  color: white;
}

.slot-dot.booked {
  background: #f4e3df;
  color: #9a392b;
  cursor: not-allowed;
}

.cart-total {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.table th,
.table td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f3f6f8;
  color: #526172;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 22, 29, 0.48);
}

.validation-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 22, 29, 0.5);
}

.validation-popup {
  width: min(460px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.validation-popup h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.validation-popup p {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.validation-popup .btn {
  width: 100%;
}

.modal-body {
  width: min(680px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  padding: 18px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  pointer-events: none;
  max-width: 360px;
  border-radius: 8px;
  padding: 12px 14px;
  background: #14232d;
  color: white;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow);
}

.player {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #050708;
  color: white;
}

.player-frame {
  width: min(100vw, calc(100vh * 1080 / 1920));
  height: min(100vh, calc(100vw * 1920 / 1080));
  aspect-ratio: 1080 / 1920;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(13, 118, 110, 0.36), transparent 30%),
    linear-gradient(135deg, #071113, #101b23 58%, #271a14);
}

.player-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  text-align: center;
}

.player-stage h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(42px, 8vw, 112px);
  line-height: 0.96;
}

.player-stage img,
.player-stage video {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
}

.player-stage .signage-video {
  pointer-events: none;
}

.player-stage .signage-video::-webkit-media-controls,
.player-stage .signage-video::-webkit-media-controls-panel,
.player-stage .signage-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  opacity: 0 !important;
}

.player-logo-toggle {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 6;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  color: white;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  opacity: 0.86;
  padding: 4px;
}

.player-logo-toggle:hover {
  opacity: 1;
}

.player-logo-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-countdown {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 5;
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(30, 34, 36, 0.22);
  color: rgba(190, 196, 198, 0.38);
  text-align: right;
  font-size: 18px;
  font-weight: 900;
  backdrop-filter: blur(2px);
  opacity: 0.42;
}

.player.vertical .player-logo-toggle,
.player.vertical .player-countdown {
  transform: rotate(-90deg);
  transform-origin: center;
}

.player.vertical .player-countdown {
  right: 8px;
  top: 52px;
}

.countdown-track {
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(170, 176, 178, 0.16);
}

.countdown-track div {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(170, 176, 178, 0.38);
}

.player-info {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 12px;
  background: transparent;
  color: #dce8ea;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  body {
    height: auto;
    overflow: auto;
  }

  .shell,
  .auth-page,
  .grid.two,
  .grid.two.even,
  .grid.two.booking-map-grid,
  .grid.three,
  .sticker-workspace,
  .screen-status-grid,
  .screen-stat-grid,
  .rate-band-row {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .main {
    height: auto;
    overflow: visible;
    padding-top: 18px;
  }

  .topbar {
    position: static;
    padding-top: 0;
  }

  .full-booking-calendar {
    position: static;
    max-height: none;
  }

  .week-slot-grid {
    max-height: 720px;
  }

  .sticker-upload-panel {
    position: static;
  }

  .auth-visual {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .main,
  .auth-pane,
  .auth-visual {
    padding: 18px;
  }

  .topbar,
  .screen-head,
  .row,
  .player-info,
  .calendar-cost-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-cost-strip {
    grid-template-columns: 1fr;
  }

  .decision-bar {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}
