:root {
  --bg: #0b0e11;
  --bg-soft: #0f1418;
  --panel: #12181e;
  --panel-2: #161e25;
  --panel-3: #1b242c;
  --line: #26313b;
  --line-soft: #1d262e;
  --text: #f2f5f7;
  --text-2: #c0cad3;
  --muted: #83909c;
  --muted-2: #62707c;
  --accent: #ffb454;
  --accent-strong: #ffc372;
  --accent-soft: rgba(255, 180, 84, .13);
  --teal: #4dd4c6;
  --teal-soft: rgba(77, 212, 198, .12);
  --green: #5ad19a;
  --red: #ff7373;
  --red-soft: rgba(255, 115, 115, .12);
  --amber: #f6c667;
  --violet: #b59cff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
  --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1100px 720px at 90% -12%, rgba(255, 180, 84, .085), transparent 62%),
    radial-gradient(900px 680px at 4% 108%, rgba(77, 212, 198, .055), transparent 60%),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 75%);
  z-index: 0;
}
::selection { background: rgba(255, 180, 84, .28); color: #fff; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
pre { margin: 0; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a353f; border-radius: 20px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a4854; }

.app-root { position: relative; z-index: 1; min-height: 100vh; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
}
.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 6vw, 76px);
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
}
.login-art::before {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  right: -180px; top: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,180,84,.18), transparent 66%);
  filter: blur(8px);
}
.login-art::after {
  content: "";
  position: absolute;
  left: 9%; bottom: -30%;
  width: 480px; height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(77,212,198,.16);
  box-shadow: 0 0 0 80px rgba(77,212,198,.025), 0 0 0 160px rgba(77,212,198,.018);
}
.login-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: .95;
  filter: saturate(.92) brightness(.9);
  pointer-events: none;
}
.login-video-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,14,17,.96) 0%, rgba(11,14,17,.82) 46%, rgba(11,14,17,.5) 100%),
    radial-gradient(800px 520px at 78% 24%, rgba(255,180,84,.1), transparent 70%),
    linear-gradient(0deg, rgba(11,14,17,.92), transparent 46%);
}
.login-art > .login-art-content { position: relative; z-index: 2; }
.login-art > .login-foot { position: relative; z-index: 2; }
.login-art::before, .login-art::after { pointer-events: none; }

.login-landing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.login-landing .login-video-shade {
  background:
    linear-gradient(90deg, rgba(7,10,13,.76) 0%, rgba(7,10,13,.46) 34%, rgba(7,10,13,.1) 64%, transparent 100%),
    linear-gradient(0deg, rgba(7,10,13,.42), transparent 28%);
}
.login-landing-brand {
  position: absolute;
  left: clamp(22px, 4vw, 52px);
  top: clamp(20px, 4vw, 42px);
  z-index: 3;
}
.login-landing-brand .login-brand { padding: 0; margin: 0; }
.login-landing-brand .brand-name { font-weight: 750; letter-spacing: -.01em; word-spacing: .12em; }
.login-landing-brand .brand-name span { font-weight: 600; letter-spacing: .15em; }
.login-landing-main {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 16vw));
  margin: 0;
  padding: clamp(150px, 24vh, 260px) 0 0 8vw;
  text-align: left;
}
.login-hero-title {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 1.7vw, 30px);
  font-family: "Bahnschrift", "DIN Alternate", "Segoe UI Variable Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(64px, 9.6vw, 146px);
  line-height: .82;
  letter-spacing: -.045em;
  font-weight: 800;
  font-stretch: 95%;
  color: var(--text);
  margin: 0;
  text-shadow: 0 6px 34px rgba(0,0,0,.6);
  -webkit-font-smoothing: antialiased;
}
.login-hero-title .hc {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -.06em;
}
.login-hero-title .studio {
  color: var(--text);
  font-weight: 700;
  font-size: 1em;
  letter-spacing: .005em;
}
.login-slogan {
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: clamp(18px, 1.9vw, 27px);
  font-weight: 650;
  letter-spacing: .08em;
  margin-top: 28px;
  text-shadow: 0 3px 18px rgba(0,0,0,.65);
}
.login-hero-desc {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.8;
  max-width: 640px;
  margin-top: 18px;
  text-shadow: 0 2px 14px rgba(0,0,0,.7);
}
.login-message {
  margin-top: 16px;
  display: inline-block;
  color: var(--amber);
  font-size: 12.5px;
  border: 1px solid rgba(246,198,103,.2);
  background: rgba(246,198,103,.06);
  border-radius: 8px;
  padding: 7px 12px;
}
.login-landing-points {
  position: absolute;
  left: 8vw;
  bottom: 88px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-2);
  font-size: 11.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}
