/* ==========================================================================
   cinematic.css — 3D cinematic look for every page (light + dark)
   Loaded after theme.css. Behaviour (tilt, spotlight, reveal) lives in cinematic.js.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --c-bg: #edf2f8;
  --c-glass: rgba(255, 255, 255, 0.80);
  --c-glass-strong: rgba(255, 255, 255, 0.94);
  --c-border: rgba(15, 23, 42, 0.07);
  --c-hi: rgba(255, 255, 255, 0.95);
  --c-depth: 0 1px 1px rgba(15, 23, 42, 0.04), 0 10px 26px -14px rgba(15, 23, 42, 0.20), 0 28px 56px -34px rgba(15, 23, 42, 0.25);
  --c-depth-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 22px 40px -16px rgba(15, 23, 42, 0.30), 0 40px 70px -34px rgba(2, 132, 199, 0.32);
  --c-spot: rgba(56, 189, 248, 0.10);
  --c-aurora-1: rgba(56, 189, 248, 0.30);
  --c-aurora-2: rgba(167, 139, 250, 0.24);
  --c-aurora-3: rgba(52, 211, 153, 0.16);
  --c-grid: rgba(15, 23, 42, 0.035);
  --c-btn-top: rgba(255, 255, 255, 0.95);
  --c-btn-bottom: rgba(241, 245, 249, 0.95);
  --c-btn-hi: rgba(255, 255, 255, 1);
  --c-btn-ledge: rgba(15, 23, 42, 0.12);
  --c-glare: rgba(255, 255, 255, 0.55);
  --c-title-a: #0f172a;
  --c-title-b: #0369a1;
  --c-title-c: #6d28d9;
}
:root[data-theme="dark"] {
  --c-bg: #060b16;
  --c-glass: rgba(17, 26, 44, 0.74);
  --c-glass-strong: rgba(17, 26, 44, 0.94);
  --c-border: rgba(148, 163, 184, 0.13);
  --c-hi: rgba(255, 255, 255, 0.06);
  --c-depth: 0 1px 0 rgba(255, 255, 255, 0.03), 0 14px 32px -16px rgba(0, 0, 0, 0.85), 0 34px 64px -36px rgba(0, 0, 0, 0.9);
  --c-depth-hover: 0 1px 0 rgba(255, 255, 255, 0.05), 0 26px 46px -18px rgba(0, 0, 0, 0.9), 0 40px 80px -36px rgba(14, 165, 233, 0.35);
  --c-spot: rgba(56, 189, 248, 0.09);
  --c-aurora-1: rgba(14, 165, 233, 0.24);
  --c-aurora-2: rgba(139, 92, 246, 0.20);
  --c-aurora-3: rgba(16, 185, 129, 0.10);
  --c-grid: rgba(148, 163, 184, 0.05);
  --c-btn-top: rgba(30, 41, 67, 0.95);
  --c-btn-bottom: rgba(17, 26, 44, 0.95);
  --c-btn-hi: rgba(255, 255, 255, 0.07);
  --c-btn-ledge: rgba(0, 0, 0, 0.55);
  --c-glare: rgba(255, 255, 255, 0.16);
  --c-title-a: #f1f5f9;
  --c-title-b: #38bdf8;
  --c-title-c: #a78bfa;
}

/* ==========================================================================
   Stage: ambient aurora + faint perspective grid
   ========================================================================== */
