/* ============================================================
   PARKO SIGNAGE — Design System v2 "Dual"
   Landing: light editorial. Dashboard: light default + dark toggle.
   Player: always dark (self-contained).
   Typography: Space Grotesk (display) + Manrope (text)
   ============================================================ */

:root {
  /* Brand */
  --lime: #b9e916;
  --lime-deep: #86ac0a;
  --lime-ink: #1a2005;
  --cyan: #0fb5bf;
  --ok: #17a34a;
  --warn: #d97706;
  --err: #dc2626;

  /* Light theme (default) */
  --bg: #f6f5f0;
  --surface: #ffffff;
  --surface-2: #f1f0ea;
  --surface-3: #e9e8e0;
  --line: rgba(20, 24, 43, 0.10);
  --line-strong: rgba(20, 24, 43, 0.18);
  --tx: #14182b;
  --tx-2: #4b5266;
  --tx-3: #8b90a1;
  --accent: var(--lime-deep);
  --accent-fill: var(--lime);
  --accent-glow: rgba(185, 233, 22, 0.28);
  --shadow-card: 0 1px 2px rgba(20,24,43,.05), 0 8px 28px rgba(20,24,43,.07);
  --shadow-pop: 0 24px 70px rgba(20, 24, 43, 0.18);

  --font-display: 'Space Grotesk', sans-serif;
  --font-text: 'Manrope', sans-serif;
  --r-sm: 9px;
  --r-md: 14px;
  --r-lg: 22px;
}

[data-theme="dark"] {
  --bg: #0c0f1a;
  --surface: #131828;
  --surface-2: #1a2136;
  --surface-3: #222b45;
  --line: rgba(150, 162, 194, 0.14);
  --line-strong: rgba(150, 162, 194, 0.26);
  --tx: #eef1f9;
  --tx-2: #a8b0c6;
  --tx-3: #6b7490;
  --accent: #c8f542;
  --accent-fill: #c8f542;
  --accent-glow: rgba(200, 245, 66, 0.16);
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #f87171;
  --cyan: #45e0e8;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 30px 80px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--tx);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background .25s ease, color .25s ease;
}

h1, h2, h3, h4, .display { font-family: var(--font-display); letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; }

/* ---------- Boot loader ---------- */
.boot-loader { display: flex; align-items: center; justify-content: center; height: 100vh; }
.boot-mark {
  width: 52px; height: 52px; border-radius: 16px;
  background: conic-gradient(from 180deg, var(--lime), var(--cyan), var(--lime));
  animation: bootspin 1.1s cubic-bezier(.6,.1,.3,.9) infinite;
}
@keyframes bootspin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: var(--r-sm);
  padding: 10px 18px; font-size: 14px; font-weight: 700; color: var(--tx);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--tx); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(20,24,43,.25); }
[data-theme="dark"] .btn-primary { background: var(--accent-fill); color: var(--lime-ink); }
.btn-accent { background: var(--accent-fill); color: var(--lime-ink); }
.btn-accent:hover { box-shadow: 0 0 0 4px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--tx-2); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--tx); }
.btn-danger { background: transparent; color: var(--err); border: 1px solid currentColor; opacity: .85; }
.btn-danger:hover { opacity: 1; background: rgba(220,38,38,.07); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn-icon { padding: 8px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 800; color: var(--tx-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .07em; }
.input, select.input, textarea.input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 11px 14px; font-size: 14.5px; color: var(--tx);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--tx-3); }

/* ============================================================
   LANDING — light editorial (never dark)
   ============================================================ */
.landing-body { background: #f6f5f0; color: #14182b; }
.l-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4.5vw, 56px); }

