/* ============================================================
   ScanPro — design tokens
   ============================================================ */
:root {
  --ink: #0d1526;
  --ink-soft: #334155;
  --muted: #6b7a90;
  --line: #e5eaf2;
  --line-strong: #d3dbe8;
  --bg: #f6f8fb;
  --card: #ffffff;
  --brand: #2f6bff;
  --brand-strong: #1f54e0;
  --brand-soft: #ecf1ff;
  --accent: #00c2a8;
  --ok: #0f9d6e;
  --danger: #e0405b;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, .04), 0 10px 26px -18px rgba(13, 21, 38, .32);
  --shadow-md: 0 18px 48px -24px rgba(13, 21, 38, .35);
  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(47, 107, 255, .18); }

/* ============================================================
   Auth page
   ============================================================ */
.auth-body {
  background:
    radial-gradient(900px 520px at 8% -8%, #e8efff 0%, transparent 62%),
    radial-gradient(700px 480px at 100% 100%, #e6fbf6 0%, transparent 55%),
    var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, .95fr);
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 40px 52px 30px;
  color: #e9eefc;
  background: linear-gradient(152deg, #070d1a 0%, #0c1730 46%, #12203f 100%);
  isolation: isolate;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 70%;
  background: radial-gradient(560px 340px at 28% 34%, rgba(47, 107, 255, .42), transparent 70%);
  filter: blur(8px);
  z-index: -1;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 32% 26%, #000 22%, transparent 76%);
  mask-image: radial-gradient(circle at 32% 26%, #000 22%, transparent 76%);
}

.brand-row { display: flex; align-items: center; gap: 12px; }

.logo-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #4d84ff, #1b47c8);
  box-shadow: 0 8px 22px -8px rgba(47, 107, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .28);
  color: #fff;
  flex: none;
}
.logo-mark svg { width: 21px; height: 21px; }

.brand-name { display: flex; align-items: baseline; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-name span { font-size: 12px; font-weight: 500; color: rgba(233, 238, 252, .56); letter-spacing: .12em; }

.brand-hero { margin-top: 26px; max-width: 520px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: rgba(233, 238, 252, .78);
  background: rgba(255, 255, 255, .04);
}

.brand-hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 3.5vw, 50px);
  line-height: 1.13;
  letter-spacing: -.025em;
  font-weight: 700;
}

.brand-hero p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(233, 238, 252, .62);
  max-width: 400px;
}

.points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.points li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(233, 238, 252, .82); }
.points i {
  width: 20px; height: 20px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 194, 168, .14);
  color: var(--accent);
  font-style: normal;
  font-size: 11px;
}

.brand-stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.paper-stack {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 320px;
  height: 312px;
  transition: transform .5s ease;
}
.auth-brand:hover .paper-stack { transform: translateY(-4px); }

.paper {
  position: absolute;
  width: 200px; height: 268px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 26px 60px -30px rgba(0, 0, 0, .8);
}
.paper.p3 { left: 28px; top: 44px; transform: rotate(-10deg); opacity: .28; }
.paper.p2 { left: 60px; top: 22px; transform: rotate(-5deg); opacity: .55; }
.paper.p1 {
  left: 92px; top: 2px; transform: rotate(2deg);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 9px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.paper.p1::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(47, 107, 255, .05));
}

