:root {
  --bg: #09090B;
  --bg-sidebar: #0D0D10;
  --surface: #121216;
  --surface-2: #18181E;
  --surface-3: #202028;
  --ink: #F4F4F6;
  --ink-2: #A1A1AA;
  --ink-3: #71717A;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --gold: #D8B372;
  --gold-bright: #E8CA91;
  --gold-deep: #A97D38;
  --gold-glow: rgba(216, 179, 114, 0.14);
  --gold-border: rgba(216, 179, 114, 0.42);
  --emerald: #34D399;
  --emerald-bg: rgba(52, 211, 153, 0.12);
  --amber: #FBBF24;
  --amber-bg: rgba(251, 191, 36, 0.12);
  --rose: #FB7185;
  --rose-bg: rgba(251, 113, 133, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 65% 45% at 22% -10%, rgba(216, 179, 114, 0.08), transparent 60%),
    radial-gradient(ellipse 45% 40% at 85% 15%, rgba(255, 255, 255, 0.025), transparent 60%);
  background-attachment: fixed;
}
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; font-family: "Inter", "Segoe UI", system-ui, sans-serif; }
.ico { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 22px; height: 22px; }

/* Custom subtle dark scrollbars */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ==================== AUTH / REGISTER SPLIT-SCREEN ==================== */
.auth-wrap {
  min-height: 100vh;
  display: grid; grid-template-columns: 1.25fr 1fr;
}
.auth-visual {
  position: relative; overflow: hidden; padding: 48px 54px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #0B0B0E; border-right: 1px solid var(--border);
}
.auth-mosaic {
  position: absolute; inset: 0; z-index: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 10px; opacity: 0.34; filter: saturate(0.95);
}
.auth-mosaic img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
}
.auth-vignette {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(155deg, rgba(9,9,11,0.88) 0%, rgba(9,9,11,0.70) 48%, rgba(9,9,11,0.95) 100%);
}
.auth-visual-inner { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; justify-content: space-between; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-emblem {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #101012; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(216, 179, 114, 0.25), inset 0 1px 0 rgba(255,255,255,0.45);
  overflow: hidden;
}
.brand-emblem.brand-emblem-img {
  background: #FFFFFF; padding: 2px; border: 1px solid rgba(216, 179, 114, 0.45);
}
.brand-emblem.brand-emblem-img img {
  width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 7px;
}
.brand-lockup .b-en { font-size: 14px; font-weight: 800; letter-spacing: 0.14em; color: var(--ink); }
.brand-lockup .b-cn { font-size: 11px; color: var(--ink-2); letter-spacing: 0.04em; margin-top: 1px; }

.auth-copy { max-width: 560px; margin: auto 0; padding: 36px 0; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(216, 179, 114, 0.11); border: 1px solid rgba(216, 179, 114, 0.30);
  color: var(--gold-bright); margin-bottom: 18px;
}
.auth-copy h1 {
  font-size: 38px; font-weight: 700; line-height: 1.24; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 16px;
}
.auth-copy h1 span {
  background: linear-gradient(120deg, #F3DFAF, #C99A4E);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-copy p { font-size: 14px; color: var(--ink-2); line-height: 1.75; margin-bottom: 26px; }
.feature-list { list-style: none; display: grid; gap: 13px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 13px; color: rgba(244,244,246,0.88); line-height: 1.6;
}
.feature-list .f-ic {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; margin-top: 1px;
  background: rgba(216, 179, 114, 0.14); border: 1px solid rgba(216, 179, 114, 0.25);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
}
.price-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 16px 20px; border-radius: 14px;
  background: rgba(18, 18, 22, 0.78); backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
}
.price-strip div span { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 3px; }
.price-strip div strong { font-size: 18px; font-weight: 700; color: var(--gold-bright); }

.auth-form-side {
  display: flex; align-items: center; justify-content: center; padding: 40px 36px;
  background: var(--bg);
}
.auth-panel {
  width: 420px; max-width: 100%; padding: 34px 32px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.auth-panel-head { margin-bottom: 22px; }
.auth-panel-head h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.auth-panel-head p { font-size: 12px; color: var(--ink-3); }
.auth-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: 10px; background: var(--bg);
  border: 1px solid var(--border); margin-bottom: 22px;
}
.auth-switch button {
  padding: 9px; border: none; border-radius: 7px; cursor: pointer;
  background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: all .16s;
}
.auth-switch button.active {
  background: var(--surface-3); color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ==================== PRO APP SHELL (LEFT SIDEBAR + FLUID CANVAS) ==================== */
.app-shell {
  display: flex; min-height: 100vh; width: 100%;
}

/* Fixed Obsidian Sidebar */
.sidebar {
  width: 242px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: var(--bg-sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px 14px 16px; z-index: 40;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 11px; padding: 4px 6px 18px;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.sidebar-brand .brand-emblem { width: 32px; height: 32px; border-radius: 8px; }
.sidebar-brand .b-title {
  font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-brand .b-sub {
  font-size: 11px; color: var(--ink-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav-section-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 10px 8px;
}
.nav-tabs { display: flex; flex-direction: column; gap: 3px; }
.nav-tab {
  width: 100%; background: transparent; border: 1px solid transparent;
  color: var(--ink-2); padding: 10px 12px; border-radius: 10px;
  cursor: pointer; font-size: 13px; font-weight: 500; transition: all .15s;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left;
}
.nav-tab-l { display: inline-flex; align-items: center; gap: 10px; }
.nav-tab:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.nav-tab.active {
  background: rgba(216, 179, 114, 0.12); border-color: rgba(216, 179, 114, 0.28);
  color: var(--gold-bright); font-weight: 600;
}
.badge-dot {
  background: var(--rose); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
}
.badge-live {
  background: var(--gold); color: #111; font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: 999px;
  animation: pulseBadge 1.8s ease-in-out infinite;
}
@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216,179,114,0.55); }
  50% { box-shadow: 0 0 0 6px rgba(216,179,114,0); }
}

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.wallet-card-mini {
  padding: 13px 14px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(216,179,114,0.12) 0%, rgba(24,24,30,0.9) 70%);
  border: 1px solid rgba(216, 179, 114, 0.25);
  cursor: pointer; transition: border-color .15s;
}
.wallet-card-mini:hover { border-color: var(--gold-border); }
.wc-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--ink-2); }
.wc-bal { font-size: 22px; font-weight: 800; color: var(--gold-bright); margin: 5px 0 8px; letter-spacing: -0.02em; }
.wc-bal span { font-size: 11px; font-weight: 500; color: var(--ink-2); margin-left: 4px; }
.btn-topup-mini {
  width: 100%; padding: 6px 10px; border-radius: 8px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #111; font-size: 12px; font-weight: 700; transition: filter .15s;
}
.btn-topup-mini:hover { filter: brightness(1.08); }

.user-foot-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
}
.user-foot-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  color: var(--gold-bright); font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.user-name-wrap { min-width: 0; }
.user-name {
  font-size: 12px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 116px;
  display: flex; align-items: center; gap: 5px;
}
.user-role-sub { font-size: 10px; color: var(--ink-3); }
.btn-icon-ghost {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: transparent; border: 1px solid transparent; color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .15s;
}
.btn-icon-ghost:hover { color: var(--rose); background: var(--rose-bg); border-color: rgba(251,113,133,0.28); }

