:root{--bg:#080b10;--panel:#0f141d;--panel2:#0b1017;--line:#202938;--text:#f4f7fb;--muted:#8f9bad;--accent:#8cff79;--accent2:#76d4ff;--danger:#ff7d8a;--warning:#ffc66d}*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;background:radial-gradient(circle at 80% 0,#12231b 0,transparent 26%),radial-gradient(circle at 10% 15%,#111b2b 0,transparent 30%),var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh}.noise{position:fixed;inset:0;pointer-events:none;opacity:.075}.topbar{height:72px;border-bottom:1px solid #18202c;display:flex;align-items:center;justify-content:space-between;padding:0 4vw;position:sticky;top:0;background:#080b10dc;backdrop-filter:blur(20px);z-index:5}.brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;font-weight:800}.brandmark{width:34px;height:34px;border:1px solid #39524a;background:linear-gradient(145deg,#92ff7b,#50c7ff);color:#061008;display:grid;place-items:center;border-radius:10px}.top-actions{display:flex;align-items:center;gap:12px}.top-actions span{color:var(--muted);font-size:13px}.shell{width:min(1220px,92vw);margin:0 auto;padding:54px 0 80px}.hidden{display:none!important}.auth-wrap{min-height:calc(100vh - 180px);display:grid;grid-template-columns:1.25fr .75fr;gap:80px;align-items:center}.hero-copy h1,.dashboard-head h1,.admin-head h1{font-size:clamp(42px,6vw,82px);line-height:.95;letter-spacing:-.065em;margin:14px 0 24px}.hero-copy h1 span{color:var(--accent)}.hero-copy p,.dashboard-head p,.admin-head p,.section-title p{font-size:16px;line-height:1.7;color:#8f9bad;max-width:700px}.eyebrow{font-size:11px;letter-spacing:.22em;color:#92a0b5;font-weight:800}.pills{display:flex;gap:8px;flex-wrap:wrap;margin-top:30px}.pills span{border:1px solid var(--line);background:#0d121a;padding:8px 11px;border-radius:999px;font-size:12px;color:#b9c4d2}.auth-card,.panel{background:linear-gradient(180deg,#111720,#0d1219);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 80px #0005}.auth-card{padding:18px}.tabs{display:grid;grid-template-columns:1fr 1fr;background:#080b10;border-radius:12px;padding:4px;margin-bottom:22px}.tabs button{border:0;background:transparent;color:#7f8b9e;padding:11px;border-radius:9px;font-weight:700;cursor:pointer}.tabs button.active{background:#151d28;color:#fff}.auth-card form{padding:6px 8px 8px}label{display:flex;flex-direction:column;gap:8px;color:#acb6c5;font-size:13px;font-weight:700;margin-bottom:18px}input,select,textarea{width:100%;border:1px solid #293344;background:#090d13;color:#fff;border-radius:12px;padding:13px 14px;outline:none;font:inherit}textarea{min-height:160px;resize:vertical;line-height:1.5}.primary{border:0;background:linear-gradient(135deg,var(--accent),#62c9ff);color:#061008;padding:13px 18px;border-radius:12px;font-weight:900;cursor:pointer}.full{width:100%}.ghost{border:1px solid #2a3444;background:#0e141d;color:#c9d3df;padding:9px 13px;border-radius:10px;cursor:pointer}.compact{padding:7px 10px;font-size:12px}.danger-outline{border-color:#5b3038;color:#ff9da6}.success-outline{border-color:#31553e;color:#a7ef99}.error{min-height:18px;color:var(--danger);font-size:12px}.portal-nav{display:flex;justify-content:space-between;align-items:end;margin-bottom:46px;border-bottom:1px solid #1c2430;padding-bottom:18px}.portal-tabs,.admin-tabs{display:flex;gap:6px;margin-top:13px}.portal-tab,.admin-tab{border:0;background:transparent;color:#778599;padding:10px 13px;border-radius:10px;font-weight:700;cursor:pointer}.portal-tab.active,.admin-tab.active{background:#151d28;color:#fff}.credit-card{min-width:160px;border:1px solid #2c3f38;background:#0c1714;border-radius:16px;padding:12px 18px;display:flex;flex-direction:column}.credit-card strong{font-size:28px;color:var(--accent)}.dashboard-head{margin-bottom:28px}.dashboard-head h1{font-size:52px;margin:10px 0 12px}.grid{display:grid;grid-template-columns:1fr 320px;gap:18px}.panel{padding:22px}.field-row{display:grid;grid-template-columns:1.2fr .8fr .8fr;gap:12px}.upload-zone{border:1px dashed #344255;background:#0a0f16;border-radius:16px;padding:20px;align-items:center;text-align:center;cursor:pointer}.upload-zone input{display:none}.upload-icon{font-size:28px;color:var(--accent)}.file-names{font-size:11px;color:#9fb1c5;margin-top:8px}.generate-row{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #202a38;padding-top:18px}.sidecard{position:relative;overflow:hidden}.orb{width:180px;height:180px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#c9ffbc,#63ff8b 23%,#106d4d 56%,transparent 72%);margin:-60px -40px 30px auto}.stat{border-top:1px solid #202938;padding:14px 0;display:flex;justify-content:space-between;font-size:12px}.section-title{display:flex;align-items:end;justify-content:space-between;margin-bottom:18px}.section-title h2{margin:7px 0;font-size:32px}.jobs{display:grid;gap:10px}.job{display:grid;grid-template-columns:72px 1fr 170px 130px;gap:16px;align-items:center;background:#0d1219;border:1px solid #1c2532;border-radius:16px;padding:13px}.thumb{height:54px;border-radius:10px;background:linear-gradient(135deg,#182537,#15271f);display:grid;place-items:center}.job h3{font-size:14px;margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.meta{font-size:11px;color:#728196}.progress{height:6px;border-radius:999px;background:#1a2330;overflow:hidden;margin-top:7px}.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2))}.badge{padding:5px 8px;border-radius:999px;background:#152019;display:inline-block;color:#a7e799;font-size:11px}.status-processing{background:#10202b;color:#89dfff}.status-queued{background:#242115;color:#ffd37e}.status-failed,.status-disabled{background:#25151a;color:#ff9ca5}.empty{border:1px dashed #283243;border-radius:16px;padding:38px;text-align:center;color:#738196}.ledger-row,.mini-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:16px 18px;border-bottom:1px solid #1b2430}.positive{color:var(--accent)}.negative{color:#ff9ca5}.admin-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:26px}.admin-head h1{font-size:56px;margin:10px 0 12px}.admin-tabs{border-bottom:1px solid #1d2532;margin-bottom:26px;padding-bottom:12px}.stat-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:18px}.metric-card{border:1px solid #202938;background:#0d1219;border-radius:18px;padding:18px;display:flex;flex-direction:column}.admin-two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}.table-wrap{width:100%;overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:880px}.data-table th,.data-table td{padding:12px 14px;border-bottom:1px solid #263141;text-align:left}.credit-control{display:flex;gap:7px}.system-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.system-card{border:1px solid #202938;background:#0d1219;border-radius:16px;padding:18px;display:flex;gap:12px}.system-dot{width:9px;height:9px;border-radius:50%;margin-top:3px}.system-dot.ok{background:#88f276}.system-dot.warn{background:#ffc66d}.probe-panel{margin-top:16px}.probe-result{margin:0;min-height:90px;max-height:340px;overflow:auto;background:#080c12;border:1px solid #202938;border-radius:12px;padding:14px;color:#a9bacd;white-space:pre-wrap}.probe-result.ok{border-color:#31553e;color:#a7ef99}.probe-result.bad{border-color:#5b3038;color:#ff9da6}.mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:#080c12;border:1px solid #1f2937;border-radius:13px;padding:4px;margin-bottom:18px}.mode-toggle button{border:0;background:transparent;color:#8090a4;border-radius:9px;padding:11px 12px;font-weight:800;cursor:pointer}.mode-toggle button.active{background:#17202c;color:#fff}@media(max-width:900px){.auth-wrap,.grid{grid-template-columns:1fr}.field-row{grid-template-columns:1fr}.sidecard{display:none}.job{grid-template-columns:54px 1fr}.stat-grid{grid-template-columns:repeat(2,1fr)}.system-grid{grid-template-columns:1fr}.admin-two-col{grid-template-columns:1fr}}@media(max-width:560px){.stat-grid{grid-template-columns:1fr}.generate-row{flex-direction:column;align-items:stretch}}
.user-actions{display:flex;gap:6px;flex-wrap:wrap}.data-table td small{display:block;color:#728196;margin-top:4px}.modal-backdrop{position:fixed;inset:0;background:#03060bb8;backdrop-filter:blur(12px);z-index:50;display:grid;place-items:center;padding:20px}.modal-card{width:min(480px,100%);background:linear-gradient(180deg,#121923,#0c1118);border:1px solid #293446;border-radius:22px;padding:22px;box-shadow:0 28px 90px #0009}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:22px}.modal-head h3{margin:7px 0 0;font-size:28px}.icon-button{width:36px;height:36px;border-radius:10px;border:1px solid #2c3747;background:#0a0f16;color:#b8c3d0;font-size:24px;line-height:1;cursor:pointer}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:10px}.modal-note{color:#748196;font-size:12px;margin:-4px 0 5px}.credit-control input{min-width:150px}.table-panel{padding:14px}.data-table th{font-size:12px;color:#95a5b8}.data-table td{vertical-align:middle}
/* Keep long generation prompts inside their cards instead of widening the whole page. */
.jobs,.job,.job-main,.job-extra,.job-action{min-width:0}
.job{width:100%;max-width:100%;overflow:hidden}
.job-main{overflow:hidden}
.job h3{
  white-space:normal;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:break-word;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
  line-height:1.35;
  max-height:2.7em
}
.job .meta{overflow-wrap:anywhere}
.job-action{overflow:hidden}
.job-action a{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:900px){
  .job{grid-template-columns:54px minmax(0,1fr)}
  .job-extra,.job-action{grid-column:2}
}

/* === Premium AI Studio customer experience === */
:root{
  --studio-bg:#07090c;
  --studio-panel:#101216;
  --studio-panel-2:#15181d;
  --studio-line:#272b31;
  --studio-soft:#a3abb7;
  --studio-accent:#d9ff00;
  --studio-violet:#7d5cff;
  --studio-cyan:#4bd8ff;
}
.shell{width:min(1740px,96vw);padding:28px 0 64px}
.studio-app{margin-top:-10px}
.studio-productbar{height:58px;display:flex;align-items:center;justify-content:space-between;border:1px solid #1d2127;border-radius:15px 15px 0 0;background:#0b0d10;padding:7px 10px 7px 12px;box-shadow:0 18px 60px #0006}
.studio-product-tabs{display:flex;gap:5px;align-items:center}
.studio-product{border:0;background:transparent;color:#7f8792;padding:10px 13px;border-radius:9px;font-weight:800;cursor:pointer;display:flex;align-items:center;gap:8px;transition:.18s ease}
.studio-product:hover{background:#15181d;color:#e9edf3}
.studio-product.active{background:#1b1f25;color:#fff;box-shadow:inset 0 0 0 1px #2f343c}
.product-icon{font-size:12px;color:var(--studio-accent)}
.soon-badge{font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:#c8ff64;background:#1e2a10;border:1px solid #354b19;border-radius:999px;padding:4px 6px}
.studio-accountbar{display:flex;align-items:center}
.studio-credit-pill{display:flex;align-items:center;gap:9px;border:1px solid #2b3038;background:#12151a;border-radius:999px;padding:8px 12px;color:#929ba8;font-size:12px}
.studio-credit-pill strong{color:#fff;font-size:14px}
.studio-layout{display:grid;grid-template-columns:315px minmax(0,1fr);min-height:760px;border:1px solid #1d2127;border-top:0;border-radius:0 0 16px 16px;overflow:hidden;background:#090b0e}
.studio-sidebar{background:#0c0e11;border-right:1px solid #22262c;padding:14px;min-width:0}
.studio-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:8px 6px 16px}
.studio-sidebar-head h2{margin:5px 0 0;font-size:21px}
.live-dot{font-size:10px;color:#b9ff93;background:#142414;border:1px solid #244226;border-radius:999px;padding:5px 8px}
.live-dot:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#79ff67;margin-right:5px;box-shadow:0 0 12px #79ff67}
.studio-generator{display:flex;flex-direction:column;gap:12px}
.studio-generator label{margin:0}
.studio-generator input,.studio-generator select,.studio-generator textarea{background:#14171b;border:1px solid #2a2f36;border-radius:10px}
.studio-generator textarea{min-height:170px;max-height:260px;resize:vertical}
.studio-generator textarea:focus,.studio-generator select:focus{border-color:#565d67;box-shadow:0 0 0 3px #ffffff0a}
.studio-label{font-size:12px;color:#a8b0bb}
.studio-mode-toggle{margin:0;background:#111419}
.studio-mode-toggle button{font-size:12px}
.studio-control-block{border-top:1px solid #20242a;padding-top:12px}
.studio-control-title{display:block;font-size:11px;color:#8c95a1;margin-bottom:8px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.studio-control-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.studio-control-grid label{font-size:11px;color:#8c95a1}
.studio-upload{min-height:118px;border-radius:12px;background:#12151a}
.studio-generate-footer{margin-top:4px;padding-top:12px;border-top:1px solid #20242a;display:grid;gap:10px}
.studio-cost{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#87909d}
.studio-cost strong{font-size:12px;color:#e9edf3}
.studio-generate-button{width:100%;border:0;border-radius:10px;background:var(--studio-accent);color:#101500;padding:14px 18px;font-weight:950;font-size:14px;cursor:pointer;display:flex;justify-content:center;gap:8px;transition:.18s ease;box-shadow:0 0 28px #d9ff001a}
.studio-generate-button:hover{transform:translateY(-1px);filter:brightness(1.05)}
.studio-workspace{min-width:0;background:#090b0e;padding:14px 18px 22px;background-image:radial-gradient(circle at 30% 20%,#1f22301c,transparent 28%),radial-gradient(circle at 80% 35%,#1724171f,transparent 28%)}
.studio-workspace-top{display:flex;justify-content:space-between;align-items:center;padding:0 2px 12px;border-bottom:1px solid #1f2329}
.studio-view-tabs{margin:0}
.studio-view-tabs .portal-tab{padding:8px 11px;font-size:12px}
.workspace-chip{border:1px solid #2a2f36;background:#111419;color:#8f98a4;border-radius:999px;padding:6px 9px;font-size:10px}
.studio-hero{position:relative;min-height:365px;margin-top:14px;border:1px solid #20242a;border-radius:16px;overflow:hidden;display:grid;grid-template-columns:.85fr 1.15fr;align-items:center;padding:38px;background:linear-gradient(145deg,#11151b 0%,#0d1015 58%,#151711 100%)}
.studio-hero:after{content:"";position:absolute;inset:0;background-image:radial-gradient(#ffffff0c 1px,transparent 1px);background-size:17px 17px;mask-image:linear-gradient(to right,transparent,#000 32%,#000)}
.studio-hero-glow{position:absolute;width:440px;height:440px;border-radius:50%;background:radial-gradient(circle,#bfff4d20 0,#8057ff15 42%,transparent 69%);right:12%;top:-90px;filter:blur(8px)}
.studio-hero-copy{position:relative;z-index:2;max-width:590px}
.studio-kicker{font-size:10px;letter-spacing:.18em;color:#a8ff73;font-weight:900}
.studio-hero h1{font-size:clamp(36px,4.1vw,64px);letter-spacing:-.055em;line-height:.98;margin:13px 0 18px;max-width:650px}
.studio-hero p{color:#969faa;line-height:1.65;font-size:14px;max-width:560px}
.studio-hero-pills{display:flex;gap:7px;flex-wrap:wrap;margin-top:20px}
.studio-hero-pills span{font-size:10px;color:#b2bbc6;background:#15191f;border:1px solid #2a3038;border-radius:999px;padding:7px 9px}
.studio-visual{position:relative;z-index:2;min-height:280px;display:grid;place-items:center}
.visual-frame{position:relative;width:min(620px,88%);aspect-ratio:16/9;border-radius:18px;overflow:hidden;border:1px solid #42464e;background:
radial-gradient(circle at 66% 36%,#d9ff0050,transparent 18%),
radial-gradient(circle at 28% 72%,#6d52ff65,transparent 25%),
linear-gradient(135deg,#272f3d,#12161d 42%,#252618);
box-shadow:0 36px 80px #0009,0 0 0 1px #ffffff0a inset;transform:perspective(1200px) rotateY(-8deg) rotateX(2deg)}
.visual-frame:before{content:"";position:absolute;inset:0;background:linear-gradient(115deg,transparent 15%,#ffffff1a 42%,transparent 49%);transform:translateX(-65%)}
.visual-badge{position:absolute;top:14px;left:14px;background:#090b0ebd;border:1px solid #ffffff20;border-radius:999px;padding:6px 8px;font-size:9px;letter-spacing:.12em}
.visual-play{position:absolute;inset:0;display:grid;place-items:center;font-size:22px;color:#0d1000;margin:auto;width:54px;height:54px;border-radius:50%;background:var(--studio-accent);box-shadow:0 0 42px #d9ff0057}
.visual-orb{position:absolute;border-radius:50%;filter:blur(14px)}
.visual-orb.one{width:120px;height:120px;background:#7b5cff44;left:8%;bottom:12%}
.visual-orb.two{width:140px;height:140px;background:#c8ff3440;right:5%;top:8%}
.studio-section-head{display:flex;align-items:end;justify-content:space-between;margin:24px 2px 12px}
.studio-section-head h3{margin:6px 0 0;font-size:20px}
.studio-generation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.studio-gen-card{min-width:0;border:1px solid #22272e;background:#101318;border-radius:13px;overflow:hidden;text-decoration:none;color:#fff;display:flex;flex-direction:column;transition:.18s ease}
.studio-gen-card:hover{transform:translateY(-2px);border-color:#3d444d;background:#13171d}
.studio-gen-thumb{aspect-ratio:16/9;background:
radial-gradient(circle at 70% 24%,#baff3540,transparent 20%),
radial-gradient(circle at 22% 72%,#6c50ff55,transparent 27%),
linear-gradient(135deg,#222a35,#11151b);position:relative;overflow:hidden}
.studio-gen-thumb:after{content:"";position:absolute;inset:0;background-image:radial-gradient(#fff 1px,transparent 1px);background-size:13px 13px;opacity:.05}
.studio-gen-play{position:absolute;inset:0;margin:auto;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#e8ff54;color:#141700;font-size:12px;z-index:1}
.studio-gen-status{position:absolute;left:9px;top:9px;z-index:2}
.studio-gen-body{padding:11px;min-width:0}
.studio-gen-body strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:12px;line-height:1.35;min-height:32px}
.studio-gen-body small{display:block;margin-top:7px;color:#7d8794;font-size:10px}
.coming-soon-view{min-height:720px;border:1px solid #1d2127;border-top:0;border-radius:0 0 16px 16px;background:#090b0e;padding:24px}
.coming-soon-card{position:relative;min-height:640px;border:1px solid #262b32;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;overflow:hidden;padding:30px;background:#0f1217}
.coming-soon-card:before{content:"";position:absolute;width:560px;height:560px;border-radius:50%;filter:blur(20px);opacity:.32}
.image-soon:before{background:radial-gradient(circle,#6d5cff,#38d8ff55 40%,transparent 70%)}
.voice-soon:before{background:radial-gradient(circle,#d9ff00,#00ffc655 40%,transparent 70%)}
.coming-soon-card>*{position:relative;z-index:1}
.coming-icon{width:74px;height:74px;border-radius:22px;background:#181d24;border:1px solid #303741;display:grid;place-items:center;font-size:30px;margin-bottom:24px;box-shadow:0 20px 50px #0008}
.coming-soon-card h1{font-size:clamp(42px,5vw,74px);letter-spacing:-.055em;line-height:1;margin:14px 0 18px;max-width:850px}
.coming-soon-card p{max-width:640px;color:#9aa3af;line-height:1.65}
.coming-pills{display:flex;gap:8px;margin-top:20px;flex-wrap:wrap;justify-content:center}
.coming-pills span{padding:7px 10px;border-radius:999px;border:1px solid #2a3038;background:#12161c;color:#aeb7c3;font-size:11px}
.coming-soon-label{margin-top:28px;color:#111600;background:var(--studio-accent);border-radius:999px;padding:9px 14px;font-size:10px;font-weight:950;letter-spacing:.13em}
.job-main{min-width:0;overflow:hidden}
.job h3{max-width:100%}
@media(max-width:1250px){
  .studio-generation-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .studio-hero{grid-template-columns:1fr}
  .studio-visual{margin-top:18px}
}
@media(max-width:980px){
  .studio-layout{grid-template-columns:1fr}
  .studio-sidebar{border-right:0;border-bottom:1px solid #22262c}
  .studio-generation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .studio-productbar{align-items:flex-start;height:auto;gap:8px}
  .studio-product-tabs{flex-wrap:wrap}
}
@media(max-width:620px){
  .studio-generation-grid{grid-template-columns:1fr}
  .studio-hero{padding:22px}
  .studio-hero h1{font-size:42px}
  .studio-control-grid{grid-template-columns:1fr}
  .studio-product{padding:9px}
  .soon-badge{display:none}
}

/* === CMM Tools bright theme (default) === */
html{background:#f5f9fd}
body.light-theme{
  --bg:#f5f9fd;
  --panel:#ffffff;
  --panel2:#f8fbfe;
  --line:#dce6ef;
  --text:#0d3152;
  --muted:#6d8195;
  --accent:#14c3cf;
  --accent2:#0b4f7f;
  background:
    radial-gradient(circle at 82% 0,#dff7f8 0,transparent 27%),
    radial-gradient(circle at 8% 18%,#eaf3fb 0,transparent 32%),
    #f5f9fd;
  color:#0d3152;
}
body.light-theme .noise{opacity:.025}
body.light-theme .topbar{
  background:#ffffffee;
  border-bottom-color:#dce6ef;
  box-shadow:0 6px 28px #174a7010;
}
body.light-theme .brand{color:#0a426f}
.brand-logo{
  display:block;
  width:164px;
  height:auto;
  max-height:50px;
  object-fit:contain;
}
body.light-theme .top-actions span{color:#6f8294}
body.light-theme .ghost{
  background:#fff;
  border-color:#d6e2ec;
  color:#31516c;
}
body.light-theme .ghost:hover{background:#f3f8fc}
body.light-theme .primary{
  background:linear-gradient(135deg,#18c4cf,#0d6fa3);
  color:#fff;
}
body.light-theme .auth-card,
body.light-theme .panel{
  background:linear-gradient(180deg,#ffffff,#f8fbfd);
  border-color:#d9e5ee;
  box-shadow:0 20px 55px #21597a12;
}
body.light-theme .tabs{background:#edf4f8}
body.light-theme .tabs button{color:#698095}
body.light-theme .tabs button.active{background:#fff;color:#0b416d;box-shadow:0 2px 10px #21597a14}
body.light-theme label{color:#587186}
body.light-theme input,
body.light-theme select,
body.light-theme textarea{
  background:#fff;
  color:#143852;
  border-color:#cfdae4;
}
body.light-theme input::placeholder,
body.light-theme textarea::placeholder{color:#9aabba}
body.light-theme .eyebrow{color:#5c7891}
body.light-theme .pills span{
  background:#fff;
  border-color:#d8e3ec;
  color:#5e7488;
}
body.light-theme .hero-copy h1 span{color:#11b8c4}
body.light-theme .hero-copy p,
body.light-theme .dashboard-head p,
body.light-theme .admin-head p,
body.light-theme .section-title p{color:#6d8195}
body.light-theme .portal-tab,
body.light-theme .admin-tab{color:#6b8195}
body.light-theme .portal-tab.active,
body.light-theme .admin-tab.active{
  background:#e9f5f8;
  color:#0a5575;
}
body.light-theme .admin-tabs,
body.light-theme .portal-nav{border-color:#dce6ef}
body.light-theme .credit-card{
  background:#eefbfb;
  border-color:#cdecee;
}
body.light-theme .credit-card strong{color:#0ba9b6}
body.light-theme .metric-card,
body.light-theme .system-card,
body.light-theme .job{
  background:#fff;
  border-color:#dbe5ed;
}
body.light-theme .thumb{
  background:linear-gradient(135deg,#dcecf7,#def7f4);
  color:#0a5575;
}
body.light-theme .meta{color:#75899a}
body.light-theme .empty{
  border-color:#cfdbe5;
  color:#7890a3;
  background:#fbfdff;
}
body.light-theme .ledger-row,
body.light-theme .mini-row,
body.light-theme .data-table th,
body.light-theme .data-table td{border-color:#e3ebf1}
body.light-theme .data-table th{color:#5d7488}
body.light-theme .modal-backdrop{background:#12324f55}
body.light-theme .modal-card{
  background:linear-gradient(180deg,#fff,#f7fbfd);
  border-color:#d6e2eb;
  box-shadow:0 28px 80px #274f6f24;
}
body.light-theme .icon-button{
  background:#fff;
  color:#436078;
  border-color:#d5e1ea;
}

/* Bright premium studio */
body.light-theme .studio-productbar{
  background:#fff;
  border-color:#dce5ec;
  box-shadow:0 18px 50px #28567612;
}
body.light-theme .studio-product{color:#6c8295}
body.light-theme .studio-product:hover{background:#f0f6fa;color:#0b4f79}
body.light-theme .studio-product.active{
  background:#e8f7f8;
  color:#074d70;
  box-shadow:inset 0 0 0 1px #c8e8eb;
}
body.light-theme .product-icon{color:#12b7c3}
body.light-theme .soon-badge{
  color:#0f7180;
  background:#e7fbfb;
  border-color:#bfe9ec;
}
body.light-theme .studio-credit-pill{
  background:#f6fbfd;
  border-color:#d6e2eb;
  color:#728698;
}
body.light-theme .studio-credit-pill strong{color:#0a4d78}
body.light-theme .studio-layout{
  background:#f7fafc;
  border-color:#dbe5ed;
}
body.light-theme .studio-sidebar{
  background:#ffffff;
  border-right-color:#dfe8ef;
}
body.light-theme .studio-sidebar-head h2{color:#103b5e}
body.light-theme .live-dot{
  color:#14765d;
  background:#ebfaf4;
  border-color:#c8eadb;
}
body.light-theme .live-dot:before{
  background:#32c98e;
  box-shadow:0 0 10px #32c98e66;
}
body.light-theme .studio-generator input,
body.light-theme .studio-generator select,
body.light-theme .studio-generator textarea{
  background:#fbfdff;
  color:#153a54;
  border-color:#d4e0e9;
}
body.light-theme .studio-generator textarea:focus,
body.light-theme .studio-generator select:focus{
  border-color:#72cdd5;
  box-shadow:0 0 0 3px #18becb16;
}
body.light-theme .studio-label,
body.light-theme .studio-control-title,
body.light-theme .studio-control-grid label{color:#60798e}
body.light-theme .studio-mode-toggle{background:#f0f5f8;border-color:#d7e2ea}
body.light-theme .studio-mode-toggle button{color:#6d8396}
body.light-theme .studio-mode-toggle button.active{background:#fff;color:#0b5578}
body.light-theme .studio-control-block,
body.light-theme .studio-generate-footer{border-color:#e0e8ee}
body.light-theme .studio-upload{background:#f8fcfe;border-color:#bddde3}
body.light-theme .studio-cost{color:#718596}
body.light-theme .studio-cost strong{color:#0e3b5d}
body.light-theme .studio-generate-button{
  background:linear-gradient(135deg,#12c2cd,#0b6c9f);
  color:#fff;
  box-shadow:0 10px 24px #0c91a12b;
}
body.light-theme .studio-workspace{
  background:#f7fafc;
  background-image:
    radial-gradient(circle at 30% 20%,#dceff31f,transparent 30%),
    radial-gradient(circle at 80% 35%,#dceafa30,transparent 28%);
}
body.light-theme .studio-workspace-top{border-color:#dce6ed}
body.light-theme .workspace-chip{
  background:#fff;
  color:#667f93;
  border-color:#d5e1e9;
}
body.light-theme .studio-hero{
  border-color:#d7e3eb;
  background:
    linear-gradient(145deg,#ffffff 0%,#f7fbfd 58%,#eef9fa 100%);
  box-shadow:0 16px 45px #235c7f10;
}
body.light-theme .studio-hero:after{
  background-image:radial-gradient(#0d567a0d 1px,transparent 1px);
}
body.light-theme .studio-hero-glow{
  background:radial-gradient(circle,#4ad7df28 0,#4d8cff14 42%,transparent 69%);
}
body.light-theme .studio-kicker{color:#0e99a5}
body.light-theme .studio-hero h1{color:#0a3454}
body.light-theme .studio-hero p{color:#698095}
body.light-theme .studio-hero-pills span{
  color:#5c7387;
  background:#fff;
  border-color:#d8e3eb;
}
body.light-theme .visual-frame{
  border-color:#bed6e0;
  background:
    radial-gradient(circle at 66% 36%,#56d7df70,transparent 18%),
    radial-gradient(circle at 28% 72%,#5f8dff55,transparent 25%),
    linear-gradient(135deg,#dceaf4,#aecfe0 42%,#c8e7e7);
  box-shadow:0 26px 60px #2b6a8620,0 0 0 1px #ffffff88 inset;
}
body.light-theme .visual-badge{
  background:#ffffffd9;
  color:#0c5576;
  border-color:#d4e3eb;
}
body.light-theme .visual-play{
  background:#0aaab7;
  color:#fff;
  box-shadow:0 0 34px #13b9c55a;
}
body.light-theme .visual-orb.one{background:#5f8dff28}
body.light-theme .visual-orb.two{background:#36d7dd33}
body.light-theme .studio-section-head h3{color:#173e5b}
body.light-theme .studio-gen-card{
  background:#fff;
  border-color:#d9e4ec;
  color:#123b5a;
  box-shadow:0 10px 24px #25516e0b;
}
body.light-theme .studio-gen-card:hover{
  border-color:#b9d6df;
  background:#fcfeff;
}
body.light-theme .studio-gen-thumb{
  background:
    radial-gradient(circle at 70% 24%,#55d9df50,transparent 20%),
    radial-gradient(circle at 22% 72%,#6d8eff42,transparent 27%),
    linear-gradient(135deg,#e3edf4,#c9dfe9);
}
body.light-theme .studio-gen-thumb:after{
  background-image:radial-gradient(#164f6f 1px,transparent 1px);
}
body.light-theme .studio-gen-play{
  background:#0eb4c0;
  color:#fff;
}
body.light-theme .studio-gen-body small{color:#758a9c}
body.light-theme .coming-soon-view{
  background:#f7fafc;
  border-color:#dce6ed;
}
body.light-theme .coming-soon-card{
  background:#fff;
  border-color:#dce6ed;
  box-shadow:0 20px 50px #25536f12;
}
body.light-theme .coming-icon{
  background:#f5fafc;
  border-color:#d7e3eb;
  box-shadow:0 14px 34px #244d6815;
  color:#0c6d8c;
}
body.light-theme .coming-soon-card h1{color:#0a3454}
body.light-theme .coming-soon-card p{color:#6d8194}
body.light-theme .coming-pills span{
  background:#f8fbfd;
  border-color:#dae5ec;
  color:#61798d;
}
body.light-theme .coming-soon-label{
  background:#0bb4c0;
  color:#fff;
}
body.light-theme .probe-result{
  background:#f7fafc;
  border-color:#d8e3ea;
  color:#526c80;
}
body.light-theme .probe-result.ok{border-color:#b8dfcf;color:#24694f}
body.light-theme .probe-result.bad{border-color:#edc5ca;color:#a74754}

/* Generated video thumbnails */
.thumb{position:relative;overflow:hidden}
.job-thumb-video,.studio-gen-video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.job-thumb-video{position:absolute;inset:0}
.thumb-play,.thumb-placeholder{
  position:relative;
  z-index:2;
  width:30px;
  height:30px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:11px;
  background:#ffffffd9;
  color:#0b5475;
  box-shadow:0 4px 14px #0002;
}
.studio-gen-thumb{position:relative}
.studio-gen-video{
  position:absolute;
  inset:0;
  z-index:0;
}
.studio-gen-thumb:after{z-index:1}
.studio-gen-status{z-index:3}
.studio-gen-play{z-index:3}
body:not(.light-theme) .thumb-play,
body:not(.light-theme) .thumb-placeholder{
  background:#0b0e12d9;
  color:#fff;
}

/* Reference image thumbnail cards */
.file-names{width:100%;margin-top:12px}
.reference-preview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  width:100%;
}
.reference-preview-card,
.reference-add-card{
  position:relative;
  aspect-ratio:1/1;
  border-radius:12px;
  overflow:hidden;
  border:1px solid #cfdde7;
  background:#f7fbfd;
}
.reference-preview-card img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.reference-preview-card:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top,#061c2b80 0%,transparent 48%);
  pointer-events:none;
}
.reference-index{
  position:absolute;
  left:7px;
  bottom:7px;
  z-index:2;
  font-size:9px;
  font-weight:800;
  color:#fff;
  background:#0b3657c9;
  border:1px solid #ffffff40;
  border-radius:999px;
  padding:4px 6px;
  backdrop-filter:blur(7px);
}
.reference-remove{
  position:absolute;
  z-index:3;
  top:6px;
  right:6px;
  width:25px;
  height:25px;
  padding:0;
  border:1px solid #ffffff70;
  border-radius:50%;
  background:#0b2034c9;
  color:#fff;
  font-size:16px;
  line-height:1;
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow:0 4px 12px #0003;
}
.reference-remove:hover{background:#c74755}
.reference-add-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border-style:dashed;
  border-color:#9fd5dc;
  color:#0a758d;
  cursor:pointer;
  min-height:96px;
}
.reference-add-card span{font-size:24px;line-height:1}
.reference-add-card small{font-size:9px;font-weight:800}
.reference-add-card:hover{
  background:#edfafa;
  border-color:#56c8d0;
}
body.light-theme .studio-upload{
  padding:12px;
  align-items:stretch;
}
body.light-theme .studio-upload > .upload-icon,
body.light-theme .studio-upload > strong,
body.light-theme .studio-upload > small{
  align-self:center;
}
body:not(.light-theme) .reference-preview-card,
body:not(.light-theme) .reference-add-card{
  background:#11161d;
  border-color:#303a46;
}
body:not(.light-theme) .reference-add-card{
  color:#79dce5;
  border-color:#3c6870;
}
@media(max-width:620px){
  .reference-preview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* === In-app generated video player === */
.modal-open{overflow:hidden}
.thumb-button{
  border:0;
  padding:0;
  cursor:pointer;
}
.thumb-button:disabled{cursor:default}
.play-video-button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid #b9dce2;
  background:linear-gradient(180deg,#ffffff,#f3fbfc);
  color:#0a6880;
  border-radius:10px;
  padding:10px 14px;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  box-shadow:0 5px 14px #1d6b8310;
  transition:.18s ease;
}
.play-video-button:hover{
  transform:translateY(-1px);
  border-color:#77cbd3;
  box-shadow:0 8px 20px #1d6b8318;
}
.play-video-button span{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#0eb4c0;
  color:#fff;
  font-size:9px;
}
.studio-gen-card-button{
  width:100%;
  text-align:left;
  padding:0;
  cursor:pointer;
  font:inherit;
}
.video-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  padding:24px;
  background:#09253d8f;
  backdrop-filter:blur(14px);
}
.video-modal-shell{
  width:min(1050px,94vw);
  max-height:92vh;
  overflow:auto;
  background:#ffffff;
  border:1px solid #cfdde7;
  border-radius:24px;
  box-shadow:0 30px 100px #0a33553a;
}
.video-modal-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 20px 14px;
  border-bottom:1px solid #e3ebf1;
}
.video-modal-topbar h3{
  margin:5px 0 0;
  color:#0c3555;
  font-size:22px;
}
.video-modal-close{
  width:38px;
  height:38px;
  border:1px solid #d5e1e9;
  border-radius:12px;
  background:#f8fbfd;
  color:#3a5970;
  font-size:24px;
  cursor:pointer;
}
.video-modal-close:hover{background:#eef6f8}
.video-modal-stage{
  background:#07121d;
  display:grid;
  place-items:center;
  min-height:320px;
}
.video-modal-stage video{
  display:block;
  width:100%;
  max-height:62vh;
  object-fit:contain;
  background:#07121d;
}
.video-modal-details{
  padding:18px 20px 22px;
}
.video-modal-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.video-modal-meta span{
  padding:6px 9px;
  border-radius:999px;
  background:#eef8fa;
  border:1px solid #cfe8eb;
  color:#3c687a;
  font-size:10px;
  font-weight:700;
}
.video-prompt-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}
.video-prompt-head>span{
  color:#526d82;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.copy-prompt-button{
  border:1px solid #c9dde6;
  background:#fff;
  color:#0a6e85;
  border-radius:9px;
  padding:8px 11px;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.copy-prompt-button:hover{background:#f0fafb}
.video-modal-prompt{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.65;
  color:#173b56;
  background:#f7fbfd;
  border:1px solid #dce7ee;
  border-radius:14px;
  padding:14px 15px;
  max-height:230px;
  overflow:auto;
  font-size:13px;
}
@media(max-width:720px){
  .video-modal-backdrop{padding:10px}
  .video-modal-shell{width:100%;border-radius:18px}
  .video-modal-stage{min-height:220px}
  .video-modal-stage video{max-height:50vh}
  .job{grid-template-columns:76px minmax(0,1fr)}
  .job-extra,.job-action{grid-column:2}
  .play-video-button{width:100%;justify-content:center}
}

/* Customer generation cancellation */
.cancel-task-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #efc7cb;
  background:#fff7f8;
  color:#b5424e;
  border-radius:10px;
  padding:10px 13px;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  transition:.18s ease;
}
.cancel-task-button:hover{
  background:#fff0f2;
  border-color:#e7aeb5;
  transform:translateY(-1px);
}
.status-cancelled{
  background:#eef2f5!important;
  color:#677989!important;
  border-color:#d8e0e6!important;
}
.job-action{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
@media(max-width:720px){
  .cancel-task-button{width:100%}
}

/* Generation card actions */
.studio-gen-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.studio-gen-main{
  display:block;
  width:100%;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  font:inherit;
}
button.studio-gen-main{cursor:pointer}
.studio-gen-actions{
  display:flex;
  gap:7px;
  align-items:center;
  padding:9px 10px 10px;
  border-top:1px solid #e4edf2;
  background:#fbfdfe;
}
.mini-play-button,
.delete-generation-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  padding:9px 11px;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
}
.mini-play-button{
  color:#0a7187;
  background:#eefafa;
  border:1px solid #c4e7e9;
}
.mini-play-button:hover{
  background:#e3f7f8;
  border-color:#91d7dc;
}
.delete-generation-button{
  color:#b64350;
  background:#fff7f8;
  border:1px solid #efc8cd;
}
.delete-generation-button:hover{
  background:#fff0f2;
  border-color:#e3aab2;
  transform:translateY(-1px);
}
.compact-action{
  padding:8px 10px;
  font-size:10px;
}
.video-modal-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
body:not(.light-theme) .studio-gen-actions{
  border-color:#252c34;
  background:#0f1318;
}
body:not(.light-theme) .mini-play-button{
  color:#7be2e8;
  background:#102227;
  border-color:#24474d;
}
body:not(.light-theme) .delete-generation-button,
body:not(.light-theme) .cancel-task-button{
  color:#ff9da7;
  background:#271519;
  border-color:#5b2a32;
}
@media(max-width:720px){
  .studio-gen-actions{flex-wrap:wrap}
  .studio-gen-actions .cancel-task-button,
  .studio-gen-actions .delete-generation-button,
  .studio-gen-actions .mini-play-button{flex:1}
  .video-modal-actions{flex-wrap:wrap;justify-content:flex-end}
}

/* Seedance prompt enhancer */
.prompt-field-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:-3px;
  color:#60798e;
  font-size:12px;
  font-weight:700;
}
.prompt-tools{
  display:flex;
  align-items:center;
  gap:6px;
}
.prompt-label{
  margin-bottom:0!important;
}
.prompt-enhance-button,
.prompt-tool-button{
  border:1px solid #c7e3e7;
  background:#f1fbfc;
  color:#087486;
  border-radius:9px;
  min-height:30px;
  padding:0 9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font:inherit;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
  transition:.16s ease;
}
.prompt-enhance-button svg{
  width:13px;
  height:13px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.prompt-enhance-button:hover,
.prompt-tool-button:hover{
  background:#e7f8fa;
  border-color:#8fd3da;
  transform:translateY(-1px);
}
.prompt-enhance-button:disabled{
  opacity:.65;
  cursor:wait;
  transform:none;
}
.prompt-enhance-button.is-loading svg{
  animation:promptSparkle 1s linear infinite;
}
.prompt-tool-button{
  color:#627a8e;
  background:#fff;
  border-color:#d7e3eb;
}
.prompt-enhance-note{
  margin-top:-5px;
  color:#8aa0b2;
  font-size:9px;
  line-height:1.35;
}
@keyframes promptSparkle{
  0%{transform:rotate(0deg) scale(1)}
  50%{transform:rotate(180deg) scale(.82)}
  100%{transform:rotate(360deg) scale(1)}
}
body:not(.light-theme) .prompt-field-head{color:#93a2b5}
body:not(.light-theme) .prompt-enhance-button{
  color:#85e5eb;
  background:#102428;
  border-color:#285057;
}
body:not(.light-theme) .prompt-tool-button{
  color:#b1bdc9;
  background:#14191f;
  border-color:#303842;
}
body:not(.light-theme) .prompt-enhance-note{color:#6f7d8d}