.paper-line { display: block; height: 7px; border-radius: 4px; background: #e9eef7; }
.paper-line.w92 { width: 92%; }
.paper-line.w70 { width: 70%; }
.paper-line.w54 { width: 54%; }
.paper-line.head { height: 12px; width: 62%; background: linear-gradient(90deg, #cfe0ff, #e6efff); margin-bottom: 6px; }
.paper-line.block { height: 58px; width: 100%; background: #eef3fb; margin: 4px 0 6px; border-radius: 8px; }

.scan-beam {
  position: absolute;
  left: -10%; right: -10%;
  height: 2px;
  top: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 194, 168, .95), rgba(47, 107, 255, .95), transparent);
  box-shadow: 0 0 18px 4px rgba(0, 194, 168, .45);
  animation: scan 4.2s cubic-bezier(.5, 0, .5, 1) infinite;
}
@keyframes scan {
  0% { top: 10%; opacity: 0; }
  12% { opacity: 1; }
  62% { top: 86%; opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

.brand-foot { font-size: 11.5px; color: rgba(233, 238, 252, .34); letter-spacing: .04em; }

/* auth panel */
.auth-panel { display: grid; place-items: center; padding: 40px 32px; }
.auth-card { width: 100%; max-width: 392px; }
.auth-card header { margin-bottom: 26px; }
.auth-card h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.02em; font-weight: 700; }
.auth-card header p { margin: 0; color: var(--muted); font-size: 13.5px; }

.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #eef1f7;
  border-radius: 12px;
  margin-bottom: 24px;
}
.seg-tabs button {
  padding: 9px 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: all .18s ease;
}
.seg-tabs button.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(13, 21, 38, .06), 0 4px 12px -6px rgba(13, 21, 38, .2);
}

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 500; color: var(--ink-soft); margin-bottom: 7px; }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input::placeholder { color: #9aa8bd; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 107, 255, .12); }

.form-error {
  min-height: 18px;
  margin: 2px 0 12px;
  font-size: 12.5px;
  color: var(--danger);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(180deg, #3f79ff, var(--brand-strong));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px -12px rgba(47, 107, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 14px 30px -12px rgba(47, 107, 255, .9); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; filter: none; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  font-size: 14px; font-weight: 500;
  transition: border-color .16s ease, color .16s ease;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.legal { margin: 18px 0 0; font-size: 11.5px; color: #9aa8bd; line-height: 1.6; text-align: center; }

/* ============================================================
   App shell
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.app-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.app-brand .logo-mark { width: 34px; height: 34px; border-radius: 10px; }
.app-brand .logo-mark svg { width: 18px; height: 18px; }
.app-brand em { font-style: normal; font-size: 11px; letter-spacing: .14em; color: var(--muted); font-weight: 500; }

.nav-pill {
  margin-left: 10px;
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #eef1f7;
  border-radius: 10px;
}
.nav-pill button {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  transition: all .16s ease;
}
.nav-pill button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(13, 21, 38, .1); }

.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #63a0ff, #2f6bff);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
}
.user-name { font-size: 13px; color: var(--ink-soft); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--muted);
  transition: background .16s ease, color .16s ease;
}
.icon-btn:hover { background: #eef1f7; color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

/* workspace */
.workspace {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 22px;
  align-items: start;
}

.work-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 214px;
  padding: 28px;
  background: #fff;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dropzone:hover { border-color: #a9c1ff; background: #fdfdff; }
.dropzone.dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: scale(1.004);
}
.dropzone h2 { margin: 10px 0 2px; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.dropzone p { margin: 0; font-size: 12.5px; color: var(--muted); }
.dropzone .browse { color: var(--brand); font-weight: 600; cursor: pointer; }

.upload-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 4px;
}
.upload-icon svg { width: 25px; height: 25px; }

.dz-meta { margin-top: 10px; display: flex; gap: 16px; font-size: 11.5px; color: #93a1b5; }
.dz-meta span { display: inline-flex; align-items: center; gap: 5px; }
.dz-meta i { width: 4px; height: 4px; border-radius: 50%; background: #c4cedd; font-style: normal; }

/* queue */
.queue-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.queue-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f4f9;
}
.queue-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.queue-count { font-size: 11.5px; color: var(--muted); background: #f2f5fa; padding: 2px 8px; border-radius: 999px; }
.queue-head .spacer { flex: 1; }
.link-btn { font-size: 12px; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.link-btn:hover { color: var(--danger); background: #fdf0f2; }

.queue-list { list-style: none; margin: 0; padding: 0 18px; }

.q-item {
  display: grid;
  grid-template-columns: 26px 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f4f6fa;
  animation: rise .24s ease both;
}
.q-item:last-child { border-bottom: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.q-index {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: #f2f5fa;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.q-thumb {
  width: 52px; height: 52px;
  border-radius: 9px;
  object-fit: cover;
  background: #f2f5fa;
  border: 1px solid var(--line);
}

.q-info { min-width: 0; }
.q-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

.q-actions { display: flex; align-items: center; gap: 2px; opacity: .55; transition: opacity .15s ease; }
.q-item:hover .q-actions { opacity: 1; }
.q-actions .icon-btn { width: 27px; height: 27px; border-radius: 7px; }
.q-actions .icon-btn svg { width: 14px; height: 14px; }
.q-actions .danger:hover { background: #fdf0f2; color: var(--danger); }

/* side panel */
.work-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.panel h3 {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel h3:not(:first-child) { margin-top: 20px; }

.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.format-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 11px 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: all .16s ease;
}
.format-card:hover { border-color: #b9caf5; }
.format-card.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .08);
}
.format-card[disabled] { opacity: .45; cursor: not-allowed; }
.fc-top { display: flex; align-items: center; gap: 6px; }
.fc-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef2f9;
  color: var(--muted);
}
.format-card.active .fc-badge { background: rgba(47, 107, 255, .16); color: var(--brand-strong); }
.fc-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.fc-note { font-size: 10.5px; color: var(--muted); }

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #f1f4f9;
  border-radius: 10px;
}
.segmented button {
  flex: 1;
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  transition: all .15s ease;
}
.segmented button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(13, 21, 38, .1); }

.field-inline { display: block; margin-top: 18px; }
.field-inline span { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field-inline input {
  width: 100%; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field-inline input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 255, .11); }

.summary {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f9fc;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 7px;
}
.summary b { color: var(--ink-soft); font-weight: 600; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #c3cddc; flex: none; }

.btn-block { margin-top: 14px; }
.btn-block svg { width: 16px; height: 16px; }

.fineprint { margin: 10px 0 0; font-size: 11px; color: #93a1b5; text-align: center; line-height: 1.6; }

.tip-card {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f0f7ff, #f7fbff);
  border: 1px solid #dbe9ff;
  font-size: 11.8px;
  line-height: 1.65;
  color: #47607f;
}
.tip-card svg { width: 16px; height: 16px; flex: none; color: var(--brand); margin-top: 2px; }
.tip-card b { color: #1c3f77; }

/* progress */
.progress-card {
  margin-top: 14px;
  padding: 12px;
  border-radius: 11px;
  background: #f7f9fc;
  border: 1px solid var(--line);
}
.progress-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.progress-head b { color: var(--brand); font-variant-numeric: tabular-nums; }
.progress-track { height: 6px; border-radius: 999px; background: #e6ebf4; overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #4b83ff, #2f6bff); transition: width .2s ease; }
.progress-fill.indeterminate {
  width: 38% !important;
  animation: indet 1.1s ease-in-out infinite;
}
@keyframes indet {
  0% { margin-left: -38%; }
  100% { margin-left: 100%; }
}

/* history */
.history-wrap { max-width: 1280px; margin: 0 auto; padding: 26px 24px 72px; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 6px 2px 16px; }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.panel-head .count { font-size: 12px; color: var(--muted); }

.table-scroll { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.history-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.history-table td { padding: 14px 12px; border-bottom: 1px solid #f3f6fa; font-size: 13px; vertical-align: middle; }
.history-table tr:last-child td { border-bottom: 0; }
.history-table tbody tr:hover { background: #fafcff; }

.file-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-icon {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: .03em;
  background: var(--brand-soft); color: var(--brand-strong);
}
.file-icon.docx { background: #eaf3ff; color: #1f5fd0; }
.file-icon.html { background: #fff1e8; color: #c26415; }
.file-icon.txt { background: #eef2f8; color: #566579; }
.file-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.file-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.mono { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions .icon-btn:hover { background: #eef3ff; color: var(--brand); }
.row-actions .danger:hover { background: #fdf0f2; color: var(--danger); }

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 60px 20px; color: var(--muted); text-align: center;
}
.empty-state .upload-icon { background: #f2f5fa; color: #a8b5c8; }
.empty-state h3 { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.empty-state p { margin: 0; font-size: 12.5px; }

/* modal */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(8, 14, 28, .45);
  backdrop-filter: blur(4px);
  animation: fade .18s ease both;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%; max-width: 396px;
  background: #fff;
  border-radius: 22px;
  padding: 30px 28px 24px;
  text-align: center;
  box-shadow: 0 40px 90px -30px rgba(6, 12, 26, .55);
  animation: pop .22s cubic-bezier(.2, 1.2, .4, 1) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }

.result-icon {
  width: 58px; height: 58px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #d8f7ee, #eafcf6);
  color: var(--ok);
}
.result-icon svg { width: 27px; height: 27px; }
.modal-card h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.modal-card p { margin: 0 0 20px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.modal-actions { display: flex; flex-direction: column; gap: 9px; }
.modal-actions .btn-primary, .modal-actions .btn-ghost { width: 100%; }

/* toast */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translate(-50%, 12px);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 11px;
  background: #0e1a30;
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 18px 40px -18px rgba(6, 12, 26, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8f1d2f; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .work-side { position: static; }
  .format-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { padding: 30px 26px 26px; gap: 18px; }
  .brand-stage, .brand-foot { display: none; }
  .brand-hero { margin-top: 10px; }
  .brand-hero h1 { font-size: 30px; margin: 14px 0 10px; }
  .brand-hero p { font-size: 13px; }
  .points { display: none; }
  .auth-panel { padding: 32px 22px 48px; align-items: start; }
}

@media (max-height: 820px) {
  .brand-hero h1 { font-size: clamp(30px, 3vw, 42px); }
  .points { gap: 9px; margin-top: 20px; }
  .paper-stack { transform: scale(.86); transform-origin: bottom right; }
}

@media (max-height: 860px) {
  .brand-stage { display: none; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 14px; gap: 10px; height: 60px; }
  .app-brand em { display: none; }
  .user-name { display: none; }
  .nav-pill { margin-left: auto; }
  .nav-pill button { padding: 7px 12px; font-size: 12.5px; }
  .workspace { padding: 16px 14px 60px; gap: 14px; }
  .dropzone { min-height: 176px; padding: 20px 16px; }
  .dropzone h2 { font-size: 15px; }
  .dz-meta { display: none; }
  .format-grid { grid-template-columns: 1fr 1fr; }
  .q-item { grid-template-columns: 22px 46px minmax(0, 1fr) auto; gap: 9px; }
  .q-thumb { width: 46px; height: 46px; }
  .queue-list { padding: 0 14px; }
  .history-wrap { padding: 18px 14px 60px; }
  .file-name { max-width: 150px; }
}