/* Main Fluid Content Column */
.workspace-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
}
.workspace-header {
  height: 58px; padding: 0 28px; position: sticky; top: 0; z-index: 30;
  background: rgba(9, 9, 11, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wh-left { display: flex; align-items: center; gap: 12px; }
.wh-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.wh-divider { width: 1px; height: 14px; background: var(--border-strong); }
.wh-status {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); flex-shrink: 0;
  box-shadow: 0 0 8px rgba(52,211,153,0.65);
}
.wh-right { display: flex; align-items: center; gap: 10px; }

.running-pill-top {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  background: rgba(216,179,114,0.12); border: 1px solid var(--gold-border);
  color: var(--gold-bright); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.running-pill-top:hover { background: rgba(216,179,114,0.2); }

.workspace-body {
  flex: 1; padding: 24px 28px 56px; width: 100%; max-width: 1680px; margin: 0 auto;
}

/* ==================== VIEW 1: PRO SPLIT STUDIO WORKSPACE ==================== */
.studio-split {
  display: grid; grid-template-columns: 448px 1fr; gap: 24px; align-items: start;
}
.control-dock {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 22px; box-shadow: var(--shadow-card);
  position: sticky; top: 80px;
}
.dock-head { margin-bottom: 16px; }
.dock-head .eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold);
  text-transform: uppercase; margin-bottom: 4px;
}
.dock-head h1 { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.dock-head p { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.55; }

/* Architectural Dot-Grid Dropzone */
.hero-dropzone {
  border: 1.5px dashed rgba(255,255,255,0.16); border-radius: 13px;
  padding: 32px 18px; text-align: center; cursor: pointer;
  background-color: #0D0D11;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  transition: all .18s;
}
.hero-dropzone:hover, .hero-dropzone.dragover {
  border-color: var(--gold); background-color: rgba(216,179,114,0.05);
}
.dz-icon-ring {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--gold-bright); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.hero-dropzone .dz-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.hero-dropzone .dz-sub { font-size: 12px; color: var(--ink-3); line-height: 1.55; }
.dz-tags {
  margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
}
.dz-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--ink-2);
}

