@import url("https://cdn.jsdelivr.net/npm/@fontsource-variable/noto-sans-sc@5.3.0/index.css");

:root {
  --font-ui: "Noto Sans SC Variable", "CapCut Sans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  --ink: #172033;
  --ink-soft: #56627a;
  --ink-muted: #7b879d;
  --primary: #4d40e8;
  --primary-dark: #3528c7;
  --primary-soft: #eeecff;
  --accent: #16a36a;
  --accent-soft: #e6f8f0;
  --danger: #dc4c64;
  --danger-soft: #fff0f3;
  --warning: #b76b08;
  --warning-soft: #fff7e6;
  --surface: #ffffff;
  --surface-soft: #f6f7fb;
  --surface-tint: #f5f3ff;
  --border: #e3e7ef;
  --border-strong: #cfd5e1;
  --shadow-sm: 0 8px 24px rgba(37, 31, 91, 0.07);
  --shadow-md: 0 18px 50px rgba(37, 31, 91, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --transition: 180ms ease;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--surface-soft);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--font-ui);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button, a, label[for], select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible { outline: 3px solid rgba(77, 64, 232, 0.26); outline-offset: 2px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(227, 231, 239, 0.88);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #6f62ff, #3e32d8);
  box-shadow: 0 8px 18px rgba(77, 64, 232, 0.24);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-mark svg path:first-child { fill: rgba(255,255,255,.12); }
.brand-mark svg path:last-child { fill: #fff; stroke: #fff; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.credit-pill, .worker-state {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #dcd8ff;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 13px;
}
.credit-pill svg { width: 17px; height: 17px; }
.user-name { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--surface);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.icon-button:hover { border-color: #bcb5ff; color: var(--primary); background: var(--primary-soft); }

.page-container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 64px; }
.eyebrow { display: inline-block; margin-bottom: 8px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow.light { color: #c9c4ff; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, .65fr); gap: 24px; margin-top: 24px; align-items: start; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.create-panel { padding: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }

.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, .field legend { color: var(--ink); font-size: 14px; font-weight: 700; }
.field textarea, .field input, .toolbar-actions select, .search-box {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.field textarea, .field input { min-height: 48px; padding: 13px 14px; }
.field textarea { resize: vertical; line-height: 1.65; }
.field textarea:hover, .field input:hover, .toolbar-actions select:hover { border-color: #aca4ed; }
.field textarea:focus, .field input:focus, .toolbar-actions select:focus, .search-box:focus-within { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(77,64,232,.12); }
.field textarea::placeholder, .field input::placeholder { color: #9ca6b8; }

.material-section { margin-bottom: 22px; padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: #fbfbfe; }
.material-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.material-heading h3 { margin: 0 0 5px; font-size: 14px; }
.material-heading p { margin: 0; color: var(--ink-muted); font-size: 11px; line-height: 1.6; }
.material-heading > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 700; }
.material-grid { min-height: 112px; display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; padding: 10px; border: 1.5px dashed #d4cffa; border-radius: 13px; background: #fff; transition: border-color var(--transition), background var(--transition); }
.material-grid.dragover { border-color: var(--primary); background: var(--surface-tint); }
.material-message { margin-top: 9px; color: var(--danger); font-size: 12px; line-height: 1.55; }
.material-message:empty { display: none; }
.material-items { display: contents; }
.material-card { position: relative; width: 86px; min-height: 96px; margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.material-card img { display: block; width: 76px; height: 68px; border-radius: 8px; object-fit: cover; background: var(--surface-soft); }
.material-card figcaption { overflow: hidden; padding: 7px 3px 2px; color: var(--primary-dark); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.material-card button, .video-reference-card > button, .audio-preview > button { position: absolute; top: -9px; right: -9px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(23,32,51,.88); box-shadow: 0 5px 12px rgba(23,32,51,.18); opacity: 0; transition: opacity var(--transition), background var(--transition); }
.material-card:hover button, .material-card:focus-within button, .video-reference-card:hover > button, .video-reference-card:focus-within > button, .audio-preview:hover > button, .audio-preview:focus-within > button { opacity: 1; }
.material-card button:hover, .video-reference-card > button:hover, .audio-preview > button:hover { background: var(--danger); }
.material-card button svg, .video-reference-card > button svg, .audio-preview > button svg { width: 15px; height: 15px; }
.material-add { width: 86px; min-height: 96px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px solid var(--border); border-radius: 11px; color: var(--ink-soft); background: var(--surface-soft); cursor: pointer; text-align: center; transition: border-color var(--transition), color var(--transition), background var(--transition); }
.material-add:hover { border-color: #bdb5ff; color: var(--primary); background: var(--primary-soft); }
.material-add svg { width: 23px; height: 23px; }
.material-add strong { font-size: 11px; }
.material-add small { color: var(--ink-muted); font-size: 9px; font-weight: 500; }
.video-add { color: #315ba8; background: #f3f7ff; }
.video-reference-items { display: contents; }
.video-reference-items[hidden] { display: none; }
.video-reference-card { position: relative; min-width: min(100%, 220px); flex: 1 1 220px; margin: 0; padding: 8px; border: 1px solid #cfddf8; border-radius: 11px; background: #f7f9ff; }
.video-reference-card video { display: block; width: 100%; height: 112px; border-radius: 8px; background: #111827; object-fit: contain; }
.video-reference-card > div { min-width: 0; display: grid; gap: 3px; padding: 8px 3px 2px; }
.video-reference-card strong { color: #315ba8; font-size: 11px; }
.video-reference-card small { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.audio-add { color: #177557; background: #f1fbf7; }
.audio-items { display: contents; }
.audio-items[hidden] { display: none; }
.audio-preview { position: relative; min-width: min(100%, 300px); min-height: 96px; flex: 1; display: grid; grid-template-columns: minmax(120px,1fr) minmax(160px,.8fr); align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #ccebdd; border-radius: 11px; background: #f5fcf9; }
.audio-info { min-width: 0; display: flex; align-items: center; gap: 10px; }
.audio-info > span:last-child { min-width: 0; display: grid; gap: 4px; }
.audio-info strong { color: #0d7d50; font-size: 11px; }
.audio-info small { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.audio-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: var(--accent-soft); }
.audio-preview audio { width: 100%; height: 34px; }

.prompt-field { margin-bottom: 18px; }
.prompt-composer { position: relative; overflow: visible; border: 1px solid var(--border-strong); border-radius: 14px; background: #fff; transition: border-color var(--transition), box-shadow var(--transition); }
.prompt-composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(77,64,232,.1); }
.prompt-composer textarea { min-height: 150px; margin: 0; padding: 16px 16px 8px; border: 0; border-radius: 14px 14px 0 0; box-shadow: none; background: transparent; }
.prompt-composer textarea:hover, .prompt-composer textarea:focus { border: 0; box-shadow: none; outline: 0; }
.composer-footer { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 9px 8px; }
.composer-footer > span { color: var(--ink-muted); font-size: 10px; }
.mention-wrap { position: relative; }
.mention-button { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #d8d3ff; border-radius: 9px; color: var(--primary); background: var(--surface-tint); font-size: 11px; font-weight: 800; }
.mention-button:hover { border-color: var(--primary); background: var(--primary-soft); }
.mention-button span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--primary); font-size: 13px; }
.mention-menu { position: absolute; z-index: 40; left: 0; bottom: calc(100% + 8px); width: min(340px, calc(100vw - 48px)); max-height: 240px; overflow-y: auto; padding: 7px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-md); }
.mention-menu button { width: 100%; min-height: 48px; display: grid; gap: 3px; padding: 8px 10px; border: 0; border-radius: 8px; background: #fff; text-align: left; }
.mention-menu button:hover, .mention-menu button:focus-visible { background: var(--surface-tint); }
.mention-menu button strong { color: var(--primary); font-size: 12px; }
.mention-menu button span, .mention-menu p { overflow: hidden; margin: 0; color: var(--ink-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mention-menu p { padding: 14px 10px; }

.generation-controls { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin: 18px 0; }
.control-pill { min-width: 0; display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.control-pill > span { color: var(--ink-muted); font-size: 9px; font-weight: 700; }
.control-pill select { min-width: 0; width: 100%; height: 25px; padding: 0 19px 0 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.control-pill select:disabled { color: var(--primary-dark); opacity: 1; cursor: default; }
.resolution-pill { border-color: #ccebdd; background: #f3fbf7; }
.resolution-pill select:disabled { color: #0d7d50; }

.form-message { min-height: 20px; margin: 2px 0 8px; color: var(--danger); font-size: 13px; line-height: 1.5; }
.primary-button, .secondary-button, .table-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  font-weight: 700;
  transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition), box-shadow var(--transition);
}
.primary-button { border: 1px solid var(--primary); color: #fff; background: var(--primary); box-shadow: 0 9px 20px rgba(77,64,232,.18); }
.primary-button:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.primary-button:disabled, .secondary-button:disabled, .table-button:disabled { cursor: not-allowed; opacity: .52; box-shadow: none; }
.secondary-button { padding: 0 15px; border: 1px solid var(--border-strong); color: var(--ink-soft); background: #fff; white-space: nowrap; }
.secondary-button:hover { border-color: #aaa2ff; color: var(--primary); background: var(--surface-tint); }
.secondary-button svg { width: 17px; height: 17px; }
.create-actions { display: grid; grid-template-columns: minmax(150px, .35fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.preview-button { min-height: 52px; }
.submit-button { width: 100%; min-height: 52px; font-size: 15px; }
.submit-button svg { width: 19px; height: 19px; }

.orders-section { margin-top: 32px; padding: 4px 0; }
.orders-heading { margin-bottom: 16px; }
.order-list { display: grid; gap: 12px; }
.order-card { display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(140px, .65fr) minmax(220px, 1.1fr) auto; align-items: center; gap: 20px; padding: 19px 20px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(37,31,91,.05); }
.order-card:hover { border-color: #d2cdfa; }
.order-main { min-width: 0; }
.order-main strong { display: block; margin-bottom: 6px; font-size: 14px; }
.order-main p { overflow: hidden; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.order-spec { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-tag { padding: 6px 8px; border-radius: 8px; color: var(--ink-soft); background: var(--surface-soft); font-size: 11px; font-weight: 700; }
.order-status { min-width: 0; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 5px 9px; border-radius: 999px; color: var(--warning); background: var(--warning-soft); font-size: 11px; font-weight: 800; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge.processing { color: var(--primary); background: var(--primary-soft); }
.status-badge.completed { color: var(--accent); background: var(--accent-soft); }
.status-badge.failed { color: var(--danger); background: var(--danger-soft); }
.status-line small { color: var(--ink-muted); font-size: 11px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #ebeef4; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6759f3, #9d69ee); transition: width 450ms ease; }
.order-actions { min-width: 126px; display: grid; gap: 7px; justify-items: stretch; }
.order-history-actions { display: flex; gap: 6px; justify-content: flex-end; }
.order-prompt-button { min-height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--ink-soft); background: #fff; font-size: 11px; font-weight: 750; white-space: nowrap; }
.order-prompt-button:hover { color: var(--primary); border-color: #aaa2ff; background: var(--surface-tint); }
.download-button { min-height: 42px; padding: 0 14px; color: #fff; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); font-size: 12px; font-weight: 800; }
.download-button:hover { background: #0d8857; border-color: #0d8857; }
.waiting-note { color: var(--ink-muted); font-size: 11px; }
.empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 36px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--ink-muted); background: rgba(255,255,255,.65); text-align: center; }
.empty-state svg { width: 42px; height: 42px; margin-bottom: 6px; }
.empty-state h3 { margin: 0; color: var(--ink); font-size: 16px; }
.empty-state p { margin: 0; font-size: 12px; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.15fr) minmax(440px, .85fr); background: #fff; }
.login-visual { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 7vw; color: #fff; background: linear-gradient(145deg, #17133e, #32288e 60%, #4e42d4); }
.login-visual::before { content: ""; position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, #000, transparent 75%); }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.orb-one { width: 420px; height: 420px; right: -110px; top: -80px; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.44), rgba(111,98,255,.16) 46%, transparent 70%); }
.orb-two { width: 300px; height: 300px; left: -90px; bottom: 120px; border: 48px solid rgba(151,139,255,.1); }
.visual-card { position: absolute; right: 14%; top: 18%; width: 250px; height: 170px; padding: 24px; border: 1px solid rgba(255,255,255,.22); border-radius: 24px; background: rgba(255,255,255,.1); box-shadow: 0 28px 60px rgba(5,3,24,.28); backdrop-filter: blur(10px); transform: rotate(4deg); }
.visual-card span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(145deg,#9c8fff,#6658e9); font-weight: 900; }
.visual-card div { width: 100%; height: 12px; margin-top: 24px; border-radius: 999px; background: rgba(255,255,255,.26); }
.visual-card i { display: block; width: 64%; height: 8px; margin-top: 12px; border-radius: 999px; background: rgba(255,255,255,.14); }
.login-message { position: relative; z-index: 2; max-width: 620px; }
.login-message h1 { margin: 0 0 18px; font-size: clamp(34px, 4.7vw, 64px); line-height: 1.12; letter-spacing: -.05em; }
.login-message p { margin: 0; color: rgba(255,255,255,.73); font-size: 17px; }
.login-form-wrap { display: grid; place-items: center; padding: 46px; }
.login-card { width: min(410px, 100%); }
.login-brand { margin-bottom: 50px; }
.login-title { margin-bottom: 30px; }
.login-title h2 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.04em; }
.login-title p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.login-card .field { margin-bottom: 17px; }
.login-button { width: 100%; min-height: 50px; margin-top: 2px; }
.demo-account { margin: 14px 0 20px; color: var(--ink-muted); text-align: center; font-size: 11px; }
.admin-entry { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--primary); font-size: 13px; font-weight: 700; }
.admin-entry:hover { text-decoration: underline; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 32px)); padding: 13px 18px; border-radius: 12px; color: #fff; background: #211c43; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity var(--transition), transform var(--transition); font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #9f2740; }

.modal-open { overflow: hidden; }
.prompt-preview-modal { position: fixed; z-index: 140; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(19,16,46,.58); backdrop-filter: blur(6px); }
.prompt-preview-card { width: min(900px, 100%); max-height: min(88vh, 780px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr) auto; border: 1px solid rgba(255,255,255,.55); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(18,13,64,.28); }
.prompt-preview-header { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.prompt-preview-header h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.03em; }
.prompt-preview-close { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; color: var(--ink-soft); background: var(--surface-soft); }
.prompt-preview-close:hover { color: var(--primary); border-color: #b7afff; background: var(--surface-tint); }
.prompt-preview-close svg { width: 19px; height: 19px; }
.prompt-preview-body { overflow: auto; display: grid; gap: 22px; padding: 24px; }
.prompt-preview-copy { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 12px; }
.prompt-preview-text-block { min-width: 0; padding: 16px 17px; border: 1px solid #ddd9ff; border-radius: 14px; background: #faf9ff; }
.prompt-preview-text-block.muted { border-color: var(--border); background: var(--surface-soft); }
.prompt-preview-text-block > span { color: var(--primary); font-size: 11px; font-weight: 800; }
.prompt-preview-text-block.muted > span { color: var(--ink-muted); }
.prompt-preview-text-block p { min-height: 42px; margin: 9px 0 0; color: var(--ink); font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-preview-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.prompt-preview-section-title h3 { margin: 0; font-size: 15px; }
.prompt-preview-section-title span { color: var(--ink-muted); font-size: 11px; font-weight: 700; }
.prompt-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.prompt-preview-image { min-width: 0; overflow: hidden; margin: 0; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.prompt-preview-image img { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: cover; background: var(--surface-soft); }
.prompt-preview-image figcaption { min-width: 0; display: grid; gap: 3px; padding: 10px 11px; }
.prompt-preview-image figcaption strong { color: var(--primary); font-size: 11px; }
.prompt-preview-image figcaption span { overflow: hidden; color: var(--ink-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-preview-empty { grid-column: 1 / -1; min-height: 90px; display: grid; place-items: center; border: 1px dashed var(--border-strong); border-radius: 13px; color: var(--ink-muted); background: var(--surface-soft); font-size: 12px; }
.prompt-preview-specs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.prompt-preview-specs div { min-width: 0; display: grid; gap: 5px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.prompt-preview-specs span { color: var(--ink-muted); font-size: 10px; }
.prompt-preview-specs strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-preview-footer { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--border); background: #fbfbfe; }
.prompt-preview-footer p { margin: 0; color: var(--ink-muted); font-size: 11px; }
.prompt-preview-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.prompt-reuse-button { min-height: 44px; padding: 0 17px; white-space: nowrap; }

.smart-workspace { margin-top: 24px; }
.smart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 20px; align-items: start; }
.smart-builder { padding: 26px; }

.creative-input-grid {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-bottom: 20px;
}
.creative-product-section {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfbfd;
}
.creative-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.creative-field-heading > div { display: grid; gap: 3px; }
.creative-field-heading label { color: var(--ink); font-size: 13px; font-weight: 800; }
.creative-field-heading small, .creative-field-heading > span { color: var(--ink-muted); font-size: 9px; }
.creative-reference-zone {
  min-height: 218px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px;
  border: 1px dashed #cbd1df;
  border-radius: 12px;
  background: #fff;
  transition: border-color var(--transition), background var(--transition);
}
.creative-reference-zone.dragover { border-color: var(--primary); background: var(--surface-tint); }
.creative-reference-grid { display: contents; }
.creative-reference-card, .creative-reference-add {
  position: relative;
  width: calc(33.333% - 6px);
  min-width: 64px;
  aspect-ratio: 1;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}
.creative-reference-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.creative-reference-card figcaption {
  position: absolute;
  inset: auto 4px 4px;
  overflow: hidden;
  padding: 3px 5px;
  border-radius: 5px;
  color: #fff;
  background: rgba(20, 17, 51, .72);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.creative-reference-card button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: rgba(25, 21, 56, .78);
}
.creative-reference-card button svg { width: 13px; height: 13px; }
.creative-reference-add {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--ink-soft);
  border-style: dashed;
  cursor: pointer;
}
.creative-reference-add:hover { color: var(--primary); border-color: #aaa2ff; background: var(--surface-tint); }
.creative-reference-add svg { width: 21px; height: 21px; }
.creative-reference-add strong { font-size: 10px; }
.creative-reference-add small { color: var(--ink-muted); font-size: 7px; }
.creative-product-section .material-message { min-height: 14px; margin: 8px 0 0; font-size: 9px; }
.creative-brief-field { margin: 0; }
.creative-brief-field textarea { min-height: 218px; resize: vertical; }
.creative-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}
.creative-controls > label {
  min-width: 0;
  min-height: 57px;
  display: grid;
  gap: 4px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}
.creative-controls span { color: var(--ink-muted); font-size: 9px; }
.creative-controls select {
  width: 100%;
  padding: 0 22px 0 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.creative-start-button { width: 100%; min-height: 52px; gap: 9px; }

.smart-side { display: grid; gap: 14px; }
.recent-creative-panel { padding: 18px; }
.recent-creative-heading h3 { margin: 0 0 14px; font-size: 16px; }
.recent-creative-list { display: grid; gap: 7px; }
.recent-creative-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 7px;
}
.recent-creative-item {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}
.recent-creative-item:hover, .recent-creative-item.active { border-color: #c3bcff; background: #faf9ff; }
.recent-creative-item > span { min-width: 0; display: grid; gap: 4px; }
.recent-creative-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.recent-creative-item small { color: var(--ink-muted); font-size: 9px; }
.recent-creative-item i {
  flex: 0 0 auto;
  max-width: 100px;
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}
.recent-creative-download {
  display: grid;
  place-items: center;
  min-width: 66px;
  padding: 8px;
  border: 1px solid #d8d3ff;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}
.recent-creative-download:hover {
  border-color: var(--primary);
  background: #eeeaff;
}
.recent-creative-empty { margin: 12px 0 2px; color: var(--ink-muted); font-size: 10px; text-align: center; }

.creative-flow-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.creative-flow-header h3 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.compact-button { min-height: 40px; }
.creative-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.creative-stepper li {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 9px;
}
.creative-stepper li::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 1px;
  background: var(--border-strong);
}
.creative-stepper li:last-child::after { display: none; }
.creative-stepper span {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
}
.creative-stepper li.done span { color: #fff; border-color: #16a36a; background: #16a36a; }
.creative-stepper li.done::after { background: #81d4b0; }
.creative-stepper li.current { color: var(--primary); }
.creative-stepper li.current span { color: #fff; border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 5px rgba(77,64,232,.1); }
.creative-current-step { min-height: 390px; }
.creative-step-card {
  min-height: 390px;
  display: grid;
  align-content: start;
  padding: 22px;
  border: 1px solid #e4e0ff;
  border-radius: 16px;
  background: #fdfcff;
}
.creative-step-card h4 { margin: 4px 0 7px; font-size: 19px; letter-spacing: -.025em; }
.creative-step-card > p { margin: 0 0 16px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.step-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.step-model-badge, .revision-badge, .success-dot, .failed-dot, .working-dot {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}
.step-model-badge { color: var(--primary-dark); background: var(--primary-soft); }
.revision-badge { color: var(--ink-muted); background: var(--surface-soft); }
.success-dot { color: #087a52; background: #e6f8f0; }
.failed-dot { color: var(--danger); background: var(--danger-soft); }
.working-dot { color: #a35e05; background: var(--warning-soft); }
.prompt-confirm-card textarea {
  width: 100%;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  line-height: 1.75;
  resize: vertical;
}
.prompt-confirm-card textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(77,64,232,.08); }
.creative-step-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.creative-step-actions .primary-button, .creative-step-actions .secondary-button { min-height: 44px; }
.cost-note { display: block; margin-top: 10px; color: var(--ink-muted); font-size: 9px; text-align: right; }
.creative-error { margin: 11px 0; padding: 10px 12px; border: 1px solid #f1c8d0; border-radius: 9px; color: #ae304b; background: var(--danger-soft); font-size: 10px; line-height: 1.55; }
.creative-error.subtle { color: var(--warning); border-color: #f2ddb9; background: var(--warning-soft); }
.creative-generating-card { align-content: center; justify-items: center; text-align: center; }
.creative-generating-card h4 { margin-top: 15px; }
.creative-spinner { width: 48px; height: 48px; border: 4px solid #e8e5ff; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.creative-progress-line { width: 100%; height: 7px; overflow: hidden; margin: 16px 0 9px; border-radius: 999px; background: #e7e6ef; }
.creative-progress-line i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .35s ease; }
.creative-generating-card > strong, .generated-video-card > strong { color: var(--primary); font-size: 12px; }
.generated-image-card figure { overflow: hidden; width: min(100%, 560px); margin: 8px auto 0; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.generated-image-card figure img { width: 100%; max-height: 500px; display: block; object-fit: contain; }
.generated-video-card video { width: min(100%, 680px); max-height: 470px; margin: 9px auto 0; border-radius: 13px; background: #0f1020; }

/* Merchant console */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; color: #edf0ff; background: #1b183b; }
.admin-brand { padding: 0 10px; color: #fff; }
.admin-brand > span:last-child { display: grid; gap: 1px; }
.admin-brand small { color: #9f99c9; font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.admin-nav { display: grid; gap: 7px; margin-top: 44px; }
.admin-nav a { min-height: 46px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border-radius: 11px; color: #aaa5ca; font-size: 13px; font-weight: 700; transition: color var(--transition), background var(--transition); }
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.admin-nav a.active { color: #fff; background: linear-gradient(90deg, #5749d9, #4639bf); box-shadow: 0 9px 22px rgba(0,0,0,.16); }
.admin-nav svg { width: 19px; height: 19px; }
.sidebar-note { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.04); }
.sidebar-note span { color: #bfb9ff; font-size: 11px; font-weight: 800; }
.sidebar-note p { margin: 8px 0 0; color: #938eb6; font-size: 11px; line-height: 1.6; }
.admin-main { min-width: 0; }
.admin-topbar { min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 34px; border-bottom: 1px solid var(--border); background: #fff; }
.admin-topbar .eyebrow { margin-bottom: 3px; }
.admin-topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.worker-state { border-color: #dce2ec; color: var(--ink-soft); background: #f7f8fb; }
.worker-state i { width: 8px; height: 8px; border-radius: 50%; background: #a8b0bf; }
.worker-state.online { color: #0d7d50; border-color: #bfe9d6; background: var(--accent-soft); }
.worker-state.online i { background: var(--accent); box-shadow: 0 0 0 4px rgba(22,163,106,.12); }
.worker-state.offline { color: var(--danger); border-color: #f5cbd4; background: var(--danger-soft); }
.worker-state.offline i { background: var(--danger); }
.admin-content { padding: 28px 32px 56px; }
.admin-stats { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 13px; margin-bottom: 22px; }
.admin-stats article { min-height: 126px; display: grid; align-content: center; gap: 5px; padding: 19px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.admin-stats span { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.admin-stats strong { font-size: 31px; letter-spacing: -.04em; }
.admin-stats small { color: var(--ink-muted); font-size: 10px; }
.admin-stats article.accent { color: var(--primary-dark); border-color: #d7d2ff; background: linear-gradient(145deg, #fff, #f2f0ff); }
.admin-stats article.danger strong { color: var(--danger); }
.admin-orders-panel { overflow: hidden; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px 24px; border-bottom: 1px solid var(--border); }
.admin-toolbar h2 { margin: 0; font-size: 20px; }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
.search-box { min-width: 220px; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.search-box svg { width: 17px; height: 17px; color: var(--ink-muted); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.toolbar-actions select { width: auto; min-width: 130px; height: 44px; padding: 0 35px 0 12px; color: var(--ink-soft); font-size: 12px; cursor: pointer; }
#adminRefresh { flex: 0 0 auto; min-width: 78px; }
.table-wrap { overflow-x: auto; }
.orders-table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.orders-table th { padding: 12px 14px; color: var(--ink-muted); background: #f9fafc; text-align: left; font-size: 10px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.orders-table td { padding: 15px 14px; border-top: 1px solid var(--border); color: var(--ink-soft); font-size: 11px; vertical-align: middle; }
.orders-table tbody tr:hover { background: #fcfcff; }
.table-order strong, .table-customer strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 12px; }
.table-order small, .table-customer small { display: block; max-width: 230px; overflow: hidden; color: var(--ink-muted); text-overflow: ellipsis; white-space: nowrap; }
.table-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.internal-status { display: grid; gap: 4px; }
.internal-status .status-badge { width: max-content; }
.internal-status small { max-width: 180px; overflow: hidden; color: var(--ink-muted); text-overflow: ellipsis; white-space: nowrap; }
.table-progress { min-width: 100px; }
.table-progress span { display: block; margin-bottom: 7px; color: var(--ink); font-size: 10px; font-weight: 800; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.table-button { min-height: 38px; padding: 0 10px; border: 1px solid #cfc9ff; color: var(--primary); background: var(--surface-tint); font-size: 10px; white-space: nowrap; }
.table-button:hover { color: #fff; border-color: var(--primary); background: var(--primary); }
.table-button.success { color: var(--accent); border-color: #bce6d2; background: var(--accent-soft); }
.table-button.success:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.table-button.danger { color: var(--danger); border-color: #f0c2cb; background: var(--danger-soft); }
.table-button.danger:hover { color: #fff; border-color: var(--danger); background: var(--danger); }
.admin-orders-panel .empty-state.compact { min-height: 210px; border: 0; border-radius: 0; box-shadow: none; }

.admin-visual { background: linear-gradient(145deg, #11102d, #231d5f 58%, #3b2fa7); }
.grid-decoration { position: absolute; inset: 0; opacity: .3; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px); background-size: 46px 46px; transform: perspective(500px) rotateX(52deg) translateY(-12%); transform-origin: bottom; }
.status-visual { position: absolute; right: 12%; top: 16%; width: 280px; padding: 25px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: rgba(17,15,50,.55); box-shadow: 0 25px 65px rgba(0,0,0,.3); backdrop-filter: blur(14px); }
.status-visual .signal { float: right; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #39df9a; box-shadow: 0 0 0 5px rgba(57,223,154,.12); }
.status-visual strong, .status-visual small { display: block; }
.status-visual strong { margin-bottom: 5px; font-size: 14px; }
.status-visual small { color: #9f99c9; font-size: 11px; }
.status-visual div { display: flex; align-items: end; gap: 9px; height: 80px; margin-top: 22px; }
.status-visual div i { flex: 1; border-radius: 7px 7px 2px 2px; background: linear-gradient(#796bed,#493db1); }
.status-visual div i:nth-child(1){height:35%}.status-visual div i:nth-child(2){height:68%}.status-visual div i:nth-child(3){height:50%}.status-visual div i:nth-child(4){height:88%}
.upload-progress-modal { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(19,16,46,.52); backdrop-filter: blur(4px); }
.upload-progress-card { width: min(390px, 100%); padding: 34px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-md); text-align: center; }
.upload-progress-card h3 { margin: 16px 0 7px; }
.upload-progress-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.spinner { width: 40px; height: 40px; margin: auto; border: 4px solid #e7e4ff; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .smart-layout { grid-template-columns: 1fr; }
  .smart-side { grid-template-columns: 1fr 1fr; }
  .generation-controls { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .order-card { grid-template-columns: 1fr .65fr 1fr auto; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-stats article:nth-child(4), .admin-stats article:nth-child(5) { min-height: 105px; }
}

@media (max-width: 860px) {
  .creative-input-grid { grid-template-columns: 1fr; }
  .creative-reference-zone { min-height: 150px; }
  .creative-reference-card, .creative-reference-add { width: calc(20% - 7px); }
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-wrap { min-height: 100vh; padding: 32px 24px; }
  .admin-shell { grid-template-columns: 76px minmax(0,1fr); }
  .admin-sidebar { padding: 18px 10px; }
  .admin-brand { justify-content: center; padding: 0; }
  .admin-brand > span:last-child, .admin-nav a { font-size: 0; }
  .admin-nav a { justify-content: center; padding: 0; }
  .admin-nav svg { width: 22px; height: 22px; }
  .sidebar-note { display: none; }
  .admin-topbar { padding: 14px 20px; }
  .admin-content { padding: 22px 18px 44px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-stats article:last-child { grid-column: 1 / -1; }
  .admin-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; flex-wrap: wrap; }
  .search-box { flex: 1; min-width: 180px; }
}

@media (max-width: 720px) {
  .topbar { min-height: 64px; padding: 0 16px; }
  .credit-pill span { display: none; }
  .credit-pill { width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .user-name { display: none; }
  .page-container { width: min(100% - 28px, 1180px); padding-top: 18px; }
  .workspace-grid { margin-top: 15px; }
  .smart-workspace { margin-top: 18px; }
  .smart-builder { padding: 18px 14px; }
  .smart-side { grid-template-columns: 1fr; }
  .creative-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creative-flow-header { align-items: flex-start; }
  .creative-flow-header h3 { font-size: 18px; }
  .creative-stepper { overflow-x: auto; grid-auto-columns: minmax(85px, 1fr); grid-template-columns: none; }
  .creative-stepper li { grid-row: 1; min-width: 85px; }
  .creative-step-card { min-height: 350px; padding: 17px 14px; }
  .creative-step-actions { display: grid; grid-template-columns: 1fr; }
  .creative-step-actions > * { width: 100%; }
  .cost-note { text-align: left; }
  .create-panel { padding: 21px 17px; }
  .material-section { padding: 15px 12px; }
  .material-heading { align-items: flex-start; }
  .material-heading p { max-width: 230px; }
  .material-card button, .video-reference-card > button, .audio-preview > button { opacity: 1; }
  .audio-preview { grid-template-columns: 1fr; }
  .generation-controls { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .control-pill:first-child { grid-column: 1 / -1; }
  .create-actions { grid-template-columns: 1fr; }
  .prompt-preview-modal { padding: 12px; }
  .prompt-preview-card { max-height: 94vh; border-radius: 18px; }
  .prompt-preview-header, .prompt-preview-body, .prompt-preview-footer { padding-left: 16px; padding-right: 16px; }
  .prompt-preview-copy { grid-template-columns: 1fr; }
  .prompt-preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .prompt-preview-specs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .prompt-preview-footer { align-items: stretch; flex-direction: column; }
  .prompt-preview-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .prompt-preview-actions > button { width: 100%; }
  .prompt-preview-actions .prompt-reuse-button { grid-column: 1 / -1; grid-row: 1; }
  .section-heading { margin-bottom: 20px; }
  .section-heading h2 { font-size: 21px; }
  .order-card { grid-template-columns: 1fr; gap: 13px; }
  .order-main p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .order-actions { min-width: 0; justify-content: stretch; }
  .order-history-actions { justify-content: stretch; }
  .order-prompt-button { flex: 1; min-height: 40px; }
  .download-button { width: 100%; }
  .orders-section { margin-top: 24px; }
  .toast { right: 16px; bottom: 16px; }
  .admin-topbar { align-items: flex-start; }
  .admin-topbar .topbar-actions { gap: 7px; }
  .worker-state span { display: none; }
  .worker-state { width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-stats article { min-height: 105px; padding: 15px; }
  .admin-toolbar { padding: 18px; }
  .toolbar-actions select { flex: 1; }
}

@media (max-width: 470px) {
  .brand { font-size: 16px; }
  .brand-mark { width: 36px; height: 36px; }
  .material-grid { gap: 8px; padding: 8px; }
  .material-card, .material-add { width: calc(33.333% - 6px); min-width: 78px; }
  .creative-reference-card, .creative-reference-add { width: calc(33.333% - 6px); }
  .creative-controls { grid-template-columns: 1fr; }
  .creative-flow-header { display: grid; grid-template-columns: 1fr; }
  .creative-flow-header .compact-button { width: 100%; }
  .material-card img { width: 100%; }
  .video-reference-card { min-width: 100%; }
  .audio-preview { min-width: 100%; }
  .generation-controls { gap: 7px; }
  .prompt-preview-grid { grid-template-columns: 1fr; }
  .login-form-wrap { padding: 24px 20px; }
  .login-brand { margin-bottom: 40px; }
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: 100%; height: 66px; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .admin-brand > span:last-child { display: none; }
  .admin-nav { display: flex; margin: 0; }
  .admin-nav a { width: 42px; min-height: 42px; }
  .admin-topbar { min-height: 72px; }
  .admin-topbar h1 { font-size: 20px; }
  .admin-content { padding: 16px 12px 36px; }
  .admin-stats { gap: 8px; }
  .admin-stats article { min-width: 0; }
  .admin-stats span, .admin-stats small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; width: 100%; }
}

/* Customer UI v2 · 胖包蓝白智能工作台 */
.customer-page {
  --ink: #1f2b43;
  --ink-soft: #56647d;
  --ink-muted: #8592a8;
  --primary: #3478ff;
  --primary-dark: #1e5fe8;
  --primary-soft: #eaf2ff;
  --surface-soft: #eef5ff;
  --surface-tint: #f3f7ff;
  --border: rgba(172, 197, 235, .42);
  --border-strong: #c9d8ee;
  --shadow-sm: 0 12px 30px rgba(66, 111, 179, .10);
  --shadow-md: 0 24px 60px rgba(51, 91, 157, .16);
  --radius: 18px;
  --radius-lg: 26px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 4%, rgba(107, 174, 255, .20), transparent 30%),
    radial-gradient(circle at 94% 20%, rgba(151, 127, 255, .13), transparent 28%),
    linear-gradient(145deg, #f8fbff 0%, #eef5ff 54%, #f8faff 100%);
  background-attachment: fixed;
}

.customer-page .app-shell {
  min-height: 100vh;
  padding-left: 92px;
}

.app-rail {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 9px 14px;
  border-right: 1px solid rgba(181, 204, 238, .56);
  background: rgba(250, 253, 255, .82);
  box-shadow: 8px 0 28px rgba(68, 110, 174, .06);
  backdrop-filter: blur(22px);
}
.rail-brand {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #1f2b43;
  font-size: 12px;
  font-weight: 900;
}
.rail-brand .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
.rail-nav {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 36px;
}
.rail-item {
  width: 100%;
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 7px 3px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #627089;
  background: transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}
.rail-item > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(230, 239, 253, .72);
}
.rail-item svg { width: 20px; height: 20px; }
.rail-item small { font-size: 10px; font-weight: 750; white-space: nowrap; }
.rail-item:hover { color: var(--primary-dark); background: rgba(235, 243, 255, .72); transform: translateY(-1px); }
.rail-item.active { color: var(--primary-dark); border-color: #c7dafe; background: #eef5ff; }
.rail-item.active > span { color: #fff; background: linear-gradient(145deg, #62adff, #3478ff); box-shadow: 0 8px 17px rgba(52,120,255,.25); }
.rail-bottom {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-top: auto;
}
.rail-credit {
  width: 72px;
  display: grid;
  gap: 2px;
  padding: 8px 4px;
  border: 1px solid #c9daf9;
  border-radius: 13px;
  color: #46617f;
  background: #f4f8ff;
  text-align: center;
}
.rail-credit span { font-size: 9px; }
.rail-credit strong { color: var(--primary-dark); font-size: 14px; }
.rail-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-top: 6px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #7ec8ff, #417dff);
  box-shadow: 0 6px 16px rgba(57,112,209,.22);
  font-size: 13px;
  font-weight: 900;
}
.rail-bottom > small { color: var(--ink-muted); font-size: 9px; }

.customer-page .topbar {
  min-height: 70px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(181, 204, 238, .45);
  background: rgba(249, 252, 255, .72);
  backdrop-filter: blur(20px);
}
.customer-page .topbar .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 16px; }
.brand-copy small { color: var(--ink-muted); font-size: 9px; font-weight: 650; letter-spacing: .04em; }
.customer-page .credit-pill {
  border-color: #c9dcff;
  color: #275eb7;
  background: rgba(238, 245, 255, .86);
}

.customer-page .page-container {
  width: min(1460px, calc(100% - 44px));
  padding: 24px 0 72px;
}

.customer-page .workspace-grid,
.customer-page .smart-layout { gap: 20px; }
.customer-page .workspace-grid { grid-template-columns: minmax(0, 2.15fr) minmax(292px, .62fr); margin-top: 20px; }
.customer-page .panel,
.customer-page .order-card {
  border-color: rgba(255,255,255,.95);
  background: rgba(255,255,255,.76);
  box-shadow: 0 14px 36px rgba(62,103,168,.09);
  backdrop-filter: blur(18px);
}
.customer-page .create-panel { padding: 27px; }
.customer-page .section-heading h2 { color: #202b41; }
.customer-page .eyebrow { color: #3478ff; letter-spacing: .12em; }
.customer-page .material-section,
.customer-page .prompt-composer,
.customer-page .creative-reference-zone,
.customer-page .creative-step-card {
  border-color: rgba(188,207,236,.65);
  background: rgba(247,250,255,.76);
}
.customer-page .material-grid {
  border-color: #c6d9f7;
  background: rgba(255,255,255,.82);
}
.customer-page .material-add,
.customer-page .creative-reference-add {
  border-color: #cfddf1;
  color: #527095;
  background: #f2f7ff;
}
.customer-page .material-add:hover,
.customer-page .creative-reference-add:hover {
  border-color: #82b5ff;
  color: #276cdb;
  background: #eaf3ff;
}
.customer-page .prompt-composer:focus-within,
.customer-page .field textarea:focus,
.customer-page .field input:focus {
  border-color: #66a5ff;
  box-shadow: 0 0 0 4px rgba(52,120,255,.11);
}
.customer-page .generation-controls,
.customer-page .creative-controls {
  border-color: rgba(192,211,239,.66);
  background: rgba(245,249,255,.86);
}
.customer-page .control-pill,
.customer-page .creative-controls > label {
  border-color: rgba(198,214,238,.76);
  background: rgba(255,255,255,.86);
}
.customer-page .primary-button {
  border-color: #3478ff;
  background: linear-gradient(135deg, #58a5ff, #3478ff 58%, #5068ff);
  box-shadow: 0 10px 22px rgba(52,120,255,.24);
}
.customer-page .primary-button:hover {
  border-color: #1e5fe8;
  background: linear-gradient(135deg, #3f93f5, #1e5fe8 62%, #4058e7);
}
.customer-page .secondary-button,
.customer-page .order-prompt-button {
  border-color: #c8d8ee;
  color: #526681;
  background: rgba(255,255,255,.86);
}
.customer-page .secondary-button:hover,
.customer-page .order-prompt-button:hover {
  border-color: #86b5fa;
  color: #2368d8;
  background: #eef5ff;
}
.customer-page .smart-side { position: sticky; top: 92px; }

.customer-page .smart-workspace { margin-top: 22px; }
.customer-page .creative-start-button { min-height: 54px; }
.customer-page .recent-creative-download { border-color: #c8dcff; color: #2869d5; background: #edf5ff; }

.customer-page .orders-section {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 22px;
  background: rgba(255,255,255,.50);
  box-shadow: 0 14px 36px rgba(62,103,168,.07);
  backdrop-filter: blur(16px);
}
.customer-page .order-card:hover { border-color: #b9d3fb; box-shadow: 0 16px 36px rgba(58,106,181,.13); transform: translateY(-1px); }
.customer-page .spec-tag { color: #536d8d; background: #eef4fc; }
.customer-page .progress-track i { background: linear-gradient(90deg, #4aa5ff, #4f68ff); }
.customer-page .download-button { border-color: #3478ff; background: #3478ff; }
.customer-page .download-button:hover { border-color: #1e5fe8; background: #1e5fe8; }
.customer-page .prompt-preview-modal { background: rgba(36,57,92,.42); }
.customer-page .prompt-preview-card { border-color: rgba(255,255,255,.8); background: rgba(255,255,255,.96); }

.customer-page .login-screen {
  grid-template-columns: minmax(520px, 1.45fr) minmax(430px, .72fr);
  background: #edf5ff;
}
.customer-page .login-visual {
  align-items: flex-start;
  justify-content: flex-end;
  padding: 8vh 4.5vw;
  color: #202b41;
}
.customer-page .login-visual::before {
  opacity: .45;
  background-image: radial-gradient(circle at 80% 15%, rgba(111,144,255,.22), transparent 24%);
  mask-image: none;
}
.customer-page .orb,
.customer-page .visual-card { display: none; }
.customer-page .login-message {
  max-width: 430px;
  padding: 25px 28px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 22px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 18px 45px rgba(57,99,161,.10);
  backdrop-filter: blur(16px);
}
.customer-page .login-message .eyebrow { color: #3478ff; }
.customer-page .login-message h1 { margin-bottom: 12px; font-size: clamp(34px, 3.6vw, 52px); }
.customer-page .login-message p { color: #65738b; font-size: 15px; }
.customer-page .login-form-wrap {
  padding: 44px;
  border-left: 1px solid rgba(191,210,239,.55);
  background: rgba(253,254,255,.84);
  backdrop-filter: blur(20px);
}
.customer-page .login-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid rgba(255,255,255,.96);
  border-radius: 24px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 24px 60px rgba(54,94,154,.13);
}
.customer-page .login-brand { margin-bottom: 38px; }
.customer-page .login-title h2 { color: #202b41; }

@media (max-width: 1180px) {
  .customer-page .workspace-grid { grid-template-columns: 1fr; }
  .customer-page .smart-layout { grid-template-columns: 1fr; }
  .customer-page .smart-side { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .customer-page .app-shell { padding-left: 0; padding-bottom: 72px; }
  .app-rail {
    inset: auto 10px 10px;
    width: auto;
    height: 62px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 46px;
    padding: 6px 8px;
    border: 1px solid rgba(185,205,236,.72);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(47,86,146,.17);
  }
  .rail-brand, .rail-bottom .rail-credit, .rail-bottom > small { display: none; }
  .rail-nav { grid-template-columns: repeat(3,1fr); gap: 5px; margin: 0; }
  .rail-item { min-height: 48px; grid-template-columns: auto auto; align-content: center; gap: 5px; border-radius: 12px; }
  .rail-item > span { width: 31px; height: 31px; }
  .rail-item small { font-size: 9px; }
  .rail-bottom { margin: 0; align-content: center; }
  .rail-avatar { width: 34px; height: 34px; margin: 0; }
  .customer-page .topbar { padding: 0 17px; }
  .customer-page .login-screen { grid-template-columns: 1fr; }
  .customer-page .login-visual { display: none; }
  .customer-page .login-form-wrap {
    min-height: 100vh;
    border-left: 0;
    background:
      linear-gradient(rgba(242,247,255,.82), rgba(242,247,255,.92)),
      url("/assets/yunyin-home-poster.png") center / cover no-repeat;
  }
}

@media (max-width: 720px) {
  .customer-page .page-container { width: min(100% - 24px, 1460px); padding-top: 14px; }
  .customer-page .topbar .brand-mark { display: none; }
  .brand-copy small { display: none; }
  .customer-page .create-panel { padding: 19px 14px; }
  .customer-page .smart-side { grid-template-columns: 1fr; }
  .customer-page .orders-section { padding: 17px 13px; border-radius: 18px; }
  .customer-page .login-form-wrap { padding: 24px 18px; }
  .customer-page .login-card { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .app-rail { grid-template-columns: minmax(0,1fr) 38px; }
  .rail-item { grid-template-columns: 1fr; gap: 1px; }
  .rail-item > span { width: 28px; height: 28px; }
  .rail-item small { display: none; }
}

/* Customer UI v3 · 对齐超级AI首页版式 */
.customer-page .topbar {
  display: none;
  position: fixed;
  z-index: 50;
  top: 12px;
  right: 22px;
  left: auto;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.customer-page .topbar > .brand { display: none; }
.customer-page .topbar-actions {
  gap: 9px;
  padding: 5px 7px 5px 12px;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 18px;
  background: rgba(249,252,255,.74);
  box-shadow: 0 8px 24px rgba(73,112,175,.10);
  backdrop-filter: blur(18px);
}
.customer-page .page-container {
  width: min(1480px, calc(100% - 72px));
  padding: 34px 0 76px;
}
.customer-page .app-rail {
  padding-top: 14px;
}
.customer-page .rail-nav {
  gap: 4px;
  margin-top: 22px;
}
.customer-page .rail-item {
  min-height: 64px;
}
.customer-page .rail-item > span {
  width: 34px;
  height: 34px;
}
.customer-page .rail-item.active {
  border-color: #a9c9ff;
  background: #eef4ff;
}
.app-view[hidden] { display: none !important; }

.home-view {
  min-height: calc(100vh - 110px);
  display: grid;
  align-content: center;
  gap: 8px;
}

.studio-view,
.tasks-view,
.inspiration-view {
  padding-top: 54px;
}
.view-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:30px;
  margin-bottom:28px;
  padding:30px 34px;
  border:1px solid rgba(255,255,255,.92);
  border-radius:24px;
  background:rgba(246,250,255,.72);
  box-shadow:var(--shadow-sm);
  backdrop-filter:blur(18px);
}
.view-heading h1 { margin:5px 0 7px; font-size:40px; color:#202b41; }
.view-heading p { margin:0; color:#6a768d; font-size:16px; }
.inspiration-filters {
  display:flex;
  gap:8px;
  margin-bottom:22px;
}
.inspiration-filters button {
  padding:10px 20px;
  border:1px solid #d3e0f3;
  border-radius:999px;
  color:#5a6880;
  background:rgba(255,255,255,.72);
  font-weight:750;
}
.inspiration-filters button.active {
  color:#fff;
  border-color:#3478ff;
  background:linear-gradient(135deg,#56a8ff,#4165ff);
  box-shadow:0 8px 18px rgba(52,120,255,.22);
}
.inspiration-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
}
.inspiration-card {
  overflow:hidden;
  border:1px solid rgba(255,255,255,.96);
  border-radius:22px;
  background:rgba(249,252,255,.82);
  box-shadow:0 12px 30px rgba(74,112,174,.11);
  backdrop-filter:blur(16px);
  transition:transform .2s ease,box-shadow .2s ease;
}
.inspiration-card:hover { transform:translateY(-4px); box-shadow:0 20px 38px rgba(74,112,174,.17); }
.inspiration-media {
  position:relative;
  aspect-ratio:16/10;
  overflow:hidden;
  background:#dfeafa;
}
.inspiration-media img,
.inspiration-media video { width:100%; height:100%; display:block; object-fit:cover; }
.inspiration-type {
  position:absolute;
  top:12px;
  left:12px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.8);
  border-radius:999px;
  color:#fff;
  background:rgba(26,43,75,.54);
  backdrop-filter:blur(9px);
  font-size:12px;
  font-weight:800;
}
.inspiration-card-body { padding:18px; }
.inspiration-card-title { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.inspiration-card-title h3 { margin:0 0 7px; color:#202b41; font-size:18px; }
.inspiration-card-title p {
  display:-webkit-box;
  overflow:hidden;
  margin:0;
  color:#6c788d;
  line-height:1.5;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.inspiration-card-title button {
  flex:0 0 auto;
  padding:8px 13px;
  border:0;
  border-radius:10px;
  color:#1769e8;
  background:#eaf2ff;
  font-weight:800;
}
.inspiration-meta { display:flex; align-items:center; gap:7px; margin-top:17px; color:#7c899c; font-size:12px; }
.inspiration-meta i { margin-left:auto; color:#3478ff; font-style:normal; font-weight:800; }
.inspiration-avatar { width:25px; height:25px; display:grid; place-items:center; border-radius:50%; color:#fff; background:linear-gradient(145deg,#75c0ff,#4b6dff); font-weight:900; }
.inspiration-empty {
  min-height:340px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  color:#7b879b;
  text-align:center;
}
.inspiration-empty span { color:#5b83ff; font-size:46px; }
.inspiration-empty h3,.inspiration-empty p { margin:0; }
.order-prompt-button.publish,
.publish-work-button { color:#1769e8 !important; border-color:#c6d9fb !important; background:#edf4ff !important; }
.rail-logout {
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  margin-top:2px;
  border:1px solid #d2def0;
  border-radius:10px;
  color:#738198;
  background:#f8fbff;
}
.rail-logout:hover { color:#3478ff; border-color:#b9d0f6; }
.rail-logout svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }

.publish-modal {
  position:fixed;
  z-index:120;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(26,39,66,.38);
  backdrop-filter:blur(8px);
}
.publish-modal[hidden] { display:none; }
.publish-card {
  width:min(680px,100%);
  max-height:calc(100vh - 48px);
  overflow:auto;
  border:1px solid rgba(255,255,255,.95);
  border-radius:24px;
  background:#f8fbff;
  box-shadow:0 30px 80px rgba(24,55,104,.28);
}
.publish-card > header,
.publish-card > footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:22px 26px; }
.publish-card > header { border-bottom:1px solid #dce6f4; }
.publish-card > header h2 { margin:5px 0 0; color:#202b41; }
.publish-card > footer { justify-content:flex-end; border-top:1px solid #dce6f4; }
.publish-body { display:grid; gap:18px; padding:24px 26px; }
.publish-body .field { margin:0; }
.publish-body .field small { color:#7b879b; }
.publish-preview { max-height:290px; overflow:hidden; border:1px solid #d7e2f2; border-radius:16px; background:#eaf1fb; }
.publish-preview img,.publish-preview video { width:100%; max-height:290px; display:block; object-fit:contain; }

.home-view {
  align-content:start;
  gap:26px;
}

@media (max-width: 1280px) {
  .customer-page .page-container { width:min(1180px,calc(100% - 42px)); }
}
@media (max-width: 900px) {
  .customer-page .topbar { display:flex; top:8px; right:12px; }
  .customer-page .topbar-actions .user-name { display:none; }
  .customer-page .app-rail {
    display:grid;
    grid-template-columns:1fr;
    height:64px;
    padding:6px;
  }
  .customer-page .rail-nav { grid-template-columns:repeat(5,1fr); }
  .customer-page .rail-item { min-height:50px; grid-template-columns:1fr; gap:1px; }
  .customer-page .rail-item > span { width:30px; height:30px; }
  .customer-page .rail-item small { font-size:9px; }
  .customer-page .rail-bottom { display:none; }
  .home-view { align-content:start; }
  .inspiration-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .studio-view,.tasks-view,.inspiration-view { padding-top:72px; }
}
@media (max-width: 640px) {
  .customer-page .page-container { width:calc(100% - 24px); }
  .customer-page .credit-pill span { font-size:0; }
  .customer-page .credit-pill strong { font-size:13px; }
  .view-heading { align-items:flex-start; padding:22px; }
  .view-heading h1 { font-size:32px; }
  .view-heading .primary-button { padding:10px 13px; }
  .inspiration-grid { grid-template-columns:1fr; }
  .inspiration-filters { overflow:auto; }
  .publish-modal { padding:10px; }
  .publish-card > header,.publish-card > footer,.publish-body { padding:18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 云印管家 · 清爽紧凑工作台 */
.customer-page {
  --ink:#15253b;
  --ink-soft:#536579;
  --ink-muted:#8292a4;
  --primary:#168dcc;
  --primary-dark:#0875ac;
  --primary-soft:#e9f7fd;
  --accent:#16a982;
  --accent-soft:#e8f8f3;
  --surface-soft:#f5f8fb;
  --surface-tint:#f1f8fb;
  --border:#dce8ef;
  --border-strong:#c7d9e4;
  --shadow-sm:0 8px 24px rgba(36,81,111,.07);
  --shadow-md:0 18px 48px rgba(36,81,111,.11);
  background:#f5f8fb;
}

/* 积分与人工充值 */
.credit-pill,
.rail-credit {
  font: inherit;
  cursor: pointer;
}
.credit-pill {
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.credit-pill:hover,
.rail-credit:hover {
  border-color: #8ec8eb;
  background: #eef9ff;
  transform: translateY(-1px);
}
.credit-pill small {
  padding-left: 7px;
  border-left: 1px solid #c9dcec;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}
.recharge-modal {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 45, 70, .4);
  backdrop-filter: blur(8px);
}
.recharge-modal[hidden] { display: none; }
.recharge-card {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.94);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 75px rgba(23, 52, 83, .24);
}
.recharge-card > header,
.recharge-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 24px;
}
.recharge-card > header { border-bottom: 1px solid #e2ebf2; }
.recharge-card > header h2 { margin: 2px 0 0; font-size: 21px; }
.recharge-card > footer {
  justify-content: flex-end;
  border-top: 1px solid #e2ebf2;
}
.recharge-body { display: grid; gap: 12px; padding: 22px 24px; }
.recharge-balance,
.recharge-rate,
.recharge-contact {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid #dce8ef;
  border-radius: 14px;
  background: #f8fbfd;
}
.recharge-balance span,
.recharge-rate span,
.recharge-contact span {
  color: #8292a4;
  font-size: 11px;
  font-weight: 700;
}
.recharge-balance strong { color: #0875ac; font-size: 22px; }
.recharge-rate strong { color: #15253b; font-size: 15px; }
.recharge-contact p {
  margin: 0;
  color: #344b62;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}
.recharge-account {
  margin: 2px 0 0;
  color: #687b8f;
  font-size: 12px;
}

/* 商家积分后台 */
.credit-admin-panel {
  margin-top: 22px;
  overflow: hidden;
  scroll-margin-top: 18px;
}
.credit-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.credit-summary > span {
  padding: 8px 11px;
  border: 1px solid #e0ddf8;
  border-radius: 999px;
  color: #69637f;
  background: #faf9ff;
  font-size: 11px;
}
.credit-summary strong { color: #332b8f; }
.credit-admin-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 420px;
}
.credit-recharge-form {
  padding: 24px;
  border-right: 1px solid var(--border);
  background: #fbfbfe;
}
.credit-recharge-form h3,
.credit-ledger-heading h3 { margin: 0; font-size: 17px; }
.credit-recharge-form > div:first-child p {
  margin: 7px 0 21px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.6;
}
.credit-recharge-form label { display: grid; gap: 7px; margin-bottom: 15px; }
.credit-recharge-form label > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}
.credit-recharge-form select,
.credit-recharge-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
.credit-recharge-form select:focus,
.credit-recharge-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,64,232,.11);
}
.credit-points-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 15px;
  padding: 13px;
  border: 1px solid #d4d0fb;
  border-radius: 11px;
  color: var(--ink-soft);
  background: #f3f1ff;
  font-size: 11px;
}
.credit-points-preview strong { color: var(--primary-dark); font-size: 15px; }
.credit-recharge-form .primary-button { width: 100%; justify-content: center; }
.credit-recharge-form .form-message { min-height: 18px; margin: 9px 0 0; }
.credit-ledger { min-width: 0; }
.credit-ledger-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px;
  border-bottom: 1px solid var(--border);
}
.credits-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.credits-table th {
  padding: 11px 12px;
  color: var(--ink-muted);
  background: #f9fafc;
  text-align: left;
  font-size: 10px;
  white-space: nowrap;
}
.credits-table td {
  padding: 13px 12px;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 11px;
}
.credit-delta.positive { color: var(--accent); }
.credit-delta.negative { color: var(--danger); }
.credit-record {
  display: block;
  max-width: 250px;
  overflow: hidden;
  color: var(--ink-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1050px) {
  .credit-admin-grid { grid-template-columns: 1fr; }
  .credit-recharge-form { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* 商家账号管理 */
.account-admin-panel {
  margin-top: 22px;
  overflow: hidden;
  scroll-margin-top: 18px;
}
.account-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .65fr);
  min-height: 430px;
}
.customer-account-panel { min-width: 0; border-right: 1px solid var(--border); }
.account-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
}
.account-section-heading h3,
.administrator-account-form h3,
.account-modal-heading h3 { margin: 0; font-size: 17px; }
.account-count {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--surface-tint);
  font-size: 11px;
}
.account-create-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
  gap: 10px;
  padding: 0 22px 15px;
}
.account-create-form label,
.administrator-account-form label,
.account-modal-card label { display: grid; gap: 7px; }
.account-create-form label > span,
.administrator-account-form label > span,
.account-modal-card label > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}
.account-create-form input,
.administrator-account-form input,
.account-modal-card input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}
.account-create-form input:focus,
.administrator-account-form input:focus,
.account-modal-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(77,64,232,.11);
}
.account-create-form .primary-button { min-width: 108px; justify-content: center; }
#customerCreateMessage { min-height: 18px; margin: 0 22px 8px; }
.accounts-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.accounts-table th {
  padding: 11px 13px;
  color: var(--ink-muted);
  background: #f9fafc;
  text-align: left;
  font-size: 10px;
  white-space: nowrap;
}
.accounts-table td {
  padding: 13px;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 11px;
}
.account-username {
  padding: 5px 8px;
  border-radius: 7px;
  color: #3f388c;
  background: #f4f2ff;
  font-family: var(--font-ui);
  font-size: 11px;
}
.administrator-account-form {
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 23px;
  background: #fbfbfe;
}
.administrator-account-form > div:first-child p {
  margin: 7px 0 3px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.6;
}
.administrator-account-form .primary-button { width: 100%; justify-content: center; }
.administrator-account-form .form-message { margin: -6px 0 0; }
body.modal-open { overflow: hidden; }
.account-modal {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19,16,46,.52);
  backdrop-filter: blur(4px);
}
.account-modal-card {
  width: min(480px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.account-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.account-modal-heading .icon-button { border: 0; color: var(--ink-muted); background: #f4f5f8; font-size: 22px; }
.account-security-note { margin: -3px 0 0; color: var(--ink-muted); font-size: 11px; line-height: 1.6; }
.account-modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.account-modal-actions > button { min-width: 100px; justify-content: center; }
@media (max-width: 1180px) {
  .account-admin-grid { grid-template-columns: 1fr; }
  .customer-account-panel { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 850px) {
  .account-create-form { grid-template-columns: 1fr 1fr; }
  .account-create-form .primary-button { width: 100%; }
}
@media (max-width: 560px) {
  .account-create-form { grid-template-columns: 1fr; }
  .account-section-heading { align-items: flex-start; }
}

.customer-page :focus-visible { outline-color:rgba(22,141,204,.28); }
.customer-page .app-shell { padding-left:80px; }
.customer-page .app-rail {
  width:80px;
  padding:12px 8px;
  border-right-color:#e3ebf0;
  background:rgba(255,255,255,.96);
  box-shadow:none;
  backdrop-filter:none;
}
.customer-page .rail-brand { gap:4px; color:#17344c; }
.customer-page .rail-brand .brand-mark { width:38px; height:38px; border-radius:12px; }
.customer-page .brand-mark {
  color:#fff;
  background:linear-gradient(145deg,#35b6d0,#168dcc);
  box-shadow:0 7px 16px rgba(22,141,204,.20);
}
.customer-page .brand-mark svg path {
  fill:none !important;
  stroke:currentColor !important;
}
.customer-page .rail-nav { gap:2px; margin-top:22px; }
.customer-page .rail-item {
  min-height:58px;
  gap:2px;
  border-radius:12px;
}
.customer-page .rail-item > span { width:31px; height:31px; border-radius:10px; background:#f0f6f9; }
.customer-page .rail-item small { font-size:9px; }
.customer-page .rail-item:hover { color:var(--primary-dark); background:#f2f8fb; transform:none; }
.customer-page .rail-item.active { border-color:#c9e4ef; background:#edf8fc; }
.customer-page .rail-item.active > span {
  background:linear-gradient(145deg,#3bbad1,#168dcc);
  box-shadow:0 6px 14px rgba(22,141,204,.22);
}
.customer-page .rail-credit {
  width:62px;
  padding:6px 4px;
  border-color:#d3e5ed;
  color:#5d7182;
  background:#f7fbfc;
}
.customer-page .rail-credit strong { color:var(--primary-dark); }
.customer-page .rail-avatar { background:linear-gradient(145deg,#42c0c6,#168dcc); }
.customer-page .topbar {
  min-height:60px;
  padding:0 20px;
  border-bottom-color:#e1ebf0;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(12px);
}
.customer-page .credit-pill { border-color:#d4e7ee; color:#216f91; background:#f0f9fc; }
.customer-page .page-container {
  width:min(1280px,calc(100% - 32px));
  padding:18px 0 46px;
}
.customer-page .panel,
.customer-page .view-heading {
  border-color:#dce8ef;
  background:#fff;
  box-shadow:var(--shadow-sm);
  backdrop-filter:none;
}
.customer-page .primary-button {
  background:linear-gradient(135deg,#23a7d0,#168dcc);
  box-shadow:0 8px 18px rgba(22,141,204,.18);
}
.customer-page .primary-button:hover { box-shadow:0 10px 22px rgba(22,141,204,.24); }
.customer-page .secondary-button { border-color:#cfdee7; color:#31546a; background:#fff; }
.customer-page select,
.customer-page input,
.customer-page textarea { border-color:#d5e3eb; }
.customer-page select:focus,
.customer-page input:focus,
.customer-page textarea:focus { border-color:#74bddc; box-shadow:0 0 0 3px rgba(22,141,204,.10); }

.home-view {
  min-height:calc(100vh - 64px);
  display:flex;
  align-items:center;
}
.cloud-home-poster {
  width:100%;
  min-height:clamp(360px,38vw,520px);
  position:relative;
  overflow:hidden;
  border:1px solid #dbe8ef;
  border-radius:24px;
  background:#fff;
  box-shadow:0 16px 44px rgba(45,91,120,.10);
}
.cloud-home-poster > img {
  width:100%;
  height:100%;
  position:absolute;
  inset:0;
  object-fit:cover;
  object-position:center;
}
.cloud-home-poster::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(255,255,255,.46) 0%,rgba(255,255,255,.10) 43%,transparent 65%);
  pointer-events:none;
}
.cloud-home-copy {
  position:absolute;
  z-index:1;
  top:50%;
  left:7%;
  transform:translateY(-50%);
}
.cloud-home-copy > span {
  display:inline-flex;
  padding:7px 12px;
  border:1px solid #cfe7ef;
  border-radius:999px;
  color:#147ba9;
  background:rgba(255,255,255,.82);
  font-size:13px;
  font-weight:750;
  letter-spacing:.08em;
}
.cloud-home-copy h1 {
  margin:18px 0 0;
  color:#18324a;
  font-size:clamp(42px,4.7vw,72px);
  line-height:1.12;
  letter-spacing:-.055em;
}
.cloud-home-copy h1 em {
  color:#1099ba;
  font-style:normal;
}

.customer-page .workspace-grid { display:block; margin-top:0; }
.customer-page .create-panel {
  width:min(1040px,100%);
  margin:0 auto;
  padding:20px 22px 22px;
  border-radius:18px;
}
.customer-page .section-heading { margin-bottom:14px; }
.customer-page .section-heading h2 { font-size:20px; letter-spacing:-.02em; }
.customer-page .material-section { padding:14px; border-radius:14px; background:#f8fbfc; }
.customer-page .material-heading { margin-bottom:10px; }
.customer-page .material-heading h3 { font-size:14px; }
.customer-page .material-add {
  min-height:76px;
  border-color:#d5e4eb;
  border-radius:12px;
  background:#fff;
}
.customer-page .material-add svg { width:20px; height:20px; }
.customer-page .material-add strong { font-size:12px; }
.customer-page .material-add small { font-size:9px; }
.customer-page .prompt-field { margin-top:14px; }
.customer-page .prompt-field > label { margin-bottom:7px; }
.customer-page .prompt-composer { border-color:#d5e3eb; border-radius:13px; }
.customer-page .prompt-composer textarea { min-height:142px; padding:14px; }
.customer-page .composer-footer { min-height:40px; padding:5px 8px; }
.customer-page .generation-controls {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:12px 0;
  padding:0;
  border:0;
  background:transparent;
}
.customer-page .control-pill { min-height:52px; padding:8px 10px; border-radius:11px; background:#f8fbfc; }
.customer-page .control-pill span { font-size:9px; }
.customer-page .control-pill select { font-size:12px; }
.customer-page .create-actions { gap:8px; margin-top:12px; }
.customer-page .create-actions .secondary-button { flex:0 0 190px; }
.customer-page .create-actions .primary-button { min-height:46px; }
.field-count { margin-top:5px; color:var(--ink-muted); font-size:10px; text-align:right; }

.smart-workspace { padding-top:0; }
.customer-page .smart-layout {
  grid-template-columns:minmax(0,1fr) 260px;
  gap:12px;
  margin-top:0;
}
.customer-page .smart-builder { padding:18px; border-radius:18px; }
.customer-page .creative-input-grid { gap:12px; margin-top:14px; }
.customer-page .creative-product-section,
.customer-page .creative-brief-field { padding:14px; border-radius:14px; }
.customer-page .creative-reference-add { min-height:88px; border-radius:12px; }
.customer-page .creative-reference-add strong { font-size:12px; }
.customer-page .creative-brief-field textarea { min-height:132px; }
.customer-page .creative-controls { gap:8px; margin-top:12px; }
.customer-page .creative-controls > * { min-height:50px; padding:8px 10px; border-radius:11px; }
.customer-page .creative-start-button { min-height:46px; margin-top:12px; }
.customer-page .smart-side { gap:12px; }
.customer-page .recent-creative-panel { padding:14px; border-radius:16px; }
.customer-page .recent-creative-heading { margin-bottom:10px; }
.customer-page .recent-creative-heading h3 { font-size:16px; }
.customer-page .recent-creative-list { gap:7px; }
.customer-page .recent-creative-item { padding:9px; border-radius:10px; }

.customer-page .view-heading { padding:20px 22px; border-radius:18px; }
.customer-page .view-heading h1 { margin-top:3px; font-size:28px; }
.customer-page .view-heading p { display:none; }
.customer-page .inspiration-filters { margin:12px 0; }
.customer-page .orders-section { padding-top:0; }
.customer-page .order-card { border-radius:14px; box-shadow:0 5px 16px rgba(36,81,111,.05); }

.customer-page .login-screen { background:#f5f9fb; }
.customer-page .login-visual {
  background:
    linear-gradient(90deg,rgba(255,255,255,.10),rgba(255,255,255,.02)),
    url("/assets/yunyin-home-poster.png") center / cover no-repeat;
}
.customer-page .login-visual::after { background:linear-gradient(90deg,rgba(14,78,105,.28),rgba(14,78,105,.02)); }
.customer-page .login-visual .orb,
.customer-page .login-visual .visual-card { display:none; }
.customer-page .login-message { color:#173c54; text-shadow:none; }
.customer-page .login-message h1 { max-width:620px; color:#173c54; font-size:clamp(40px,4.4vw,68px); }
.customer-page .login-message .eyebrow { color:#0875ac; }
.customer-page .login-card { border-color:#dce8ef; box-shadow:0 18px 50px rgba(36,81,111,.10); }

@media (max-width:1080px) {
  .customer-page .smart-layout { grid-template-columns:1fr; }
  .customer-page .smart-side { display:block; }
  .customer-page .recent-creative-panel { margin-top:12px; }
}
@media (max-width:900px) {
  .customer-page .app-shell { padding-left:0; padding-bottom:72px; }
  .customer-page .page-container { padding-top:74px; }
  .home-view { min-height:calc(100vh - 150px); }
  .cloud-home-poster { min-height:500px; }
  .cloud-home-poster > img { object-position:62% center; }
  .cloud-home-poster::after { background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(255,255,255,.10) 54%,rgba(255,255,255,.02)); }
  .cloud-home-copy { top:42px; left:34px; transform:none; }
  .cloud-home-copy h1 { font-size:48px; }
  .studio-view,.tasks-view,.inspiration-view { padding-top:0; }
}
@media (max-width:640px) {
  .customer-page .page-container { width:calc(100% - 20px); padding-bottom:30px; }
  .cloud-home-poster { min-height:480px; border-radius:18px; }
  .cloud-home-poster > img { object-position:64% center; }
  .cloud-home-copy { top:28px; left:22px; right:18px; }
  .cloud-home-copy > span { padding:6px 10px; font-size:11px; }
  .cloud-home-copy h1 { margin-top:12px; font-size:39px; }
  .customer-page .create-panel,
  .customer-page .smart-builder { padding:14px; border-radius:14px; }
  .customer-page .generation-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-page .create-actions { flex-direction:column; }
  .customer-page .create-actions .secondary-button { flex:auto; width:100%; }
  .customer-page .creative-input-grid { grid-template-columns:1fr; }
  .customer-page .creative-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Customer UI v5 · 普通/进阶视频 + 独立图片创作 */
.customer-page .studio-view { padding-top:18px; }
.customer-page .generation-controls { grid-template-columns:repeat(3,minmax(0,1fr)); }
.customer-page .advanced-video-status {
  margin-top:12px;
  padding:13px 14px;
  border:1px solid #cfe4ec;
  border-radius:13px;
  background:#f5fbfd;
}
.advanced-status-heading {
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
}
.advanced-status-heading > span:nth-child(2) { display:grid; gap:2px; }
.advanced-status-heading strong { color:#21475b; font-size:13px; }
.advanced-status-heading small { color:#81929c; font-size:10px; }
.advanced-status-heading b { color:#168dcc; font-size:12px; }
.advanced-status-icon {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  color:#fff;
  background:linear-gradient(145deg,#3fc3c5,#168dcc);
  font-weight:900;
}
.advanced-status-icon.completed { background:#21a87a; }
.advanced-status-icon.failed { background:#e86772; }
.advanced-status-track {
  height:5px;
  overflow:hidden;
  margin:11px 0 8px 44px;
  border-radius:999px;
  background:#dfebef;
}
.advanced-status-track i {
  height:100%;
  display:block;
  border-radius:inherit;
  background:linear-gradient(90deg,#35bcb9,#168dcc);
  transition:width .3s ease;
}
.advanced-status-steps {
  display:flex;
  gap:6px;
  margin-left:44px;
}
.advanced-status-steps span {
  padding:3px 7px;
  border-radius:999px;
  color:#8a99a2;
  background:#edf3f5;
  font-size:9px;
  font-weight:750;
}
.advanced-status-steps span.done { color:#147999; background:#dff4f8; }
.advanced-status-error { margin:9px 0 0 44px; color:#bd4853; font-size:11px; }
.advanced-status-actions {
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-top:10px;
}
.advanced-status-actions .primary-button,
.advanced-status-actions .secondary-button { min-height:34px; padding:7px 11px; font-size:11px; }
.text-button {
  padding:5px 8px;
  border:0;
  color:#71848f;
  background:transparent;
  font-size:11px;
}
.customer-page .image-create-heading { margin-bottom:12px; }
.customer-page .image-create-heading p { margin:3px 0 0; color:#7b8d98; font-size:11px; }
.customer-page .image-creative-controls {
  width:min(260px,100%);
  grid-template-columns:1fr;
}
.customer-page .smart-builder { padding:20px; }
.customer-page .video-submit-group {
  min-width:0;
  display:grid;
  grid-template-columns:200px minmax(0,1fr);
  gap:10px;
}
.customer-page .video-mode-switch {
  min-width:0;
  min-height:54px;
  margin:0;
  padding:5px;
  border:1px solid #cfe0e8;
  border-radius:13px;
  background:#f4f8fa;
}
.customer-page .video-mode-switch legend {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}
.customer-page .video-mode-options {
  height:100%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px;
}
.customer-page .video-mode-option {
  position:relative;
  min-width:0;
  min-height:42px;
  display:grid;
  place-items:center;
  border-radius:9px;
  color:#71818d;
  cursor:pointer;
  transition:color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.customer-page .video-mode-option:hover {
  color:#173e53;
  background:rgba(255,255,255,.74);
}
.customer-page .video-mode-option.selected {
  color:#116d91;
  background:#fff;
  box-shadow:0 2px 8px rgba(35,91,116,.10);
}
.customer-page .video-mode-option input {
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.customer-page .video-mode-option span {
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}
.customer-page .video-mode-option:has(input:focus-visible) {
  outline:3px solid rgba(22,141,204,.18);
  outline-offset:1px;
}

@media (max-width:640px) {
  .customer-page .studio-view { padding-top:4px; }
  .customer-page .video-mode-options { grid-template-columns:1fr; }
  .customer-page .generation-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-page .generation-controls .resolution-pill { grid-column:1 / -1; }
  .advanced-status-track,
  .advanced-status-steps,
  .advanced-status-error { margin-left:0; }
  .advanced-status-actions { flex-wrap:wrap; }
  .customer-page .video-submit-group { grid-template-columns:1fr; }
}
