:root {
  --bg: #f2f5f9;
  --card: #ffffff;
  --ink: #172433;
  --ink-soft: #405269;
  --muted: #77869a;
  --line: #e3e9f0;
  --brand: #14507e;
  --brand-2: #1d6fa5;
  --brand-soft: #e8f1f8;
  --green: #16794f;
  --green-soft: #e5f5ec;
  --amber: #9a6412;
  --amber-soft: #fff5df;
  --red: #b53a32;
  --red-soft: #fdeceb;
  --blue: #1d5fa7;
  --blue-soft: #e9f1fb;
  --gray: #667085;
  --gray-soft: #f0f2f5;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(23, 42, 66, 0.06);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0 0 10px; }
code, pre, .mono { font-family: var(--mono); }

/* ------------------------------------------------------------------ */
/* 基础组件                                                           */
/* ------------------------------------------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.card + .card { margin-top: 18px; }
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-title h2 { font-size: 16px; font-weight: 650; }
.card-title h3 { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  padding: 8px 15px;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  min-height: 36px;
}
.btn:hover { background: #f7fafc; border-color: #cad5e2; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #0f3f66; border-color: #0f3f66; color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: #11623f; border-color: #11623f; color: #fff; }
.btn-danger { background: #fff; border-color: #e6b6b2; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #d99590; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-2); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sm { padding: 5px 10px; font-size: 12px; min-height: 30px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; }

.alert {
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid transparent;
}
.alert-ok { background: var(--green-soft); color: #0f5d3d; border-color: #bfe6d1; }
.alert-err { background: var(--red-soft); color: #8f2823; border-color: #f0c7c4; }
.alert-warn { background: var(--amber-soft); color: #7a4f0c; border-color: #f0dcb0; }
.alert-info { background: var(--blue-soft); color: #174c85; border-color: #c9dcf3; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.badge, .status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.7;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-green { background: var(--green-soft); color: var(--green); }
.status-blue { background: var(--blue-soft); color: var(--blue); }
.status-amber { background: var(--amber-soft); color: var(--amber); }
.status-red { background: var(--red-soft); color: var(--red); }
.status-gray { background: var(--gray-soft); color: var(--gray); }
.badge-gray { background: var(--gray-soft); color: var(--gray); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }

/* ------------------------------------------------------------------ */
/* 表单                                                               */
/* ------------------------------------------------------------------ */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink-soft); }
.field .hint { margin-top: 5px; font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid #d5dee8;
  border-radius: 9px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  min-height: 40px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid rgba(29, 111, 165, 0.18);
  border-color: var(--brand-2);
}
.textarea { min-height: 90px; resize: vertical; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.checkbox input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.inline-form { display: inline; }

/* ------------------------------------------------------------------ */
/* 表格                                                               */
/* ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #f7f9fc; color: var(--ink-soft); font-weight: 650; font-size: 12px; white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafcfe; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { display: inline; }
.table-empty { padding: 30px 16px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* 管理端布局                                                         */
/* ------------------------------------------------------------------ */
body.admin { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: #0e2b44;
  color: #dbe7f2;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 20px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2e8bc0, #1d5f8f);
  font-weight: 700; font-size: 18px; color: #fff;
}
.brand-text { line-height: 1.2; }
.brand-text strong { display: block; font-size: 16px; letter-spacing: 0.5px; }
.brand-text span { display: block; font-size: 10px; color: #89a7c0; letter-spacing: 1.6px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  color: #b9cbdc; font-size: 13.5px; font-weight: 550;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; text-decoration: none; }
.nav-link.active { background: #1d6fa5; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); }
.nav-dot { width: 7px; height: 7px; border-radius: 2px; background: currentColor; opacity: 0.65; }
.sidebar-foot { margin-top: auto; padding: 14px 8px 4px; font-size: 11px; color: #7d9ab3; line-height: 1.8; }
.sidebar-foot .env-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); color: #d7e6f2; margin-right: 6px; }
.main { flex: 1 1 auto; min-width: 0; padding: 26px 32px 48px; max-width: 1440px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.eyebrow { font-size: 11px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.page-title { font-size: 25px; font-weight: 700; letter-spacing: 0.2px; }
.topbar-right { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.user-chip { padding: 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { font-size: 27px; font-weight: 720; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -0.5px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.accent { background: linear-gradient(135deg, #14507e, #1d6fa5); border-color: transparent; color: #fff; }
.stat.accent .label, .stat.accent .sub { color: #c6ddef; }

.hero {
  background: linear-gradient(120deg, #103a5c 0%, #1d6fa5 70%, #2e8bc0 100%);
  color: #fff; border-radius: 18px; padding: 24px 26px; margin-bottom: 20px;
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  box-shadow: 0 14px 34px rgba(20, 80, 126, 0.18);
}
.hero h2 { font-size: 21px; margin-bottom: 4px; }
.hero .muted { color: #c3dbec; }
.hero .hero-amount { font-size: 34px; font-weight: 730; font-variant-numeric: tabular-nums; letter-spacing: -0.8px; }
.hero .hero-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.hero .btn { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); color: #fff; }
.hero .btn:hover { background: rgba(255,255,255,0.2); }
.hero .btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.hero .btn-light:hover { background: #eef6fc; color: var(--brand); }

.progress { height: 8px; border-radius: 99px; background: #e8eef5; overflow: hidden; display: flex; }
.progress span { display: block; height: 100%; }
.progress .p-signed { background: var(--green); }
.progress .p-viewed { background: #e0a92e; }
.progress .p-sent { background: #4a8cc7; }
.progress .p-failed { background: var(--red); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.quick-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fbfdff; }
.quick-card h3 { font-size: 14px; margin-bottom: 4px; }
.quick-card p { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

.action-bar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.action-panel { background: #fbfdff; border: 1px dashed #cddae7; border-radius: 12px; padding: 14px 16px; }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 22px; }
.meta-item .k { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.meta-item .v { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }

.validation-list { display: flex; flex-direction: column; gap: 8px; }
.issue { display: flex; gap: 10px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.issue-error { background: #fff8f7; border-color: #f3d2cf; }
.issue-warn { background: #fffdf6; border-color: #efe0ba; }
.issue-info { background: #f8fbff; border-color: #d9e7f5; }
.issue .where { color: var(--muted); font-size: 12px; white-space: nowrap; }
.issue .msg { flex: 1; min-width: 0; }
.issue .code { font-family: var(--mono); font-size: 10.5px; color: #8a99ab; }

.mapping-table td { vertical-align: top; }
.mapping-table .input, .mapping-table .select { min-height: 34px; padding: 5px 9px; font-size: 13px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.preview-card { border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; background: #fff; }
.preview-card .name { font-weight: 650; font-size: 15px; }
.preview-card .amount { font-size: 23px; font-weight: 720; margin: 6px 0; font-variant-numeric: tabular-nums; }
.preview-card .actions { margin-top: 10px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; align-items: flex-start; }
.checklist li:last-child { border-bottom: none; }
.check-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex: 0 0 18px; margin-top: 2px; background: var(--green-soft); color: var(--green); }
.check-dot.warn { background: var(--amber-soft); color: var(--amber); }
.check-dot.err { background: var(--red-soft); color: var(--red); }

.kv-table { width: 100%; border-collapse: collapse; }
.kv-table td { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; vertical-align: top; }
.kv-table td:first-child { width: 180px; color: var(--muted); }
.kv-table tr:last-child td { border-bottom: none; }

.sheet-preview { font-size: 11px; }
.sheet-preview table { border-collapse: collapse; min-width: 100%; }
.sheet-preview td { border: 1px solid #eef2f6; padding: 3px 6px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.sheet-preview tr:first-child td { background: #f7f9fc; font-weight: 600; }

details.disclosure { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: #fff; }
details.disclosure + details.disclosure { margin-top: 8px; }
details.disclosure summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-soft); }
details.disclosure[open] summary { margin-bottom: 8px; }

.outbox-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.outbox-item + .outbox-item { margin-top: 10px; }
.outbox-item .title { font-weight: 650; }
.outbox-item .url { font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ */
/* 登录 / 错误页                                                      */
/* ------------------------------------------------------------------ */
body.auth, body.plain {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 480px at 15% 0%, #dceaf6 0%, transparent 60%),
    radial-gradient(700px 400px at 90% 100%, #e5f1ec 0%, transparent 55%),
    #f2f5f9;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 390px;
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 45, 75, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 34px 32px 28px;
}
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 20px; }
.auth-brand strong { display: block; font-size: 19px; }
.auth-brand span { display: block; font-size: 11px; letter-spacing: 2px; color: var(--muted); }
.auth-card h1 { font-size: 20px; margin-bottom: 5px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-card .field { margin-bottom: 15px; }
.auth-foot { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted); }
.auth-foot a { color: var(--brand-2); }

.error-box { width: 100%; max-width: 480px; text-align: center; background: #fff; border-radius: 20px; padding: 40px 30px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.error-icon { width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.error-box h1 { font-size: 21px; margin-bottom: 8px; }
.error-box p { color: var(--muted); margin-bottom: 22px; }

/* ------------------------------------------------------------------ */
/* 员工端 H5                                                          */
/* ------------------------------------------------------------------ */
body.h5 {
  background: #eef2f7;
  min-height: 100vh;
  padding: 0 0 34px;
}
.h5-shell { max-width: 560px; margin: 0 auto; padding: 0 14px; position: relative; }
.h5-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 4px 14px;
}
.h5-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.h5-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.h5-head .who { font-size: 12px; color: var(--muted); text-align: right; }
.h5-head form { margin: 0; }
.link-button { background: none; border: none; padding: 0; color: var(--brand-2); font: inherit; font-size: 12px; cursor: pointer; }
.h5-card {
  background: #fff; border-radius: 18px; padding: 20px;
  box-shadow: 0 10px 28px rgba(23, 42, 66, 0.07);
  border: 1px solid rgba(227, 233, 240, 0.9);
}
.h5-card + .h5-card { margin-top: 14px; }
.h5-greeting h1 { font-size: 21px; margin-bottom: 3px; }
.h5-greeting p { color: var(--muted); font-size: 12.5px; margin: 0; }
.h5-label { font-size: 12px; color: var(--muted); }
.h5-period { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.h5-period .title { font-size: 15px; font-weight: 650; }
.h5-net { font-size: 40px; font-weight: 750; letter-spacing: -1px; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.h5-net small { font-size: 18px; font-weight: 600; margin-right: 2px; }
.h5-net-label { font-size: 12px; color: var(--muted); }
.h5-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 4px; }
.h5-total { background: #f6f9fc; border-radius: 11px; padding: 10px 12px; }
.h5-total .k { font-size: 11px; color: var(--muted); }
.h5-total .v { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 1px; }
.h5-actions { display: flex; gap: 9px; margin-top: 16px; }
.h5-actions .btn { flex: 1; }
.h5-history { margin-top: 14px; }
.h5-history a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 2px; border-bottom: 1px dashed var(--line); color: var(--ink);
}
.h5-history a:last-child { border-bottom: none; }
.h5-history a:hover { text-decoration: none; color: var(--brand-2); }
.h5-history .h-period { font-weight: 600; font-size: 14px; }
.h5-history .h-meta { font-size: 11px; color: var(--muted); }
.h5-history .h-net { font-weight: 650; font-variant-numeric: tabular-nums; }
.h5-empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.h5-empty .big { font-size: 40px; margin-bottom: 10px; opacity: 0.35; }
.h5-foot { text-align: center; font-size: 11px; color: #93a1b3; margin-top: 22px; line-height: 1.9; }

.slip-head { border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 15px; }
.slip-head .title { font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.slip-head .sub { font-size: 12px; color: var(--muted); }
.slip-employee { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; }
.slip-employee span { color: var(--muted); }
.slip-section { margin-top: 18px; }
.slip-section h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; letter-spacing: 0.4px; }
.slip-items { border-top: 1px solid var(--line); }
.slip-item { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.slip-item .amount { font-variant-numeric: tabular-nums; font-weight: 550; }
.slip-total { display: flex; justify-content: space-between; padding: 12px 0 4px; font-weight: 650; font-size: 14px; }
.slip-total.net { font-size: 17px; color: var(--brand); border-top: 1.5px solid #b9cde0; margin-top: 6px; padding-top: 13px; }
.slip-remark { margin-top: 14px; padding: 11px 13px; background: #f7f9fc; border-radius: 9px; font-size: 12.5px; color: var(--ink-soft); }
.sign-card { border: 1px solid #cfe0ee; background: linear-gradient(180deg, #f7fbff, #fff); }
.sign-text { font-size: 12.5px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 14px; }
.sign-text strong { color: var(--brand); }
.sign-hint { font-size: 11.5px; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.signed-stamp {
  display: flex; gap: 13px; align-items: center;
  padding: 15px; border-radius: 13px; background: var(--green-soft);
  border: 1px solid #bfe6d1;
}
.signed-stamp .seal {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid var(--green); color: var(--green);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  transform: rotate(-9deg); flex: 0 0 54px; line-height: 1.2; text-align: center;
}
.signed-stamp .info { font-size: 12px; color: #17633f; line-height: 1.75; }
.preview-flag { background: #fff3cd; color: #7a4f0c; text-align: center; font-size: 12px; padding: 6px 10px; border-radius: 8px; margin-bottom: 12px; font-weight: 600; }

.watermark {
  position: fixed; inset: -20%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: space-around;
  justify-items: center;
  gap: 46px 10px;
  transform: rotate(-24deg);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: #0b2f4f;
  white-space: nowrap;
}
.h5-shell { z-index: 1; }

.h5-login-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.h5-login-item {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px;
  color: var(--ink); background: #fff;
}
.h5-login-item:hover { border-color: #b9cfe2; background: #f9fcff; text-decoration: none; }
.h5-login-item .emp { font-size: 12px; color: var(--muted); }
.h5-message { text-align: center; padding: 34px 20px; }
.h5-message .icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--amber-soft); color: var(--amber); font-size: 26px; font-weight: 700; }
.h5-message h1 { font-size: 19px; margin-bottom: 8px; }
.h5-message p { color: var(--muted); font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.h5-message .btn { margin-top: 12px; }

@media (max-width: 980px) {
  body.admin { display: block; }
  .sidebar {
    width: auto; height: auto; position: static;
    padding: 13px 16px; flex-direction: row; align-items: center; gap: 12px;
    overflow-x: auto;
  }
  .brand { padding: 0 10px 0 0; flex: 0 0 auto; }
  .brand-text span { display: none; }
  .side-nav { flex-direction: row; margin: 0; gap: 2px; }
  .nav-link { white-space: nowrap; padding: 7px 10px; }
  .nav-dot { display: none; }
  .sidebar-foot { display: none; }
  .main { padding: 20px 16px 40px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
  .topbar { margin-bottom: 16px; }
  .page-title { font-size: 21px; }
}
@media (max-width: 560px) {
  .main { padding: 16px 12px 36px; }
  .card { padding: 16px; border-radius: 12px; }
  .h5-net { font-size: 36px; }
  .stat .value { font-size: 23px; }
  .topbar-right .user-chip { display: none; }
  .table th, .table td { padding: 8px 9px; }
}