/* Loading State */
.upload-loading {
  padding: 34px 18px; text-align: center; border-radius: 13px;
  background: rgba(216,179,114,0.06); border: 1px solid rgba(216,179,114,0.28);
}
.spinner {
  width: 30px; height: 30px; margin: 0 auto 12px;
  border: 2.5px solid rgba(216,179,114,0.22); border-top-color: var(--gold-bright);
  border-radius: 50%; animation: spin .75s linear infinite;
}
.spinner-sm {
  width: 22px; height: 22px; margin: 0 auto 8px;
  border: 2px solid rgba(216,179,114,0.24); border-top-color: var(--gold-bright);
  border-radius: 50%; animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Single Auto-Recognized Card */
.recognized-card {
  display: grid; grid-template-columns: 94px 1fr; gap: 14px; align-items: start;
  padding: 14px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.rec-thumb-col { display: flex; flex-direction: column; gap: 6px; }
.rec-thumb-col img {
  width: 94px; max-height: 152px; object-fit: contain; border-radius: 8px;
  border: 1px solid var(--border-strong); background: #0B0B0D; cursor: zoom-in;
}
.rec-info-col { min-width: 0; }
.rec-head-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.rec-cn { font-size: 17px; font-weight: 700; color: var(--ink); }
.rec-en { font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.06em; }
.rec-ok-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--emerald-bg); color: var(--emerald); border: 1px solid rgba(52,211,153,0.24);
}
.rec-meta-line { font-size: 11.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 9px; }
.rec-meta-line strong { color: var(--ink); }
.rec-spec-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.rec-spec-pill {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  background: rgba(216,179,114,0.12); border: 1px solid rgba(216,179,114,0.28);
  color: var(--gold-bright); display: inline-flex; align-items: center; gap: 5px;
}
.rec-spec-pill span { color: var(--ink-2); font-weight: 500; font-size: 10px; }
.rec-deliverable-bar {
  font-size: 11px; color: var(--ink-2); background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; line-height: 1.5;
}
.rec-deliverable-bar strong { color: var(--gold-bright); }