html.cine body { background: var(--c-bg) !important; }
html.cine .app-layout { background: transparent; position: relative; z-index: 1; }
html.cine body::before,
html.cine body::after {
  content: ''; position: fixed; pointer-events: none; z-index: 0;
}
html.cine body::before {
  inset: -20vmax;
  background:
    radial-gradient(38vmax 30vmax at 18% 12%, var(--c-aurora-1), transparent 62%),
    radial-gradient(34vmax 28vmax at 86% 18%, var(--c-aurora-2), transparent 64%),
    radial-gradient(40vmax 30vmax at 60% 96%, var(--c-aurora-3), transparent 66%);
  filter: blur(10px);
  animation: cineAurora 28s ease-in-out infinite alternate;
}
html.cine body::after {
  inset: 0;
  background-image:
    linear-gradient(var(--c-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes cineAurora {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(3vmax, -2vmax, 0) rotate(6deg) scale(1.06); }
  100% { transform: translate3d(-3vmax, 2vmax, 0) rotate(-4deg) scale(1.02); }
}

/* ==========================================================================
   Sidebar — floating glass slab
   ========================================================================== */
html.cine .app-sidebar {
  background: var(--c-glass-strong) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-right: 1px solid var(--c-border) !important;
  box-shadow: 10px 0 40px -28px rgba(15, 23, 42, 0.45);
}
:root[data-theme="dark"].cine .app-sidebar { background: rgba(8, 13, 25, 0.82) !important; box-shadow: 14px 0 50px -30px rgba(0, 0, 0, 0.9); }
html.cine .sidebar-logo-img { filter: drop-shadow(0 6px 10px rgba(2, 132, 199, 0.35)); animation: cineFloat 6s ease-in-out infinite; }
@keyframes cineFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
html.cine .nav-link.active {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 #075985, 0 10px 22px -8px rgba(2, 132, 199, 0.65) !important;
  transform: translateY(-1px);
}
html.cine .nav-link:not(.active):hover { transform: translateX(3px); }
html.cine .nav-link { transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(.2, .8, .2, 1); }

/* ==========================================================================
   Header — cinematic title
   ========================================================================== */
html.cine .header-title-wrap h1 {
  background: linear-gradient(100deg, var(--c-title-a) 0%, var(--c-title-a) 38%, var(--c-title-b) 70%, var(--c-title-c) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: cineTitle 9s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 18px rgba(2, 132, 199, 0.12));
}
@keyframes cineTitle { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
html.cine .sync-status-line.is-live .live-dot { animation: cinePulse 2.2s ease-out infinite; }
@keyframes cinePulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ==========================================================================
   Glass panels with depth + pointer spotlight
   ========================================================================== */
html.cine .panel-card,
html.cine .chart-panel,
html.cine .lc-controls {
  background-color: var(--c-glass) !important;
  background-image: radial-gradient(520px circle at var(--px, -999px) var(--py, -999px), var(--c-spot), transparent 45%) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 var(--c-hi), var(--c-depth) !important;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  position: relative;
}
html.cine .panel-card:hover,
html.cine .chart-panel:hover { box-shadow: inset 0 1px 0 var(--c-hi), var(--c-depth-hover) !important; }
/* keep open menus above the panels that follow */
html.cine .lc-controls { z-index: 30; }
html.cine .panel-card:focus-within,
html.cine .panel-card:has(.ms.is-open),
html.cine .lc-controls:has(.ms.is-open) { z-index: 40; }
html.cine .ms.is-open { z-index: 70; }

/* Scroll reveal: rise out of depth */
html.cine-reveal-on .cine-reveal:not(.is-in) { opacity: 0; transform: perspective(1200px) translateY(26px) rotateX(7deg) scale(0.985); }
html.cine-reveal-on .cine-reveal {
  transform-origin: 50% 0%;
  transition: opacity 0.7s cubic-bezier(.2, .8, .2, 1) var(--cine-delay, 0ms), transform 0.8s cubic-bezier(.2, .8, .2, 1) var(--cine-delay, 0ms), box-shadow 0.35s ease;
}
html.cine-reveal-on .cine-reveal.is-in { opacity: 1; transform: none; }

/* Page switch: content glides in */
html.cine .dashboard-view.active > .dashboard-wrapper { animation: cineViewIn 0.6s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 0; }
@keyframes cineViewIn {
  from { opacity: 0; transform: perspective(1400px) translateY(14px) rotateX(3deg); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   3D tilt cards (KPI, channel, login) + glare
   ========================================================================== */
html.cine .cine-tilt {
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(0);
  transition: transform 0.6s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s ease, border-color 0.3s ease;
  box-shadow: inset 0 1px 0 var(--c-hi), var(--c-depth);
}
html.cine .cine-tilt:hover,
html.cine .cine-tilt.is-tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px);
  box-shadow: inset 0 1px 0 var(--c-hi), var(--c-depth-hover);
}
html.cine .cine-tilt.is-tilting { transition: transform 0.12s linear, box-shadow 0.4s ease; }
.cine-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--c-glare), transparent 60%);
  opacity: 0; transition: opacity 0.35s ease;
  mix-blend-mode: soft-light;
}
html.cine .cine-tilt:hover .cine-glare { opacity: 1; }
:root[data-theme="dark"] .cine-glare { mix-blend-mode: screen; }

