:root {
  --paper: #f6f3ec;
  --paper-2: #efe9dd;
  --card: #fffdf9;
  --ink: #17171a;
  --ink-2: #3d3932;
  --muted: #7c7568;
  --line: #e6e0d4;
  --line-strong: #d8d0c0;
  --gold: #af8949;
  --gold-deep: #8f6c30;
  --gold-soft: #f1e6ce;
  --jade: #2f8f62;
  --jade-soft: #e8f3ec;
  --coral: #c9504b;
  --coral-soft: #fbebe9;
  --shadow-sm: 0 1px 2px rgba(23, 23, 26, 0.04);
  --shadow-md: 0 12px 32px rgba(23, 23, 26, 0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(1100px 520px at 90% -10%, #fbf6ea 0%, rgba(251, 246, 234, 0) 62%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
body.drawer-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; }
::selection { background: var(--gold-soft); color: var(--ink); }

.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.muted { color: var(--muted); }
.green { color: var(--jade); }
.gold { color: var(--gold); }
.red { color: var(--coral); }
.desktop-only { display: inline-flex; }

/* ---------- Shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 26px 18px 22px;
  background: #fbfaf6;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 0; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(23, 23, 26, 0.14);
}
.brand-mark.big { width: 52px; height: 52px; border-radius: 14px; font-size: 30px; }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-text strong { font-size: 16px; letter-spacing: 0.32em; font-weight: 700; }
.brand-text small { font-size: 8.5px; letter-spacing: 0.16em; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 32px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 43px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.nav-item:hover { background: #f4efe4; transform: translateX(2px); }
.nav-item.active { background: #f0e8d8; color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--gold); }
.nav-item.active .nav-icon { color: var(--gold-deep); }
.nav-icon { display: inline-flex; color: var(--muted); }
.nav-count { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); background: #f2ecdf; border-radius: 20px; padding: 1px 7px; min-width: 22px; text-align: center; }
.nav-item.active .nav-count { background: #fffaf0; color: var(--gold-deep); }

.side-section { margin-top: 28px; padding: 0 4px; }
.side-label { font-size: 9.5px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; padding: 0 8px; margin-bottom: 8px; }
.side-cat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  text-align: left;
  transition: background 0.16s ease;
}
.side-cat em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.side-cat:hover { background: #f4efe4; }
.side-cat.active { color: var(--gold-deep); background: #f6efdf; font-weight: 600; }
.side-foot { margin-top: auto; padding: 22px 6px 0; display: flex; flex-direction: column; gap: 10px; }
.storage { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.side-link { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 11px; }
.side-link .icon { width: 13px; height: 13px; }
.side-link:hover { color: var(--gold-deep); }
.version { font-size: 8.5px; letter-spacing: 0.14em; color: #aaa293; }

.main-wrap { margin-left: 248px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 26px 40px 16px;
  background: rgba(246, 243, 236, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-titles { min-width: 0; }
.mobile-brand { display: none; font-family: var(--font-serif); font-size: 20px; letter-spacing: 0.14em; font-weight: 700; }
.eyebrow { font-size: 9.5px; letter-spacing: 0.22em; color: var(--gold); font-weight: 600; text-transform: uppercase; }
.page-title { font-family: var(--font-serif); font-size: 32px; line-height: 1.12; font-weight: 600; letter-spacing: 0.01em; margin-top: 2px; }
.page-sub { margin-top: 5px; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; padding-bottom: 3px; flex: 0 0 auto; }
.main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 6px 40px 56px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn .icon { width: 15px; height: 15px; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: #fffdf9; box-shadow: 0 6px 16px rgba(23, 23, 26, 0.16); }
.btn-primary:hover { background: #2a2a2e; box-shadow: 0 8px 20px rgba(23, 23, 26, 0.2); }
.btn-ghost { background: rgba(255, 253, 249, 0.6); border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: #fffdf9; border-color: #c9c0ae; }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 6px 16px rgba(175, 137, 73, 0.24); }
.btn-danger { background: var(--coral); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 11.5px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 13.5px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 253, 249, 0.7);
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.icon-btn:hover { color: var(--ink); background: #fffdf9; border-color: var(--line-strong); }
.icon-btn.danger:hover, .icon-btn.danger.armed { color: var(--coral); border-color: #e7b9b5; background: var(--coral-soft); }
.icon-btn.small { min-width: 28px; width: 28px; height: 28px; padding: 0; }
.icon-btn .icon { width: 15px; height: 15px; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--gold-deep); font-size: 11.5px; font-weight: 600; }
.link-btn .icon { width: 13px; height: 13px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--coral); font-weight: 500; }
.link-btn:disabled { opacity: 0.4; cursor: default; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.button-row { display: flex; align-items: center; gap: 8px; }

/* ---------- Forms ---------- */
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.input, .select { height: 40px; padding: 0 12px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7568' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.textarea { padding: 12px; resize: vertical; line-height: 1.7; min-height: 90px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(175, 137, 73, 0.11); }
.input::placeholder, .textarea::placeholder { color: #aaa294; }
.select:disabled { background-color: #f4f0e8; color: #a09a8d; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }
.field-label em { color: var(--coral); font-style: normal; margin-left: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: span 2; }
.hint { font-size: 10.5px; color: var(--muted); }
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: #f1ebe0; border-radius: 10px; }
.seg-item { height: 30px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.seg-item.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(23, 23, 26, 0.08); }

/* ---------- Cards & stats ---------- */
.view { display: flex; flex-direction: column; gap: 20px; animation: viewIn 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); }
.pad-lg { padding: 22px 24px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-title { font-family: var(--font-serif); font-size: 19px; line-height: 1.25; font-weight: 600; margin-top: 3px; }
.badge-soft { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 20px; background: #f5efe2; color: var(--gold-deep); font-size: 10px; letter-spacing: 0.04em; }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 20px; padding: 0 7px; margin-left: 4px; border-radius: 20px; background: var(--gold-soft); color: var(--gold-deep); font-size: 11px; font-family: var(--font-sans); vertical-align: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.stat-card { position: relative; padding: 19px 20px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.stat-card::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; background: var(--gold); opacity: 0; }
.stat-card.accent::after { opacity: 0.65; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.stat-icon { color: var(--gold); opacity: 0.85; }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-value { font-family: var(--font-serif); font-size: 38px; line-height: 1.1; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 10.5px; color: var(--muted); }
.stat-foot strong { color: var(--ink-2); font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }

.category-bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-label { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }
.bar-label strong { font-family: var(--font-serif); font-size: 14px; font-weight: 600; }
.bar-track { height: 5px; background: #f0eadd; border-radius: 10px; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #d4b37a, var(--gold)); animation: barGrow 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) both; transform-origin: left; }

.donut-card { display: flex; flex-direction: column; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex: 1; }
.donut { width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%; background: conic-gradient(var(--jade) calc(var(--p) * 1%), #ece6d9 0); display: grid; place-items: center; }
.donut-hole { width: 96px; height: 96px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(230, 224, 212, 0.5); }
.donut-hole strong { font-family: var(--font-serif); font-size: 26px; line-height: 1; font-weight: 600; }
.donut-hole strong small { font-size: 12px; margin-left: 1px; }
.donut-hole span { font-size: 9.5px; color: var(--muted); margin-top: 5px; letter-spacing: 0.08em; }
.donut-legend { display: flex; flex-direction: column; gap: 9px; font-size: 11.5px; min-width: 90px; }
.donut-legend > div { display: flex; align-items: center; gap: 7px; }
.donut-legend strong { margin-left: auto; font-family: var(--font-serif); font-size: 14px; }
.legend-divider { height: 1px; background: var(--line); margin: 2px 0; }
.card-link { margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--gold-deep); font-weight: 600; }
.card-link .icon { width: 14px; height: 14px; }

.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid #f0ebe1; background: none; text-align: left; border-radius: 8px; transition: background 0.16s; }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { background: #faf6ee; }
.recent-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.recent-main strong { font-size: 12.5px; font-weight: 600; }
.recent-main small { font-size: 10px; color: var(--muted); }
.recent-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.recent-side small { font-size: 9px; color: #a39b8c; }
.season-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.season-item { background: #f8f4ea; border: 1px solid #efe7d8; border-radius: 13px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.season-item span { font-size: 11px; color: var(--ink-2); }
.season-item strong { font-family: var(--font-serif); font-size: 21px; color: var(--gold-deep); line-height: 1; }
.season-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: 0.08em; color: #a39b8c; }
.season-foot .icon { width: 13px; height: 13px; color: var(--gold); }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-action { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 253, 249, 0.72); text-align: left; transition: transform 0.2s, border-color 0.2s, background 0.2s; }
.quick-action:hover { transform: translateY(-2px); background: var(--card); border-color: var(--line-strong); }
.quick-action > .icon { width: 20px; height: 20px; color: var(--gold-deep); }
.quick-action span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-action strong { font-size: 12px; font-weight: 600; }
.quick-action small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-arrow { margin-left: auto; width: 14px !important; height: 14px !important; color: #b5ad9e !important; }

.wechat-tip { display: flex; align-items: center; gap: 10px; padding: 11px 13px 11px 16px; border: 1px solid #dfeadf; background: #eef6ef; border-radius: 14px; color: #4d6b4d; font-size: 11.5px; }
.wechat-tip > .icon { color: var(--jade); }
.wechat-tip span { flex: 1; }
.wechat-tip .icon-btn { border-color: transparent; background: transparent; height: 26px; min-width: 26px; }

/* ---------- Library ---------- */
.lib-shell { padding: 18px 20px 16px; }
.lib-toolbar { display: flex; align-items: center; gap: 12px; }
.search-box { position: relative; flex: 1; display: flex; align-items: center; }
.search-box > .icon { position: absolute; left: 13px; width: 16px; height: 16px; color: #a0988a; pointer-events: none; }
.search-box input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: #fffefb; padding: 0 38px; font-size: 13px; outline: none; transition: border-color 0.16s, box-shadow 0.16s; }
.search-box input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(175, 137, 73, 0.1); }
.search-box input::placeholder { color: #a8a092; }
.search-clear { position: absolute; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #f1ece1; color: var(--muted); display: none; align-items: center; justify-content: center; }
.search-clear.show { display: inline-flex; }
.search-clear .icon { width: 12px; height: 12px; }
.sort-select { width: 196px; height: 42px; border-radius: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 31px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 249, 0.7); color: var(--ink-2); font-size: 11.5px; transition: background 0.16s, border-color 0.16s, color 0.16s; }
.chip em { font-style: normal; font-size: 9.5px; color: var(--muted); background: #f2ede2; border-radius: 20px; padding: 1px 5px; min-width: 18px; text-align: center; }
.chip:hover { border-color: var(--line-strong); background: var(--card); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fffdf9; }
.chip.active em { background: rgba(255, 255, 255, 0.16); color: #fffdf9; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px dashed #ebe4d7; }
.mini-field { display: inline-flex; align-items: center; gap: 7px; }
.mini-field > span { font-size: 9.5px; letter-spacing: 0.08em; color: #a0988a; }
.select-sm { width: auto; min-width: 105px; height: 32px; border-radius: 8px; font-size: 11.5px; padding-left: 10px; background-position: right 9px center; padding-right: 27px; }
.filter-reset { margin-left: auto; color: var(--muted); font-weight: 500; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 4px 10px; }
.results-count { font-size: 12px; color: var(--ink-2); }
.results-count strong { font-family: var(--font-serif); font-size: 21px; font-weight: 600; margin-right: 2px; }
.results-tools { display: flex; align-items: center; gap: 14px; }
.table-card { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.data-table th { padding: 11px 14px; text-align: left; font-size: 9.5px; letter-spacing: 0.12em; color: #9d9586; text-transform: uppercase; font-weight: 600; background: #fdfbf5; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid #f0ebe1; font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.talent-row { cursor: pointer; transition: background 0.16s; }
.talent-row:hover { background: #fbf8f0; }
.check-cell { width: 38px; padding-right: 4px !important; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--ink); cursor: pointer; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.person-main strong { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.person-main small { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 50%; background: var(--avatar-bg, #ded3be); color: #4f463a; font-family: var(--font-serif); font-weight: 600; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.6); }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.md { width: 36px; height: 36px; font-size: 15px; }
.avatar.lg { width: 48px; height: 48px; font-size: 20px; }
.avatar.xl { width: 84px; height: 84px; font-size: 32px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.stack { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.stack small { font-size: 9.5px; }
.tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; background: #f2eee6; color: var(--ink-2); font-size: 9.5px; border: 1px solid #ebe4d8; white-space: nowrap; }
.tag.gold { background: var(--gold-soft); border-color: #e7d7b8; color: var(--gold-deep); }
.cat-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-size: 9.5px; white-space: nowrap; }
.cat-0 { background: #f0e7d8; color: #83632e; }
.cat-1 { background: #e8ede4; color: #4e6b4a; }
.cat-2 { background: #f5e3dd; color: #a05545; }
.cat-3 { background: #e7e4f0; color: #605284; }
.cat-4 { background: #e2ebee; color: #406673; }
.cat-5 { background: #efe4ea; color: #855063; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot.on { background: var(--jade); box-shadow: 0 0 0 3px rgba(47, 143, 98, 0.13); }
.dot.off { background: var(--coral); box-shadow: 0 0 0 3px rgba(201, 80, 75, 0.1); }
.dot-label { font-size: 11px; }
.status-cell { display: inline-flex; align-items: center; gap: 7px; }
.status-cell small { font-size: 10px; color: var(--muted); }
.stage-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 2px 7px; border-radius: 5px; font-size: 9.5px; }
.stage-badge.pass { background: var(--jade-soft); color: var(--jade); }
.stage-badge.fail { background: var(--coral-soft); color: var(--coral); }
.stage-badge.wait { background: #f4efe4; color: #8d816e; }
.phone-link { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.phone-link:hover { color: var(--gold-deep); }
.row-arrow { color: #c5bdae; opacity: 0; transition: opacity 0.16s; }
.talent-row:hover .row-arrow { opacity: 1; }
.talent-cards { display: none; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state > .icon { width: 34px; height: 34px; color: var(--gold); background: var(--gold-soft); border-radius: 50%; padding: 8px; margin-bottom: 2px; }
.empty-state h3 { font-family: var(--font-serif); font-size: 20px; color: var(--ink); font-weight: 600; }
.empty-state p { font-size: 11.5px; line-height: 1.8; }
.empty-actions { display: flex; gap: 9px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.empty-state.compact { padding: 30px 18px; justify-content: center; height: 100%; min-height: 290px; }

/* ---------- Import ---------- */
.split-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.import-textarea { height: 292px; min-height: 220px; font-size: 12.5px; background: #fffefb; }
.import-actions { margin-top: 13px; }
.guide-card .card-head { margin-bottom: 12px; }
.code-template { margin: 0 0 13px; padding: 13px 14px; max-height: 300px; overflow: auto; background: #f8f4ea; border: 1px solid #eee5d5; border-radius: 12px; font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 10.5px; line-height: 1.9; color: #5c5548; white-space: pre-wrap; }
.guide-list { display: flex; flex-direction: column; gap: 7px; font-size: 10.5px; color: var(--muted); }
.guide-list span { display: flex; align-items: center; gap: 7px; }
.guide-list .icon { width: 13px; height: 13px; color: var(--jade); }
.preview-card { padding: 20px 22px; }
.preview-wrap { max-height: 430px; overflow: auto; }
.import-table { min-width: 820px; }
.import-table td { padding: 8px 10px; }
.import-table th { padding: 9px 10px; }
.preview-index { font-family: var(--font-serif); color: #aaa293; font-size: 11px; width: 32px; }
.cell-input, .cell-select { width: 100%; height: 32px; border: 1px solid transparent; border-radius: 7px; background: #fbf8f1; padding: 0 8px; font-size: 11.5px; outline: none; }
.cell-input:focus, .cell-select:focus { border-color: var(--gold); background: #fffefb; box-shadow: 0 0 0 3px rgba(175, 137, 73, 0.1); }
.cell-select { padding-right: 22px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237c7568' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; appearance: none; }
.import-table tr.has-issue td { background: #fffaf4; }
.import-table .muted-cell { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.issue-text { display: flex; align-items: center; gap: 3px; font-size: 9px; color: #b17b3e; margin-top: 4px; }
.issue-text .icon { width: 10px; height: 10px; }
.warning-strip { display: flex; gap: 9px; padding: 10px 12px; border-radius: 10px; background: #fdf6e9; border: 1px solid #f0dfbf; color: #946b2d; font-size: 10.5px; margin-bottom: 12px; }
.warning-strip > .icon { width: 15px; height: 15px; margin-top: 1px; }
.warning-strip div { display: flex; flex-direction: column; gap: 2px; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.preview-foot strong { color: var(--ink); font-family: var(--font-serif); font-size: 16px; }
.result-card { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; background: linear-gradient(100deg, #fbf8ef, #fffdf9); }
.result-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--jade-soft); color: var(--jade); display: grid; place-items: center; }
.result-main { flex: 1; min-width: 0; }
.result-main h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; }
.result-main > p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.result-stats { display: flex; gap: 18px; margin-top: 11px; font-size: 11px; color: var(--muted); }
.result-stats strong { font-family: var(--font-serif); font-size: 18px; margin-right: 2px; }
.result-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.result-list span { font-size: 9.5px; color: #8b6a34; background: #f7edda; border-radius: 5px; padding: 2px 7px; }
.result-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* ---------- Interview ---------- */
.roster-textarea { height: 188px; min-height: 150px; font-size: 12.5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.last-roster { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 10px; color: var(--muted); }
.last-roster .icon { width: 13px; height: 13px; color: var(--gold); }
.analysis-card { min-height: 100%; }
.analysis-summary { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.analysis-summary strong { font-family: var(--font-serif); font-size: 16px; color: var(--ink); }
.analysis-summary .dot { margin-left: 6px; }
.analysis-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-title { font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.match-list { display: flex; flex-direction: column; gap: 7px; max-height: 330px; overflow-y: auto; padding-right: 3px; }
.match-item { display: flex; gap: 9px; padding: 9px 10px; border: 1px solid #eee7da; border-radius: 10px; background: #fffefb; align-items: flex-start; }
.match-item .dot { margin-top: 5px; }
.match-item.unmatched { background: #fff9f8; border-color: #f3dedb; }
.match-icon { width: 14px !important; height: 14px !important; margin-top: 3px; }
.match-icon.on { color: var(--jade); }
.match-main { min-width: 0; flex: 1; }
.match-name { font-size: 11.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.match-sub { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.mini-warn { font-size: 8.5px; color: #a5762f; background: #fbf1dd; border-radius: 4px; padding: 1px 4px; font-weight: 400; }
.match-talents { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.match-talent { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e8e1d4; background: #fbf8f1; border-radius: 6px; padding: 2px 5px; font-size: 9.5px; color: var(--ink-2); }
.match-talent .dot { width: 5px; height: 5px; box-shadow: none; }
.match-talent small { color: var(--muted); font-size: 8.5px; }
.match-talent em { font-style: normal; color: var(--jade); font-size: 8.5px; }
.match-talent:hover { border-color: var(--gold); }
.mini-empty { padding: 14px 10px; font-size: 10.5px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
.mini-empty.success { color: var(--jade); border-color: #cfe5d8; background: #f5fbf7; }
.analysis-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
.analysis-foot strong { color: var(--ink); }
.interview-table { min-width: 680px; }
.interview-table td { padding: 10px 12px; }

/* ---------- Export ---------- */
.export-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.scope-list { display: flex; flex-direction: column; gap: 8px; }
.scope-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fffefb; text-align: left; transition: border-color 0.16s, background 0.16s; }
.scope-item:hover { border-color: var(--line-strong); }
.scope-item.active { border-color: var(--gold); background: #fdf8ed; box-shadow: 0 0 0 3px rgba(175, 137, 73, 0.08); }
.scope-item:disabled { opacity: 0.4; cursor: not-allowed; }
.scope-radio { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; border: 1.5px solid #c8c0b1; background: #fff; position: relative; }
.scope-item.active .scope-radio { border-color: var(--gold); }
.scope-item.active .scope-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold); }
.scope-copy { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.scope-copy strong { font-size: 12px; font-weight: 600; }
.scope-copy small { font-size: 9.5px; color: var(--muted); }
.scope-item em { font-style: normal; font-family: var(--font-serif); font-size: 17px; color: var(--gold-deep); }
.export-action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.export-note { display: flex; align-items: flex-start; gap: 6px; font-size: 9.5px; color: #a08b68; margin-top: 12px; line-height: 1.6; }
.export-note .icon { width: 12px; height: 12px; margin-top: 1px; }
.sheet-list { display: flex; flex-direction: column; gap: 8px; }
.sheet-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #faf6ed; border: 1px solid #f0e8da; border-radius: 10px; }
.sheet-index { font-family: var(--font-serif); font-size: 15px; color: var(--gold); width: 20px; }
.sheet-item div { display: flex; flex-direction: column; }
.sheet-item strong { font-size: 11.5px; }
.sheet-item small { font-size: 9.5px; color: var(--muted); }
.column-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 15px; }
.column-list span { font-size: 9px; color: var(--muted); background: #f4efe4; border-radius: 4px; padding: 2px 6px; }
.backup-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.backup-row div { display: flex; flex-direction: column; gap: 1px; }
.backup-row strong { font-size: 11.5px; }
.backup-row small { font-size: 9px; color: var(--muted); }

/* ---------- Export formats & bundle ---------- */
.export-grid { grid-template-columns: 1.1fr 1.1fr; }
.bundle-card { grid-column: 1 / -1; }
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.format-item { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 13px 13px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fffefb; text-align: left; transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s; cursor: pointer; }
.format-item:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(175, 137, 73, 0.12); }
.format-item .format-icon { width: 20px; height: 20px; color: var(--gold-deep); }
.format-item .format-icon .icon { width: 20px; height: 20px; }
.format-item strong { font-size: 11.5px; }
.format-item small { font-size: 9px; color: var(--muted); line-height: 1.5; }
.bundle-card .bundle-desc { font-size: 10.5px; color: var(--muted); line-height: 1.8; margin-top: 10px; }
.bundle-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.check-item { display: flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fffefb; font-size: 11px; cursor: pointer; transition: border-color 0.16s, background 0.16s; }
.check-item:has(input:checked) { border-color: var(--gold); background: #fdf8ed; }
.check-item input { accent-color: var(--gold-deep); width: 13px; height: 13px; }

/* ---------- Video upload ---------- */
.video-box { display: flex; flex-direction: column; gap: 10px; padding: 13px; border: 1px dashed var(--line-strong); border-radius: 11px; background: #fffefb; }
.video-box .file-icon .icon, .video-box .icon { width: 18px; height: 18px; }
.video-box > .file-icon { align-self: center; color: var(--gold-deep); }
.video-preview { width: 100%; max-height: 320px; border-radius: 9px; background: #17171a; }
.upload-progress { height: 5px; border-radius: 999px; background: #efe9dc; overflow: hidden; }
.upload-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #d8b878); border-radius: 999px; transition: width 0.2s ease; }
.note-card { display: flex; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #faf7ef; }
.note-card > .icon { color: var(--gold); width: 18px; height: 18px; margin-top: 1px; }
.note-card strong { font-size: 11.5px; }
.note-card p { font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.8; }
.note-card .link-btn { margin-top: 7px; }

/* ---------- Bottom nav / bulk ---------- */
.bottom-nav { display: none; }
.bulk-bar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; width: min(760px, calc(100% - 40px)); animation: riseIn 0.24s ease both; }
.bulk-inner { display: flex; align-items: center; gap: 14px; padding: 8px 9px 8px 18px; background: var(--ink); color: #f6f3ec; border-radius: 999px; box-shadow: 0 16px 40px rgba(23, 23, 26, 0.28); }
.bulk-count { font-size: 11px; white-space: nowrap; }
.bulk-count strong { font-family: var(--font-serif); font-size: 18px; margin: 0 2px; }
.bulk-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.bulk-actions button { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: #f6f3ec; font-size: 10.5px; white-space: nowrap; }
.bulk-actions button:hover { background: rgba(255, 255, 255, 0.1); }
.bulk-actions button .icon { width: 13px; height: 13px; }
.bulk-actions button.danger { color: #f0a09c; }
.bulk-actions button.danger.armed { background: var(--coral); color: #fff; }

/* ---------- Drawer ---------- */
.drawer-layer { position: fixed; inset: 0; z-index: 90; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(23, 23, 26, 0.38); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fadeIn 0.25s ease both; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(570px, 100%); background: var(--paper); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(23, 23, 26, 0.16); animation: slideIn 0.32s cubic-bezier(0.2, 0.75, 0.25, 1) both; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); background: rgba(246, 243, 236, 0.94); }
.drawer-title h2 { font-family: var(--font-serif); font-size: 24px; font-weight: 600; margin-top: 3px; }
.drawer-head-actions { display: flex; align-items: center; gap: 7px; }
.drawer-head-actions .icon-btn.danger { font-size: 10.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 26px; }
.form-section { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid #ece6da; }
.form-section:last-child { border-bottom: 0; margin-bottom: 0; }
.form-title { font-size: 9.5px; letter-spacing: 0.16em; color: var(--gold); text-transform: uppercase; font-weight: 600; margin-bottom: 13px; }
.photo-row { display: flex; align-items: center; gap: 16px; padding-bottom: 4px; }
.photo-copy { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.photo-copy strong { font-size: 12.5px; }
.photo-copy small { font-size: 9.5px; color: var(--muted); }
.photo-copy .btn { margin-top: 4px; }
.seg-block { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: #f1ebe0; border-radius: 10px; }
.seg-choice { position: relative; }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice span { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 8px; color: var(--muted); font-size: 11.5px; cursor: pointer; transition: background 0.16s, color 0.16s; }
.seg-choice input:checked + span { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(23, 23, 26, 0.08); }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fffefb; cursor: pointer; margin-bottom: 13px; }
.switch-copy { display: flex; flex-direction: column; flex: 1; gap: 1px; }
.switch-copy strong { font-size: 11.5px; }
.switch-copy small { font-size: 9.5px; color: var(--muted); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: #e2dccf; position: relative; transition: background 0.2s; flex: 0 0 38px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(23, 23, 26, 0.2); transition: transform 0.2s; }
.switch-row input:checked + .switch { background: var(--jade); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.interview-fields { transition: opacity 0.2s; }
.interview-fields.is-off { opacity: 0.5; }
.file-box { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px dashed var(--line-strong); border-radius: 11px; background: #fffefb; }
.file-icon { width: 32px; height: 32px; border-radius: 8px; background: #f3ede1; color: var(--gold-deep); display: grid; place-items: center; flex: 0 0 32px; }
.file-icon .icon { width: 15px; height: 15px; }
.file-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.file-meta strong { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta small, .file-meta a { font-size: 9px; color: var(--muted); }
.file-meta a { color: var(--gold-deep); }
.drawer-foot { display: flex; align-items: center; gap: 10px; padding: 13px 24px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(251, 249, 244, 0.96); backdrop-filter: blur(10px); }
.form-error { flex: 1; color: var(--coral); font-size: 10.5px; line-height: 1.4; }
.drawer-foot-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.drawer-foot .btn { height: 38px; }

/* ---------- Toast / splash ---------- */
#toastRoot { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast { display: flex; align-items: center; gap: 8px; padding: 9px 15px; background: var(--ink); color: #f7f4ec; border-radius: 999px; font-size: 11.5px; box-shadow: 0 12px 28px rgba(23, 23, 26, 0.26); animation: toastIn 0.25s ease both; max-width: 100%; }
.toast .icon { width: 14px; height: 14px; color: #8fd0ac; }
.toast-info .icon { color: #e0c48c; }
.toast-error .icon { color: #f0a09c; }
.toast.leaving { animation: toastOut 0.24s ease both; }
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.splash-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.splash-brand strong { font-family: var(--font-serif); font-size: 26px; letter-spacing: 0.36em; color: var(--ink); margin-top: 4px; }
.splash-brand small { font-size: 8.5px; letter-spacing: 0.2em; }
.splash p { font-size: 11.5px; }
.loading-line { width: 160px; height: 2px; background: #e8e1d4; border-radius: 10px; overflow: hidden; margin-top: 8px; }
.loading-line i { display: block; width: 40%; height: 100%; background: var(--gold); border-radius: 10px; animation: loadingSlide 1.15s ease-in-out infinite; }
.error-screen .btn { margin-top: 10px; }

/* ---------- Animations ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes loadingSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ---------- Scrollbars ---------- */
* { scrollbar-width: thin; scrollbar-color: #d8d0c0 transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #d8d0c0; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .sidebar { width: 220px; }
  .main-wrap { margin-left: 220px; }
  .topbar { padding: 22px 28px 14px; }
  .main { padding: 4px 28px 48px; }
  .dash-grid { grid-template-columns: 1.45fr 1fr; }
  .stat-value { font-size: 34px; }
  .pad-lg { padding: 20px 20px; }
}

@media (max-width: 1023px) {
  .sidebar { display: none; }
  .main-wrap { margin-left: 0; }
  .topbar { padding: 14px 18px 12px; }
  .main { padding: 4px 18px calc(100px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 55;
    background: rgba(251, 250, 246, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 2px; border-radius: 9px; color: var(--muted); font-size: 9px; letter-spacing: 0.02em; }
  .bnav-item .icon { width: 19px; height: 19px; }
  .bnav-item.active { color: var(--gold-deep); font-weight: 600; }
  .bnav-item.active .bnav-icon { color: var(--gold-deep); }
  .mobile-brand { display: inline-block; }
  .topbar-left { gap: 12px; }
  .page-title { font-size: 25px; }
  .page-sub { font-size: 11px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dash-grid { grid-template-columns: 1fr; }
  .split-2, .export-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-action:last-child { grid-column: span 2; }
  .analysis-columns { grid-template-columns: 1fr; }
  .match-list { max-height: 250px; }
  .bulk-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .drawer { width: 100%; }
  .drawer-body { padding: 18px 20px 24px; }
  .drawer-head { padding: 16px 20px 14px; }
  .drawer-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
  #toastRoot { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .stat-grid.three .stat-card { padding: 15px 14px 13px; }
  .stat-grid.three .stat-value { font-size: 28px; }
}

@media (max-width: 767px) {
  .topbar { padding: 12px 16px 10px; }
  .main { padding: 2px 16px calc(100px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 22px; }
  .page-sub { font-size: 10.5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .topbar-actions .btn { height: 36px; padding: 0 13px; font-size: 11.5px; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px 14px 12px; border-radius: 15px; }
  .stat-label { font-size: 9px; }
  .stat-value { font-size: 29px; margin: 7px 0 4px; }
  .stat-foot { font-size: 9.5px; }
  .stat-icon .icon { width: 15px; height: 15px; }
  .card { border-radius: 16px; }
  .pad-lg { padding: 17px 16px; }
  .card-head { margin-bottom: 14px; }
  .card-title { font-size: 17px; }
  .view { gap: 14px; }
  .cat-bars { gap: 11px; }
  .donut-wrap { gap: 18px; }
  .donut { width: 118px; height: 118px; flex-basis: 118px; }
  .donut-hole { width: 86px; height: 86px; }
  .donut-hole strong { font-size: 23px; }
  .quick-actions { grid-template-columns: 1fr; gap: 9px; }
  .quick-action:last-child { grid-column: span 1; }
  .quick-action { padding: 13px 14px; }
  .lib-shell { padding: 14px 14px 12px; }
  .lib-toolbar { flex-wrap: wrap; gap: 8px; }
  .search-box { flex-basis: 100%; }
  .sort-select { width: 100%; height: 36px; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-top: 11px; -webkit-overflow-scrolling: touch; }
  .chip { flex: 0 0 auto; height: 29px; font-size: 10.5px; }
  .filter-row { gap: 9px; margin-top: 10px; padding-top: 10px; }
  .seg { width: 100%; }
  .seg-item { flex: 1; padding: 0 8px; height: 28px; font-size: 10.5px; }
  .mini-field { flex: 1 1 calc(50% - 5px); }
  .mini-field .select { flex: 1; width: 100%; min-width: 0; }
  .filter-reset { margin-left: 0; flex-basis: 100%; justify-content: flex-end; }
  .results-head { margin: 14px 2px 8px; }
  .results-count strong { font-size: 19px; }
  .results-tools { gap: 9px; }
  .talent-table { display: none; }
  .table-card { display: none; }
  .talent-cards { display: flex; flex-direction: column; gap: 9px; }
  .talent-card { position: relative; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-sm); }
  .talent-card:active { background: #fbf7ef; }
  .tc-head { display: flex; align-items: center; gap: 10px; }
  .tc-check { position: absolute; top: 12px; right: 12px; }
  .tc-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
  .tc-name strong { font-size: 13.5px; }
  .tc-name small { font-size: 9.5px; color: var(--muted); }
  .tc-status { display: flex; align-items: center; gap: 5px; margin-right: 22px; }
  .tc-status small { font-size: 9px; color: var(--muted); }
  .tc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
  .tc-foot { display: flex; align-items: center; gap: 9px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed #eee7d9; font-size: 10.5px; color: var(--muted); }
  .tc-foot .phone-link { font-size: 10.5px; }
  .tc-foot .stage-badge { margin-left: auto; }
  .tc-arrow { width: 13px; height: 13px; color: #c2baab; }
  .import-textarea { height: 230px; }
  .code-template { max-height: 240px; font-size: 10px; }
  .preview-card { padding: 16px 14px; }
  .preview-wrap { max-height: 360px; }
  .preview-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .preview-foot .button-row { justify-content: flex-end; }
  .result-card { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .result-main { flex-basis: calc(100% - 52px); }
  .result-actions { flex-basis: 100%; justify-content: flex-end; }
  .result-actions .btn { height: 34px; font-size: 11px; }
  .result-stats { gap: 12px; flex-wrap: wrap; }
  .form-row { grid-template-columns: 1fr; gap: 10px; }
  .roster-textarea { height: 160px; }
  .analysis-summary { margin-top: 4px; }
  .analysis-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .analysis-foot .btn { width: 100%; }
  .interview-table { min-width: 600px; }
  .scope-item { padding: 11px 12px; }
  .export-action-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .export-action-row .btn { width: 100%; }
  .backup-row { flex-wrap: wrap; }
  .note-card { padding: 14px 14px; }
  .bulk-bar { width: calc(100% - 24px); bottom: calc(72px + env(safe-area-inset-bottom)); }
  .bulk-inner { flex-direction: column; align-items: stretch; gap: 7px; padding: 10px 11px; border-radius: 16px; }
  .bulk-count { text-align: center; }
  .bulk-actions { justify-content: space-between; gap: 0; }
  .bulk-actions button { padding: 0 7px; font-size: 9.5px; height: 30px; }
  .bulk-actions button .icon { width: 12px; height: 12px; }
  .drawer-head { padding: 14px 16px 12px; }
  .drawer-title h2 { font-size: 21px; }
  .drawer-body { padding: 16px 16px 22px; }
  .drawer-foot { padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .span-2 { grid-column: span 1; }
  .drawer { width: 100%; }
  .photo-row { gap: 13px; }
  .avatar.xl { width: 72px; height: 72px; font-size: 28px; }
  .wechat-tip { font-size: 10.5px; }
}

@media (max-width: 560px) {
  .stat-grid.three { grid-template-columns: 1fr 1fr; }
  .stat-grid.three .stat-card:last-child { grid-column: span 2; }
  .page-sub { display: none; }
  .topbar-actions .btn.ghost { display: none; }
  .result-main { flex-basis: 100%; }
  .season-grid { gap: 8px; }
  .season-item { padding: 10px; }
  .season-item strong { font-size: 18px; }
  .donut { width: 106px; height: 106px; flex-basis: 106px; }
  .donut-hole { width: 78px; height: 78px; }
  .donut-hole strong { font-size: 21px; }
  .donut-legend { font-size: 10.5px; gap: 7px; }
}

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