/* Batch Multi-Tile Queue */
.batch-queue-box {
  border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border-strong);
  padding: 14px;
}
.batch-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.batch-head-title { font-size: 13px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.batch-list { display: grid; gap: 8px; max-height: 290px; overflow-y: auto; padding-right: 2px; }
.batch-row {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; transition: border-color .15s;
}
.batch-row:hover { border-color: var(--border-strong); }
.batch-row.active-edit { border-color: var(--gold-border); background: rgba(216,179,114,0.06); }
.batch-row img { width: 40px; height: 56px; object-fit: contain; border-radius: 5px; background: #0B0B0D; border: 1px solid var(--border); }
.batch-row-info { min-width: 0; }
.batch-row-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.batch-row-title strong { font-size: 13px; color: var(--ink); }
.batch-row-title small { font-size: 11px; color: var(--ink-3); }
.batch-row-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.batch-mini-pill {
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: rgba(216,179,114,0.12); color: var(--gold-bright); font-weight: 600;
}
.batch-row-actions { display: flex; gap: 5px; }

/* Resolution Tier Selector */
.section-label {
  font-size: 11px; font-weight: 600; color: var(--ink-2);
  margin: 16px 0 8px; display: flex; align-items: center; justify-content: space-between;
}
.tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier-card {
  border: 1.5px solid var(--border); border-radius: 11px; padding: 12px 13px;
  cursor: pointer; background: var(--surface-2); transition: all .16s; position: relative;
}
.tier-card:hover { border-color: var(--border-strong); }
.tier-card.selected {
  border-color: var(--gold); background: linear-gradient(160deg, rgba(216,179,114,0.13) 0%, rgba(24,24,30,0.95) 85%);
  box-shadow: 0 0 0 1px rgba(216,179,114,0.22);
}
.tier-badge {
  position: absolute; top: 9px; right: 10px; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; background: var(--gold); color: #111;
}
.tier-name { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tier-card.selected .tier-name { color: var(--gold-bright); }
.tier-price { font-size: 19px; font-weight: 800; color: var(--ink); margin: 4px 0; letter-spacing: -0.02em; }
.tier-price small { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.tier-desc { font-size: 11px; color: var(--ink-3); line-height: 1.45; }
.tier-desc strong { color: var(--ink-2); }

/* Primary Checkout Action */
.checkout-panel {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.checkout-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 11px; font-size: 12px; color: var(--ink-2);
}
.checkout-meta strong { font-size: 17px; font-weight: 800; color: var(--gold-bright); }
.btn-cta-hero {
  width: 100%; padding: 13px 20px; border-radius: 11px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #EDD29B 0%, #C89B51 55%, #A97D38 100%);
  color: #111114; font-size: 14px; font-weight: 800; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 28px rgba(216,179,114,0.24), inset 0 1px 0 rgba(255,255,255,0.45);
  transition: all .16s;
}
.btn-cta-hero:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-cta-hero:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.checkout-foot-note {
  margin-top: 9px; font-size: 11px; color: var(--ink-3); text-align: center;
}

/* Collapsed Optional Drawer inside Dock */
.adv-drawer {
  margin-top: 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 11px; overflow: hidden;
}
.adv-drawer summary {
  list-style: none; cursor: pointer; padding: 11px 14px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  user-select: none; transition: color .15s;
}
.adv-drawer summary::-webkit-details-marker { display: none; }
.adv-drawer summary:hover { color: var(--ink); }
.adv-drawer[open] summary { border-bottom: 1px solid var(--border); color: var(--gold-bright); }
.adv-chevron { transition: transform .2s; }
.adv-drawer[open] .adv-chevron { transform: rotate(180deg); }
.adv-body { padding: 14px; display: grid; gap: 12px; }

/* ==================== RIGHT SHOWCASE STAGE (REAL 4K BENTO GALLERY) ==================== */
.showcase-stage { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stage-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.stage-head h2 { font-size: 16px; font-weight: 700; color: var(--ink); }
.stage-head p { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.stage-badge-row { display: flex; gap: 7px; flex-wrap: wrap; }
.micro-pill {
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-2);
}

.bento-showcase {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-template-rows: 278px 236px;
  gap: 14px;
}
.bento-card {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface);
  cursor: zoom-in; group: true;
}
.bento-card.span-2-rows { grid-row: span 2; }
.bento-card img.b-photo {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .55s cubic-bezier(0.22, 1, 0.36, 1);
}
.bento-card.contain-photo img.b-photo {
  object-fit: contain; background: #141418; padding: 10px 10px 58px 10px;
}
.bento-card:hover img.b-photo { transform: scale(1.035); }
.bento-grad {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(9,9,11,0.12) 0%, rgba(9,9,11,0) 45%, rgba(9,9,11,0.92) 100%);
}
.bento-top-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(12,12,15,0.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12); color: var(--gold-bright);
}
.bento-bottom {
  position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
}
.bento-title { font-size: 13.5px; font-weight: 700; color: #fff; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bento-sub { font-size: 11px; color: rgba(255,255,255,0.68); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bento-swatch-chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 7px 4px 4px;
  border-radius: 8px; background: rgba(12,12,15,0.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.16); flex-shrink: 0;
}
.bento-swatch-chip img {
  width: 22px; height: 34px; object-fit: cover; border-radius: 4px;
}
.bento-swatch-chip.sq img { width: 28px; height: 28px; }
.bento-swatch-chip span { font-size: 10px; font-weight: 600; color: var(--ink-2); }

.bento-split-cell {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

.cap-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.cap-card {
  padding: 15px 16px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
}
.cap-num {
  font-size: 11px; font-weight: 800; color: var(--gold); padding: 4px 8px;
  border-radius: 7px; background: rgba(216,179,114,0.1); border: 1px solid rgba(216,179,114,0.22);
  flex-shrink: 0;
}
.cap-card h4 { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.cap-card p { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }

/* ==================== SHARED CARDS, FORMS, BUTTONS, TABLES ==================== */
.card {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card);
}
.card-title {
  font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-title .step-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--gold-glow); border: 1px solid var(--gold-border); color: var(--gold-bright); font-weight: 700;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: 9px; font-size: 13px; background: var(--bg); color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,179,114,0.14);
}
.select option { background: #141418; color: var(--ink); }
.textarea { resize: vertical; min-height: 70px; font-family: inherit; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .15s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--surface-3); color: var(--gold-bright); border-color: var(--gold-border); }
.btn-primary:hover { background: rgba(216,179,114,0.18); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); color: #111; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-gold:hover { filter: brightness(1.07); }
.btn-outline { background: var(--surface-2); border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: rgba(255,255,255,0.3); background: var(--surface-3); }
.btn-danger { background: var(--rose-bg); color: var(--rose); border-color: rgba(251,113,133,0.3); }
.btn-danger:hover { background: rgba(251,113,133,0.22); }
.btn-success { background: var(--emerald-bg); color: var(--emerald); border-color: rgba(52,211,153,0.3); }
.btn-success:hover { background: rgba(52,211,153,0.22); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mode-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-btn {
  flex: 1; min-width: 96px; padding: 7px 9px; border: 1px solid var(--border-strong);
  background: var(--surface-2); border-radius: 8px; font-size: 11.5px;
  cursor: pointer; color: var(--ink-2); font-weight: 600; transition: all .15s;
}
.pill-btn.active { background: rgba(216,179,114,0.16); color: var(--gold-bright); border-color: var(--gold-border); }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 12px; cursor: pointer; background: var(--surface-2); color: var(--ink-2);
  user-select: none; display: inline-flex; align-items: center; gap: 5px; transition: all .15s;
}
.chip.selected { background: rgba(216,179,114,0.16); color: var(--gold-bright); border-color: var(--gold-border); font-weight: 600; }

.spec-rows { margin-top: 8px; display: grid; gap: 6px; }
.spec-row-item {
  display: grid; grid-template-columns: 112px 1fr; gap: 8px; align-items: center;
  padding: 6px 10px; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--border);
  font-size: 12px; color: var(--ink-2);
}

