/* Ember Studio app shell — shared by dashboard, account, settings, video editor, pricing.
   Loads last. Visual only: no markup hooks or scripts are changed. */

/* ── Logo mounted at the top of the sidebar ──
   The top-left of the bar becomes the sidebar's header (same surface + edge): logo on the
   left, collapse button at the sidebar's right edge. When the sidebar collapses the header
   slides away with it and the button moves to the far left. */
body:has(> .layout .sidebar){--sb-w:240px}
body[data-ember-page="video-editor"]{--sb-w:220px}
@media (min-width:769px){
  body:has(> .layout .sidebar) > nav{justify-content:flex-start; padding-left:16px}
  body:has(> .layout .sidebar) > nav::before{
    content:''; position:absolute; left:0; top:0; bottom:-1px; width:var(--sb-w); pointer-events:none;
    background:rgba(8,10,13,.96); border-right:1px solid rgba(255,255,255,.07);
    transition:transform .22s ease;
  }
  body:has(> .layout .sidebar) > nav > *{position:relative; z-index:1}
  body:has(> .layout .sidebar) > nav .logo{order:-1; margin:0; transition:margin-left .22s ease}
  body:has(> .layout .sidebar) > nav .sidebar-toggle-btn{position:absolute; top:50%; left:calc(var(--sb-w) - 46px); transform:translateY(-50%); margin:0;
    transition:left .22s ease}
  body:has(> .layout .sidebar) > nav .nav-right{margin-left:auto}
  html[data-sidebar="collapsed"] body > nav::before{transform:translateX(-100%)}
  html[data-sidebar="collapsed"] body > nav .sidebar-toggle-btn{left:14px}
  html[data-sidebar="collapsed"] body > nav .logo{margin-left:46px}
  html[data-theme="light"] body:has(> .layout .sidebar) > nav::before{background:#f3f7fb; border-right-color:#d5dfea}
}
/* Sidebar line icons (same as the dashboard's) on every sidebar page */
.sidebar-icon{display:grid; place-items:center; color:inherit}
.sidebar-icon svg{display:block; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.sidebar{display:flex; flex-direction:column}
/* Phones (≤768px): the sidebar is an off-canvas drawer. Hidden by default; the ☰ button opens it
   (html.sl-drawer, set by ember-selene.js); tapping outside or on a link closes it. */
@media (max-width:768px){
  body:has(> .layout .sidebar) > nav .sidebar-toggle-btn, body:has(> .layout .sidebar) > nav #sidebarToggleBtn{display:inline-flex !important; align-items:center; justify-content:center;
    width:40px; height:40px; margin-right:10px; flex:0 0 40px; order:-2}
  .layout .sidebar{display:flex !important; position:fixed !important; top:64px !important; left:0 !important; bottom:0 !important; height:auto !important;
    width:min(280px,84vw) !important; padding:16px 12px 24px !important; transform:translateX(-105%) !important; visibility:hidden;
    transition:transform .28s cubic-bezier(.2,.7,.1,1), visibility 0s linear .28s !important; z-index:70 !important;
    background:rgba(6,9,15,.98) !important; box-shadow:18px 0 40px -18px rgba(0,0,0,.8)}
  /* open: the dim backdrop is the drawer's own shadow, so it can never cover the drawer */
  html.sl-drawer .layout .sidebar{transform:none !important; visibility:visible; transition:transform .28s cubic-bezier(.2,.7,.1,1) !important;
    box-shadow:0 0 0 100vmax rgba(3,6,12,.62), 18px 0 40px -18px rgba(0,0,0,.8) !important}
  .layout .main{margin-left:0 !important}
  html.sl-drawer, html.sl-drawer body{overflow:hidden}
}

/* The full name fits the sidebar header */
body > nav .logo.qbit-logo .qbit-word{font-size:calc(var(--qbit-size) * .44); letter-spacing:.02em}

/* ── Page titles + cards: warm glass, light on the edge ── */
body[data-ember-page] .page-title{
  font-family:'Plus Jakarta Sans','Inter',sans-serif; font-weight:800; letter-spacing:-.02em;
  background:linear-gradient(180deg,#fff 35%,#dbecff 100%); -webkit-background-clip:text; background-clip:text; color:transparent;
}
html[data-theme="light"] body[data-ember-page] .page-title{background:linear-gradient(180deg,#08101a 35%,#124a8a 100%); -webkit-background-clip:text; background-clip:text}
body[data-ember-page] .card{position:relative; transition:border-color .3s, box-shadow .35s, transform .35s var(--ember-ease)}
body[data-ember-page] .card::before{
  content:''; position:absolute; left:18px; right:18px; top:-1px; height:1px; pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(140,196,255,.55),rgba(207,230,255,.8),rgba(140,196,255,.55),transparent);
}
body[data-ember-page] .card:hover{border-color:rgba(140,196,255,.28); box-shadow:0 18px 44px -26px rgba(74,149,245,.55)}
body[data-ember-page] .usage-bar-fill{background:linear-gradient(90deg,#2f7beb,#6fb6ff,#99caff) !important; box-shadow:0 0 10px rgba(74,149,245,.5)}

/* Video editor: the drop zone breathes like a light table */
body[data-ember-page="video-editor"] .upload-icon{animation:ember-breathe 3.6s ease-in-out infinite}
@keyframes ember-breathe{0%,100%{filter:drop-shadow(0 0 0 rgba(74,149,245,0)); transform:translateY(0)} 50%{filter:drop-shadow(0 0 14px rgba(74,149,245,.55)); transform:translateY(-4px)}}

/* ── Pricing: four real plans side by side ── */
body[data-ember-page="pricing"] .plans{grid-template-columns:repeat(4,minmax(0,1fr)) !important; max-width:1240px !important; gap:18px !important}
body[data-ember-page="pricing"] .plan-card{transition:transform .35s var(--ember-ease), border-color .3s, box-shadow .35s}
body[data-ember-page="pricing"] .plan-card:hover{transform:translateY(-6px); border-color:rgba(140,196,255,.4); box-shadow:0 22px 50px -26px rgba(74,149,245,.6)}
body[data-ember-page="pricing"] .plan-card.featured{box-shadow:0 0 0 1px rgba(140,196,255,.45), 0 30px 70px -30px rgba(74,149,245,.65)}
body[data-ember-page="pricing"] .plan-credits{margin:-4px 0 10px; font-weight:700; font-size:14px; color:#8cc4ff}
body[data-ember-page="pricing"] .hero-title{font-family:'Plus Jakarta Sans','Inter',sans-serif}
@media (max-width:1100px){body[data-ember-page="pricing"] .plans{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
@media (max-width:640px){body[data-ember-page="pricing"] .plans{grid-template-columns:1fr !important}}

@media (prefers-reduced-motion:reduce){
  body[data-ember-page="video-editor"] .upload-icon{animation:none}
  body[data-ember-page] .card,body[data-ember-page="pricing"] .plan-card{transition:none}
}

/* Studio tier gold written by the account page's plan data -> the logo's amber */
[style*="#ffcc4d"],[style*="rgb(255, 204, 77)"]{color:#99caff !important; border-color:#99caff !important}
[style*="255,204,77"],[style*="rgba(255, 204, 77"]{background-color:rgba(153,202,255,.06) !important}
/* ── Sidebar, professional icon set (Lucide v0.453.0, ISC — static/icons/LICENSE-lucide.txt) ──
   Each link keeps its text; its icon is drawn from the matching Lucide outline via a CSS mask,
   so the markup and links stay as they are. Active item = filled navy pill with a blue edge. */
.sidebar a.sidebar-link .sidebar-icon{width:20px !important; height:20px !important; flex:0 0 20px !important; background:currentColor;
  -webkit-mask:var(--ico) center/20px 20px no-repeat; mask:var(--ico) center/20px 20px no-repeat; color:rgba(203,213,225,.85)}
.sidebar a.sidebar-link .sidebar-icon > svg{display:none !important}
.sidebar a.sidebar-link[href="/"]{--ico:url(/static/icons/house.svg)}
.sidebar a.sidebar-link[href="/dashboard"]{--ico:url(/static/icons/layout-dashboard.svg)}
.sidebar a.sidebar-link[href="/dashboard#myVideosSection"]{--ico:url(/static/icons/clapperboard.svg)}
.sidebar a.sidebar-link[href="/dashboard#gen-input"]{--ico:url(/static/icons/video.svg)}
.sidebar a.sidebar-link[href="/video-editor"]{--ico:url(/static/icons/scissors.svg)}
.sidebar a.sidebar-link[href="/pricing"]{--ico:url(/static/icons/tag.svg)}
.sidebar a.sidebar-link[href="/account"]{--ico:url(/static/icons/credit-card.svg)}
.sidebar a.sidebar-link[href="/settings"]{--ico:url(/static/icons/settings.svg)}
.sidebar a.sidebar-link[href="/admin"]{--ico:url(/static/icons/shield-check.svg)}
.sidebar a.sidebar-link{gap:14px !important; padding:11px 14px !important; border-radius:12px !important; font-weight:500 !important;
  border:1px solid transparent !important; color:rgba(226,232,240,.86) !important}
.sidebar a.sidebar-link:hover{background:rgba(96,165,250,.08) !important; color:#fff !important}
.sidebar a.sidebar-link:hover .sidebar-icon{color:#cfe6ff}
.sidebar a.sidebar-link.active{background:linear-gradient(180deg,rgba(37,99,235,.28),rgba(30,64,175,.22)) !important;
  border-color:rgba(96,165,250,.45) !important; color:#fff !important; font-weight:600 !important; box-shadow:0 8px 24px -14px rgba(59,130,246,.6) !important}
.sidebar a.sidebar-link.active .sidebar-icon{color:#cfe6ff !important; filter:none !important}
.sidebar a.sidebar-link.active::before{display:none !important}
/* Sidebar account popup removed on request (Account & Billing and Settings are in the sidebar); its chevron too */
#sidebarAccountMenu{display:none !important}
.sidebar-plan::after{display:none !important}
/* AI Video lands on the generator with room to spare (the entrance animation shifts it after the jump) */
#gen-input{scroll-margin-top:180px}

/* Requested: no theme switch; the avatar menu shows Log Out only; thin dark sidebar scrollbar */
#themeToggleBtn,.theme-toggle-btn{display:none !important}
.user-dropdown .user-dropdown-item:not(.logout){display:none !important}
.sidebar{scrollbar-width:thin; scrollbar-color:rgba(111,182,255,.28) transparent}
.sidebar::-webkit-scrollbar{width:6px} .sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:rgba(111,182,255,.28); border-radius:6px}

/* ── Glassmorphism icon tiles: each Lucide icon sits in a frosted glass tile (the tile is the span,
   the icon is drawn by its ::after mask). Active = blue glass with glow; hover = brighter, lifted. ── */
.sidebar a.sidebar-link .sidebar-icon{position:relative; width:34px !important; height:34px !important; flex:0 0 34px !important; border-radius:10px;
  -webkit-mask:none !important; mask:none !important; color:#cbd5e1;
  background:linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,.025)) !important;
  border:1px solid rgba(255,255,255,.10); box-shadow:inset 0 1px 0 rgba(255,255,255,.14), 0 6px 16px -10px rgba(0,0,0,.8);
  backdrop-filter:blur(10px) saturate(1.3); -webkit-backdrop-filter:blur(10px) saturate(1.3);
  transition:transform .35s cubic-bezier(.2,.7,.1,1), background .3s, border-color .3s, box-shadow .3s}
.sidebar a.sidebar-link .sidebar-icon::after{content:''; position:absolute; inset:8px; background:currentColor;
  -webkit-mask:var(--ico) center/contain no-repeat; mask:var(--ico) center/contain no-repeat}
.sidebar a.sidebar-link:hover .sidebar-icon{transform:translateY(-1px) !important; color:#e6f2ff;
  background:linear-gradient(145deg,rgba(140,196,255,.18),rgba(140,196,255,.05)) !important; border-color:rgba(140,196,255,.28)}
.sidebar a.sidebar-link.active .sidebar-icon{color:#fff !important;
  background:linear-gradient(145deg,rgba(111,182,255,.55),rgba(47,123,235,.35)) !important; border-color:rgba(207,230,255,.45);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 8px 22px -8px rgba(59,130,246,.75)}
.sidebar a.sidebar-link{padding:7px 10px !important}
@media (prefers-reduced-motion:reduce){.sidebar a.sidebar-link:hover .sidebar-icon{transform:none !important}}

/* Sizes after the reference sidebar: ~44px rows, ~18–20px icons, ~15.5px labels (glass tiles kept, compact) */
.sidebar a.sidebar-link{padding:6px 10px !important; gap:12px !important; font-size:15.5px !important; line-height:1.2 !important; min-height:0 !important; margin:0 !important}
.sidebar a.sidebar-link .sidebar-icon{width:30px !important; height:30px !important; flex:0 0 30px !important; border-radius:9px}
.sidebar a.sidebar-link .sidebar-icon::after{inset:6px}
.sidebar .sidebar-label{margin:16px 0 6px !important}
.sidebar a.sidebar-link{padding:5px 10px !important}

/* ── Sidebar sizes copied from the QbitVisuals sidebar (Qubitvisualz/website/dash-app.js, Tailwind):
   aside w-64 (256px), nav p-4, rows space-y-1, link px-3 py-2.5 gap-3 rounded-xl text-sm font-medium,
   icon w-4 h-4 (16px) → 40px rows, 44px pitch. Plain Lucide line icons; colours unchanged. ── */
@media (min-width:1024px){
  body:has(> .layout .sidebar), body[data-ember-page="video-editor"]{--sb-w:256px}
  .layout .sidebar{width:256px !important; padding:16px !important}
  .layout .main{margin-left:256px !important}
  html[data-sidebar="collapsed"] .layout .main{margin-left:0 !important}
}
.layout .sidebar{gap:4px !important}
/* Requested: no Admin entry in the sidebar (admins still reach the panel at /admin directly) */
.sidebar a.sidebar-link[href="/admin"], .sidebar a.sidebar-link[href^="/admin/"]{display:none !important}
/* Paid-plan badges (PRO / PLUS / STUDIO) in Earthlight Blue instead of gold (CSS only; same markup + script) */
.nav-plan-pill.pro{background:linear-gradient(135deg,#8cc4ff,#2f7beb) !important; color:#fff !important; border:none !important;
  box-shadow:0 6px 18px -8px rgba(47,123,235,.7) !important}
.sidebar-plan .sp-credits.pro{color:#8cc4ff !important}
html[data-theme="light"] .nav-plan-pill.pro{color:#fff !important}
/* the icon inside the blue PRO pill must be white (blue-on-blue was invisible) */
.nav-plan-pill.pro .sl-ico{stroke:#fff !important; stroke-width:2.2}
/* Collapsed = QbitVisuals icon rail (w-16, 64px): icons only, centred, active pill kept; logo mark only.
   Same toggle button + script; CSS only. */
@media (min-width:1024px){
  html[data-sidebar="collapsed"] body:has(> .layout .sidebar){--sb-w:64px}
  html[data-sidebar="collapsed"] .layout .sidebar{transform:none !important; width:64px !important; padding:12px 8px !important; overflow-x:hidden !important; align-items:center}
  html[data-sidebar="collapsed"] .layout .main{margin-left:64px !important}
  html[data-sidebar="collapsed"] .layout .sidebar > :not(a.sidebar-link){display:none !important}
  html[data-sidebar="collapsed"] .layout .sidebar a.sidebar-link{width:48px !important; height:44px !important; padding:0 !important; gap:0 !important;
    justify-content:center !important; font-size:0 !important; flex:0 0 auto}
  html[data-sidebar="collapsed"] .layout .sidebar a.sidebar-link .sidebar-icon{width:18px !important; height:18px !important; flex:0 0 18px !important}
  html[data-sidebar="collapsed"] body > nav::before{transform:none !important}
  html[data-sidebar="collapsed"] body:has(> .layout .sidebar) > nav .logo{margin-left:0 !important; width:32px; overflow:hidden; flex:0 0 32px}
  html[data-sidebar="collapsed"] body:has(> .layout .sidebar) > nav .logo :is(.brand-word,.qbit-word){display:none !important}
  html[data-sidebar="collapsed"] body:has(> .layout .sidebar) > nav .sidebar-toggle-btn{left:76px !important}
}
.sidebar a.sidebar-link{padding:9px 12px !important; gap:12px !important; font-size:14px !important; font-weight:500 !important;
  line-height:20px !important; border-radius:12px !important; margin:0 !important; box-sizing:border-box !important; height:40px !important}
.sidebar a.sidebar-link .sidebar-icon, .sidebar a.sidebar-link:hover .sidebar-icon, .sidebar a.sidebar-link.active .sidebar-icon{
  width:16px !important; height:16px !important; flex:0 0 16px !important; border:0 !important; border-radius:0 !important;
  background:none !important; box-shadow:none !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important}
.sidebar a.sidebar-link .sidebar-icon::after{inset:0 !important}
.sidebar .sidebar-label{margin:18px 4px 8px !important}

/* Video editor: the 'Edit Scene' tool generated AI images via /generate-scene-image, which the backend does not have
   (always failed). Hidden; 'Replace Scene' (upload) and 'AI Generate' (video) stay. */
#tbScene, #panel-scene{display:none !important}
