:root {
  --bg: #05060a;
  --bg2: #0a0d16;
  --panel: rgba(17, 21, 34, 0.72);
  --panel2: #0e1220;
  --border: rgba(148, 163, 184, 0.14);
  --border2: rgba(148, 163, 184, 0.25);
  --text: #eceff5;
  --muted: #8b94a9;
  --accent: #8b5cf6;
  --accent2: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --blue: #60a5fa;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --radius: 16px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--font);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: #2b3350 #0a0d16; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
code { background: #1a2033; padding: 1px 6px; border-radius: 6px; font-size: .85em; }

/* ambient background glows */
.bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; }
.glow-a { width: 640px; height: 640px; top: -260px; left: -140px; background: #5b21b655; }
.glow-b { width: 560px; height: 560px; top: 20%; right: -220px; background: #0e749055; }
.glow-c { width: 480px; height: 480px; bottom: -220px; left: 30%; background: #312e8155; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 26px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 1.25rem;
}
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.06rem; letter-spacing: .2px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { color: var(--muted); font-size: .78rem; letter-spacing: .4px; }
.nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.nav a { color: var(--muted); padding: 8px 14px; border-radius: 10px; font-size: .9rem; font-weight: 500; transition: .15s; }
.nav a:hover { color: var(--text); background: rgba(148,163,184,.08); }
.nav a.active { color: var(--text); background: rgba(139,92,246,.12); box-shadow: inset 0 0 0 1px rgba(139,92,246,.3); }

.app { position: relative; z-index: 1; max-width: 1220px; margin: 0 auto; padding: 30px 26px 90px; }

/* typography */
h1, h2 { font-family: var(--display); letter-spacing: -.2px; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.12rem; }
.sub { color: var(--muted); font-size: .93rem; margin-bottom: 22px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 900px) { .g2 { grid-template-columns: 1fr; } }

/* cards */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; backdrop-filter: blur(10px);
}
.card.pad0 { padding: 0; overflow: hidden; }
.card-title { font-family: var(--display); font-weight: 600; font-size: .95rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #141a2c; color: var(--text); border: 1px solid var(--border2);
  border-radius: 12px; padding: 11px 20px; font-size: .93rem; font-weight: 500;
  cursor: pointer; transition: .18s; font-family: inherit;
}
.btn:hover { border-color: #3b4a6b; background: #1a2138; transform: translateY(-1px); }
.btn.primary { background: var(--grad); border: none; color: #fff; font-weight: 600; box-shadow: 0 4px 24px -6px rgba(139,92,246,.55); }
.btn.primary:hover { filter: brightness(1.1); box-shadow: 0 6px 30px -6px rgba(139,92,246,.7); }
.btn.sm { padding: 7px 13px; font-size: .84rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; }

/* forms */
input[type=text], input[type=password], textarea, select {
  width: 100%; background: var(--panel2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 12px; padding: 12px 14px; font-size: .95rem; font-family: inherit; transition: .15s;
}
input[type=file] {
  width: 100%; background: var(--panel2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 12px; padding: 12px 14px; font-size: .95rem; font-family: inherit; transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 7px; font-weight: 500; letter-spacing: .3px; text-transform: uppercase; }
input[type=file]::file-selector-button {
  background: var(--grad); color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: .85rem; font-weight: 600; cursor: pointer;
  margin-right: 12px; transition: .15s;
}
input[type=file]::file-selector-button:hover {
  filter: brightness(1.1);
}
.file-info { margin-top: 8px; font-size: .85rem; }
.file-name { color: var(--text); font-weight: 500; }
.file-preview { max-width: 140px; max-height: 140px; margin-top: 8px; border-radius: 8px; border: 1px solid var(--border2); object-fit: cover; }
.file-info button.btn.sm.ghost { margin-top: 8px; }

/* segmented control */
.seg { display: grid; grid-auto-flow: column; gap: 6px; background: var(--panel2); padding: 5px; border-radius: 12px; border: 1px solid var(--border); }
.seg button { border: none; background: transparent; color: var(--muted); padding: 9px 12px; border-radius: 9px; font-size: .88rem; font-weight: 500; cursor: pointer; transition: .15s; font-family: inherit; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 2px 12px -2px rgba(139,92,246,.5); }

/* pills / chips */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  border: 1px solid var(--border2); background: var(--panel2); color: var(--muted);
  padding: 9px 14px; border-radius: 999px; font-size: .85rem; cursor: pointer; transition: .15s;
}
.pill:hover { color: var(--text); border-color: #3b4a6b; }
.pill.on { border-color: var(--accent); color: #fff; background: rgba(139,92,246,.14); box-shadow: 0 0 0 1px rgba(139,92,246,.4); }

/* tags / status */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .3px; border: 1px solid var(--border2); color: var(--muted); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ok { color: var(--green); border-color: rgba(52,211,153,.35); }
.tag.err { color: var(--red); border-color: rgba(248,113,113,.35); }
.tag.warn { color: var(--amber); border-color: rgba(251,191,36,.35); }
.tag.info { color: var(--blue); border-color: rgba(96,165,250,.35); }
.tag.accent { color: #c4b5fd; border-color: rgba(139,92,246,.45); }

/* login / landing */
.hero { min-height: 82vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-inner { max-width: 760px; padding: 0 20px; }
.hero-badge {
  display: inline-flex; gap: 8px; align-items: center; padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(139,92,246,.4); background: rgba(139,92,246,.1); color: #c4b5fd;
  font-size: .8rem; font-weight: 600; letter-spacing: .4px; margin-bottom: 26px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; margin-bottom: 18px; }
.hero .lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.6; max-width: 560px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.login-card { max-width: 420px; margin: 60px auto 0; text-align: left; }
.hero-mini { font-size: .8rem; color: var(--muted); margin-top: 18px; }

/* dashboard hero */
.dash-hero {
  border-radius: 22px; padding: 40px; margin-bottom: 26px; position: relative; overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(700px 240px at 12% 0%, rgba(139,92,246,.22), transparent 60%),
    radial-gradient(600px 220px at 88% 20%, rgba(34,211,238,.14), transparent 55%),
    var(--panel);
}
.dash-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 8px; }
.dash-hero .sub { margin-bottom: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; backdrop-filter: blur(8px); }
.stat .v { font-family: var(--display); font-size: 1.35rem; font-weight: 700; }
.stat .k { color: var(--muted); font-size: .78rem; margin-top: 3px; letter-spacing: .3px; text-transform: uppercase; }

/* render grid */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.rcard { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; cursor: pointer; transition: .18s; backdrop-filter: blur(8px); }
.rcard:hover { border-color: rgba(139,92,246,.5); transform: translateY(-3px); box-shadow: 0 12px 34px -14px rgba(0,0,0,.7); }
.rcard .thumb { aspect-ratio: 9/16; background: #070a12 center/cover; position: relative; }
.rcard .thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard .thumb::after {
  content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; background: rgba(5,6,10,.25); opacity: 0; transition: .2s;
}
.rcard:hover .thumb::after { opacity: 1; }
.rcard .body { padding: 13px 15px; }
.rcard .t { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .meta { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; align-items: center; }
.rcard .cost { margin-left: auto; font-size: .8rem; color: var(--muted); }

/* progress */
.stage { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border); font-size: .93rem; }
.stage:last-child { border-bottom: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: #232b42; flex: none; position: relative; }
.dot.done { background: var(--green); }
.dot.done::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #04130c; font-weight: 800; }
.dot.active { background: var(--grad); box-shadow: 0 0 0 4px rgba(139,92,246,.18); animation: pulse 1.2s infinite; }
.dot.err { background: var(--red); }
@keyframes pulse { 50% { opacity: .55; } }
.bar { height: 10px; border-radius: 999px; background: #141a2c; overflow: hidden; margin: 16px 0 22px; border: 1px solid var(--border); }
.bar > div {
  height: 100%; border-radius: 999px; background: var(--grad); transition: width .6s cubic-bezier(.3,.7,.4,1);
  position: relative; overflow: hidden;
}
.bar > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 1.6s infinite; transform: translateX(-100%); }
@keyframes shimmer { to { transform: translateX(100%); } }

/* player */
.player { background: #000; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 20px 60px -20px rgba(0,0,0,.8); }
.player video { width: 100%; max-height: 72vh; display: block; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filters .btn { border-radius: 999px; padding: 8px 16px; }
.filters .btn.active { background: var(--grad); color: #fff; border-color: transparent; }

/* assets */
.asset { display: flex; gap: 14px; align-items: center; padding: 13px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); backdrop-filter: blur(8px); }
.asset video { width: 68px; height: 120px; object-fit: cover; border-radius: 9px; background: #000; flex: none; }
.asset .cap { color: var(--muted); font-size: .88rem; }

/* tables */
table { width: 100%; font-size: .85rem; border-collapse: collapse; }
th { color: var(--muted); text-align: left; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: .78rem; letter-spacing: .4px; text-transform: uppercase; }
td { padding: 9px 10px; border-bottom: 1px solid rgba(148,163,184,.07); }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: #171e31; border: 1px solid var(--border2); padding: 13px 22px; border-radius: 14px;
  font-size: .92rem; box-shadow: 0 14px 40px -10px rgba(0,0,0,.8); backdrop-filter: blur(10px);
}

/* mobile topbar fallback for login page */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
  .topbar .btn.primary { display: none; }
}

/* showcase */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.showcase-card {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.showcase-card:hover { border-color: var(--border2); }
.showcase-poster { position: relative; background: #000; }
.showcase-poster video { display: block; width: 100%; aspect-ratio: 9/16; object-fit: cover; }
.showcase-poster .model-badge { position: absolute; top: 10px; left: 10px; z-index: 1; }
.showcase-body { padding: 14px 16px; }
.showcase-body h3 { font-family: var(--display); font-size: 1.02rem; margin-bottom: 6px; }

/* ========================================
   SIDEBAR — Phase A premium navigation
   ======================================== */
.sidebar {
  position: fixed; top: 0; left: 0; z-index: 40;
  width: 240px; height: 100vh;
  display: flex; flex-direction: column;
  background: rgba(8, 10, 18, 0.92);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  padding: 0;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow-y: auto; overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #2b3350; border-radius: 4px; }

/* brand area */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand .brand-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.sidebar-brand .brand-text {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: .2px;
}
.sidebar-brand .brand-text .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* create button */
.sidebar-create {
  padding: 12px 16px;
  flex-shrink: 0;
}
.sidebar-create .btn { width: 100%; padding: 11px 0; font-size: .9rem; }

/* nav sections */
.sidebar-nav { flex: 1; padding: 8px 0; }

.sidebar-section-label {
  padding: 12px 20px 6px;
  font-size: .7rem; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted);
  opacity: .7;
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: var(--muted); font-size: .9rem; font-weight: 500;
  border-radius: 0; transition: .12s;
  cursor: pointer; text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  color: var(--text); background: rgba(148,163,184,.06);
}
.sidebar-link.active {
  color: var(--text);
  background: rgba(139,92,246,.08);
  border-left-color: var(--accent);
}
.sidebar-link .nav-icon {
  width: 18px; text-align: center; font-size: .85rem;
  opacity: .7; flex-shrink: 0;
}
.sidebar-link.active .nav-icon { opacity: 1; }
.sidebar-link .coming-soon {
  margin-left: auto;
  font-size: .65rem; font-weight: 600; letter-spacing: .3px;
  color: var(--amber); opacity: .7;
}

/* divider in sidebar */
.sidebar-divider {
  height: 1px; margin: 6px 16px;
  background: var(--border);
}

/* user/workspace area */
.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #fff;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: .82rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: .7rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* main content offset */
.app-shell { display: flex; min-height: 100vh; }
.app-main {
  flex: 1; margin-left: 240px;
  position: relative; z-index: 1;
  max-width: 1220px; padding: 30px 26px 90px;
}

/* hamburger button (mobile) */
.sidebar-toggle {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 50;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border2);
  color: var(--text); font-size: 1.1rem;
  cursor: pointer; align-items: center; justify-content: center;
}

/* overlay for mobile drawer */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 35;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
}

/* SDUI section titles */
.sdui-section { margin-bottom: 28px; }
.sdui-section-title {
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  margin-bottom: 16px; letter-spacing: -.1px;
}
.sdui-hero-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem) !important;
  margin-bottom: 8px !important;
  font-family: var(--display) !important;
  letter-spacing: -.2px !important;
}
.sdui-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sdui-project-card { padding: 16px; }
.sdui-render-meta { font-size: .82rem !important; margin-top: 4px !important; }
.sdui-stat-value { font-size: 1.35rem !important; font-family: var(--display) !important; font-weight: 700 !important; }
.sdui-stat-label { font-size: .78rem !important; margin-top: 3px !important; letter-spacing: .3px !important; text-transform: uppercase !important; }
.sdui-render-thumb { aspect-ratio: 9/16; background: #070a12 center/cover; border-radius: 0; }
.sdui-fallback { padding: 4px 8px; }

/* ========================================
   CREATE SCREEN — Phase B
   ======================================== */
.sdui-create-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  margin-top: 22px;
}
@media (max-width: 900px) { .sdui-create-layout { grid-template-columns: 1fr; } }

.sdui-create-form { display: flex; flex-direction: column; gap: 0; }
.sdui-create-prompt textarea {
  width: 100%; min-height: 140px; background: var(--panel2); color: var(--text);
  border: 1px solid var(--border2); border-radius: 12px; padding: 14px;
  font-size: .95rem; font-family: inherit; resize: vertical; line-height: 1.6;
  transition: .15s;
}
.sdui-create-prompt textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.18);
}
.sdui-create-prompt > span, .sdui-create-script > span {
  display: block; font-size: .8rem; color: var(--muted); margin-bottom: 7px;
  font-weight: 500; letter-spacing: .3px; text-transform: uppercase;
}
.sdui-create-script select {
  width: 100%; background: var(--panel2); color: var(--text);
  border: 1px solid var(--border2); border-radius: 12px; padding: 12px 14px;
  font-size: .95rem; font-family: inherit;
}
.sdui-create-go { width: 100%; margin-top: 22px; padding: 14px; }

/* model selector composite */
.sdui-model-selector { display: flex; flex-direction: column; gap: 18px; }
.sdui-selector-group { }
.sdui-selector-label {
  font-family: var(--display); font-weight: 600; font-size: .88rem;
  margin-bottom: 8px; color: var(--text);
}
.sdui-create-info { display: flex; flex-direction: column; gap: 16px; }
.sdui-create-info-card { padding: 18px; }
.sdui-info-text { line-height: 1.8; font-size: .9rem; }

/* ========================================
   PROGRESS SCREEN — Phase B
   ======================================== */
.sdui-progress-wrap { max-width: 640px; }
.sdui-progress-header { margin-bottom: 22px; }
.sdui-progress-card { padding: 22px; }
.sdui-progress-info { margin-top: 14px; padding: 18px; }
.sdui-progress-error { text-align: center; padding: 20px 0; }
.sdui-progress-error h2 { margin-bottom: 8px; }
.sdui-progress-done { text-align: center; padding: 20px 0; }
.sdui-progress-done h2 { margin-bottom: 8px; }
.sdui-stage-list { margin-top: 8px; }

/* ========================================
   RESULT SCREEN — Phase B
   ======================================== */
.sdui-result-wrap { }
.sdui-result-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.sdui-result-header h1 { margin-bottom: 4px; }
.sdui-result-player { margin-bottom: 22px; }
.sdui-result-meta { margin-top: 0; }
.sdui-result-usage { margin-top: 18px; }

/* ========================================
   PROJECTS + SESSIONS — Phase C
   ======================================== */
.sdui-list-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.sdui-list-header h1 { margin-bottom: 4px; }

.sdui-empty {
  text-align: center; padding: 60px 20px;
}
.sdui-empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: .6; }
.sdui-empty h2 { margin-bottom: 8px; }

/* project list */
.sdui-project-list { display: flex; flex-direction: column; gap: 12px; }
.sdui-project-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; cursor: pointer; transition: .15s; backdrop-filter: blur(8px);
  gap: 16px; flex-wrap: wrap;
}
.sdui-project-item:hover {
  border-color: rgba(139,92,246,.5); transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.5);
}
.sdui-project-info h3 { font-family: var(--display); font-size: 1rem; margin-bottom: 4px; }
.sdui-project-info p { font-size: .85rem; }
.sdui-project-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* project detail */
.sdui-script-list { display: flex; flex-direction: column; gap: 12px; }
.sdui-script-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; gap: 16px; flex-wrap: wrap;
}
.sdui-script-info h3 { font-family: var(--display); font-size: .95rem; margin-bottom: 4px; }
.sdui-script-info p { font-size: .85rem; }
.sdui-script-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* session list */
.sdui-session-list { display: flex; flex-direction: column; gap: 16px; }
.sdui-session-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; backdrop-filter: blur(8px);
}
.sdui-session-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.sdui-session-header h3 { font-family: var(--display); font-size: 1rem; }
.sdui-session-renders { display: flex; flex-direction: column; gap: 8px; }
.sdui-session-render {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--panel2); border-radius: 10px; cursor: pointer; transition: .12s;
}
.sdui-session-render:hover { background: rgba(139,92,246,.08); }

/* ========================================
   RESPONSIVE — sidebar + mobile
   ======================================== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .sidebar-overlay.visible { display: block; }
  .app-main { margin-left: 0; padding: 60px 16px 80px; }
  .dash-hero { padding: 26px 20px; }
  .rgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

@media (min-width: 901px) {
  .sidebar-overlay { display: none !important; }
}