/* ==================== LIVE GENERATION GALLERY ==================== */
.live-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.live-filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.live-job-card {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
  padding: 20px 22px; box-shadow: var(--shadow-card); margin-bottom: 20px;
}
.live-job-card.is-active {
  border-color: var(--gold-border);
  box-shadow: 0 12px 36px rgba(216,179,114,0.08);
}
.live-job-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.live-job-idbox { display: flex; align-items: center; gap: 12px; min-width: 0; }
.live-job-swatch {
  width: 44px; height: 60px; object-fit: contain; border-radius: 7px;
  border: 1px solid var(--border-strong); background: #0B0B0D; cursor: zoom-in; flex-shrink: 0;
}
.live-job-meta h3 { font-size: 16px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-job-meta p { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.live-job-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.progress-box {
  padding: 13px 16px; border-radius: 11px; background: rgba(216,179,114,0.08);
  border: 1px solid rgba(216,179,114,0.26); margin-bottom: 16px;
}
.progress-track {
  height: 7px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; margin-top: 9px;
}
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); transition: width .35s; }

.sub-tabs { display: flex; gap: 7px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sub-tab {
  padding: 6px 13px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface-2); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s;
}
.sub-tab:hover { color: var(--ink); border-color: rgba(255,255,255,0.24); }
.sub-tab.active { background: rgba(216,179,114,0.16); color: var(--gold-bright); border-color: var(--gold-border); }