.l-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #14182b; }
.brand-name em { font-style: normal; color: var(--lime-deep); }
.l-nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 700; color: #4b5266; }
.l-nav-links a:hover { color: #14182b; }
@media (max-width: 760px) { .l-nav-links .l-anchor { display: none; } }

/* Hero */
.l-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; padding: clamp(36px, 7vh, 80px) 0 clamp(40px, 8vh, 90px); }
@media (max-width: 920px) { .l-hero { grid-template-columns: 1fr; } }
.l-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #14182b; background: var(--lime); padding: 6px 14px; border-radius: 99px; }
.l-hero h1 { margin-top: 22px; font-size: clamp(38px, 5.4vw, 66px); line-height: 1.02; color: #14182b; font-weight: 700; }
.l-hero h1 .under { position: relative; white-space: nowrap; }
.l-hero h1 .under::after { content: ''; position: absolute; left: 0; right: 0; bottom: .06em; height: .28em; background: var(--lime); z-index: -1; border-radius: 3px; }
.l-hero p.lead { margin-top: 22px; font-size: 17px; line-height: 1.7; color: #4b5266; max-width: 480px; }
.l-hero-cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.l-hero-note { margin-top: 14px; font-size: 13px; color: #8b90a1; font-weight: 600; }

/* Device mockup — TV frame with real player content */
.l-stage { position: relative; }
.tv {
  background: #14182b; border-radius: 18px; padding: 12px;
  box-shadow: var(--shadow-pop);
}
.tv-screen { border-radius: 9px; overflow: hidden; aspect-ratio: 16/9; position: relative; background: #0c0f1a; }
.tv-foot { display: flex; justify-content: center; gap: 6px; padding-top: 10px; }
.tv-foot span { width: 46px; height: 5px; border-radius: 3px; background: #2a3049; }
/* slide 1: promo */
.slide-promo { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 7% 8%; background: linear-gradient(150deg, #b9e916 0%, #8fc410 60%, #79a80c 100%); animation: slidecycle 12s infinite; }
.slide-promo .sp-tag { font-size: clamp(8px, 1vw, 12px); font-weight: 800; letter-spacing: .16em; color: #1a2005; text-transform: uppercase; }
.slide-promo .sp-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3.4vw, 44px); line-height: 1.02; color: #14182b; }
.slide-promo .sp-price { display: inline-flex; align-items: baseline; gap: 6px; background: #14182b; color: #b9e916; border-radius: 10px; padding: 6px 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(14px, 2vw, 26px); width: fit-content; }
/* slide 2: weather */
.slide-weather { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; background: radial-gradient(500px 280px at 50% -10%, #1d2740, #0c0f1a); opacity: 0; animation: slidecycle 12s 6s infinite; }
.slide-weather .sw-city { font-size: clamp(8px, 1vw, 12px); font-weight: 800; letter-spacing: .2em; color: #c8f542; text-transform: uppercase; }
.slide-weather .sw-row { display: flex; align-items: center; gap: 6%; }
.slide-weather .sw-temp { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5.5vw, 72px); color: #eef1f9; line-height: 1; }
.slide-weather .sw-days { display: flex; gap: 10px; font-size: clamp(7px, .9vw, 11px); color: #a8b0c6; font-weight: 700; }
.slide-weather .sw-days span b { color: #eef1f9; }
@keyframes slidecycle { 0%, 45% { opacity: 1; } 55%, 95% { opacity: 0; } 100% { opacity: 1; } }
/* live chip on tv */
.tv-live { position: absolute; top: 6%; right: 5%; display: flex; align-items: center; gap: 5px; background: rgba(12,15,26,.65); backdrop-filter: blur(4px); color: #fff; font-size: clamp(7px, .9vw, 11px); font-weight: 800; letter-spacing: .1em; padding: 4px 10px; border-radius: 99px; z-index: 5; }
.tv-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: pulse-dot 2s infinite; }
/* floating dashboard card */
.dash-float {
  position: absolute; left: -8%; bottom: -14%; width: 62%;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-pop);
  padding: 16px; border: 1px solid rgba(20,24,43,.08);
}
@media (max-width: 920px) { .dash-float { position: static; width: 100%; margin-top: 16px; } }
.dash-float .df-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8b90a1; margin-bottom: 10px; }
.df-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; }
.df-row:hover { background: #f6f5f0; }
.df-row .df-ic { width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, #14182b, #2a3049); flex-shrink: 0; }
.df-row .df-name { flex: 1; font-size: 13px; font-weight: 700; color: #14182b; }
.df-row .df-sub { font-size: 11px; color: #8b90a1; font-weight: 600; }
.df-dot { width: 8px; height: 8px; border-radius: 50%; background: #17a34a; box-shadow: 0 0 0 3px rgba(23,163,74,.15); }
.df-dot.off { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.12); }

/* Use cases strip */
.l-uses { padding: 26px 0 10px; border-top: 1px solid rgba(20,24,43,.09); }
.l-uses-label { text-align: center; font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #8b90a1; }
.l-uses-row { display: flex; justify-content: center; gap: clamp(18px, 4vw, 48px); flex-wrap: wrap; margin-top: 18px; }
.l-use { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #4b5266; }
.l-use svg { width: 19px; height: 19px; color: var(--lime-deep); }

/* Section head */
.l-sec { padding: clamp(50px, 9vh, 100px) 0 0; }
.l-sec-head { max-width: 620px; }
.l-sec-head .l-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--lime-deep); }
.l-sec-head h2 { margin-top: 10px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; color: #14182b; }
.l-sec-head p { margin-top: 12px; font-size: 15.5px; line-height: 1.7; color: #4b5266; }

/* Steps (how it works) */
.l-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
@media (max-width: 820px) { .l-steps { grid-template-columns: 1fr; } }
.l-step { background: #fff; border: 1px solid rgba(20,24,43,.09); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-card); }
.l-step .ls-num { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #14182b; background: var(--lime); width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.l-step h3 { margin-top: 16px; font-size: 17px; color: #14182b; }
.l-step p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: #4b5266; }

/* Features grid */
.l-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 36px; }
.l-feat { background: #fff; border: 1px solid rgba(20,24,43,.09); border-radius: var(--r-md); padding: 22px; transition: transform .16s ease, box-shadow .16s ease; }
.l-feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.l-feat .lf-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: rgba(185,233,22,.22); color: #14182b; }
.l-feat .lf-ic svg { width: 20px; height: 20px; }
.l-feat h3 { margin-top: 14px; font-size: 15.5px; color: #14182b; }
.l-feat p { margin-top: 7px; font-size: 13.5px; line-height: 1.6; color: #4b5266; }

/* Pricing */
.l-pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; align-items: stretch; }
@media (max-width: 860px) { .l-pricing { grid-template-columns: 1fr; } }
.l-price { background: #fff; border: 1px solid rgba(20,24,43,.1); border-radius: var(--r-lg); padding: 30px 26px; display: flex; flex-direction: column; }
.l-price.hot { border: 2px solid #14182b; position: relative; box-shadow: var(--shadow-card); }
.l-price .lp-badge { position: absolute; top: -12px; left: 26px; background: var(--lime); color: #1a2005; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 99px; }
.l-price h3 { font-size: 17px; color: #14182b; }
.l-price .lp-cost { margin-top: 14px; font-family: var(--font-display); font-weight: 700; font-size: 40px; color: #14182b; line-height: 1; }
.l-price .lp-cost small { font-size: 14px; color: #8b90a1; font-weight: 600; font-family: var(--font-text); }
.l-price .lp-desc { margin-top: 8px; font-size: 13.5px; color: #4b5266; }
.l-price ul { list-style: none; margin: 20px 0 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.l-price li { display: flex; gap: 9px; font-size: 13.5px; color: #4b5266; font-weight: 600; align-items: flex-start; }
.l-price li svg { width: 15px; height: 15px; color: var(--lime-deep); flex-shrink: 0; margin-top: 2px; }

/* Final CTA band */
.l-cta-band { margin: clamp(56px, 10vh, 110px) 0 0; background: #14182b; border-radius: var(--r-lg); padding: clamp(34px, 6vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.l-cta-band h2 { color: #f6f5f0; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.15; max-width: 520px; }
.l-cta-band h2 em { font-style: normal; color: #c8f542; }

/* Footer */
.l-footer { margin-top: clamp(40px, 7vh, 80px); border-top: 1px solid rgba(20,24,43,.09); padding: 34px 0 44px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.l-footer .lft-tag { margin-top: 10px; font-size: 13px; color: #8b90a1; max-width: 300px; line-height: 1.6; }
.l-footer-cols { display: flex; gap: clamp(30px, 6vw, 80px); flex-wrap: wrap; }
.l-fcol h4 { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8b90a1; margin-bottom: 12px; }
.l-fcol a { display: block; font-size: 13.5px; font-weight: 600; color: #4b5266; padding: 4px 0; }
.l-fcol a:hover { color: #14182b; }
.l-copy { width: 100%; margin-top: 8px; padding-top: 18px; border-top: 1px solid rgba(20,24,43,.07); font-size: 12.5px; color: #8b90a1; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Auth modal (landing = always light) */
.auth-wrap { position: fixed; inset: 0; background: rgba(20,24,43,.45); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: var(--r-lg); padding: 34px; box-shadow: var(--shadow-pop); }
.auth-card h2 { font-size: 24px; color: #14182b; margin-bottom: 6px; }
.auth-card .sub { font-size: 14px; color: #4b5266; margin-bottom: 24px; }
.auth-card .field label { color: #8b90a1; }
.auth-card .input { background: #fff; border-color: rgba(20,24,43,.18); color: #14182b; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13.5px; color: #4b5266; }
.auth-switch a { color: var(--lime-deep); font-weight: 800; }
.auth-error { background: rgba(220,38,38,.07); border: 1px solid rgba(220,38,38,.3); color: #dc2626; padding: 10px 14px; border-radius: var(--r-sm); font-size: 13.5px; margin-bottom: 16px; }

/* Lang pill */
.lang-pill { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.lang-pill button { border: none; background: transparent; color: var(--tx-3); font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 99px; }
.lang-pill button.on { background: var(--tx); color: var(--bg); }
.landing-body .lang-pill { background: #eceae2; border-color: rgba(20,24,43,.08); }
.landing-body .lang-pill button.on { background: #14182b; color: #fff; }

/* ============================================================
   APP (dashboard) — themed light/dark
   ============================================================ */
.app-body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 234px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 22px 20px 18px; }
.sidebar .brand-name { color: var(--tx); }
.sidebar .brand-name em { color: var(--accent); }
.side-nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px;
  color: var(--tx-2); font-size: 14px; font-weight: 700; border: 1px solid transparent;
  transition: background .12s, color .12s;
}
.side-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.side-link:hover { background: var(--surface-2); color: var(--tx); }
.side-link.on { background: var(--accent-glow); color: var(--tx); border-color: transparent; }
.side-link.on svg { color: var(--accent); }
[data-theme="dark"] .side-link.on { color: var(--accent); }
.side-foot { padding: 14px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.user-chip .avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  color: #14182b; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
}
.user-chip .uname { font-size: 13px; font-weight: 700; color: var(--tx); line-height: 1.2; }
.user-chip .uorg { font-size: 11.5px; color: var(--tx-3); }

.main { flex: 1; min-width: 0; padding: 28px clamp(18px, 3.5vw, 44px); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; color: var(--tx); }
.page-head .desc { margin-top: 5px; font-size: 13.5px; color: var(--tx-3); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-card); }
.stat-card .sic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.stat-card .sic svg { width: 19px; height: 19px; }
.stat-card .sval { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--tx); line-height: 1; }
.stat-card .sval small { font-size: 15px; color: var(--tx-3); font-weight: 500; }
.stat-card .slabel { margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--tx-3); text-transform: uppercase; letter-spacing: .05em; }
.sic.lime { background: var(--accent-glow); color: var(--accent); }
.sic.cyan { background: rgba(15,181,191,.12); color: var(--cyan); }
.sic.green { background: rgba(23,163,74,.1); color: var(--ok); }
.sic.amber { background: rgba(217,119,6,.1); color: var(--warn); }

/* Panels / tables */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card); }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h3 { font-size: 15px; color: var(--tx); }
.panel-body { padding: 20px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 12px 16px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--tx-3); border-bottom: 1px solid var(--line); font-weight: 800; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--tx-2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--surface-2); }

/* Screen cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.screen-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .15s, transform .15s; box-shadow: var(--shadow-card); }
.screen-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.screen-preview { aspect-ratio: 16/9; background: linear-gradient(135deg, #1a2136, #10141f); display: flex; align-items: center; justify-content: center; position: relative; color: #4b5570; }
.screen-preview svg { width: 44px; height: 44px; }
.screen-preview.portrait-mode { background: repeating-linear-gradient(45deg, #1a2136, #1a2136 12px, #151b2c 12px, #151b2c 24px); }
.status-dot { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.status-dot.on { background: rgba(74,222,128,.16); color: #4ade80; }
.status-dot.on::before { background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: pulse-dot 2s infinite; }
.status-dot.off { background: rgba(248,113,113,.15); color: #f87171; }
.status-dot.off::before { background: #f87171; }
@keyframes pulse-dot { 50% { opacity: .5; } }
.screen-card .sc-body { padding: 16px; }
.screen-card .sc-name { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--tx); }
.screen-card .sc-meta { margin-top: 5px; font-size: 12.5px; color: var(--tx-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.screen-card .sc-meta svg { width: 13px; height: 13px; }
.screen-card .sc-actions { display: flex; gap: 8px; margin-top: 14px; }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .15s; box-shadow: var(--shadow-card); }
.media-card:hover { border-color: var(--line-strong); }
.media-thumb { aspect-ratio: 16/10; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb svg { width: 34px; height: 34px; color: var(--tx-3); }
.media-type-tag { position: absolute; bottom: 8px; left: 8px; background: rgba(20,24,43,.78); backdrop-filter: blur(4px); padding: 3px 9px; border-radius: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #c8f542; }
.media-card .m-body { padding: 12px 14px; }
.media-card .m-name { font-size: 13px; font-weight: 700; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card .m-meta { margin-top: 3px; font-size: 11.5px; color: var(--tx-3); }
.media-card .m-actions { display: flex; gap: 6px; padding: 0 14px 12px; }

/* Dropzone */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--r-md); padding: 40px 20px; text-align: center; color: var(--tx-3); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-glow); color: var(--tx); }
.dropzone svg { width: 38px; height: 38px; margin-bottom: 10px; }

/* Playlist editor */
.pl-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .pl-editor { grid-template-columns: 1fr; } }
.pl-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--tx-3); margin-bottom: 12px; }
.pl-item { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; }
.pl-item.dragging { opacity: .4; }
.pl-item .pi-thumb { width: 52px; height: 34px; border-radius: 6px; background: var(--surface-3); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--tx-3); }
.pl-item .pi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pl-item .pi-thumb svg { width: 18px; height: 18px; }
.pl-item .pi-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .pi-dur { font-size: 12px; color: var(--tx-3); }
.pl-item input.pi-dur-in { width: 54px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--tx); padding: 4px 6px; font-size: 12px; text-align: center; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.pill.lime { background: var(--accent-glow); color: var(--accent); }
[data-theme] .pill.lime { color: var(--tx); } 
[data-theme="dark"] .pill.lime { color: var(--accent); }
.pill.cyan { background: rgba(15,181,191,.13); color: var(--cyan); }
.pill.gray { background: var(--surface-2); color: var(--tx-2); }
.pill.green { background: rgba(23,163,74,.12); color: var(--ok); }
.pill.red { background: rgba(220,38,38,.1); color: var(--err); }

/* Modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(12,15,26,.55); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal { width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-pop); }
.modal h3 { font-size: 19px; color: var(--tx); margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal.wide { max-width: 760px; }

/* Toast */
.toast-zone { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--tx); color: var(--bg); border-radius: 10px; padding: 13px 18px; font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow-pop); animation: toast-in .25s ease; border-left: 4px solid var(--lime); }
.toast.err { border-left-color: var(--err); }
@keyframes toast-in { from { transform: translateX(30px); opacity: 0; } }

/* Empty */
.empty { text-align: center; padding: 60px 20px; color: var(--tx-3); }
.empty svg { width: 52px; height: 52px; margin-bottom: 14px; color: var(--tx-3); opacity: .6; }
.empty h3 { color: var(--tx-2); font-size: 16px; margin-bottom: 6px; }
.empty p { font-size: 13.5px; max-width: 380px; margin: 0 auto 18px; line-height: 1.6; }

/* Day picker */
.day-picker { display: flex; gap: 6px; }
.day-picker button { width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--tx-3); font-size: 12px; font-weight: 800; }
.day-picker button.on { background: var(--tx); color: var(--bg); border-color: var(--tx); }

/* Theme toggle */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--tx-2); }
.theme-toggle:hover { background: var(--surface-2); color: var(--tx); }
.theme-toggle svg { width: 16px; height: 16px; }

/* Pairing screen (player) — ALWAYS dark, self-contained */
.pair-screen { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(900px 500px at 50% -10%, #16203a, #0a0d14); color: #e2e7f2; font-family: 'Manrope', sans-serif; text-align: center; padding: 20px; }
.pair-code { font-family: 'Space Grotesk', monospace; font-size: clamp(48px, 12vw, 110px); font-weight: 700; letter-spacing: .18em; color: #c8f542; margin: 24px 0; text-shadow: 0 0 40px rgba(200,245,66,.35); }

/* Mobile */
.mobile-top { display: none; }
@media (max-width: 820px) {
  .sidebar { position: fixed; z-index: 80; left: -240px; transition: left .22s ease; height: 100vh; }
  .sidebar.open { left: 0; box-shadow: 20px 0 60px rgba(0,0,0,.3); }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 70; }
  .main { padding: 20px 16px; }
}

.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.grow{flex:1}
.muted{color:var(--tx-3);font-size:12.5px}
