/* =========================================================
   闈掔鍛樺伐妗ｆ 鈥?鐧?/ 闈掔豢涓婚
   ========================================================= */
:root {
  --teal-950: #062f2b;
  --teal-900: #083f3a;
  --teal-800: #0b5a53;
  --teal-700: #0d6e65;
  --teal-600: #0f8f82;
  --teal-500: #17b3a3;
  --teal-400: #43c8ba;
  --teal-200: #b9e9e1;
  --teal-100: #d9f4ee;
  --teal-50: #effaf7;
  --mint: #f4fbf8;
  --ink: #17332f;
  --ink-soft: #2d4a45;
  --muted: #6f8781;
  --muted-light: #94a8a3;
  --line: #e2eee9;
  --line-strong: #cfdfda;
  --bg: #f5faf8;
  --white: #ffffff;
  --sand: #b7791f;
  --sand-soft: #fff8e8;
  --danger: #c24132;
  --danger-soft: #fff5f3;
  --shadow-sm: 0 1px 2px rgba(10, 65, 58, .04), 0 2px 8px rgba(10, 65, 58, .03);
  --shadow-md: 0 10px 30px rgba(10, 65, 58, .07);
  --shadow-lg: 0 24px 70px rgba(10, 65, 58, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 254px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
::selection { background: var(--teal-100); color: var(--teal-900); }
.icon { flex: 0 0 auto; vertical-align: -3px; }

.text-muted { color: var(--muted); }
.text-teal { color: var(--teal-600); font-weight: 700; }
.mono-text { font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace; font-size: 12.5px; letter-spacing: .02em; }
.break-all { word-break: break-all; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 10px; padding: 9px 16px;
  background: var(--white); color: var(--ink); font-weight: 600; font-size: 13px;
  line-height: 1.3; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--teal-600); color: var(--white); box-shadow: 0 6px 16px rgba(15, 143, 130, .18); }
.btn-primary:hover { background: var(--teal-700); box-shadow: 0 8px 22px rgba(15, 143, 130, .23); }
.btn-secondary { background: var(--white); border-color: var(--line-strong); color: var(--ink-soft); }
.btn-secondary:hover { border-color: var(--teal-400); color: var(--teal-700); background: var(--teal-50); }
.btn-light { background: var(--white); color: var(--teal-800); }
.btn-light:hover { background: var(--teal-50); }
.btn-ghost-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); color: var(--white); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #a8372a; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; gap: 4px; }
.btn-lg { padding: 13px 22px; font-size: 14.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .7; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 13px; height: 13px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after { color: var(--teal-600); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--muted); cursor: pointer; transition: .15s ease;
}
.icon-btn:hover { background: var(--teal-50); color: var(--teal-700); }
.icon-btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.text-link { display: inline-flex; align-items: center; gap: 2px; color: var(--teal-700); font-size: 12px; font-weight: 700; }
.text-link:hover { color: var(--teal-900); }
button.text-link { border: 0; background: transparent; padding: 0; cursor: pointer; font-family: inherit; }
.join-share-meta .text-link { white-space: nowrap; }

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field-label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.field-label i, .required-note i { color: var(--danger); font-style: normal; }
.field-hint { font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.input, .select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--white); color: var(--ink); padding: 10px 12px; font-size: 13.5px;
  line-height: 1.45; transition: .16s ease; min-height: 40px;
}
.input::placeholder { color: #aabbb6; }
.input:focus, .select:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(23, 179, 163, .12); outline: none; }
.input[readonly] { background: var(--mint); color: var(--ink-soft); }
.textarea { resize: vertical; min-height: 66px; }
.mono-input { font-family: "Cascadia Mono", Consolas, monospace; letter-spacing: .02em; }
.input-sm { padding: 6px 9px; min-height: 32px; font-size: 12.5px; border-radius: 8px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f8781' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.split-actions { justify-content: flex-start; flex-wrap: wrap; }
.required-note { font-size: 11.5px; color: var(--muted); }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; cursor: pointer; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--teal-600); flex: 0 0 auto; }
.input-wrap { position: relative; display: block; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-light); display: flex; }
.input-wrap .input { padding-left: 38px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .input { flex: 1; }

/* Alerts & flash */
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); position: relative;
}
.alert-icon { display: flex; margin-top: 1px; }
.alert-success { background: var(--teal-50); border-color: #c4ebe3; color: var(--teal-800); }
.alert-success .alert-icon { color: var(--teal-600); }
.alert-error { background: var(--danger-soft); border-color: #f2d0ca; color: #92362b; }
.alert-error .alert-icon { color: var(--danger); }
.alert-warn { background: var(--sand-soft); border-color: #f1dfb6; color: #7c5713; }
.alert-warn .alert-icon { color: var(--sand); }
.alert-info { background: #f2f8f7; border-color: #dcebe7; color: #45635d; }
.alert-info .alert-icon { color: var(--teal-600); }
.alert-close { margin-left: auto; border: 0; background: transparent; color: currentColor; opacity: .55; cursor: pointer; padding: 2px; }
.alert-close:hover { opacity: 1; }
.inline-form { display: inline-flex; margin: 0; }
.select-input { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b8580' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 15px; }
.select-input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(15, 143, 130, .1); }
.select-input option { color: var(--ink); background: #fff; }
.alert-compact { margin: 12px 0 14px; padding: 9px 12px; }

/* Cards */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); min-width: 0;
}
.card-padded { padding: 22px; }
.card-flush { overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head-padded { padding: 20px 22px 0; margin-bottom: 8px; }
.card-head-inline { align-items: center; }
.card-kicker { display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--teal-600); text-transform: uppercase; margin-bottom: 3px; }
.card-head h3, .aside-head h3 { font-size: 16px; letter-spacing: -.01em; }
.card-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Status & badges */
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-archived { background: var(--teal-50); color: var(--teal-700); border: 1px solid #cfeee7; }
.status-progress { background: #fff8e9; color: #96651b; border: 1px solid #f0dfb8; }
.status-pending { background: #f5f7f6; color: var(--muted); border: 1px solid #e7ecea; }
.status-unrecognized { background: #eef4ff; color: #3567a8; border: 1px solid #d6e2f7; }
.status-recognized { background: var(--teal-50); color: var(--teal-700); border: 1px solid #cfeee7; }
.status-recognized-warning { background: #fff8e9; color: #96651b; border: 1px solid #f0dfb8; }
.status-recognized-danger { background: #fff0ef; color: #b42318; border: 1px solid #f3c8c3; }
.count-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--mint); color: var(--muted); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.action-chip { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--mint); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.ocr-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: #f5f7f6; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.ocr-pill.ocr-on { background: var(--teal-50); color: var(--teal-700); border-color: #cfeee7; }

/* Progress */
.progress { height: 8px; border-radius: 999px; background: #edf4f2; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-500), var(--teal-600)); transition: width .35s ease; }
.progress-thin { height: 5px; }

/* Avatar */
.avatar {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px; background: var(--teal-100); color: var(--teal-800);
  font-weight: 800; font-size: 15px; flex: 0 0 auto;
}
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.avatar-lg { width: 62px; height: 62px; border-radius: 18px; font-size: 24px; }

/* Layout: admin */
.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--white);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 18px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center;
  background: linear-gradient(145deg, var(--teal-600), var(--teal-800)); color: #fff;
  box-shadow: 0 6px 14px rgba(15, 143, 130, .24); flex: 0 0 auto;
}
.brand-mark-light { background: rgba(255,255,255,.16); box-shadow: none; border: 1px solid rgba(255,255,255,.25); }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-text strong { font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: .02em; }
.sidebar-close { display: none; }
.sidebar-nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.nav-label { padding: 10px 12px 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .16em; color: var(--muted-light); text-transform: uppercase; }
.nav-label-spaced { margin-top: 12px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #506963; margin-bottom: 2px;
  transition: .15s ease; position: relative;
}
.nav-item:hover { background: var(--teal-50); color: var(--teal-800); }
.nav-item.active { background: var(--teal-50); color: var(--teal-800); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal-600); }
.nav-icon { display: flex; color: var(--muted); }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: var(--teal-600); }
.sidebar-bottom { padding: 14px 14px 18px; border-top: 1px solid var(--line); }
.privacy-note { display: flex; gap: 9px; padding: 10px 11px; border-radius: 10px; background: var(--mint); border: 1px solid var(--line); margin-bottom: 12px; }
.privacy-icon { color: var(--teal-600); display: flex; margin-top: 2px; }
.privacy-note p { font-size: 10.5px; color: var(--muted); line-height: 1.55; }
.privacy-note strong { color: var(--teal-800); font-weight: 700; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 2px 4px; }
.sidebar-user-info { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.sidebar-user-info strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info small { font-size: 10px; color: var(--muted); }
.admin-main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  min-height: 78px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 32px; background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-menu { display: none; }
.topbar-heading { min-width: 0; }
.topbar-kicker { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.topbar-heading h1 { font-size: 18px; letter-spacing: -.02em; line-height: 1.35; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-date { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.page-content { padding: 28px 32px 18px; width: 100%; max-width: 1460px; margin: 0 auto; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; padding: 28px 2px 8px; color: var(--muted-light); font-size: 10.5px; }
.sidebar-scrim { display: none; }

/* Page headings */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h2 { font-size: 23px; letter-spacing: -.03em; line-height: 1.3; }
.page-heading p { color: var(--muted); font-size: 12.5px; margin-top: 4px; max-width: 700px; }
.page-heading p strong { color: var(--ink); }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.back-link { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.back-link:hover { color: var(--teal-700); }

/* Dashboard */
.hero-card {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between;
  gap: 28px; padding: 30px 34px; border-radius: 22px; color: var(--white);
  background: radial-gradient(circle at 88% 18%, rgba(92, 220, 202, .34), transparent 28%),
              linear-gradient(118deg, var(--teal-800) 0%, var(--teal-700) 50%, #118f82 100%);
  box-shadow: 0 20px 45px rgba(8, 63, 58, .17);
  margin-bottom: 20px;
}
.hero-card::after {
  content: ""; position: absolute; right: -70px; bottom: -130px; width: 300px; height: 300px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 50%;
}
.hero-card::before {
  content: ""; position: absolute; right: 40px; top: -100px; width: 220px; height: 220px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
}
.hero-copy { position: relative; z-index: 1; max-width: 660px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: #b9f0e7; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); }
.hero-copy h2 { font-size: 31px; line-height: 1.35; letter-spacing: -.035em; margin: 12px 0 9px; font-weight: 800; }
.hero-copy p { color: #cce9e3; font-size: 12.5px; line-height: 1.8; max-width: 560px; }
.hero-actions { display: flex; gap: 9px; margin-top: 17px; flex-wrap: wrap; }
.hero-progress { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-right: 8px; }
.ring {
  --pct: 0; --track: rgba(255,255,255,.18);
  width: 144px; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--teal-400) calc(var(--pct) * 1%), var(--track) 0);
  display: grid; place-items: center; position: relative;
}
.ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.ring-inner { width: 78%; height: 78%; border-radius: 50%; background: var(--teal-800); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 1; }
.ring-inner strong { font-size: 31px; line-height: 1; letter-spacing: -.04em; }
.ring-inner strong span { font-size: 13px; font-weight: 600; margin-left: 1px; }
.ring-inner small { font-size: 9.5px; color: #b9dcd6; margin-top: 5px; }
.hero-progress-meta { display: flex; gap: 13px; font-size: 10.5px; color: #c6e7e1; }
.hero-progress-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-progress-meta strong { color: #fff; font-size: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-teal { background: var(--teal-400); }
.dot-sand { background: #f3cf8a; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card { display: block; padding: 17px 18px 15px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); transition: .18s ease; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cfe9e2; }
.stat-top { display: flex; align-items: center; gap: 9px; }
.stat-icon { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--mint); color: var(--teal-700); }
.stat-icon-teal { background: var(--teal-50); color: var(--teal-600); }
.stat-icon-sand { background: #fdf7e9; color: var(--sand); }
.stat-icon-gray { background: #f4f6f5; color: #8a9d98; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat-value { margin-top: 10px; font-size: 27px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.stat-value small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat-foot { margin-top: 8px; font-size: 10.5px; color: var(--muted-light); }

.content-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.content-grid-dashboard { grid-template-columns: 1.15fr 1fr; }
.content-grid-dashboard-lower { grid-template-columns: 1fr 1.12fr; }
.content-grid > .card { padding: 22px; }
.content-grid .card-flush { padding: 0; }

.bar-list { display: flex; flex-direction: column; gap: 15px; }
.bar-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 12px; }
.bar-name { color: var(--ink-soft); font-weight: 600; }
.bar-value { color: var(--muted); font-size: 11px; }
.bar-value strong { color: var(--teal-700); font-size: 12px; }
.bar-track { height: 7px; border-radius: 999px; background: #edf4f2; position: relative; overflow: hidden; }
.bar-total { position: absolute; inset: 0 auto 0 0; background: #dff0eb; border-radius: inherit; }
.bar-done { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--teal-500), var(--teal-600)); border-radius: inherit; }

.mini-list { padding: 0 8px 8px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; transition: .15s ease; }
.mini-row:hover { background: var(--mint); }
.mini-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.mini-title { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; font-weight: 700; }
.mini-title small { font-family: Consolas, monospace; font-size: 10px; color: var(--muted-light); font-weight: 500; }
.mini-sub { color: var(--muted); font-size: 10.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-arrow { color: var(--muted-light); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); transition: .16s ease; }
.quick-action:hover { border-color: var(--teal-300, #a9ddd5); background: var(--teal-50); transform: translateY(-1px); }
.quick-icon { display: inline-grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--mint); color: var(--teal-700); flex: 0 0 auto; }
.quick-action span:last-child { display: flex; flex-direction: column; min-width: 0; }
.quick-action strong { font-size: 12px; }
.quick-action small { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.timeline { display: flex; flex-direction: column; gap: 0; padding: 0 2px; }
.timeline-row { display: flex; gap: 10px; padding: 8px 0; position: relative; }
.timeline-row:not(:last-child)::before { content: ""; position: absolute; left: 3px; top: 20px; bottom: -3px; width: 1px; background: var(--line); }
.timeline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-400); margin-top: 6px; flex: 0 0 auto; position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--white); }
.timeline-main { flex: 1; min-width: 0; }
.timeline-main p { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.timeline-main p strong { color: var(--ink-soft); }
.timeline-main small { display: block; color: var(--muted-light); font-size: 10px; margin-top: 1px; }
.timeline-row time { color: var(--muted-light); font-size: 9.5px; white-space: nowrap; margin-top: 2px; }

/* Tables */
.card-table { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  text-align: left; padding: 11px 18px; color: var(--muted); font-size: 10.5px;
  font-weight: 700; letter-spacing: .03em; background: #fbfdfc; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td { padding: 12px 18px; border-bottom: 1px solid #edf4f1; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfefd; }
.data-table.compact td, .data-table.compact th { padding: 9px 14px; }
.th-actions { text-align: right !important; }
.td-actions { display: flex; justify-content: flex-end; align-items: center; gap: 2px; white-space: nowrap; }
.person-cell { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.person-main { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.person-main strong { font-size: 12.5px; }
.person-main small { color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.cell-sub { color: var(--muted); font-size: 11px; display: block; }
.doc-dots { display: flex; align-items: center; gap: 4px; }
.doc-dot { width: 17px; height: 6px; border-radius: 99px; background: #e9f0ed; }
.doc-dot.done { background: var(--teal-500); }
.doc-dots small { margin-left: 4px; color: var(--muted); font-size: 10px; }
.log-detail { max-width: 400px; color: var(--muted); font-size: 11.5px; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); }
.pagination-info { color: var(--muted); font-size: 11px; }
.pagination-actions { display: flex; gap: 6px; }

.filter-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; flex-wrap: wrap; }
.search-field { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-light); display: flex; }
.search-field input {
  width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--white); padding: 0 12px 0 37px; font-size: 12.5px;
}
.search-field input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(23,179,163,.1); outline: none; }
.filter-bar .select { width: auto; min-width: 120px; height: 38px; min-height: 38px; font-size: 12.5px; }

/* Empty states */
.empty-state { text-align: center; padding: 36px 20px; }
.empty-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); margin: 0 auto 12px; }
.empty-state h3 { font-size: 14.5px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 5px auto 14px; max-width: 380px; line-height: 1.7; }
.inline-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 12px; background: #fbfdfc; }
.section-divider { height: 1px; background: var(--line); margin: 22px 0 18px; }
.subhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.subhead h4 { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.subhead .text-muted { font-size: 11px; }

/* Profile / detail */
.profile-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; margin-bottom: 18px; }
.profile-main { display: flex; align-items: center; gap: 15px; min-width: 0; }
.profile-title-row { display: flex; align-items: center; gap: 10px; }
.profile-title-row h2 { font-size: 23px; letter-spacing: -.03em; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 4px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 18px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.detail-main > .card { padding: 22px; }
.detail-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.detail-aside .card { padding: 17px 18px; }
.id-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.id-slot { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 11px; background: #fbfdfc; display: flex; flex-direction: column; min-height: 190px; }
.id-slot.has-file { border-style: solid; background: var(--white); }
.id-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 9px; }
.id-slot-head > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.file-ok { display: inline-flex; align-items: center; gap: 3px; color: var(--teal-600); font-size: 10px; font-weight: 700; }
.doc-preview { display: block; border-radius: 9px; overflow: hidden; background: #f2f7f5; border: 1px solid var(--line); }
.doc-preview img { width: 100%; height: 150px; object-fit: cover; transition: transform .25s ease; }
.doc-preview:hover img { transform: scale(1.025); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.doc-card { border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: #fbfdfc; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.doc-card strong { font-size: 10.5px; color: var(--ink); }
.doc-card small { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-complete-preview img { height: 92px; }
.employee-complete-icon { height: 92px; display: grid; place-items: center; border-radius: 7px; background: var(--mint); color: var(--teal-600); }
.doc-slot-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; min-height: 25px; }
.doc-slot-foot small { color: var(--muted); font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-actions { display: flex; align-items: center; gap: 1px; flex: 0 0 auto; }
.doc-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted-light); font-size: 11px; min-height: 140px; }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.file-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--teal-50); color: var(--teal-700); flex: 0 0 auto; }
.file-icon.file-pdf { background: #fff3f1; color: #c05a45; }
.file-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-main strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-main small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.info-item { padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.info-item:nth-child(odd) { border-right: 1px solid var(--line); }
.info-item span { color: var(--muted); font-size: 10px; }
.info-item strong { font-size: 12.5px; font-weight: 600; word-break: break-word; }
.info-item-full { grid-column: 1 / -1; }
.info-item-full:nth-child(odd) { border-right: 0; }
.archive-card { background: linear-gradient(160deg, #f9fefc, #ffffff 60%); border-color: #cfe9e2; }
.archive-visual { display: flex; align-items: center; gap: 13px; margin-bottom: 15px; }
.archive-file-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--teal-600); color: #fff; box-shadow: 0 8px 18px rgba(15,143,130,.22); }
.archive-visual h3 { font-size: 17px; }
.archive-visual p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.archive-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; padding: 13px 15px; background: var(--mint); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 15px; }
.archive-meta-grid div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.archive-meta-grid span { font-size: 9.5px; color: var(--muted); }
.archive-meta-grid strong { font-size: 11.5px; font-weight: 600; }
.archive-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.archive-actions form { display: inline-flex; }

.progress-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.progress-head strong { font-size: 17px; color: var(--teal-700); }
.check-list { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.check-list li { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.check-list li.done { color: var(--ink-soft); }
.check-mark { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-grid; place-items: center; flex: 0 0 auto; color: #fff; background: #fff; }
.check-list li.done .check-mark { background: var(--teal-500); border-color: var(--teal-500); }
.check-list li small { margin-left: auto; color: var(--muted-light); font-size: 10px; }
.aside-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.aside-head h3 { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.aside-text { color: var(--muted); font-size: 11px; line-height: 1.7; }
.copy-box { display: flex; align-items: center; gap: 4px; margin-top: 9px; background: var(--mint); border: 1px solid var(--line); border-radius: 8px; padding: 4px 5px 4px 9px; }
.copy-box input { border: 0; background: transparent; min-width: 0; flex: 1; font-size: 10px; color: var(--muted); outline: none; font-family: Consolas, monospace; }
.aside-actions { margin-top: 8px; }
.meta-list { display: flex; flex-direction: column; gap: 8px; }
.meta-list div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meta-list dt { color: var(--muted); font-size: 10.5px; }
.meta-list dd { margin: 0; font-size: 10.5px; color: var(--ink-soft); text-align: right; }
.mini-timeline { display: flex; flex-direction: column; gap: 0; }
.mini-timeline-row { display: flex; gap: 8px; position: relative; padding: 6px 0; }
.mini-timeline-row:not(:last-child)::before { content: ""; position: absolute; left: 3px; top: 15px; bottom: -2px; width: 1px; background: var(--line); }
.mini-timeline-row .timeline-dot { width: 6px; height: 6px; margin-top: 5px; box-shadow: 0 0 0 3px var(--white); }
.mini-timeline-row div { display: flex; flex-direction: column; }
.mini-timeline-row strong { font-size: 10.5px; font-weight: 600; }
.mini-timeline-row small { font-size: 9.5px; color: var(--muted-light); margin-top: 1px; }
.danger-card { border-color: #f0dcd7; }
.danger-hint { font-size: 9.5px; color: var(--muted-light); margin-top: 7px; }
.danger-actions { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 7px; }
.danger-actions form { margin: 0; }
.danger-actions .danger-hint { margin: 0 0 5px; }

/* Employee login homepage */
.login-body { min-height: 100vh; background: linear-gradient(180deg, #f7fcfb 0%, #eef8f5 100%); }
.login-header { max-width: 1280px; margin: 0 auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; }
.login-admin-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10.5px; text-decoration: none; }
.login-admin-link:hover { color: var(--teal-700); }
.login-main { max-width: 1100px; margin: 0 auto; padding: 18px 24px 48px; }
.login-flash { max-width: 760px; margin: 0 auto 12px; }
.login-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); gap: 22px; align-items: stretch; }
.login-intro { position: relative; min-height: 540px; overflow: hidden; border-radius: 18px; padding: 48px 44px; color: #fff; background: linear-gradient(145deg, #0b3f3b 0%, #0e6f65 55%, #0f8f82 100%); box-shadow: 0 18px 45px rgba(8, 70, 63, .18); display: flex; flex-direction: column; }
.login-intro::after { content: ""; position: absolute; width: 460px; height: 460px; right: -190px; bottom: -210px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 170px rgba(255,255,255,.025); }
.login-kicker { font-size: 9.5px; letter-spacing: .18em; font-weight: 800; color: #a7e7d9; }
.login-intro h1 { margin: 20px 0 16px; font-size: clamp(40px, 5vw, 62px); line-height: 1.08; letter-spacing: -.06em; font-weight: 800; }
.login-intro > p { max-width: 330px; color: #c9eee6; font-size: 12px; line-height: 1.8; }
.login-steps { margin-top: 36px; display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 1; }
.login-steps > div { display: flex; gap: 12px; align-items: flex-start; }
.login-steps > div > span { width: 27px; height: 27px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #d1f4eb; }
.login-steps > div > div { display: flex; flex-direction: column; }
.login-steps strong { font-size: 12.5px; }
.login-steps small { color: #a9d8ce; font-size: 9.5px; margin-top: 2px; }
.login-intro-foot { margin-top: auto; display: flex; align-items: center; gap: 5px; color: #a9d8ce; font-size: 9.5px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 38px 38px 28px; box-shadow: 0 16px 50px rgba(19, 64, 58, .08); align-self: center; }
.login-card-icon { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--teal-50); color: var(--teal-700); margin-bottom: 14px; }
.login-card h2 { margin: 5px 0 8px; font-size: 25px; letter-spacing: -.03em; }
.login-card-sub { margin: 0 0 21px; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.login-form { gap: 15px; }
.login-submit { margin-top: 4px; justify-content: center; }
.login-note, .login-privacy { display: flex; gap: 5px; align-items: flex-start; color: var(--muted-light); font-size: 9.5px; line-height: 1.65; margin: 15px 0 0; }
.login-privacy { margin-top: 8px; }
@media (max-width: 820px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-intro { min-height: 0; padding: 30px 26px; }
  .login-intro h1 { font-size: 40px; }
  .login-steps { display: none; }
  .login-intro-foot { margin-top: 25px; }
  .login-card { padding: 28px 22px 22px; }
  .login-main { padding: 8px 16px 30px; }
  .login-header { padding: 16px; }
}

.employee-body { background: #f4faf8; }
.employee-sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; background: #fff; border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; z-index: 20; }
.employee-brand { padding: 0 4px 18px; border-bottom: 1px solid var(--line); }
.employee-menu { flex: 1; margin-top: 18px; }
.employee-menu-label { display: none; }
.employee-nav-group { margin-bottom: 14px; }
.employee-nav-head { display: flex; align-items: center; gap: 4px; margin: 0 4px 4px; }
.employee-nav-title { display: flex; align-items: center; gap: 6px; flex: 1; color: var(--muted); font-size: 10.5px; font-weight: 800; padding: 6px 6px; border-radius: 7px; text-decoration: none; transition: background .15s ease, color .15s ease; }
.employee-nav-title:hover, .employee-nav-title.is-active { background: var(--mint); color: var(--teal-800); }
.employee-nav-toggle { width: 27px; height: 27px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; justify-content: center; flex: 0 0 auto; transition: transform .18s ease, background .15s ease, color .15s ease, border-color .15s ease; }
.employee-nav-toggle:hover { background: var(--mint); color: var(--teal-700); border-color: var(--teal-200); }
.employee-nav-toggle[aria-expanded="true"] { color: var(--teal-700); border-color: var(--teal-200); background: var(--teal-50); transform: rotate(90deg); }
.employee-submenu { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .22s ease, opacity .18s ease; }
.employee-submenu.is-open { max-height: 150px; opacity: 1; }
.employee-nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; margin: 3px 0 3px 12px; border-radius: 8px; color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; position: relative; }
.employee-nav-link::before { content: ""; position: absolute; left: -8px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); transform: translateY(-50%); }
.employee-nav-link:hover { background: var(--mint); color: var(--teal-800); }
.employee-nav-link.is-active { background: var(--teal-50); color: var(--teal-800); box-shadow: inset 3px 0 0 var(--teal-600); }
.employee-nav-link.is-active::before { background: var(--teal-600); }
.employee-soon { color: var(--muted-light); font-size: 8.5px; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 2px 5px; }
.employee-sidebar-user { display: flex; align-items: center; gap: 9px; padding: 13px 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.employee-sidebar-user:hover strong { color: var(--teal-700); }
.employee-sidebar-user div { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.employee-sidebar-user strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.employee-sidebar-user small { color: var(--muted); font-size: 9.5px; }
.employee-sidebar-user-arrow { color: var(--muted-light); display: inline-flex; }
.employee-logout { color: var(--muted); font-size: 10.5px; text-decoration: none; padding: 5px 8px; border-radius: 6px; }
.employee-logout:hover { color: var(--danger); background: var(--danger-soft); }
.employee-avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-100); color: var(--teal-800); font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.employee-avatar-lg { width: 54px; height: 54px; font-size: 22px; }
.employee-main { margin-left: 238px; padding: 24px 30px 42px; max-width: 1280px; }
.employee-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.employee-topbar-kicker { color: var(--teal-700); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; }
.employee-topbar h1 { margin: 4px 0 0; font-size: 25px; letter-spacing: -.02em; }
.employee-topbar-right { display: flex; align-items: center; gap: 10px; }
.employee-flash { margin-bottom: 14px; }
.employee-welcome { display: flex; gap: 12px; align-items: center; background: var(--teal-50); border: 1px solid var(--teal-200); border-radius: 12px; padding: 13px 16px; margin-bottom: 16px; }
.employee-welcome-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--teal-700); flex: 0 0 auto; }
.employee-welcome strong { font-size: 13px; }
.employee-welcome p { margin: 2px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.employee-hero { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.employee-hero-main { display: flex; align-items: center; gap: 13px; }
.employee-hero-main h2 { margin: 3px 0 3px; font-size: 21px; }
.employee-hero-main p { margin: 0; color: var(--muted); font-size: 10.5px; }
.employee-hero-meta { display: flex; align-items: center; gap: 18px; }
.employee-complete { display: flex; align-items: center; gap: 9px; }
.employee-complete > div:last-child { display: flex; flex-direction: column; }
.employee-complete strong { font-size: 10.5px; }
.employee-complete small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.employee-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.employee-quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.employee-quick-link { display: flex; align-items: center; gap: 9px; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.employee-quick-link:hover { border-color: var(--teal-300); transform: translateY(-1px); box-shadow: 0 7px 18px rgba(18, 100, 88, .08); }
.employee-quick-link.is-current { background: linear-gradient(110deg, #f1fbf7, #ffffff); border-color: var(--teal-200); }
.employee-quick-icon { width: 31px; height: 31px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--teal-700); background: var(--teal-50); flex: 0 0 auto; }
.employee-quick-link > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.employee-quick-link strong { font-size: 10.5px; }
.employee-quick-link small { color: var(--muted); font-size: 8.5px; margin-top: 2px; }
.employee-quick-link > .icon { color: var(--muted-light); flex: 0 0 auto; }
.info-link { color: var(--teal-700); text-decoration: none; }
.info-link:hover { text-decoration: underline; }
.info-copy { margin-left: 6px; vertical-align: middle; }
.employee-report-card { margin-top: 16px; }
.employee-report-status { display: flex; align-items: center; justify-content: flex-end; }
.employee-report-block { border-top: 1px solid var(--line); padding: 13px 0 2px; }
.employee-report-block:first-of-type { border-top: 0; padding-top: 2px; }
.employee-report-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.employee-report-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.employee-report-actions form { margin: 0; }
.review-select.is-staged { border-color: var(--teal-500); box-shadow: 0 0 0 2px rgba(15, 143, 130, .12); background-color: #f7fffc; }
.employee-report-head > div { display: flex; flex-direction: column; min-width: 0; }
.employee-report-head strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-report-head small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.review-inline { margin: 0; }
.review-select { min-width: 90px; height: 28px; padding: 2px 25px 2px 7px; font-size: 9.5px; background-position: right 7px center; }
.review-select:disabled { opacity: .55; }
.employee-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.employee-doc-grid { display: grid; gap: 8px; }
.employee-doc-card { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fcfefd; color: var(--ink); text-decoration: none; }
.employee-doc-card:hover { border-color: var(--teal-300); background: var(--mint); }
.employee-doc-icon { width: 31px; height: 31px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--teal-50); color: var(--teal-700); }
.employee-doc-card > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.employee-doc-card strong { font-size: 10.5px; }
.employee-doc-card small { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-doc-open { color: var(--teal-700); }
.employee-medical-list { margin-top: 14px; }
.employee-medical-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.employee-medical-row > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.employee-medical-row strong { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-medical-row small { color: var(--muted); font-size: 9px; }
.employee-medical-row > .icon { color: var(--teal-700); }
.employee-hint { display: flex; align-items: flex-start; gap: 5px; margin: 14px 0 0; color: var(--muted-light); font-size: 9.5px; line-height: 1.6; }
.employee-placeholder { max-width: 760px; padding: 30px; }
.employee-placeholder-icon { width: 48px; height: 48px; border-radius: 13px; background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.employee-placeholder h2 { margin: 5px 0 8px; font-size: 23px; }
.employee-placeholder > p { color: var(--muted); font-size: 11.5px; line-height: 1.7; max-width: 560px; }
.employee-placeholder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.employee-placeholder-grid div { border: 1px dashed var(--line-strong); border-radius: 9px; padding: 12px; background: #fbfdfc; }
.employee-placeholder-grid span { display: block; color: var(--muted); font-size: 9.5px; }
.employee-placeholder-grid strong { display: block; margin-top: 4px; font-size: 13px; }
@media (max-width: 900px) {
  .employee-sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  .employee-menu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .employee-menu-label { width: 100%; margin: 0 0 2px; }
  .employee-nav-group { margin: 0; }
  .employee-nav-title { margin: 0; }
  .employee-nav-head { margin: 0; }
  .employee-nav-link { padding: 7px 9px; }
  .employee-sidebar-user { display: none; }
  .employee-main { margin-left: 0; padding: 18px 16px 32px; }
  .employee-hero { flex-direction: column; align-items: flex-start; }
  .employee-hero-meta { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .employee-grid { grid-template-columns: 1fr; }
  .employee-quick-links { grid-template-columns: 1fr; }
  .employee-topbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .employee-topbar-right { width: 100%; justify-content: space-between; }
}
@media (max-width: 520px) {
  .employee-info-grid { grid-template-columns: 1fr; }
  .employee-placeholder-grid { grid-template-columns: 1fr; }
}
.ai-section-head { align-items: flex-start; gap: 12px; }
.ai-section-head > div { display: flex; flex-direction: column; gap: 2px; }
.ai-section-head .text-muted { font-size: 10px; }
.ai-section-head form { margin: 0; flex: 0 0 auto; }
.ai-report { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; margin-top: 9px; background: #fcfefd; }
.ai-report-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-report-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ai-report-title .file-icon { width: 32px; height: 32px; border-radius: 8px; }
.ai-report-title > div { display: flex; flex-direction: column; min-width: 0; }
.ai-report-title strong { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-report-title small { color: var(--muted); font-size: 9.5px; }
.ai-report-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.ai-report-actions form { margin: 0; }
.ai-status { font-size: 9.5px; font-weight: 700; color: var(--muted); padding: 3px 7px; border-radius: 999px; background: #f3f6f5; white-space: nowrap; }
.ai-status.is-success { color: var(--teal-700); background: var(--teal-50); }
.ai-status.is-failed { color: var(--danger); background: var(--danger-soft); }
.ai-summary { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 9px 10px; background: var(--mint); border: 1px solid var(--line); border-radius: 8px; }
.ai-summary p { color: var(--muted); font-size: 10.5px; line-height: 1.6; margin: 0; }
.ai-result-list { display: flex; flex-direction: column; gap: 4px; margin-top: 9px; }
.ai-result-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 9px; border-radius: 7px; font-size: 11px; line-height: 1.45; }
.ai-result-row.is-ok { background: #f2fbf8; color: var(--teal-800); }
.ai-result-row.is-bad { background: #fff5f3; color: #9a3c31; }
.ai-result-row.is-review { background: #fff9e9; color: #7d5a18; }
.ai-result-main { min-width: 0; word-break: break-word; }
.ai-review-tag { margin-left: 5px; padding: 1px 5px; border-radius: 4px; background: #f3dfac; color: #7d5a18; font-size: 8.5px; }
.ai-review-reason { margin: -2px 0 4px 9px; color: #9a7a31; font-size: 9.5px; line-height: 1.55; }
.ai-result-mark { font-size: 13px; flex: 0 0 auto; }
.ai-missing { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; color: var(--muted-light); font-size: 9.5px; }
.ai-missing span { padding: 2px 6px; border-radius: 5px; background: #f4f7f6; border: 1px solid var(--line); }
.ai-error { margin-top: 9px; padding: 8px 10px; border-radius: 7px; background: var(--danger-soft); color: var(--danger); font-size: 10.5px; line-height: 1.6; }
.ai-empty { display: flex; align-items: center; gap: 4px; margin-top: 9px; color: var(--muted-light); font-size: 10px; }
.review-publish { position: relative; display: inline-flex; }
.review-publish-arrow { transform: rotate(90deg); }
.review-publish-menu {
  position: absolute; z-index: 20; top: calc(100% + 6px); right: 0;
  min-width: 120px; padding: 5px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgba(20, 55, 48, .14);
}
.review-publish-menu button {
  display: block; width: 100%; padding: 8px 11px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); font: inherit; font-size: 11px;
  text-align: left; cursor: pointer;
}
.review-publish-menu button:hover { background: var(--teal-50); color: var(--teal-700); }
.review-publish-menu button[data-review-final="unqualified"]:hover { background: var(--danger-soft); color: var(--danger); }
.page-transition {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: rgba(246, 251, 249, .84); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease;
}
.page-transition.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.page-transition-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  min-width: 120px; padding: 18px 22px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; box-shadow: 0 16px 40px rgba(20, 55, 48, .14);
}
.page-transition-card strong { font-size: 11px; color: var(--ink); }
.page-transition-card small { font-size: 9px; color: var(--muted); }
.page-transition-spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--teal-100, #d6eee8); border-top-color: var(--teal-600, #0f8f82);
  animation: spin .8s linear infinite;
}
.page-transition-error { max-width: 320px; text-align: center; }
.page-transition-error-mark {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--danger); font-weight: 800; font-size: 15px;
}
.page-transition-error strong { line-height: 1.55; }
.page-transition-error .btn { margin-top: 3px; }
.report-progress { align-items: center; gap: 9px; }
.report-progress p { flex: 1; }
.report-progress .btn { flex: 0 0 auto; }
.report-progress .btn.is-loading { opacity: .65; pointer-events: none; }
.report-progress .btn.is-loading .icon { animation: spin 1s linear infinite; }
.report-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.report-count { font-size: 9.5px; padding: 3px 7px; border-radius: 5px; background: #f3f6f5; }
.report-count.good { color: var(--teal-700); background: var(--teal-50); }
.report-count.high { color: #a26312; background: #fff6e4; }
.report-count.low { color: #2f6f9b; background: #eef7fc; }
.report-count.bad { color: var(--danger); background: var(--danger-soft); }
.report-count.missing { color: #7b5a18; background: #fff3d6; }
.report-screening-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.report-screening-head > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-summary { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.report-flag.flag-missing { color: #7b5a18; background: #fff3d6; }
.report-search { width: 150px; margin-left: auto; }
.report-status-filter { width: 96px; }
.report-table-wrap { overflow-x: auto; margin-top: 9px; border: 1px solid var(--line); border-radius: 8px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 10px; white-space: nowrap; }
.table-report .report-table { table-layout: fixed; }
.table-report .report-table th:nth-child(1) { width: 18%; }
.table-report .report-table th:nth-child(2) { width: 30%; }
.table-report .report-table th:nth-child(3) { width: 8%; }
.table-report .report-table th:nth-child(4) { width: 14%; }
.table-report .report-table th:nth-child(5) { width: 9%; }
.table-report .report-table th:nth-child(6) { width: 16%; }
.table-report .report-table th:nth-child(7) { width: 5%; }
.table-report .report-table td { vertical-align: top; }
.table-report .report-table td.report-value {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}
.employee-report-table { table-layout: fixed; }
.employee-report-table th:nth-child(1) { width: 18%; }
.employee-report-table th:nth-child(2) { width: 44%; }
.employee-report-table th:nth-child(3) { width: 10%; }
.employee-report-table th:nth-child(4) { width: 18%; }
.employee-report-table th:nth-child(5) { width: 10%; }
.employee-report-table td { vertical-align: top; }
.employee-report-table td.report-value {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}
.report-table th { background: #f6faf8; color: var(--muted); text-align: left; font-weight: 700; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.report-table td { padding: 6px 9px; border-bottom: 1px solid #f0f5f3; color: var(--ink); }
.report-table tr:last-child td { border-bottom: 0; }
.report-table tr:hover td { background: #fbfefd; }
.report-flag { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.report-flag.flag-high { color: #a26312; background: #fff1d8; }
.report-flag.flag-low { color: #2f6f9b; background: #e8f4fc; }
.report-flag.flag-bad { color: var(--danger); background: var(--danger-soft); }
.report-flag.flag-good { color: var(--teal-700); background: var(--teal-50); }
.report-flag.flag-unknown { color: var(--muted); background: #f3f6f5; }
.danger-details { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.danger-details summary { cursor: pointer; color: var(--danger); font-size: 11px; font-weight: 700; }
.danger-details p { color: var(--muted); font-size: 10.5px; line-height: 1.6; margin: 7px 0; }
.danger-details .input { margin-bottom: 7px; }

/* Forms layout */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.form-aside { display: flex; flex-direction: column; gap: 12px; }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 17px; box-shadow: var(--shadow-sm); }
.info-card-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; margin-bottom: 10px; }
.info-card h3 { font-size: 13px; margin-bottom: 4px; }
.info-card p { font-size: 11px; color: var(--muted); line-height: 1.7; }
.info-card-muted { background: #fbfdfc; }
.plain-list { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.plain-list li { position: relative; padding-left: 12px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.plain-list li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--teal-400); }

/* Import */
.import-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.import-main { display: flex; flex-direction: column; gap: 18px; }
.import-aside { display: flex; flex-direction: column; gap: 12px; }
.step-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 14px; }
.step-num { width: 27px; height: 27px; border-radius: 9px; background: var(--teal-600); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.step-head h3 { font-size: 14px; }
.step-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.step-head .btn { margin-left: auto; }
.template-preview { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fbfdfc; }
.template-table { font-size: 10.5px; min-width: 550px; }
.template-row { display: grid; grid-template-columns: .8fr 1fr 1fr 1.4fr 1.8fr; border-bottom: 1px solid var(--line); }
.template-row:last-child { border-bottom: 0; }
.template-row span { padding: 8px 10px; border-right: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.template-row span:last-child { border-right: 0; }
.template-row-head { background: var(--teal-50); color: var(--teal-800); font-weight: 700; }
.template-preview { overflow-x: auto; }
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 26px 18px;
  background: #fbfdfc; text-align: center; cursor: pointer; transition: .16s ease;
}
.dropzone input[type="file"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; pointer-events: none;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--teal-400); background: var(--teal-50); }
.dropzone-icon { color: var(--teal-600); margin-bottom: 3px; }
.dropzone-title { font-size: 12.5px; font-weight: 700; }
.dropzone-hint { font-size: 10.5px; color: var(--muted); }
.dropzone.has-file .dropzone-title { color: var(--teal-700); }

/* Links */
.links-table .link-cell { display: flex; align-items: center; gap: 3px; min-width: 330px; max-width: 520px; }
.links-table .link-cell .input { font-size: 10.5px; color: var(--muted); }
.links-table td { padding-top: 10px; padding-bottom: 10px; }
.join-share-card {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 20px 22px; margin-bottom: 18px; border-color: #cfe9e2;
  background: linear-gradient(135deg, var(--teal-50), #fff 62%);
}
.join-share-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.join-share-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--teal-600); color: #fff; display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 8px 18px rgba(15,143,130,.2); }
.join-share-main h3 { font-size: 15px; margin-top: 1px; }
.join-share-main p { color: var(--muted); font-size: 11.5px; line-height: 1.7; margin-top: 3px; max-width: 560px; }
.join-share-actions { flex: 0 0 430px; max-width: 100%; }
.join-share-link { display: flex; gap: 7px; align-items: center; }
.join-share-link .input { font-size: 10.5px; color: var(--muted); }
.join-share-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.join-share-meta form { display: inline; }
.text-link-muted { color: var(--muted-light); font-weight: 500; font-size: 10.5px; }
.text-link-muted:hover { color: var(--danger); }
.links-subheading { margin-top: 6px; }

/* Export */
.export-hero { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 26px 28px; margin-bottom: 18px; background: linear-gradient(130deg, #f7fdfb, #fff); border-color: #d5ebe5; }
.export-hero-main { display: flex; align-items: center; gap: 15px; min-width: 0; }
.export-icon { width: 58px; height: 58px; border-radius: 17px; background: var(--teal-600); color: #fff; display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 10px 23px rgba(15,143,130,.2); }
.export-hero h2 { font-size: 22px; letter-spacing: -.02em; margin-top: 2px; }
.export-hero p { color: var(--muted); font-size: 11.5px; margin-top: 4px; max-width: 600px; }
.export-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.export-hint { color: var(--muted-light); font-size: 10px; max-width: 240px; text-align: right; }
.result-hero { display: flex; align-items: center; gap: 15px; padding: 22px 24px; margin-bottom: 16px; background: linear-gradient(130deg, var(--teal-50), #fff); border-color: #d5ebe5; }
.result-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--teal-600); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.result-hero h2 { font-size: 19px; }
.result-hero p { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 0 4px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 18px; }
.settings-aside { display: flex; flex-direction: column; gap: 14px; }
.settings-main > .card { padding: 22px; }
.settings-icon { width: 35px; height: 35px; border-radius: 10px; background: var(--mint); color: var(--teal-700); display: grid; place-items: center; }
.ocr-info { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--mint); margin-bottom: 16px; }
.ocr-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); display: grid; place-items: center; color: var(--teal-600); }
.ocr-info strong { font-size: 12px; }
.ocr-info p { color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.test-result { font-size: 11.5px; padding: 9px 12px; border-radius: 9px; background: var(--mint); color: var(--teal-800); }
.test-result.is-error { background: var(--danger-soft); color: var(--danger); }
.stat-list { display: flex; flex-direction: column; gap: 0; }
.stat-list div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.stat-list div:last-child { border-bottom: 0; }
.stat-list dt { color: var(--muted); font-size: 11px; }
.stat-list dd { margin: 0; font-size: 11.5px; font-weight: 700; }
.data-path { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.data-path span { font-size: 9.5px; color: var(--muted); }
.data-path code { font-size: 9.5px; word-break: break-all; color: var(--muted); background: var(--mint); border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; }
.check-list-static { margin-top: 4px; }

/* Auth */
.auth-body { background: #eef7f4; min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 44% 56%; }
.auth-aside {
  position: relative; overflow: hidden; padding: 38px 48px;
  background: radial-gradient(circle at 84% 16%, rgba(89, 218, 200, .3), transparent 31%),
              linear-gradient(150deg, var(--teal-900), var(--teal-700) 60%, #118f82);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.auth-brand { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.auth-aside-copy { position: relative; z-index: 2; max-width: 500px; }
.eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .18em; color: var(--teal-600); text-transform: uppercase; }
.eyebrow-light { color: #a8e9df; }
.auth-aside-copy h1 { font-size: 36px; line-height: 1.42; letter-spacing: -.035em; margin: 14px 0 15px; font-weight: 800; }
.auth-aside-copy > p:not(.eyebrow) { color: #c5e5df; font-size: 13px; line-height: 1.9; max-width: 430px; }
.auth-feature-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.auth-feature-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #d8f3ee; }
.auth-feature-list li span { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.13); display: inline-grid; place-items: center; color: #9fe9dd; }
.auth-aside-foot { position: relative; z-index: 2; color: #a7d7cf; font-size: 10.5px; }
.auth-aside-foot span { display: inline-flex; align-items: center; gap: 5px; }
.auth-orb { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.auth-orb-1 { width: 460px; height: 460px; right: -220px; bottom: -170px; }
.auth-orb-2 { width: 260px; height: 260px; right: -70px; bottom: -70px; background: rgba(255,255,255,.03); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 40px 24px; position: relative; background: #fff; }
.auth-mobile-brand { display: none; }
.auth-form-wrap { width: 100%; max-width: 390px; }
.auth-form-head { margin-bottom: 22px; }
.auth-form-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; margin-bottom: 12px; }
.auth-form-head h2 { font-size: 26px; letter-spacing: -.035em; line-height: 1.35; }
.auth-form-head p { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.7; }
.auth-tip { display: flex; align-items: flex-start; gap: 7px; margin-top: 18px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.auth-tip .icon { color: var(--teal-600); margin-top: 1px; }
.auth-copyright { color: var(--muted-light); font-size: 9.5px; margin-top: 30px; }
.form-stack .btn-block { margin-top: 3px; }

/* Error */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.error-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 36px; text-align: center; box-shadow: var(--shadow-md); }
.error-mark { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); margin: 0 auto 14px; }
.error-card h1 { font-size: 24px; letter-spacing: -.03em; margin: 5px 0 8px; }
.error-card > p:not(.eyebrow):not(.error-foot) { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.error-actions { margin-top: 18px; }
.error-foot { color: var(--muted-light); font-size: 9.5px; margin-top: 20px; }

/* ===================== Self registration ===================== */
.join-body { background: #f3faf7; min-height: 100vh; }
.join-main { max-width: 1120px; margin: 0 auto; padding: 30px 26px 10px; }
.join-flash { max-width: 900px; margin: 0 auto 14px; }
.join-layout { display: grid; grid-template-columns: minmax(0, 1fr) 450px; gap: 22px; align-items: stretch; }
.join-intro {
  position: relative; overflow: hidden; color: #fff; border-radius: 24px; padding: 38px 38px 30px;
  background: radial-gradient(circle at 88% 12%, rgba(97, 226, 207, .32), transparent 30%),
              linear-gradient(150deg, var(--teal-900), var(--teal-700) 62%, #12988a);
  box-shadow: 0 18px 45px rgba(8, 63, 58, .14);
  display: flex; flex-direction: column;
}
.join-intro::after { content: ""; position: absolute; width: 340px; height: 340px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; right: -150px; bottom: -140px; }
.join-intro h1 { font-size: 35px; line-height: 1.4; letter-spacing: -.04em; margin: 12px 0 12px; }
.join-lead { color: #c9e8e2; font-size: 12.5px; line-height: 1.9; max-width: 490px; }
.join-steps { display: flex; flex-direction: column; gap: 15px; margin-top: 26px; position: relative; z-index: 1; }
.join-step { display: flex; gap: 11px; align-items: flex-start; }
.join-step-num { width: 26px; height: 26px; border-radius: 9px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: 0 0 auto; }
.join-step div { display: flex; flex-direction: column; line-height: 1.45; }
.join-step strong { font-size: 12.5px; }
.join-step small { color: #b7ddd6; font-size: 10.5px; margin-top: 2px; }
.join-privacy { display: flex; gap: 9px; margin-top: auto; padding-top: 26px; color: #a9d8cf; position: relative; z-index: 1; }
.join-privacy > span { margin-top: 2px; }
.join-privacy p { font-size: 10px; line-height: 1.7; }
.join-privacy strong { color: #e0f5f0; font-size: 10.5px; }
.join-card { padding: 30px 30px 22px; align-self: center; }
.join-card-head { margin-bottom: 18px; }
.join-card-head h2 { font-size: 23px; letter-spacing: -.03em; margin-top: 10px; }
.join-card-head p { color: var(--muted); font-size: 11.5px; margin-top: 5px; line-height: 1.7; }
.join-card-head p i { color: var(--danger); font-style: normal; }
.join-form-grid { gap: 12px; }
.join-consent { background: var(--mint); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.join-footnote { display: flex; align-items: center; gap: 4px; justify-content: center; color: var(--muted-light); font-size: 9.5px; margin-top: 14px; }
.join-closed { max-width: 540px; margin: 50px auto; padding: 42px 32px; text-align: center; }
.join-closed-icon { width: 62px; height: 62px; border-radius: 18px; background: var(--teal-50); color: var(--teal-600); display: grid; place-items: center; margin: 0 auto 14px; }
.join-closed h1 { font-size: 24px; letter-spacing: -.03em; margin: 5px 0 8px; }
.join-closed p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.8; max-width: 380px; margin: 0 auto 18px; }
.honeypot { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ===================== Portal ===================== */
.portal-body { background: #f4faf8; }
.portal-header { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.portal-header-inner { max-width: 1180px; margin: 0 auto; padding: 13px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.portal-header-right { display: flex; align-items: center; gap: 12px; }
.secure-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: var(--teal-50); color: var(--teal-700); font-size: 10px; font-weight: 700; }
.portal-user { font-size: 11.5px; color: var(--muted); }
.portal-main { max-width: 1180px; margin: 0 auto; padding: 26px 26px 10px; }
.portal-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px 32px; border-radius: 22px; color: #fff; overflow: hidden; position: relative;
  background: radial-gradient(circle at 88% 18%, rgba(92,220,202,.33), transparent 28%),
              linear-gradient(118deg, var(--teal-800), #118f82);
  box-shadow: 0 18px 45px rgba(8,63,58,.15);
}
.portal-hero-copy { position: relative; z-index: 1; }
.portal-hero h1 { font-size: 30px; line-height: 1.4; letter-spacing: -.035em; margin: 8px 0 7px; }
.portal-hero-copy > p:not(.eyebrow) { color: #cce9e3; font-size: 12.5px; line-height: 1.8; max-width: 620px; }
.portal-hero-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 11px; color: #d5efea; align-items: center; }
.portal-hero-meta span { display: inline-flex; align-items: center; gap: 4px; }
.portal-hero .status-chip { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; }
.portal-hero-progress { position: relative; z-index: 1; text-align: center; flex: 0 0 auto; }
.ring-small { width: 112px; }
.ring-small .ring-inner { background: var(--teal-700); }
.ring-small .ring-inner strong { font-size: 25px; }
.portal-hero-progress p { font-size: 9.5px; color: #b8ddd6; margin-top: 6px; }
.portal-progress-steps { display: flex; align-items: center; gap: 8px; padding: 18px 4px 20px; }
.portal-step { display: flex; align-items: center; gap: 8px; }
.portal-step-num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); display: grid; place-items: center; font-size: 10.5px; font-weight: 800; flex: 0 0 auto; }
.portal-step.done .portal-step-num { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.portal-step div { display: flex; flex-direction: column; line-height: 1.35; }
.portal-step strong { font-size: 11.5px; }
.portal-step small { font-size: 9.5px; color: var(--muted); }
.portal-step-line { flex: 1; height: 1px; background: var(--line-strong); margin: 0 4px; }
.portal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 306px; gap: 18px; align-items: start; }
.portal-content { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.portal-content > .card { padding: 22px; }
.portal-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 85px; }
.portal-aside .card { padding: 18px; }
.progress-value { color: var(--teal-700); font-size: 13px; }
.upload-section .card-head { margin-bottom: 16px; }
.upload-secure { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: var(--teal-50); border: 1px solid #d5eee8; color: var(--teal-700); font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.id-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.single-upload-grid { display: grid; grid-template-columns: minmax(0, 560px); gap: 13px; }
.extra-accordion { display: flex; flex-direction: column; gap: 9px; }
.extra-acc-item { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.extra-acc-toggle {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border: 0; background: #fff; color: var(--ink); text-align: left; cursor: pointer;
}
.extra-acc-toggle:hover { background: #f8fcfb; }
.extra-acc-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-700); flex: 0 0 auto;
}
.extra-acc-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.extra-acc-copy strong { font-size: 10.5px; }
.extra-acc-copy small { color: var(--muted); font-size: 9px; margin-top: 1px; }
.extra-acc-state {
  font-size: 9px; color: #9a6a1f; background: #fff8e8;
  border-radius: 20px; padding: 3px 8px; flex: 0 0 auto;
}
.extra-acc-state.is-done { color: var(--teal-700); background: var(--teal-50); }
.extra-acc-arrow { color: var(--muted); display: inline-flex; transition: transform .16s ease; }
.extra-acc-item.is-open .extra-acc-arrow { transform: rotate(90deg); }
.extra-acc-panel { display: none; padding: 0 13px 13px; border-top: 1px solid var(--line); }
.extra-acc-item.is-open .extra-acc-panel { display: block; }
.extra-bank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.extra-bank-grid .upload-tile { margin-top: 12px; }
.upload-tile {
  position: relative; border: 1.5px dashed var(--line-strong); border-radius: 14px;
  background: #fbfdfc; overflow: hidden; cursor: pointer; transition: .16s ease;
  display: flex; flex-direction: column; min-height: 214px;
}
.upload-tile:hover, .upload-tile.is-dragover { border-color: var(--teal-400); background: var(--teal-50); }
.upload-tile.has-file { border-style: solid; border-color: var(--line); background: #fff; cursor: default; }
.upload-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 14px 12px; text-align: center; }
.upload-empty-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--teal-50); color: var(--teal-600); display: grid; place-items: center; margin-bottom: 9px; }
.upload-empty strong { font-size: 12px; }
.upload-empty small { font-size: 10px; color: var(--muted); margin-top: 2px; }
.upload-cta { margin-top: 10px; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line-strong); background: #fff; color: var(--teal-700); font-size: 10.5px; font-weight: 700; }
.upload-thumb { position: relative; height: 152px; background: #eef5f2; }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; color: #fff; font-size: 11px; font-weight: 600; background: rgba(8,63,58,.45); opacity: 0; transition: .2s ease; }
.upload-thumb:hover .upload-thumb-overlay { opacity: 1; }
.upload-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 11px; border-top: 1px solid var(--line); background: #fff; }
.upload-tile-foot > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.upload-tile-foot strong { font-size: 10.5px; }
.upload-tile-foot small { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 9px; margin-top: 1px; }
.upload-tile-foot small .icon { color: var(--teal-600); }
.upload-tile-actions { display: flex; gap: 0; }
.upload-tile-actions .icon-btn { width: 27px; height: 27px; }
.upload-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--teal-100); z-index: 2; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--teal-500); transition: width .2s ease; }
.upload-tip-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.upload-tip-row span, .upload-tip { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-light); font-size: 9.5px; }
.upload-tip { margin-top: 9px; }
.medical-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.medical-drop { display: flex; align-items: center; gap: 11px; border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 14px; background: #fbfdfc; cursor: pointer; position: relative; overflow: hidden; transition: .16s ease; }
.medical-drop:hover, .medical-drop.is-dragover { border-color: var(--teal-400); background: var(--teal-50); }
.medical-drop-icon { width: 39px; height: 39px; border-radius: 11px; background: var(--teal-50); color: var(--teal-600); display: grid; place-items: center; flex: 0 0 auto; }
.medical-drop > div:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.medical-drop strong { font-size: 11.5px; }
.medical-drop small { color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.medical-drop .btn { pointer-events: none; }
.consent-box { background: var(--mint); border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.submit-status { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.ready-dot, .wait-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ready-dot { background: var(--teal-500); box-shadow: 0 0 0 4px var(--teal-50); }
.wait-dot { background: var(--sand); box-shadow: 0 0 0 4px var(--sand-soft); }
.portal-help h4 { font-size: 11.5px; margin-bottom: 4px; }
.help-divider { height: 1px; background: var(--line); margin: 12px 0; }
.portal-contact { display: flex; gap: 10px; }
.contact-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: 0 0 auto; }
.portal-contact strong { font-size: 11.5px; }
.portal-contact p { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.portal-success { max-width: 760px; margin: 26px auto 18px; padding: 40px 34px 32px; text-align: center; background: linear-gradient(160deg, #f8fefc, #fff); border-color: #d5ebe5; }
.success-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--teal-600); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; box-shadow: 0 14px 30px rgba(15,143,130,.25); }
.portal-success h1 { font-size: 29px; letter-spacing: -.04em; margin: 5px 0 6px; }
.success-sub { color: var(--muted); font-size: 12px; }
.success-archive-no { display: inline-flex; flex-direction: column; gap: 2px; margin: 20px auto 12px; padding: 12px 34px; border-radius: 12px; background: var(--mint); border: 1px dashed #bfe3da; }
.success-archive-no span { font-size: 9.5px; color: var(--muted); }
.success-archive-no strong { font-family: Consolas, monospace; font-size: 21px; letter-spacing: .07em; color: var(--teal-800); }
.success-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 11px; margin-bottom: 20px; }
.success-meta span { display: inline-flex; align-items: center; gap: 4px; }
.success-actions { display: flex; justify-content: center; }
.success-note { margin-top: 18px; color: var(--muted-light); font-size: 10px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.portal-doc-summary { max-width: 760px; margin: 0 auto; }
.portal-footer { max-width: 1180px; margin: 14px auto 0; padding: 18px 26px 26px; display: flex; justify-content: space-between; gap: 14px; color: var(--muted-light); font-size: 9.5px; }
.portal-footer span { display: inline-flex; align-items: center; gap: 4px; }

/* Toast */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 8px; padding: 11px 13px; background: var(--teal-900); color: #fff; border-radius: 10px; font-size: 11.5px; line-height: 1.55; box-shadow: var(--shadow-lg); animation: toastIn .22s ease; }
.toast.toast-error { background: #7d2c22; }
.toast.toast-success { background: var(--teal-800); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Utility */
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.is-hidden { display: none !important; }

/* Responsive */
@media (max-width: 1180px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .import-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .portal-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .hero-copy h2 { font-size: 28px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 248px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .admin-main { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(5, 39, 35, .38); z-index: 35; opacity: 0; pointer-events: none; transition: .2s ease; }
  .sidebar-scrim.is-open { opacity: 1; pointer-events: auto; }
  .topbar { padding: 12px 20px; }
  .page-content { padding: 22px 20px 16px; }
  .content-grid-dashboard, .content-grid-dashboard-lower { grid-template-columns: 1fr; }
  .settings-grid, .import-layout, .form-layout { grid-template-columns: 1fr; }
  .settings-aside, .import-aside, .form-aside { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .detail-aside .danger-card { grid-column: 1 / -1; }
  .join-share-card { flex-direction: column; align-items: stretch; gap: 14px; }
  .join-share-actions { flex: 0 0 auto; }
  .portal-layout { grid-template-columns: 1fr; }
  .portal-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .portal-help { grid-column: 1 / -1; }
  .portal-contact { grid-column: 1 / -1; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100vh; padding: 30px 22px; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; width: 100%; max-width: 390px; color: var(--teal-900); }
  .auth-mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .auth-mobile-brand strong { font-size: 13.5px; }
  .export-hero { flex-direction: column; align-items: flex-start; }
  .export-actions { align-items: flex-start; }
  .export-hint { text-align: left; max-width: none; }
  .portal-hero { padding: 25px 24px; }
  .portal-hero h1 { font-size: 26px; }
}
@media (max-width: 700px) {
  .page-heading { flex-direction: column; align-items: flex-start; gap: 10px; }
  .heading-actions { justify-content: flex-start; }
  .topbar-date { display: none; }
  .stat-grid, .stat-grid-3 { grid-template-columns: 1fr 1fr; }
  .hero-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .hero-progress { align-self: flex-end; flex-direction: row; margin-top: -20px; }
  .ring { width: 106px; }
  .ring-inner strong { font-size: 24px; }
  .hero-copy h2 { font-size: 25px; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .profile-actions { justify-content: flex-start; }
  .id-grid { grid-template-columns: 1fr; }
  .id-slot { min-height: 170px; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .info-item:nth-child(odd) { border-right: 0; }
  .info-item-full { grid-column: auto; }
  .archive-meta-grid { grid-template-columns: 1fr; }
  .detail-aside, .settings-aside, .import-aside, .form-aside { grid-template-columns: 1fr; }
  .detail-aside .danger-card { grid-column: auto; }
  .portal-header-inner { padding: 11px 16px; }
  .brand-text small { display: none; }
  .secure-pill { display: none; }
  .portal-main { padding: 18px 14px 8px; }
  .portal-hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 22px 20px; }
  .portal-hero h1 { font-size: 24px; }
  .portal-hero-progress { align-self: flex-start; display: flex; align-items: center; gap: 10px; margin-top: 2px; }
  .portal-hero-progress p { margin: 0; max-width: 120px; text-align: left; line-height: 1.4; }
  .ring-small { width: 76px; }
  .ring-small .ring-inner strong { font-size: 19px; }
  .portal-progress-steps { display: flex; gap: 4px; padding: 14px 0 16px; }
  .portal-step { flex: 1; min-width: 0; gap: 4px; }
  .portal-step-line { display: none; }
  .portal-step div { min-width: 0; }
  .portal-step strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .portal-step small { display: none; }
  .portal-step-num { width: 22px; height: 22px; font-size: 9px; }
  .id-upload-grid { grid-template-columns: 1fr; }
  .single-upload-grid { grid-template-columns: 1fr; }
  .portal-content > .card { padding: 17px; }
  .portal-aside { grid-template-columns: 1fr; }
  .portal-success { margin-top: 12px; padding: 30px 18px 24px; }
  .portal-success h1 { font-size: 24px; }
  .success-archive-no { padding: 10px 22px; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .submit-row .btn { width: 100%; }
  .portal-footer { padding: 14px 16px 22px; flex-direction: column; gap: 4px; }
  .join-main { padding: 18px 14px 8px; }
  .join-layout { grid-template-columns: 1fr; }
  .join-intro { padding: 26px 22px; min-height: auto; }
  .join-intro h1 { font-size: 27px; }
  .join-lead { font-size: 12px; }
  .join-steps { margin-top: 20px; }
  .join-privacy { padding-top: 20px; }
  .join-card { padding: 22px 18px 18px; }
  .join-form-grid { grid-template-columns: 1fr; }
  .join-share-link { flex-direction: column; align-items: stretch; }
  .join-share-link .btn { width: 100%; }
  .links-table .link-cell { min-width: 250px; }
  .page-footer { flex-direction: column; gap: 4px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-grid-3 { grid-template-columns: 1fr; }
  .stat-card { padding: 14px 13px 12px; }
  .stat-label { font-size: 10.5px; }
  .stat-value { font-size: 24px; }
  .quick-grid { grid-template-columns: 1fr; }
  .page-content { padding: 18px 14px 12px; }
  .topbar { padding: 10px 14px; }
  .topbar-heading h1 { font-size: 16px; }
  .topbar-actions .btn { padding: 6px 9px; font-size: 11px; }
  .hero-copy h2 { font-size: 23px; }
  .hero-card { padding: 21px; }
  .hero-progress { display: none; }
  .auth-main { padding: 24px 18px; }
  .auth-form-head h2 { font-size: 23px; }
  .portal-header-right .portal-user { display: none; }
}