/* Card surfaces: glass + sheen on top of their own tint */
html.cine .spend-kpi,
html.cine .lc-kpi,
html.cine .channel-box { background-color: var(--c-glass) !important; border-color: var(--c-border) !important; border-radius: 14px; }
html.cine .spend-kpi { border-left: 4px solid var(--kc, #0284c7) !important; }
html.cine .ui-kpi-card { border-radius: 16px; border-color: var(--c-border) !important; background-image: linear-gradient(140deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 55%); }
:root[data-theme="dark"].cine .ui-kpi-card { background-image: linear-gradient(140deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 55%); }
html.cine .lc-kpi::before { box-shadow: 0 0 18px 2px var(--kc); opacity: 0.9; }

/* Raised icons */
html.cine .kpi-avatar,
html.cine .spend-kpi-icon,
html.cine .lc-kpi-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 14px -6px rgba(15, 23, 42, 0.35);
}
:root[data-theme="dark"].cine .kpi-avatar,
:root[data-theme="dark"].cine .spend-kpi-icon,
:root[data-theme="dark"].cine .lc-kpi-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px -8px rgba(0, 0, 0, 0.8); }
html.cine .kpi-big-num, html.cine .lc-kpi-value, html.cine .spend-kpi-value { text-shadow: 0 2px 12px rgba(2, 132, 199, 0.10); }

/* ==========================================================================
   Tactile 3D buttons
   ========================================================================== */
html.cine .filter-pill,
html.cine .export-btn,
html.cine .cmp-reset,
html.cine .ms-btn,
html.cine .lc-icon-btn,
html.cine .lc-cf-step,
html.cine .btn-date-cancel,
html.cine .lc-chip,
html.cine .lc-mode-btn:not(.is-active) {
  background-color: transparent !important;
  background-image: linear-gradient(180deg, var(--c-btn-top), var(--c-btn-bottom)) !important;
  border: 1px solid var(--c-border) !important;
  box-shadow: inset 0 1px 0 var(--c-btn-hi), 0 1px 0 var(--c-btn-ledge), 0 6px 14px -10px rgba(15, 23, 42, 0.45) !important;
}
html.cine .filter-pill:hover,
html.cine .export-btn:hover,
html.cine .cmp-reset:hover,
html.cine .ms-btn:hover,
html.cine .lc-icon-btn:hover,
html.cine .lc-cf-step:hover:not(:disabled),
html.cine .btn-date-cancel:hover,
html.cine .lc-chip:hover,
html.cine .lc-mode-btn:not(.is-active):hover {
  transform: translateY(-2px);
  border-color: rgba(2, 132, 199, 0.35) !important;
  box-shadow: inset 0 1px 0 var(--c-btn-hi), 0 3px 0 var(--c-btn-ledge), 0 14px 24px -12px rgba(2, 132, 199, 0.45) !important;
}
html.cine .filter-pill:active,
html.cine .export-btn:active,
html.cine .cmp-reset:active,
html.cine .ms-btn:active,
html.cine .lc-icon-btn:active,
html.cine .lc-cf-step:active,
html.cine .btn-date-cancel:active,
html.cine .lc-chip:active,
html.cine .lc-mode-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.18), 0 0 0 var(--c-btn-ledge) !important;
  transition-duration: 0.06s;
}
html.cine .filter-pill.is-open { border-color: rgba(2, 132, 199, 0.55) !important; box-shadow: inset 0 1px 0 var(--c-btn-hi), 0 0 0 4px rgba(2, 132, 199, 0.14) !important; }

/* Primary / active buttons glow */
html.cine .lc-mode-btn.is-active,
html.cine .btn-date-apply,
html.cine .lc-chip.is-active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 0 rgba(3, 105, 161, 0.55), 0 12px 24px -10px rgba(2, 132, 199, 0.6) !important;
}
html.cine .lc-mode-btn.is-active,
html.cine .btn-date-apply { background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%) !important; border-color: #0369a1 !important; color: #ffffff !important; }
html.cine .lc-mode-btn.is-active i { color: #e0f2fe !important; }
html.cine .lc-chip.is-active { background-image: linear-gradient(180deg, rgba(186, 230, 253, 0.95), rgba(224, 242, 254, 0.95)) !important; border-color: rgba(2, 132, 199, 0.45) !important; }
:root[data-theme="dark"].cine .lc-chip.is-active { background-image: linear-gradient(180deg, rgba(14, 165, 233, 0.30), rgba(14, 165, 233, 0.16)) !important; }
html.cine .seg-toggle, html.cine .lc-cf-gran, html.cine .lc-mini-toggle { box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.08); }
html.cine .seg-btn.is-active, html.cine .lc-cf-gran button.is-active, html.cine .lc-mini-toggle button.is-active {
  box-shadow: inset 0 1px 0 var(--c-btn-hi), 0 2px 6px -2px rgba(15, 23, 42, 0.3) !important;
}
html.cine .action-pill #syncIcon, html.cine .action-pill [id$="syncIcon"] { color: #0284c7; }
:root[data-theme="dark"].cine .action-pill #syncIcon, :root[data-theme="dark"].cine .action-pill [id$="syncIcon"] { color: #38bdf8; }