.login-landing-points span { color: rgba(255,180,84,.72); margin-right: 7px; }
.login-start {
  position: absolute;
  right: clamp(22px, 4vw, 58px);
  bottom: clamp(42px, 6vh, 64px);
  z-index: 4;
  min-width: 170px;
  margin: 0;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
}
.login-start span { transition: transform .15s ease; }
.login-start:hover span { transform: translateX(4px); }
.login-landing-foot {
  position: absolute;
  left: 8vw;
  right: auto;
  bottom: 26px;
  z-index: 3;
  margin: 0;
  gap: 26px;
  text-shadow: 0 2px 12px rgba(0,0,0,.85);
}
.auth-backdrop { z-index: 120; }
.auth-modal-card {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
}
.display {
  font-size: clamp(46px, 6vw, 82px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 720;
  max-width: 760px;
  margin: 28px 0 26px;
}
.display em { font-style: normal; color: var(--accent); }
.login-lede { max-width: 560px; color: var(--text-2); font-size: 16px; line-height: 1.8; }
.login-points { display: grid; gap: 12px; margin-top: 38px; max-width: 560px; }
.login-point { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.login-point .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(77,212,198,.4); color: var(--teal);
  display: grid; place-items: center; font-size: 12px; margin-top: 1px;
}
.login-card-wrap { display: grid; place-items: center; padding: 34px 28px; }
.login-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(22,30,37,.92), rgba(15,20,24,.94));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-card h2 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 11px; padding: 4px; margin-bottom: 22px; }
.auth-tab { border: 0; background: transparent; color: var(--muted); padding: 9px 10px; border-radius: 8px; font-weight: 600; }
.auth-tab.active { color: var(--text); background: var(--panel-3); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.auth-note { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; background: rgba(255,255,255,.015); }
.login-foot { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: 12px; }

/* ---------------------------------------------------------------- shell */
.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(7,10,14,.34) 0%, rgba(7,10,14,.24) 38%, rgba(7,10,14,.6) 100%),
    url('/media/app-bg.png') center / cover fixed no-repeat,
    var(--bg);
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line-soft);
  background: rgba(10,14,17,.84);
  backdrop-filter: blur(20px);
  padding: 22px 16px 16px;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 24px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; position: relative; flex: none;
  background: linear-gradient(135deg, var(--accent), #e88a32);
  box-shadow: 0 6px 24px rgba(255,180,84,.18);
  overflow: hidden;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; left: 7px; right: 7px; height: 3px; border-radius: 4px; background: #1a1308;
}
.brand-mark::before { top: 9px; box-shadow: 0 6px 0 #1a1308, 0 12px 0 #1a1308; }
.brand-mark::after { width: 9px; right: auto; bottom: 6px; height: 9px; border-radius: 2px; opacity: .65; }
.brand-name { font-weight: 720; letter-spacing: -.02em; line-height: 1.1; }
.brand-name span { display: block; color: var(--muted-2); font-size: 10px; font-weight: 600; letter-spacing: .14em; margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 18px; overflow-y: auto; padding-right: 2px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 10px; letter-spacing: .14em; color: var(--muted-2); padding: 0 12px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 550; font-size: 13.5px;
  border: 1px solid transparent; transition: .16s ease;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(255,180,84,.14), rgba(255,180,84,.04)); border-color: rgba(255,180,84,.16); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 18px; text-align: center; font-size: 15px; color: var(--muted-2); }
.nav-badge { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(255,180,84,.2); }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2a3a45, #1c252c); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--accent); flex: none; }
.side-user .name { font-size: 12.5px; font-weight: 650; line-height: 1.2; }
.side-user .role { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.side-links { display: flex; gap: 4px; }
.side-link { flex: 1; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); border-radius: 8px; padding: 6px 4px; font-size: 11px; }
.side-link:hover { color: var(--text); border-color: var(--line); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(18px, 3.2vw, 42px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11,14,17,.84);
  backdrop-filter: blur(18px);
}
.topbar-title { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.topbar-title strong { color: var(--text); font-weight: 650; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.health-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 30px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; background: rgba(255,255,255,.02); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 3px rgba(131,144,156,.08); }
.dot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(90,209,154,.1); }
.dot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(246,198,103,.1); }
.dot.bad { background: var(--red); box-shadow: 0 0 0 3px rgba(255,115,115,.1); }

