@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #0b0e13;
  --bg-elev: #12171f;
  --bg-soft: #181e28;
  --bg-hover: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #e8edf5;
  --muted: #8b97a8;
  --accent: #e8a045;
  --accent-2: #f0c27b;
  --accent-dim: rgba(232, 160, 69, 0.14);
  --ok: #3ecf8e;
  --warn: #e6b84d;
  --bad: #ef6b6b;
  --sidebar: 248px;
  --radius: 12px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(232, 160, 69, 0.1), transparent 55%),
    radial-gradient(800px 420px at 100% 0%, rgba(70, 110, 170, 0.08), transparent 48%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(232, 160, 69, 0.35); color: #fff; }

/* —— Auth —— */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-wrap::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(232,160,69,.16), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(70,120,180,.12), transparent 40%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,.02) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,.02) 40px);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: min(400px, 100%);
  background: rgba(18, 23, 31, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  animation: rise .35s ease both;
}
.auth-card-brand { width: min(440px, 100%); padding-top: 22px; }
.auth-card .brand { margin-bottom: 22px; text-align: center; }
.auth-card .brand .mark {
  width: 48px; height: 48px; margin: 0 auto 14px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), #b86a22);
  color: #1a1208;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(232, 160, 69, 0.25);
}
.brand-logo {
  align-items: center;
  gap: 8px;
}
.brand-logo-img {
  display: block;
  width: min(280px, 78vw);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(0, 180, 255, 0.18));
}
.auth-foot {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.brand { display: flex; flex-direction: column; gap: 4px; margin-bottom: 28px; }
.brand strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.01em;
}
.brand span { color: var(--muted); font-size: 0.9rem; }


/* —— Forms —— */
.form-group { margin-bottom: 15px; }
.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-control:hover { border-color: var(--line-strong); }
.form-control:focus {
  border-color: rgba(232, 160, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 160, 69, 0.14);
}
.form-control::placeholder { color: #5f6b7a; }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 96px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform .12s ease, opacity .12s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c97a2c);
  color: #1a1208;
}
.btn-primary.full, .auth-card .btn-primary { width: 100%; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--line-strong); background: var(--bg-hover); }
.btn-soft {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-soft:hover { border-color: var(--line-strong); }
.btn-danger {
  background: rgba(239, 107, 107, 0.12);
  color: #ffb4b4;
  border: 1px solid rgba(239, 107, 107, 0.28);
}
.btn-danger:hover { background: rgba(239, 107, 107, 0.2); }
.btn-sm { padding: 6px 10px; font-size: 0.8rem; border-radius: 7px; }
.btn-icon {
  width: 34px; height: 34px; padding: 0;
  border-radius: 8px;
}

/* —— App shell —— */
.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}
.sidebar {
  background: rgba(9, 11, 15, 0.97);
  border-right: 1px solid var(--line);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.sidebar-head {
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.sidebar .logo {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  padding: 2px 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .logo-img {
  width: 100%;
  max-width: 168px;
  height: auto;
  display: block;
  object-fit: contain;
}
.sidebar .logo .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #b86a22);
  color: #1a1208;
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800;
  flex-shrink: 0;
}
.sidebar .logo em { font-style: normal; color: var(--accent); }
.sidebar .logo-sub {
  color: var(--muted);
  font-size: 0.72rem;
  padding: 2px 8px 0;
  letter-spacing: 0.02em;
}
.nav {
  padding: 10px 10px 16px;
  overflow: auto;
  flex: 1;
}
.nav-section {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 10px 6px;
  font-weight: 600;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #b7c0cd;
  margin-bottom: 1px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.nav a svg {
  width: 16px; height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}
.nav a:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.nav a:hover svg { opacity: 1; }
.nav a.active {
  background: var(--accent-dim);
  color: var(--text);
  border-color: rgba(232, 160, 69, 0.22);
}
.nav a.active svg { opacity: 1; color: var(--accent); }
.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.72rem;
}

.main {
  padding: 20px 26px 36px;
  min-width: 0;
  animation: rise .28s ease both;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  min-height: var(--topbar-h);
}
.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #8a5318);
  color: #1a1208; font-weight: 700; font-size: 0.85rem;
}
.online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.2);
  display: inline-block;
}

/* —— Stats / cards —— */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent), var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  transition: border-color .15s ease, transform .15s ease;
}
.stat:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.stat .label {
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat .value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin-top: 6px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat .hint { color: var(--muted); font-size: 0.76rem; margin-top: 5px; }
.stat.accent .value { color: var(--accent-2); }
.stat.ok .value { color: #7dffc0; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.quick-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 15px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.quick-link:hover {
  border-color: rgba(232, 160, 69, 0.35);
  background: var(--accent-dim);
  transform: translateY(-1px);
}
.quick-link strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}
.quick-link span { color: var(--muted); font-size: 0.78rem; }