/* ==========================================================================
   Tables — glass header, row lift accent
   ========================================================================== */
html.cine .summary-table-wrap, html.cine .lc-table-wrap { border-radius: 12px; box-shadow: inset 0 1px 0 var(--c-hi); }
html.cine .branch-summary-table tbody tr, html.cine .lc-table tbody tr.lc-row { transition: background-color 0.2s ease, box-shadow 0.2s ease; }
html.cine .branch-summary-table tbody tr:hover, html.cine .lc-table tbody tr.lc-row:hover { box-shadow: inset 3px 0 0 #0ea5e9; }

/* ==========================================================================
   Header pill dropdown (dropdown.js renders it at <body> level)
   ========================================================================== */
.pill-menu {
  position: fixed !important; z-index: 3000 !important;
  display: flex; flex-direction: column; gap: 0;
  padding: 6px !important; min-width: 0 !important; overflow: hidden !important;
  max-height: 380px;
  background: var(--c-glass-strong, #fff) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--c-border, #e2e8f0) !important; border-radius: 14px !important;
  box-shadow: inset 0 1px 0 var(--c-hi, #fff), 0 24px 48px -16px rgba(15, 23, 42, 0.35), 0 4px 12px -4px rgba(15, 23, 42, 0.12) !important;
  opacity: 0; transform: perspective(800px) translateY(-6px) rotateX(-8deg) scale(0.97);
  transform-origin: 50% 0;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(.2, .8, .2, 1);
  cursor: default; font-family: inherit;
}
.pill-menu.is-up { transform-origin: 50% 100%; transform: perspective(800px) translateY(6px) rotateX(8deg) scale(0.97); }
.pill-menu.is-in { opacity: 1; transform: none; }
.pill-menu.is-closing { opacity: 0; transform: scale(0.98); transition-duration: 0.1s; }
:root[data-theme="dark"] .pill-menu { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 28px 56px -16px rgba(0, 0, 0, 0.85) !important; }

.pill-menu-head { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 10px 8px; }
.pill-menu-head span { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #64748b; }
.pill-menu-head small { font-size: 0.68rem; color: #94a3b8; }
.pill-menu-search { display: flex; align-items: center; gap: 8px; margin: 0 4px 6px; padding: 0 10px; height: 34px; border-radius: 9px; border: 1px solid var(--c-border, #e2e8f0); background: rgba(148, 163, 184, 0.08); }
.pill-menu-search i { color: #94a3b8; font-size: 0.78rem; }
.pill-menu-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 0.82rem; color: inherit; }
.pill-menu-search:focus-within { border-color: rgba(2, 132, 199, 0.55); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14); }
.pill-menu-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 2px 2px; overscroll-behavior: contain; }
.pill-menu-sep { height: 1px; background: var(--c-border, #e2e8f0); margin: 4px 8px; flex: none; }
.pill-menu-empty { padding: 14px; text-align: center; font-size: 0.8rem; color: #94a3b8; }
.pill-menu-empty[hidden] { display: none; }

.pill-menu .pill-menu-item {
  display: flex !important; align-items: center; gap: 10px; width: 100%;
  font: inherit; font-size: 0.84rem !important; font-weight: 500; text-align: left !important;
  color: #334155; background: transparent !important; border: 0; border-radius: 9px !important;
  padding: 9px 10px !important; cursor: pointer; white-space: nowrap; flex: none;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.pill-menu .pill-menu-item[hidden] { display: none !important; }
.pmi-icon { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 0.74rem; color: #64748b; background: rgba(148, 163, 184, 0.14); transition: all 0.16s ease; }
.pmi-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.pmi-check { font-size: 0.72rem; color: #0284c7; opacity: 0; transform: scale(0.5); transition: opacity 0.16s ease, transform 0.2s cubic-bezier(.34, 1.56, .64, 1); }
.pill-menu .pill-menu-item:hover,
.pill-menu .pill-menu-item.is-active,
.pill-menu .pill-menu-item:focus-visible { background: rgba(2, 132, 199, 0.08) !important; color: #0f172a; outline: none; transform: translateX(2px); }
.pill-menu .pill-menu-item:hover .pmi-icon,
.pill-menu .pill-menu-item.is-active .pmi-icon { color: #0284c7; background: rgba(2, 132, 199, 0.14); }
.pill-menu .pill-menu-item.is-selected { color: #0369a1 !important; font-weight: 700; background: rgba(2, 132, 199, 0.10) !important; }
.pill-menu .pill-menu-item.is-selected .pmi-icon { color: #ffffff; background: linear-gradient(180deg, #0ea5e9, #0369a1); box-shadow: 0 4px 10px -4px rgba(2, 132, 199, 0.7); }
.pill-menu .pill-menu-item.is-selected .pmi-check { opacity: 1; transform: scale(1); }

:root[data-theme="dark"] .pill-menu-head span { color: #8d9bb4; }
:root[data-theme="dark"] .pill-menu .pill-menu-item { color: #c3cddc; }
:root[data-theme="dark"] .pill-menu .pill-menu-item:hover,
:root[data-theme="dark"] .pill-menu .pill-menu-item.is-active { background: rgba(56, 189, 248, 0.10) !important; color: #ffffff; }
:root[data-theme="dark"] .pill-menu .pill-menu-item.is-selected { color: #7dd3fc !important; background: rgba(56, 189, 248, 0.14) !important; }
:root[data-theme="dark"] .pmi-check { color: #38bdf8; }
:root[data-theme="dark"] .pill-menu-search { background: rgba(2, 6, 23, 0.35); }

/* Pills: icon chevron + clearer selected state */
.filter-pill .pill-chevron { transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1), color 0.2s ease; }
.filter-pill.is-open .pill-chevron { color: #0284c7; }

/* Comparison multi-select menus get the same look */
html.cine .ms-menu {
  background: var(--c-glass-strong) !important; border: 1px solid var(--c-border) !important; border-radius: 14px !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--c-hi), 0 24px 48px -16px rgba(15, 23, 42, 0.35) !important;
  animation: cineMenuIn 0.2s cubic-bezier(.2, .8, .2, 1);
  transform-origin: 50% 0;
}
html.cine .ms-item { border-radius: 9px; transition: background-color 0.14s ease, transform 0.14s ease; }
html.cine .ms-item:hover { transform: translateX(2px); }
@keyframes cineMenuIn { from { opacity: 0; transform: perspective(800px) translateY(-6px) rotateX(-8deg) scale(0.97); } to { opacity: 1; transform: none; } }

/* Modal: deeper glass */
html.cine .custom-date-modal-backdrop { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html.cine .custom-date-modal-card { border-radius: 18px; box-shadow: inset 0 1px 0 var(--c-hi), 0 40px 80px -24px rgba(15, 23, 42, 0.5) !important; }

/* Tooltip on Lead Comparison */
html.cine .lc-tip { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 12px; }

/* ==========================================================================
   Login page
   ========================================================================== */
html.cine .login-container { position: relative; z-index: 1; }
html.cine .login-card {
  background: var(--c-glass-strong) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--c-border) !important; border-radius: 22px !important;
}
html.cine .login-logo-img { filter: drop-shadow(0 10px 18px rgba(2, 132, 199, 0.35)); animation: cineFloat 6s ease-in-out infinite; }
html.cine .login-title {
  background: linear-gradient(100deg, var(--c-title-a) 0%, var(--c-title-b) 60%, var(--c-title-c) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html.cine .btn-login { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 0 #1e40af, 0 14px 28px -10px rgba(37, 99, 235, 0.6) !important; }
html.cine .btn-login:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 5px 0 #1e40af, 0 20px 34px -12px rgba(37, 99, 235, 0.7) !important; }
html.cine .btn-login:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25) !important; }
html.cine .login-theme { z-index: 2; }

/* ==========================================================================
   Reduced motion / touch
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html.cine body::before, html.cine .header-title-wrap h1, html.cine .sidebar-logo-img, html.cine .login-logo-img { animation: none !important; }
  html.cine .cine-tilt, html.cine .cine-tilt:hover { transform: none !important; }
}
@media (hover: none) {
  html.cine .cine-tilt:hover { transform: none; }
  .cine-glare { display: none; }
}
@media (max-width: 767.98px) {
  html.cine body::after { background-size: 32px 32px; }
  html.cine .panel-card, html.cine .chart-panel, html.cine .lc-controls { border-radius: 14px; }
}

/* glare sits under the card content so numbers stay crisp */
html.cine .cine-tilt > :not(.cine-glare) { position: relative; z-index: 1; }
.cine-glare { z-index: 0 !important; }

/* 3D reveal / tilt can briefly widen a card's box — never let that create sideways scrolling */
html.cine .app-main-content { overflow-x: clip; }