.plate-live-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px;
}
.plate-card {
  border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden;
  background: var(--surface-2); display: flex; flex-direction: column;
  transition: transform .16s, border-color .16s;
}
.plate-card:hover { border-color: rgba(255,255,255,0.24); transform: translateY(-2px); }
.plate-media {
  position: relative; width: 100%; height: 268px; background: #0C0C0F;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.plate-card.ratio-1x1 .plate-media { height: 224px; background: #141418; }
.plate-media img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.plate-card.ratio-1x1 .plate-media img { object-fit: contain; padding: 6px; }
.plate-tag-tl {
  position: absolute; top: 9px; left: 9px; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 6px;
  background: rgba(9,9,11,0.78); color: var(--gold-bright);
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.12);
}
.plate-tag-tr {
  position: absolute; top: 9px; right: 9px; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(9,9,11,0.72); color: var(--ink-2); backdrop-filter: blur(6px);
}
.plate-shimmer {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 16px; text-align: center;
  background: linear-gradient(110deg, #131318 8%, #1E1E26 18%, #131318 33%);
  background-size: 200% 100%; animation: shimmerBg 1.6s linear infinite;
}
@keyframes shimmerBg { to { background-position-x: -200%; } }
.plate-shimmer .sh-lbl { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.plate-shimmer .sh-sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

.plate-failed-box {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 18px; text-align: center;
  background: rgba(251,113,133,0.06); color: var(--rose); gap: 8px;
}
.plate-failed-box p { font-size: 12px; color: var(--ink-2); line-height: 1.5; }

.plate-foot {
  padding: 10px 11px; display: flex; align-items: center; justify-content: space-between;
  gap: 6px; border-top: 1px solid var(--border); background: var(--surface);
}
.plate-foot-name {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.plate-foot-btns { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.btn-reroll {
  background: rgba(216,179,114,0.12); border: 1px solid rgba(216,179,114,0.34); color: var(--gold-bright);
  padding: 4px 9px; font-size: 11px; font-weight: 600; border-radius: 7px;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
  transition: all .15s;
}
.btn-reroll:hover { background: var(--gold); color: #111; border-color: var(--gold); }
.btn-mini-link {
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--ink-2);
  padding: 4px 8px; font-size: 11px; font-weight: 600; border-radius: 7px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-mini-link:hover { color: var(--ink); border-color: rgba(255,255,255,0.28); }

/* ==================== TABLES & KPIs & QR ==================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 13px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; background: rgba(255,255,255,0.02); }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.status-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.st-done, .st-approved, .st-unused { background: var(--emerald-bg); color: var(--emerald); }
.st-running, .st-queued, .st-packaging, .st-pending { background: var(--amber-bg); color: var(--amber); }
.st-failed, .st-rejected, .st-void { background: var(--rose-bg); color: var(--rose); }
.st-used { background: rgba(255,255,255,0.06); color: var(--ink-3); }

.kpi-card {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 13px; padding: 18px 20px;
}
.kpi-card .k-label { font-size: 12px; color: var(--ink-3); }
.kpi-card .k-val { font-size: 26px; font-weight: 800; margin-top: 6px; color: var(--ink); letter-spacing: -0.02em; }
.kpi-card .k-sub { font-size: 12px; color: var(--emerald); margin-top: 4px; }

.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.qr-box {
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px; text-align: center; background: var(--surface-2);
}
.qr-box img { height: 240px; max-width: 100%; width: auto; object-fit: contain; border-radius: 10px; background: #fff; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.qr-empty {
  width: 168px; height: 168px; margin: 0 auto; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border-strong); border-radius: 8px; font-size: 12px; color: var(--ink-3); padding: 12px;
}

/* ==================== MODAL, LIGHTBOX & TOAST ==================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 110; background: rgba(4,4,6,0.78);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-card {
  width: 480px; max-width: 100%; background: var(--surface); border-radius: 16px;
  padding: 22px 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-strong);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { font-size: 16px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.modal-preview {
  display: flex; gap: 14px; align-items: center; padding: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 14px;
}
.modal-preview img { width: 64px; height: 88px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border-strong); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(5,5,7,0.92);
  display: flex; align-items: center; justify-content: center; padding: 28px; cursor: zoom-out;
  backdrop-filter: blur(8px);
}
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 24px 72px rgba(0,0,0,0.8); }

.toast {
  position: fixed; bottom: 26px; right: 26px; z-index: 130;
  background: var(--surface-2); color: var(--ink); padding: 12px 18px;
  border-radius: 11px; font-size: 13px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--gold-border); border-left: 3px solid var(--gold); max-width: 440px;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 1280px) {
  .studio-split { grid-template-columns: 400px 1fr; gap: 18px; }
  .bento-showcase { grid-template-rows: 240px 208px; }
  .sidebar { width: 220px; }
}
@media (max-width: 1040px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: sticky; top: 0; flex-direction: row;
    align-items: center; padding: 10px 14px; gap: 10px;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .sidebar-brand { border: none; padding: 0; margin: 0; }
  .sidebar-brand .b-sub, .nav-section-lbl { display: none; }
  .nav-tabs { flex-direction: row; gap: 4px; overflow-x: auto; }
  .nav-tab { padding: 7px 10px; width: auto; white-space: nowrap; }
  .sidebar-foot { flex-direction: row; align-items: center; border: none; padding: 0; gap: 8px; }
  .wallet-card-mini { padding: 5px 10px; display: flex; align-items: center; gap: 8px; }
  .wallet-card-mini .wc-top { display: none; }
  .wallet-card-mini .wc-bal { font-size: 14px; margin: 0; }
  .wallet-card-mini .btn-topup-mini { width: auto; padding: 4px 8px; font-size: 11px; }
  .user-foot-row .user-name-wrap { display: none; }
  .workspace-header { display: none; }
  .workspace-body { padding: 16px; }
  .studio-split { grid-template-columns: 1fr; }
  .control-dock { position: static; }
  .bento-showcase { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 220px 200px; }
  .bento-card.span-2-rows { grid-row: span 1; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .grid-2, .cap-strip { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
