:root {
  --sub2api-green:#16b6a7;
  --sub2api-green-dark:#0f8f84;
  --sub2api-green-soft:#e9fbf7;
  --sub2api-sidebar:#ffffff;
  --sub2api-font:"Noto Sans SC","PingFang SC","Microsoft YaHei","HarmonyOS Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --sidebar-width:176px;
  --primary:var(--sub2api-green);
  --primary-dark:var(--sub2api-green-dark);
  --primary-soft:var(--sub2api-green-soft);
  --sidebar:var(--sub2api-sidebar);
  --bg-a:#f7fffc;
  --bg-b:#eef9fb;
  --ink:#17202c;
  --muted:#657181;
  --line:#e7eef4;
  --panel:#ffffff;
  --amber:#fff1cc;
  --danger:#ef4444;
  --danger-soft:#fef2f2;
  --warning:#f59e0b;
  --warning-soft:#fffbeb;
  --info:#3b82f6;
  --info-soft:#eff6ff;
  --success:#22c55e;
  --success-soft:#f0fdf4;
}

* { box-sizing:border-box; }

html { -webkit-font-smoothing:antialiased; }

body {
  margin:0;
  min-height:100vh;
  font-family:var(--sub2api-font);
  font-size:13px;
  line-height:1.5;
  color:var(--ink);
  background:
    radial-gradient(circle at 22% 10%, rgba(22,182,167,.10), transparent 28%),
    radial-gradient(circle at 82% 0, rgba(50,122,255,.06), transparent 22%),
    linear-gradient(135deg,var(--bg-a),var(--bg-b));
}

body::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:linear-gradient(rgba(15,143,132,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(15,143,132,.025) 1px, transparent 1px);
  background-size:28px 28px;
  mask-image:linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image:linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

a { color:inherit; text-decoration:none; }

/* ===== Sidebar ===== */
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:var(--sidebar-width);
  background:var(--sidebar);
  border-right:1px solid var(--line);
  padding:12px 12px 14px;
  box-shadow:6px 0 18px rgba(18,34,49,.025);
  overflow-y:auto;
  z-index:10;
  display:flex;
  flex-direction:column;
}

.brand {
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 8px 8px;
  border-bottom:1px solid var(--line);
  margin:0 -12px 8px;
}

.brand-logo {
  width:32px; height:32px; border-radius:8px;
  display:inline-grid; place-items:center;
  color:#fff; font-size:14px; font-weight:800;
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  box-shadow:0 4px 10px rgba(22,182,167,.2);
  flex-shrink:0;
}