/* —— Panels / tables —— */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}
.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}
.panel-body { padding: 16px; }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.08);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.filter-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 560;
}
.filter-chips .chip em {
  font-style: normal;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.72rem;
}
.filter-chips .chip.active {
  background: var(--accent-dim);
  border-color: rgba(232, 160, 69, 0.35);
  color: var(--text);
}
.field-copy {
  display: flex;
  gap: 8px;
  align-items: center;
}
.field-copy .form-control { flex: 1; min-width: 0; }
.trend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.spark {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 110px;
  padding: 4px 2px 0;
}
.spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.spark-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
}
.spark-bar.created { background: linear-gradient(180deg, var(--accent-2, #e8a045), rgba(232,160,69,.35)); }
.spark-bar.ended { background: linear-gradient(180deg, #5ec8ff, rgba(94,200,255,.3)); }
.spark-col span {
  font-size: .68rem;
  color: var(--muted);
}
@media (max-width: 720px) {
  .trend-grid { grid-template-columns: 1fr; }
}

.bq-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}
.bq-toolbar .form-control {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 280px;
  overflow: auto;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.action-menu {
  position: relative;
  display: inline-block;
}
.action-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 210px;
  background: #151b24;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 40;
  padding: 6px;
}
.action-menu.open .action-menu-panel { display: block; }
.action-menu-panel a,
.action-menu-panel .action-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 0.84rem;
  color: #d5dbe6;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.action-menu-panel a:hover,
.action-menu-panel .action-item:hover { background: var(--bg-hover); color: var(--text); }
.action-menu-panel a.danger { color: #ffb0b0; }
.action-menu-panel a.danger:hover { background: rgba(239, 107, 107, 0.12); color: #ffd0d0; }
.action-menu-panel .action-label {
  padding: 8px 10px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.action-menu-panel .action-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}
.action-menu-panel.action-menu-scroll {
  max-height: min(360px, 65vh);
  overflow: auto;
  min-width: 228px;
}
.btn-more {
  min-width: 34px;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 8, 14, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  width: min(480px, 100%);
  background: var(--bg-elev, #151b24);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: rise .18s ease;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.modal-body { padding: 16px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.btn.has-notes {
  border-color: rgba(232, 160, 69, 0.45);
  color: var(--accent-2, #e8a045);
}

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-card {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.news-card:last-child { border-bottom: 0; }
.news-card.pinned { background: rgba(232, 160, 69, 0.06); }
.news-card.draft { opacity: 0.72; }
.news-card h3 {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.news-card p {
  margin: 0;
  color: #c5ceda;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}
.news-img {
  max-width: 180px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin: 8px 0;
  border: 1px solid var(--line);
}
.toolbar-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}
.toolbar .search {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  position: relative;
}
.toolbar .search input {
  padding-left: 36px;
}
.toolbar .search::before {
  content: '';
  position: absolute;
  left: 12px; top: 50%;
  width: 14px; height: 14px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%238b97a8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}

.table-wrap { overflow: auto; max-height: min(70vh, 820px); }
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}
.pager-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pager-num {
  min-width: 4.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
table.data th, table.data td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  white-space: nowrap;
}
table.data th {
  color: var(--muted);
  font-weight: 550;
  background: rgba(0,0,0,0.22);
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data tr:hover td { background: var(--bg-hover); }
table.data tr:last-child td { border-bottom: 0; }
table.data td .actions { opacity: 0.92; }
table.data tr:hover td .actions { opacity: 1; }
table.data th.col-actions,
table.data td.row-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  background: var(--bg-elev);
  box-shadow: -12px 0 16px rgba(0, 0, 0, 0.28);
}
table.data th.col-actions {
  z-index: 5;
  background: #0f141c;
}
table.data tr:hover td.row-actions {
  background: #171d27;
}

.empty-state {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge.ok { background: rgba(62,207,142,.14); color: #7dffc0; }
.badge.warn { background: rgba(230,184,77,.14); color: #ffd978; }
.badge.bad { background: rgba(239,107,107,.14); color: #ffb0b0; }
.badge.mute { background: rgba(139,151,168,.14); color: #b7c2d0; }

.alert {
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: rise .25s ease both;
}
.alert.ok { background: rgba(62,207,142,.1); color: #b6f5d5; }
.alert.bad { background: rgba(239,107,107,.12); color: #ffc4c4; }
.alert.warn { background: rgba(230,184,77,.12); color: #ffe2a0; }
.alert .dismiss {
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
}
.alert .dismiss:hover { opacity: 1; }

.row { display: grid; gap: 14px; }
.row.cols-2 { grid-template-columns: 1fr 1fr; }
.row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions-wrap { max-width: 420px; }
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  max-width: none;
  padding-right: 12px;
}
.muted { color: var(--muted); }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}
.copyable {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
}
.copyable:hover { border-bottom-color: var(--muted); color: var(--accent-2); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 35;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .grid-stats, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    width: min(280px, 86vw);
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; }
}
@media (max-width: 720px) {
  .row.cols-2, .row.cols-3 { grid-template-columns: 1fr; }
  .main { padding: 14px; }
  .grid-stats, .quick-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 1.3rem; }
  .user-chip .chip-meta { display: none; }
}

/* VOD / ZeTa-style movie & series forms */
.tmdb-box {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}
.tmdb-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}
.tmdb-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tmdb-card {
  display: flex;
  gap: 10px;
  text-align: left;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.tmdb-card:hover {
  border-color: rgba(232, 160, 69, 0.35);
  background: var(--bg-hover);
}
.tmdb-card img, .tmdb-ph {
  width: 52px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #1a1f28;
}
.tmdb-card strong { display: block; font-size: .9rem; }
.tmdb-card span { color: var(--muted); font-size: .75rem; }
.tmdb-card p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.35; }

.vod-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.vod-preview { display: grid; gap: 12px; }
.poster-frame, .backdrop-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #12161d;
  position: relative;
}
.poster-frame { aspect-ratio: 2/3; }
.backdrop-frame { aspect-ratio: 16/9; }
.poster-frame img, .backdrop-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .vod-layout { grid-template-columns: 1fr; }
  .vod-preview { grid-template-columns: 140px 1fr; }
}

/* ZeTa-like Channel / Bouquet order */
.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: min(70vh, 720px);
  overflow: auto;
  background: var(--bg-elev);
}
.order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  user-select: none;
}
.order-item:last-child { border-bottom: 0; }
.order-item:hover { background: var(--bg-hover); }
.order-item.dragging { opacity: .55; background: var(--accent-dim); }
.order-handle {
  color: var(--muted);
  letter-spacing: -2px;
  font-size: .85rem;
  min-width: 18px;
}
.order-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