.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: clamp(26px, 4vw, 54px) clamp(18px, 3.2vw, 42px) 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.eyebrow { font-size: 10px; letter-spacing: .16em; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 9px; }
.h1 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -.035em; font-weight: 720; }
.h2 { font-size: 21px; letter-spacing: -.02em; font-weight: 680; }
.h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.lede { color: var(--muted); max-width: 700px; margin-top: 9px; font-size: 14px; line-height: 1.75; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text-2);
  padding: 9px 14px; font-size: 13px; font-weight: 600; line-height: 1.2;
  transition: .15s ease; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: #3a4854; color: var(--text); background: var(--panel-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1b1306; box-shadow: 0 7px 24px rgba(255,180,84,.18); }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); color: #1b1306; }
.btn-teal { background: rgba(77,212,198,.12); border-color: rgba(77,212,198,.3); color: var(--teal); }
.btn-teal:hover:not(:disabled) { background: rgba(77,212,198,.18); color: #8ff0e6; }
.btn-danger { background: rgba(255,115,115,.08); border-color: rgba(255,115,115,.22); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: rgba(255,115,115,.14); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 9px; display: inline-grid; place-items: center; }
.link { color: var(--accent); border: 0; background: none; padding: 0; font-weight: 600; }
.link:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.link-muted { color: var(--muted); }
.link-muted:hover { color: var(--text); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .field-label { font-size: 12px; color: var(--text-2); font-weight: 650; letter-spacing: .01em; }
.field .hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.55; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: #0d1216; color: var(--text); padding: 10px 12px;
  outline: none; transition: .15s ease; min-height: 40px;
}
.input::placeholder, .textarea::placeholder { color: #56636e; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(255,180,84,.55); box-shadow: 0 0 0 3px rgba(255,180,84,.08); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
.textarea.tall { min-height: 200px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #788692 50%), linear-gradient(135deg, #788692 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkline { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2); }
.checkline input { accent-color: var(--accent); width: 15px; height: 15px; }
.error-text { color: var(--red); font-size: 12.5px; min-height: 18px; }
.form-error { border: 1px solid rgba(255,115,115,.28); background: var(--red-soft); color: #ffc0c0; border-radius: 9px; padding: 10px 12px; font-size: 12.5px; }

/* ---------------------------------------------------------------- cards / stats */
.card { background: linear-gradient(180deg, rgba(22,30,37,.93), rgba(16,22,27,.95)); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; }
.card-tight { padding: 15px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-title { font-size: 14px; font-weight: 680; letter-spacing: -.01em; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.card-hover { transition: .16s ease; }
.card-hover:hover { border-color: #34414c; transform: translateY(-1px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px 18px 16px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(255,180,84,.07), transparent 70%); }
.stat-label { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.stat-value { font-size: 32px; line-height: 1.1; font-weight: 720; letter-spacing: -.04em; margin: 10px 0 5px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 3px; }
.stat-foot { font-size: 11.5px; color: var(--muted-2); }
.hero-band {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(680px 300px at 100% 0%, rgba(255,180,84,.12), transparent 65%),
    linear-gradient(120deg, #151d24, #10161b);
  margin-bottom: 18px;
}
.hero-band::after {
  content: ""; position: absolute; right: -70px; bottom: -150px; width: 360px; height: 360px;
  border: 1px solid rgba(255,180,84,.18); border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(255,180,84,.025), 0 0 0 92px rgba(255,180,84,.018);
}
.hero-band .h1 { max-width: 720px; }
.hero-band .page-actions { margin-top: 24px; }
.hero-meta { display: flex; gap: 18px; color: var(--muted-2); font-size: 11.5px; margin-top: 18px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- badges / status */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 30px; padding: 3px 8px; font-size: 10.5px; font-weight: 650; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.025); white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge[data-status="completed"], .badge[data-status="ok"], .badge[data-status="ready"] { color: var(--green); border-color: rgba(90,209,154,.25); background: rgba(90,209,154,.08); }
.badge[data-status="running"], .badge[data-status="processing"], .badge[data-status="queued"] { color: var(--accent); border-color: rgba(255,180,84,.22); background: var(--accent-soft); }
.badge[data-status="failed"], .badge[data-status="error"], .badge[data-status="expired"] { color: var(--red); border-color: rgba(255,115,115,.25); background: var(--red-soft); }
.badge[data-status="partial"] { color: var(--amber); border-color: rgba(246,198,103,.24); background: rgba(246,198,103,.08); }
.badge[data-status="unknown"], .badge[data-status="untested"] { color: var(--violet); border-color: rgba(181,156,255,.25); background: rgba(181,156,255,.08); }
.badge[data-status="cancelled"], .badge[data-status="disabled"] { color: var(--muted); }
.badge[data-status="archived"] { color: var(--teal); border-color: rgba(77,212,198,.25); background: var(--teal-soft); }
.badge-soft { color: var(--text-2); background: rgba(255,255,255,.04); border-color: var(--line); }

/* ---------------------------------------------------------------- tables / lists */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: rgba(15,20,24,.86); }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; color: var(--muted-2); font-weight: 650; text-transform: uppercase; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); background: rgba(255,255,255,.018); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 12.5px; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255,255,255,.018); }
.table .primary { color: var(--text); font-weight: 600; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 13px; padding: 13px 2px; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: 0; }
.list-thumb { width: 42px; height: 42px; flex: none; border-radius: 9px; background: var(--panel-3); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 16px; overflow: hidden; }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- progress */
.progress { width: 100%; height: 6px; border-radius: 20px; background: #1c252c; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); transition: width .35s ease; }
.progress.teal > span { background: linear-gradient(90deg, #2fb8ab, var(--teal)); }
.progress.slim { height: 4px; }
.meter-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }

/* ---------------------------------------------------------------- modes */
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mode-card { position: relative; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 14px 13px; min-height: 112px; transition: .15s ease; appearance: none; -webkit-appearance: none; color: inherit; }
.mode-card:hover { border-color: #3a4854; background: var(--panel-2); }
.mode-card.active { border-color: rgba(255,180,84,.6); background: linear-gradient(180deg, rgba(255,180,84,.115), rgba(255,180,84,.025)); box-shadow: inset 0 0 0 1px rgba(255,180,84,.12); }
.mode-card .mode-icon { font-size: 17px; color: var(--accent); margin-bottom: 10px; }
.mode-card .mode-name { font-size: 12.5px; font-weight: 680; color: var(--text); }
.mode-card .mode-desc { font-size: 10.5px; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.mode-card .mode-tag { position: absolute; right: 9px; top: 10px; font-size: 9px; color: var(--muted-2); }
.segmented { display: inline-flex; padding: 3px; background: #0d1216; border: 1px solid var(--line); border-radius: 9px; gap: 3px; }
.segmented button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 6px 11px; font-size: 11.5px; font-weight: 600; }
.segmented button.active { background: var(--panel-3); color: var(--text); }
.choice-row { display: flex; gap: 7px; flex-wrap: wrap; }
.choice { border: 1px solid var(--line); background: #0d1216; color: var(--muted); border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 600; }
.choice.active { border-color: rgba(255,180,84,.55); color: var(--accent); background: var(--accent-soft); }

/* ---------------------------------------------------------------- upload / assets */
.dropzone { border: 1px dashed #33414c; border-radius: 12px; background: rgba(255,255,255,.018); padding: 20px; display: flex; align-items: center; gap: 14px; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: rgba(255,180,84,.6); background: rgba(255,180,84,.04); }
.dropzone .dz-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--panel-3); display: grid; place-items: center; color: var(--accent); font-size: 18px; flex: none; }
.dropzone .dz-title { font-weight: 650; font-size: 12.5px; }
.dropzone .dz-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.upload-state { font-size: 11.5px; color: var(--muted); }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.asset-pick { position: relative; border: 1px solid var(--line-soft); background: #0e1418; border-radius: 10px; overflow: hidden; transition: .15s; text-align: left; padding: 0; appearance: none; -webkit-appearance: none; color: inherit; }
.asset-pick:hover { border-color: #3a4854; }
.asset-pick.selected { border-color: rgba(255,180,84,.7); box-shadow: 0 0 0 1px rgba(255,180,84,.18); }
.asset-pick.disabled { opacity: .38; }
.asset-pick .ap-media { height: 94px; background: var(--panel-3); display: grid; place-items: center; color: var(--muted); overflow: hidden; position: relative; }
.asset-pick .ap-media img { width: 100%; height: 100%; object-fit: cover; }
.asset-pick .ap-info { padding: 8px 9px; }
.asset-pick .ap-name { font-size: 10.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-pick .ap-meta { font-size: 9.5px; color: var(--muted-2); margin-top: 2px; }
.asset-pick .check { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(11,14,17,.72); border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 10px; color: transparent; }
.asset-pick.selected .check { background: var(--accent); border-color: var(--accent); color: #1b1306; }
.kind-mark { font-size: 22px; opacity: .7; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--text-2); border-radius: 30px; padding: 4px 9px; font-size: 10.5px; }
.chip .x { border: 0; background: transparent; color: var(--muted); padding: 0; font-size: 12px; line-height: 1; }
.asset-card { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--panel); }
.asset-card .ac-media { aspect-ratio: 16/10; background: #0d1216; display: grid; place-items: center; overflow: hidden; position: relative; }
.asset-card .ac-media img { width: 100%; height: 100%; object-fit: cover; }
.asset-card .ac-body { padding: 11px 12px; }
.asset-card .ac-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* ---------------------------------------------------------------- create */
.create-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 18px; align-items: start; }
.create-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.create-side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 14px; }
.section { padding: 20px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-title { font-size: 14px; font-weight: 680; }
.section-sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.step { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 750; margin-right: 7px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.summary-line:last-of-type { border-bottom: 0; }
.summary-line strong { color: var(--text); font-weight: 650; }
.summary-big { font-size: 38px; font-weight: 720; letter-spacing: -.04em; line-height: 1; }
.summary-big small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.notice { border: 1px solid rgba(255,180,84,.18); background: rgba(255,180,84,.055); border-radius: 10px; padding: 11px 12px; color: #ddc49c; font-size: 11.5px; line-height: 1.65; }
.notice.teal { border-color: rgba(77,212,198,.18); background: var(--teal-soft); color: #a9ded9; }
.notice.red { border-color: rgba(255,115,115,.22); background: var(--red-soft); color: #ffc0c0; }
.notice strong { color: inherit; }

/* ---------------------------------------------------------------- batch detail */
.batch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.batch-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.batch-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.batch-stat { border: 1px solid var(--line-soft); background: rgba(15,20,24,.55); border-radius: 10px; padding: 12px 13px; }
.batch-stat .k { font-size: 10px; color: var(--muted-2); letter-spacing: .04em; }
.batch-stat .v { font-size: 21px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.task-table { min-width: 980px; }
.task-table td { vertical-align: top; }
.prompt-cell { max-width: 340px; }
.prompt-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); font-size: 12px; line-height: 1.55; cursor: pointer; }
.prompt-text.open { display: block; -webkit-line-clamp: unset; }
.task-err { color: #e4a4a4; font-size: 10.5px; margin-top: 5px; line-height: 1.5; max-width: 360px; }
.task-sub { color: var(--muted-2); font-size: 10px; margin-top: 4px; }
.task-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.play-thumb { width: 54px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: linear-gradient(135deg, #1c2831, #11171b); display: grid; place-items: center; color: var(--accent); font-size: 11px; }
.progress-cell { min-width: 90px; }
.progress-cell .pct { font-size: 9.5px; color: var(--muted-2); margin-top: 4px; }

/* ---------------------------------------------------------------- outputs */
.output-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.output-card { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--panel); }
.output-media { aspect-ratio: 9/13; max-height: 320px; background: #0d1216; position: relative; overflow: hidden; display: grid; place-items: center; }
.output-media video { width: 100%; height: 100%; object-fit: contain; background: #050708; }
.output-media .play-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(11,14,17,.62); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); font-size: 17px; }
.output-media .play-btn:hover { background: var(--accent); color: #1b1306; border-color: var(--accent); }
.output-body { padding: 12px; }
.output-prompt { font-size: 11.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; min-height: 36px; }
.output-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--muted-2); font-size: 10px; }

/* ---------------------------------------------------------------- image studio */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.image-card { border: 1px solid var(--line-soft); border-radius: 11px; overflow: hidden; background: var(--panel); }
.image-thumb { aspect-ratio: 1/1; background: #0d1216; display: grid; place-items: center; position: relative; overflow: hidden; }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.image-thumb:hover img { transform: scale(1.02); }
.image-placeholder { color: var(--muted-2); font-size: 26px; display: grid; place-items: center; }
.image-status { position: absolute; left: 8px; top: 8px; }
.image-body { padding: 10px 11px; }
.image-prompt { font-size: 11.5px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }

/* ---------------------------------------------------------------- templates */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.template-card { padding: 18px; position: relative; }
.template-card .tpl-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.template-card .tpl-name { font-size: 16px; font-weight: 680; }
.template-card .tpl-desc { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 10px 0 14px; min-height: 40px; }
.template-defaults { display: flex; gap: 6px; flex-wrap: wrap; }
.kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 5px; padding: 2px 5px; color: var(--muted); }

/* ---------------------------------------------------------------- AI copy */
.ai-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.ai-output { min-height: 380px; max-height: 640px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.8; color: var(--text-2); background: #0d1216; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.ai-toolbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent); display: inline-block; animation: spin .7s linear infinite; }
.spinner.dark { border-color: rgba(0,0,0,.15); border-top-color: #1b1306; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- accounts */
.account-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.account-tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 9px 18px 10px; font-size: 13px; font-weight: 600; }
.account-tab:hover { color: var(--text); }
.account-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.channel-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: linear-gradient(180deg, rgba(22,30,37,.94), rgba(16,22,27,.96)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.channel-choices { display: flex; gap: 7px; flex-wrap: wrap; }
.channel-choice { border: 1px solid var(--line); background: #0d1216; color: var(--muted); border-radius: 9px; padding: 8px 13px; font-size: 11.5px; display: flex; align-items: center; gap: 7px; }
.channel-choice span { color: var(--muted-2); font-size: 10px; }
.channel-choice.active { border-color: var(--accent); color: var(--accent); background: rgba(255,180,84,.08); }
.channel-choice:disabled { opacity: .45; cursor: not-allowed; }
.account-pane { display: none; }
.account-pane.active { display: block; }
.key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.key-item { padding: 18px; }
.key-item.key-active { border-color: rgba(255,180,84,.35); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.account-card { padding: 18px; }
.account-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.account-name { font-size: 14px; font-weight: 680; }
.account-id { font-family: var(--mono); font-size: 10px; color: var(--muted-2); margin-top: 3px; }
.account-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.metric-box { border: 1px solid var(--line-soft); background: rgba(13,18,22,.6); border-radius: 9px; padding: 9px 10px; }
.metric-box .k { font-size: 9.5px; color: var(--muted-2); }
.metric-box .v { font-size: 13px; font-weight: 650; margin-top: 3px; }
.account-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.quota-line { margin-top: 8px; }
.account-card.account-off { opacity: .62; }
.account-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.account-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 32px; height: 18px; border-radius: 20px; background: #2a3540; border: 1px solid #3a4854; position: relative; transition: .16s ease; }
.switch-track::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #9aa7b2; top: 2px; left: 2px; transition: .16s ease; }
.account-switch input:checked + .switch-track { background: rgba(255,180,84,.75); border-color: var(--accent); }
.account-switch input:checked + .switch-track::after { transform: translateX(14px); background: #1b1306; }
.account-switch input:disabled + .switch-track { opacity: .5; }
.switch-text { font-size: 10.5px; color: var(--muted); min-width: 22px; }
.account-switch input:checked ~ .switch-text { color: var(--accent); }

/* ---------------------------------------------------------------- settings */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-stack { display: flex; flex-direction: column; gap: 18px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text-2); text-align: right; word-break: break-all; }
.invite-list { display: flex; flex-direction: column; }
.invite-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.invite-row:last-child { border-bottom: 0; }
.invite-code { font-family: var(--mono); font-size: 22px; letter-spacing: .08em; color: var(--accent); background: rgba(255,180,84,.07); border: 1px dashed rgba(255,180,84,.35); border-radius: 10px; padding: 16px; text-align: center; word-break: break-all; }
.user-admin-list { display: flex; flex-direction: column; }
.user-admin-row { display: flex; align-items: stretch; flex-wrap: wrap; gap: 9px; padding: 14px 2px; border-bottom: 1px solid var(--line-soft); }
.user-admin-row:last-child { border-bottom: 0; }
.user-admin-ident { flex: 1 1 100%; min-width: 0; }
.user-quota-grid { flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.user-admin-actions { flex: 1 1 100%; display: flex; justify-content: flex-end; gap: 7px; }
.quota-field { display: flex; flex-direction: column; gap: 3px; color: var(--muted-2); font-size: 9.5px; }
.user-quota-grid .mini-input { width: 100%; }
.quota-note { color: var(--muted-2); font-size: 9px; }
.user-row-quota { display: flex; gap: 6px; }
.mini-input { width: 62px; border: 1px solid var(--line); border-radius: 7px; background: #0d1216; color: var(--text); padding: 5px 6px; font-size: 11px; }
.mini-input.wide { width: 86px; }

/* ---------------------------------------------------------------- empty / loading */
.empty { border: 1px dashed #2d3943; border-radius: 12px; padding: 42px 22px; text-align: center; color: var(--muted); background: rgba(255,255,255,.012); }
.empty .e-icon { font-size: 28px; opacity: .6; margin-bottom: 10px; }
.empty .e-title { color: var(--text-2); font-weight: 650; font-size: 13px; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, #141b21 25%, #1a232b 50%, #141b21 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-block { display: grid; gap: 12px; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }

/* ---------------------------------------------------------------- modal / toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(3,6,8,.78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .16s ease; }
.modal {
  width: min(620px, 100%); max-height: min(86vh, 880px); overflow: auto;
  background: linear-gradient(180deg, #182129, #11171c);
  border: 1px solid #34414b; border-radius: 16px; box-shadow: var(--shadow);
  padding: 22px; animation: pop .18s ease;
}
.modal.wide { width: min(840px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-title { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.modal-sub { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.6; }
.modal-body { display: flex; flex-direction: column; gap: 13px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.video-modal video { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: #151d24; border-radius: 10px; padding: 11px 14px; color: var(--text-2); font-size: 12.5px; box-shadow: var(--shadow); animation: pop .18s ease; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--teal); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .create-grid { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .login-bg-video { opacity: .9; }
  .login-landing .login-video-shade { background: linear-gradient(180deg, rgba(7,10,13,.62), rgba(7,10,13,.14) 48%, rgba(7,10,13,.5)); }
  .login-landing-main { width: calc(100% - 40px); padding: 120px 0 0 6vw; }
  .login-hero-title { font-size: clamp(52px, 9.4vw, 86px); }
  .login-slogan { font-size: 18px; }
  .login-landing-points { display: none; }
  .login-landing-brand { left: 20px; top: 20px; }
  .login-landing-foot { left: 6vw; right: auto; bottom: 86px; }
  .login-start { right: 24px; bottom: 24px; min-width: 190px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s ease; background: #0c1115; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.45); }
  .mobile-only { display: inline-flex !important; }
  .topbar { height: 60px; }
  .create-grid, .ai-layout, .settings-grid { grid-template-columns: 1fr; }
  .channel-bar { align-items: flex-start; }
  .channel-choices { width: 100%; }
  .channel-choice { flex: 1; justify-content: center; }
  .create-side { position: static; }
  .batch-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .login-bg-video { display: none; }
}

@media (max-width: 640px) {
  .content { padding: 22px 15px 70px; }
  .topbar { padding: 0 15px; }
  .topbar .health-pill { display: none; }
  .page-head { gap: 14px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-card { min-height: 100px; }
  .form-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-card { padding: 24px; }
  .login-landing-main { width: 100%; padding: 90px 20px 0; }
  .login-hero-title { font-size: clamp(48px, 14vw, 60px); gap: 8px; }
  .login-hero-title .studio { font-size: .9em; }
  .login-slogan { font-size: 16px; margin-top: 18px; letter-spacing: .08em; }
  .login-hero-desc { font-size: 12.5px; margin-top: 14px; }
  .login-message { font-size: 11.5px; }
  .login-landing-foot { left: 20px; right: 20px; bottom: 88px; gap: 10px; flex-wrap: wrap; }
  .login-start { left: 20px; right: 20px; bottom: 20px; min-width: 0; width: auto; padding: 12px 22px; justify-content: center; }
  .hero-band { padding: 24px 18px; }
  .table { min-width: 760px; }
  .modal { padding: 18px; }
  .toast-root { right: 10px; bottom: 10px; left: 10px; max-width: none; }
}
.mobile-only { display: none; }
@media (min-width: 961px) {
  .sidebar { transform: none !important; }
}