.brand-copy { display:grid; gap:2px; }
.brand-copy strong { font-size:14px; line-height:1; font-weight:800; letter-spacing:-.02em; color:#0d514d; }
.brand-copy em {
  justify-self:start; padding:2px 6px; border-radius:999px;
  background:var(--amber); color:#bc5f0a; font-size:10px;
  line-height:1; font-style:normal; font-weight:700;
  box-shadow:inset 0 0 0 1px rgba(188,95,10,.08);
}

nav { display:grid; gap:2px; align-content:start; flex:0 0 auto; }

.nav-item {
  display:flex; align-items:center; gap:8px;
  min-height:34px;
  padding:0 10px;
  border-radius:8px;
  color:#4e5969; font-size:13px; font-weight:600; line-height:1.2;
  white-space:nowrap;
  transition:background .12s ease, color .12s ease;
}

.nav-icon { width:18px; text-align:center; color:#8b95a5; font-size:13px; line-height:1; flex-shrink:0; }

.nav-text {
  display:block;
  max-width:120px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.nav-item:hover { background:#f3f4f6; color:#1f2937; }
.nav-item.active { background:var(--primary-soft); color:var(--primary-dark); box-shadow:inset 2px 0 0 var(--primary); }
.nav-item.active .nav-icon { color:var(--primary); }
.nav-item.muted { color:#8b95a5; cursor:default; }
.nav-item.muted:hover { background:transparent; color:#8b95a5; box-shadow:none; }

.sidebar-divider {
  margin:12px 8px 8px;
  font-size:10px; font-weight:700; color:#9ca3af;
  letter-spacing:.05em;
}

/* ===== Main ===== */
.main { position:relative; margin-left:var(--sidebar-width); padding:0 20px 20px; min-width:700px; z-index:1; }
.auth-main { position:relative; min-height:100vh; display:grid; place-items:center; padding:20px; }

/* ===== Topbar ===== */
.topbar {
  min-height:52px;
  display:flex; justify-content:space-between; align-items:center;
  margin:0 -20px 14px;
  padding:0 20px;
  background:rgba(255,255,255,.78);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 4px 12px rgba(25,40,58,.025);
}

.page-title-block { display:flex; flex-direction:column; gap:2px; }
.topbar h1 { margin:0; font-size:16px; line-height:1.3; font-weight:800; letter-spacing:-.02em; color:#111827; }
.topbar p { margin:0; color:var(--muted); font-size:11px; }

.topbar-right { display:flex; align-items:center; gap:14px; }

.topbar-icon-btn {
  width:32px; height:32px; border-radius:8px;
  display:grid; place-items:center;
  color:#6b7280; font-size:16px; cursor:pointer;
  border:1px solid transparent; background:transparent;
  transition:background .15s, color .15s;
}
.topbar-icon-btn:hover { background:#f3f4f6; color:#374151; }

.user-chip {
  display:flex; align-items:center; gap:8px;
  padding:4px 10px 4px 4px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#fff;
}
.user-chip .avatar {
  width:26px; height:26px; border-radius:7px; font-size:11px; font-weight:700;
  display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
}
.user-chip-info { display:flex; flex-direction:column; line-height:1.2; }
.user-chip-name { font-size:12px; font-weight:700; color:#374151; }
.user-chip-role { font-size:10px; color:#9ca3af; }

.topbar-logout {
  color:#6b7280; font-size:12px; font-weight:600;
  padding:4px 8px; border-radius:6px;
  transition:color .15s, background .15s;
}
.topbar-logout:hover { color:var(--danger); background:var(--danger-soft); }

/* ===== Cards ===== */
.card {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 4px 16px rgba(31,41,55,.04);
  overflow:hidden;
}
.card-body { padding:14px; }
.card-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px;
  border-bottom:1px solid var(--line);
  background:#fafbfb;
}
.card-header h2, .card-header h3 { margin:0; font-size:14px; font-weight:700; color:#1f2937; }
.card-header-actions { display:flex; gap:8px; align-items:center; }

/* ===== Buttons ===== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:5px;
  min-height:28px; padding:0 12px;
  border-radius:6px; border:1px solid var(--line);
  background:#fff; color:#374151;
  font-size:12px; font-weight:600; line-height:1;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:all .12s ease;
  white-space:nowrap;
}
.btn:hover { border-color:#d1d5db; box-shadow:0 2px 6px rgba(0,0,0,.05); background:#f9fafb; }
.btn:active { transform:translateY(0); }

.btn:focus-visible { outline:2px solid rgba(22,182,167,.25); outline-offset:2px; }

.btn-primary { background:var(--primary); border-color:var(--primary); color:#fff; box-shadow:0 3px 8px rgba(22,182,167,.16); }
.btn-primary:hover { background:var(--primary-dark); border-color:var(--primary-dark); box-shadow:0 4px 10px rgba(22,182,167,.22); }

.btn-sm { min-height:28px; padding:0 10px; font-size:12px; gap:4px; }
.btn-lg { min-height:40px; padding:0 20px; font-size:14px; }

.btn-ghost { background:transparent; border-color:transparent; box-shadow:none; color:#6b7280; }
.btn-ghost:hover { background:#f3f4f6; border-color:transparent; box-shadow:none; }

.btn-danger { color:var(--danger); border-color:var(--danger-soft); background:var(--danger-soft); }
.btn-danger:hover { background:var(--danger); color:#fff; border-color:var(--danger); }

.btn-group { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.btn-group-compact { gap:6px; }

.full { width:100%; }

/* ===== Inputs ===== */
.input, select.input, textarea.input {
  width:100%;
  min-height:30px;
  padding:0 10px;
  border:1px solid #e4ebf2;
  border-radius:6px;
  font-family:inherit;
  font-size:12px;
  font-weight:500;
  color:#1f2937;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.03);
  outline:none;
  transition:border-color .12s, box-shadow .12s;
}

textarea.input { padding-top:6px; min-height:72px; resize:vertical; }
select.input { padding-right:10px; cursor:pointer; appearance:auto; -webkit-appearance:menulist; background-image:none; }

.input::placeholder { color:#9ca3af; }
.input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(22,182,167,.1); }

label { display:block; margin:0; font-size:12px; font-weight:600; color:#4b5563; }
label .input { margin-top:4px; }

/* ===== Search ===== */
.search-wrap { position:relative; }
.search-wrap .input { padding-left:32px; }
.search-icon {
  position:absolute; left:10px; top:50%; transform:translateY(-50%);
  color:#9ca3af; font-size:14px; pointer-events:none;
}

/* ===== Table ===== */
.table-wrap { overflow-x:visible; }
.table-wrap table { width:100%; min-width:0; table-layout:fixed; border-collapse:collapse; }
.table-wrap th, .table-wrap td {
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid #f1f5f9;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.table-wrap th {
  background:#f8fafc; color:#64748b;
  font-size:11px; font-weight:700;
  letter-spacing:.02em;
  white-space:nowrap; padding-top:8px; padding-bottom:8px;
}
.table-wrap tbody tr:hover { background:#fbfffd; }
.table-wrap tbody tr:last-child td { border-bottom:none; }

/* 中文表头不做uppercase，覆盖 */
.table-wrap th:lang(zh) { text-transform:none; letter-spacing:0; }

.table-actions { display:flex; gap:6px; align-items:center; justify-content:flex-end; }
.table-actions .action-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:3px;
  min-width:30px; min-height:30px;
  padding:4px 8px; border-radius:8px;
  font-size:12px; font-weight:600; color:#6b7280;
  background:transparent; border:none; cursor:pointer;
  transition:all .15s;
}
.table-actions .action-btn.icon-only { width:30px; padding:0; }
.table-actions .action-btn:hover { background:#f3f4f6; color:#374151; }
.table-actions .action-btn.danger:hover { background:var(--danger-soft); color:var(--danger); }
.table-actions .action-btn svg, .table-actions .action-btn .icon { font-size:13px; }
.action-icon { display:inline-grid; place-items:center; width:16px; height:16px; line-height:1; }
.table-wrap .badge,
.table-wrap .pill {
  max-width:100%;
  min-height:auto;
  white-space:normal;
  line-height:1.25;
  padding:4px 8px;
}
.table-wrap .table-actions {
  flex-wrap:wrap;
  gap:4px;
}
.table-wrap .table-actions .action-btn.icon-only {
  width:28px;
  min-width:28px;
  min-height:28px;
}
.archive-box-icon {
  position:relative;
  width:16px;
  height:13px;
  border:1.8px solid currentColor;
  border-radius:3px;
}
.archive-box-icon::before {
  content:"";
  position:absolute;
  left:2px;
  top:-5px;
  width:8px;
  height:5px;
  border:1.8px solid currentColor;
  border-bottom:0;
  border-radius:3px 3px 0 0;
}

.drag-cell { width:40px; }
.drag-handle {
  width:28px; height:28px;
  display:inline-grid; place-items:center;
  border:1px solid transparent; border-radius:6px;
  background:transparent; color:#94a3b8;
  font-size:14px; line-height:1; cursor:grab;
}
.drag-handle:hover { background:#f3f4f6; color:#475569; border-color:var(--line); }
.drag-handle:active { cursor:grabbing; }
.drag-handle:focus-visible { outline:2px solid rgba(22,182,167,.25); outline-offset:2px; }
.reorder-row.is-dragging { opacity:.55; background:#ecfdf5; }

.material-counts { display:flex; gap:4px; flex-wrap:wrap; }
.material-thumb {
  width:58px;
  height:44px;
  object-fit:cover;
  border-radius:6px;
  border:1px solid var(--line);
  background:#f8fafc;
}
.material-file-icon {
  width:58px;
  height:44px;
  display:inline-grid;
  place-items:center;
  border-radius:6px;
  border:1px solid var(--line);
  background:#f8fafc;
  color:#475569;
  font-size:11px;
  font-weight:800;
}
.material-path {
  margin-top:4px;
  max-width:360px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.compact-check {
  min-height:auto;
  margin:0;
  gap:6px;
  white-space:nowrap;
}
.material-export-stats {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:10px;
}
.export-kind-option {
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.export-kind-option strong {
  margin-left:auto;
  color:var(--primary-dark);
}

/* ===== Badges / Pills ===== */
.badge, .pill {
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  min-height:22px; padding:2px 10px;
  border-radius:999px; font-size:11px; font-weight:600; line-height:1;
  white-space:nowrap;
}
.pill { background:color-mix(in srgb, var(--pill) 10%, white); color:var(--pill); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--pill) 20%, white); }

.badge-green { background:var(--success-soft); color:#15803d; }
.badge-red { background:var(--danger-soft); color:#b91c1c; }
.badge-amber { background:var(--warning-soft); color:#b45309; }
.badge-blue { background:var(--info-soft); color:#1d4ed8; }
.badge-gray { background:#f3f4f6; color:#4b5563; }

/* ===== Stats ===== */
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px; }
.stat-card {
  background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:16px; box-shadow:0 4px 16px rgba(31,41,55,.04);
  display:flex; align-items:flex-start; gap:12px;
}
.stat-icon {
  width:38px; height:38px; border-radius:10px;
  display:grid; place-items:center; font-size:18px;
  flex-shrink:0;
}
.stat-icon.green { background:var(--primary-soft); color:var(--primary); }
.stat-icon.blue { background:var(--info-soft); color:var(--info); }
.stat-icon.amber { background:var(--warning-soft); color:var(--warning); }
.stat-icon.purple { background:#f3e8ff; color:#9333ea; }
.stat-content { display:flex; flex-direction:column; gap:3px; min-width:0; }
.stat-label { font-size:12px; color:var(--muted); font-weight:500; }
.stat-value { font-size:20px; font-weight:800; color:#111827; line-height:1.2; }
.stat-meta { font-size:11px; color:var(--muted); font-weight:500; }

/* ===== Forms ===== */
.form-grid { display:grid; grid-template-columns:1fr; gap:12px; }
.form-grid .span-2 { grid-column:auto; }
.form-section { margin-bottom:16px; }
.form-section-title { font-size:13px; font-weight:700; color:#1f2937; margin:0 0 10px; }
.form-actions { display:flex; gap:8px; margin-top:14px; }

/* ===== Filters / Toolbar ===== */
.toolbar { display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap; align-items:center; }
.toolbar-spacer { flex:1; }
.filters-bar {
  display:grid; grid-template-columns:minmax(180px,2fr) repeat(4,minmax(120px,1fr)) auto;
  gap:8px; margin-bottom:12px; align-items:end;
}
.list-field-options {
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding-top:2px;
}
.list-field-options-title {
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.sort-link {
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:inherit;
}
.sort-link:hover,.sort-link.active { color:var(--primary-dark); }
.sort-mark { color:var(--primary); font-size:11px; }

.record-list-wrap { overflow-x:visible; }
.record-list-table {
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.record-list-table th,
.record-list-table td {
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  vertical-align:top;
}
.record-list-table th {
  line-height:1.25;
}
.record-list-table .record-select-col,
.record-list-table .record-select-cell {
  width:34px;
  padding-left:6px;
  padding-right:6px;
  text-align:center;
}
.record-list-table .record-actions-col,
.record-list-table .record-actions-cell {
  width:72px;
  text-align:right;
}
.record-list-table .record-list-col-year,
.record-list-table .record-list-col-period {
  width:64px;
}
.record-list-table .record-list-col-title {
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
.record-list-table .badge,
.record-list-table .pill {
  max-width:100%;
  min-height:auto;
  white-space:normal;
  line-height:1.25;
  padding:4px 8px;
}
.record-list-table .table-actions {
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:4px;
}
.record-list-table .table-actions .action-btn.icon-only {
  width:28px;
  min-width:28px;
  min-height:28px;
}

/* ===== Pagination ===== */
.pagination-bar {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px; border-top:1px solid var(--line);
  font-size:11px; color:#6b7280;
}
.page-nav { display:flex; align-items:center; gap:4px; }
.page-nav button, .page-nav a {
  min-width:28px; height:28px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:6px; border:1px solid var(--line); background:#fff;
  color:#374151; font-size:12px; font-weight:600; cursor:pointer;
  transition:all .15s;
}
.page-nav button:hover, .page-nav a:hover { border-color:var(--primary); color:var(--primary); }
.page-nav button.active, .page-nav a.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.page-nav button:disabled { opacity:.5; cursor:not-allowed; }

/* ===== Flash ===== */
.flash { padding:8px 12px; border-radius:6px; margin-bottom:12px; font-size:12px; font-weight:600; }
.auth-main .flash {
  position:absolute;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  width:min(340px, calc(100% - 40px));
  margin:0;
}
.flash.success { background:var(--success-soft); color:#15803d; border:1px solid #bbf7d0; }
.flash.error { background:var(--danger-soft); color:#b91c1c; border:1px solid #fecaca; }
.flash.warning { background:var(--warning-soft); color:#b45309; border:1px solid #fde68a; }

/* ===== Login ===== */
.login-card { width:340px; padding:24px; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 32px rgba(31,41,55,.08); }
.login-brand { display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.login-brand .brand-logo { width:40px; height:40px; border-radius:10px; font-size:18px; }
.login-brand span { font-size:16px; font-weight:800; color:#1f2937; }
.login-card h1 { margin:0 0 16px; font-size:18px; font-weight:800; color:#111827; }
.login-card label { margin-bottom:10px; }
.login-card .form-actions { margin-top:16px; }

/* ===== Empty ===== */
.empty-state {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:32px 16px; color:#9ca3af; text-align:center; gap:6px;
}
.empty-state-icon { font-size:28px; opacity:.5; }
.empty-state-text { font-size:12px; font-weight:500; }

/* ===== Preview ===== */
.preview { white-space:pre-wrap; background:#f8fafc; border:1px solid var(--line); border-radius:10px; padding:14px; font-size:12px; overflow-x:auto; }

/* ===== Record title ellipsis ===== */
.record-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:#182230; }
.record-select-cell { text-align:center; }
.record-select,.record-select-all { width:16px; height:16px; accent-color:var(--primary); }
.record-row.is-selected { background:#ecfdf5; }
.selection-count {
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:6px;
  background:#f8fafc;
  color:#64748b;
  font-size:12px;
  font-weight:600;
}


/* ===== Record preview modal ===== */
.preview-lock { overflow:hidden; }
.record-preview-modal {
  position:fixed;
  inset:0;
  z-index:50;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.record-preview-modal.is-open { display:flex; }
.record-preview-backdrop {
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.46);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.record-preview-panel {
  position:relative;
  width:min(1040px, 96vw);
  max-height:88vh;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.7);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,253,251,.98));
  box-shadow:0 24px 70px rgba(15,23,42,.24);
  outline:none;
}
.record-preview-page-panel {
  width:100%;
  max-height:none;
  overflow:visible;
  border-radius:12px;
  box-shadow:0 4px 16px rgba(31,41,55,.04);
}
.record-preview-page-panel .record-preview-body { max-height:none; }
.record-preview-header {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(135deg, rgba(22,182,167,.12), rgba(59,130,246,.06));
}
.record-preview-kicker {
  margin:0 0 4px;
  color:var(--primary-dark);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
}
.record-preview-header h2 { margin:0; font-size:18px; line-height:1.35; color:#0f172a; }
.record-preview-close {
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  color:#64748b;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.record-preview-close:hover { color:#0f172a; background:#f8fafc; }
.record-preview-body {
  max-height:calc(88vh - 78px);
  overflow:auto;
  display:grid;
  gap:16px;
  padding:18px;
}
.record-preview-section {
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.82);
  overflow:hidden;
}
.record-preview-section h3 {
  margin:0;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  color:#0f172a;
  font-size:14px;
}
.record-preview-fields {
  margin:0;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:0;
}
.record-preview-fields div { padding:12px 14px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.record-preview-fields dt { margin:0 0 4px; color:#64748b; font-size:11px; font-weight:700; }
.record-preview-fields dd { margin:0; color:#17202c; font-size:13px; white-space:pre-wrap; }
.record-preview-materials { display:grid; gap:14px; padding:14px; }
.record-preview-material {
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.record-preview-material-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background:#fbfefd;
}
.record-preview-material-head strong { font-size:13px; color:#0f172a; }
.record-preview-material-head span { color:#64748b; font-size:11px; font-weight:700; }
.record-preview-image {
  display:block;
  width:100%;
  max-height:560px;
  object-fit:contain;
  background:#f8fafc;
}
.record-preview-frame {
  display:block;
  width:100%;
  height:620px;
  border:0;
  background:#f8fafc;
}
.record-preview-file-card {
  display:flex;
  align-items:center;
  min-height:72px;
  padding:14px;
  color:var(--primary-dark);
  background:linear-gradient(135deg, #f7fffc, #f8fafc);
  font-weight:700;
}
.record-preview-empty { padding:18px; color:#64748b; }

/* ===== Status dot ===== */
.status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; box-shadow:0 0 0 3px rgba(22,182,167,.1); }

/* ===== Misc ===== */
.text-muted { color:var(--muted); }
.text-sm { font-size:12px; }
.text-xs { font-size:11px; }
.font-bold { font-weight:700; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none !important; animation:none !important; }
  .btn:hover,.nav-item:hover { transform:none !important; }
}

/* ===== Responsive ===== */
@media (max-width:1100px) {
  .stat-grid { grid-template-columns:repeat(2,1fr); }
  .filters-bar { grid-template-columns:1fr 1fr; }
}

@media (max-width:768px) {
  .sidebar { transform:translateX(-100%); }
  .main { margin-left:0; min-width:auto; padding:0 12px 12px; }
  .stat-grid { grid-template-columns:1fr; }
  .filters-bar { grid-template-columns:1fr; }
}
