:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8f0;
  --border-strong: #cfd7e6;
  --text: #1c2434;
  --text-2: #5b677d;
  --text-3: #8b96a9;
  --primary: #3457d5;
  --primary-soft: #eaf0ff;
  --primary-dark: #2643ad;
  --green: #0a9b5c;
  --green-soft: #e6f7ef;
  --red: #d93025;
  --red-soft: #fdeceb;
  --amber: #b7791f;
  --amber-soft: #fff5e0;
  --shadow: 0 2px 10px rgba(28, 42, 74, .06);
  --shadow-lg: 0 12px 40px rgba(28, 42, 74, .16);
  --radius: 14px;
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
.boot-loading { padding: 60px; text-align: center; color: var(--text-3); }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: .15s ease; min-height: 38px;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: #f0c6c2; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 10px; min-height: 30px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: 9px; background: var(--surface); outline: none; transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.textarea { min-height: 74px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11px; color: var(--text-3); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.req::after { content: " *"; color: var(--red); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.card-body { padding: 18px; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.positive { color: var(--green); font-weight: 650; }
.negative { color: var(--red); font-weight: 650; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 100%; vertical-align: bottom; }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge-blue { background: var(--primary-soft); color: var(--primary); border-color: #cddaff; }
.badge-green { background: var(--green-soft); color: var(--green); border-color: #bfe9d3; }
.badge-red { background: var(--red-soft); color: var(--red); border-color: #f5cbc7; }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: #f2dfb2; }
/* ---------- 未归属发票提示 ---------- */
.alert-warn {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--amber-soft); border: 1px solid #f2dfb2;
  border-left: 4px solid var(--amber); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 18px; box-shadow: var(--shadow);
}
.alert-warn .aw-icon { font-size: 20px; line-height: 1.2; color: var(--amber); flex: none; }
.alert-warn .aw-body { flex: 1; min-width: 0; }
.alert-warn .aw-body > b { font-size: 14px; color: #8a5a12; }
.alert-warn .aw-body p { margin: 6px 0 10px; font-size: 12.5px; color: #7a6337; line-height: 1.65; }
.alert-warn .aw-body p b { color: #8a5a12; }
.alert-warn .aw-details { margin: 0 0 10px; font-size: 12px; color: #7a6337; }
.alert-warn .aw-details summary { cursor: pointer; font-weight: 600; }
.alert-warn .aw-list {
  margin-top: 8px; max-height: 190px; overflow: auto;
  background: rgba(255, 255, 255, .62); border-radius: 8px; padding: 8px 10px;
}
.alert-warn .aw-list > div { padding: 3px 0; border-bottom: 1px dashed rgba(183, 121, 31, .2); }
.alert-warn .aw-list > div:last-child { border-bottom: 0; }
.alert-warn .aw-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.alert-warn .aw-actions .dim { color: #8a7550; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }
.empty { padding: 42px 18px; text-align: center; color: var(--text-3); }
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; opacity: .6; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 认证页 ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; grid-template-rows: 1fr auto; background: var(--surface); }
.auth-hero { background: linear-gradient(145deg, #1f3a94, #3457d5 55%, #627ee9); color: #fff; padding: 54px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero .logo { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.auth-hero h1 { font-size: 34px; line-height: 1.35; margin: 0 0 18px; font-weight: 700; }
.auth-hero p { color: rgba(255,255,255,.82); max-width: 430px; font-size: 15px; }
.hero-points { display: grid; gap: 12px; margin-top: 34px; }
.hero-points div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: rgba(255,255,255,.9); }
.hero-points b { display: inline-flex; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.16); align-items: center; justify-content: center; flex: none; font-size: 11px; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 24px; font-size: 13px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.tabs button { flex: 1; padding: 8px; border: 0; background: transparent; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.tabs button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.auth-form { display: grid; gap: 14px; }
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; }
.dev-code { background: var(--amber-soft); border: 1px solid #f2dfb2; color: #8a5b12; padding: 9px 12px; border-radius: 9px; font-size: 12px; margin-top: -4px; }
.auth-tip { margin-top: 18px; font-size: 12px; color: var(--text-3); line-height: 1.7; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: none; background: #16223c; color: #c8d3ea; padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; font-weight: 700; font-size: 15px; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,#4c6ef5,#7c9bff); display: grid; place-items: center; font-size: 15px; flex: none; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; color: #c8d3ea; cursor: pointer; font-size: 13.5px; }
.nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav button.active { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(52,87,213,.45); }
.nav .ico { width: 18px; text-align: center; font-size: 15px; opacity: .95; }
.sidebar-foot { margin-top: auto; font-size: 11px; color: #7e8db0; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); line-height: 1.7; }
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; gap: 12px; position: sticky; top: 0; z-index: 20; }
.topbar .crumb { font-weight: 650; font-size: 15px; }
.topbar .right { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; }
.main { padding: 22px; flex: 1; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; font-size: 22px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 13px; }
.bottom-nav { display: none; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.stat-card .value { font-size: 25px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card .foot { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.stat-card.accent-blue { border-left: 3px solid var(--primary); }
.stat-card.accent-green { border-left: 3px solid var(--green); }
.stat-card.accent-red { border-left: 3px solid var(--red); }
.stat-card.accent-amber { border-left: 3px solid var(--amber); }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 11px 12px; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 12px; white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 筛选 / 上传 ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filters .field > label { font-size: 11px; }
.search-row { display: flex; gap: 8px; }
.search-row .input { flex: 1; }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  padding: 28px 18px; text-align: center; cursor: pointer; transition: .18s; position: relative;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .dz-icon { font-size: 34px; line-height: 1; margin-bottom: 10px; opacity: .8; }
.dropzone h3 { margin: 0 0 6px; font-size: 15px; }
.dropzone p { margin: 0; color: var(--text-2); font-size: 12px; }
.dropzone input[type=file] { display: none; }
.upload-list { display: grid; gap: 8px; margin-top: 14px; }
.upload-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); font-size: 12.5px; }
.upload-item .st { flex: none; font-weight: 700; }
.upload-item.ok .st { color: var(--green); }
.upload-item.duplicate .st { color: var(--amber); }
.upload-item.error .st { color: var(--red); }
/* 上传摘要：新增张数 / 总金额 / 进销项 / Excel 重复行号 */
.upload-summary { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.us-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.us-head b { font-size: 14px; }
.us-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.us-cell { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.us-cell > span { font-size: 11.5px; color: var(--text-2); }
.us-cell > b { font-size: 16px; font-weight: 700; letter-spacing: -.2px; word-break: break-all; }
.us-cell > em { font-size: 11px; color: var(--text-3); font-style: normal; }
.us-cell.us-total > b { color: var(--primary); }
.us-cell.us-in > b { color: var(--primary-dark); }
.us-cell.us-out > b { color: var(--amber); }
.us-lines { padding: 10px 16px; font-size: 12.5px; color: var(--text-2); display: grid; gap: 3px; border-top: 1px solid var(--border); }
.us-dups { padding: 10px 16px 12px; border-top: 1px dashed var(--border); background: var(--amber-soft); color: #7a5210; font-size: 12px; display: grid; gap: 3px; }
.us-dups b { font-size: 12.5px; margin-bottom: 2px; }
.us-dups div { word-break: break-word; }
@media (max-width: 760px) { .us-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) {
  .us-grid { grid-template-columns: minmax(0, 1fr); }
  .us-head { flex-direction: column; gap: 2px; }
}
/* 营业执照识别结果：缺字段提示 / 候选值 / 识别原文 */
.input.needs-input { border-color: var(--amber); background: var(--amber-soft); }
.license-help { margin-top: 8px; padding: 9px 12px; border-radius: 9px; background: var(--amber-soft); color: #7a5210; font-size: 12.5px; }
.license-help.warn { background: var(--red-soft); color: #96231c; }
.license-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--text-2); }
.chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.license-raw { margin-top: 8px; font-size: 12px; color: var(--text-2); }
.license-raw summary { cursor: pointer; user-select: none; }
.license-raw pre { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: 11.5px; line-height: 1.6; color: var(--text-2); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--text-2); }

/* ---------- 图表 ---------- */
.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; vertical-align: 3px; margin-right: 5px; }
.section-title { font-size: 15px; font-weight: 650; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title .tag { font-size: 11px; font-weight: 500; color: var(--text-3); }
.tabs-line { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.tabs-line button { border: 1px solid var(--border); background: var(--surface); border-radius: 20px; padding: 6px 14px; cursor: pointer; white-space: nowrap; font-size: 12.5px; color: var(--text-2); }
.tabs-line button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 弹窗 / 提示 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(18,28,48,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 720px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 18px; font-size: 13px; }
.detail-grid .k { color: var(--text-3); font-size: 11px; }
.detail-grid .v { word-break: break-all; }
#toast-root { position: fixed; top: 18px; right: 18px; z-index: 200; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 36px)); }
.toast { background: #1f2b45; color: #fff; padding: 11px 15px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; animation: slidein .2s ease; }
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }

/* ---------- 品牌标识 / 页脚 ---------- */
.brand-logo { display: block; width: 100%; max-width: 138px; height: auto; }
.auth-hero .brand-logo { max-width: 170px; margin-bottom: 16px; }
.auth-hero .logo { font-size: 18px; }
.hero-m2 {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  padding: 5px 12px; border: 1px solid rgba(255,255,255,.34);
  border-radius: 20px; background: rgba(255,255,255,.12);
  color: #fff; font-size: 12px; letter-spacing: .2px;
}
.sidebar .brand { display: block; padding: 2px 8px 18px; }
.sidebar .brand-logo { max-width: 128px; margin-bottom: 10px; }
.brand-line { color: #fff; font-weight: 700; font-size: 14px; }
.brand-m2 { color: #aebee0; font-size: 10.5px; line-height: 1.5; margin-top: 4px; }
.crumb-m2 { display: none; font-size: 10.5px; font-weight: 400; color: var(--text-2); line-height: 1.25; }
.app-footer {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 13px 22px; color: var(--text-3);
}
.foot-inner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap; max-width: 1180px; margin: 0 auto; text-align: left;
}
.foot-logo { width: 96px; height: auto; flex: none; opacity: .92; }
.foot-lines { display: grid; gap: 2px; font-size: 11px; line-height: 1.6; }
.foot-m2 { color: var(--text-2); font-weight: 600; font-size: 11.5px; }
.foot-copy { letter-spacing: .1px; }
.auth-shell .app-footer { padding: 12px 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 30px 24px; }
  .auth-hero h1 { font-size: 24px; }
  .hero-points { display: none; }
  .auth-side { padding: 26px 18px 40px; align-items: flex-start; }
  .sidebar { display: none; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around;
  }
  .bottom-nav button { flex: 1; border: 0; background: transparent; display: grid; gap: 2px; place-items: center; padding: 5px 2px; font-size: 10.5px; color: var(--text-2); cursor: pointer; }
  .bottom-nav button .ico { font-size: 18px; }
  .bottom-nav button.active { color: var(--primary); font-weight: 700; }
  .topbar { height: 58px; padding: 0 14px; }
  .topbar .crumb { font-size: 14px; }
  .topbar .crumb-title { display: block; line-height: 1.25; }
  .crumb-m2 { display: block; }
  .topbar .right { gap: 8px; flex: none; }
  .topbar .right .badge, .user-chip .ellipsis { display: none; }
  .main { padding: 14px 12px 20px; }
  .app-footer { padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }
  .foot-inner { flex-direction: column; gap: 6px; text-align: center; }
  .foot-lines { text-align: center; }
  .foot-logo { width: 92px; }
  .page-head h1 { font-size: 19px; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .value { font-size: 20px; }
  .card-body { padding: 14px; }
  .card-head { padding: 14px; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal { max-height: 88vh; }
  .alert-warn { padding: 12px; gap: 9px; }
  .alert-warn .aw-actions { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* 表格转卡片 */
  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive tr { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 8px 10px; background: var(--surface); }
  table.responsive td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.responsive td::before { content: attr(data-label); color: var(--text-3); font-size: 11px; font-weight: 500; text-align: left; flex: none; }
  table.responsive td > * { max-width: 68%; text-align: right; }
  .row-actions { justify-content: flex-end; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card .value { font-size: 18px; }
  .form-grid { gap: 12px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:last-child { grid-column: 1 / -1; }
  .btn { padding: 8px 12px; }
}
