:root {
  --bg: #f4f6f8;
  --text: #172033;
  --muted: #657184;
  --panel: #fff;
  --line: #d9e0ea;
  --primary: #1f6feb;
  --danger: #c93535;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.05);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1180px; background: var(--bg); color: var(--text); font: 14px/1.5 "Microsoft YaHei", Arial, sans-serif; }
a { color: var(--primary); text-decoration: none; }
input, select, button { font: inherit; }
.shell { display: grid; grid-template-columns: 210px 1fr; grid-template-rows: 64px 1fr; min-height: 100vh; }
.nav { grid-column: 1; grid-row: 1 / span 2; display: flex; flex-direction: column; min-height: 100vh; border-right: 1px solid var(--line); background: #fbfcfe; }
.brand { display: grid; gap: 8px; min-height: 82px; padding: 20px 18px 16px; border-bottom: 1px solid var(--line); }
.brand-title { font-size: 20px; font-weight: 900; line-height: 1.12; letter-spacing: 0; color: #0f1d33; }
.brand-tag { width: fit-content; min-height: 23px; padding: 2px 9px; border: 1px solid #d8e6fb; border-radius: 999px; background: #eef6ff; color: #2d5f9a; font-size: 12px; font-weight: 800; }
.nav-links { display: grid; gap: 7px; padding: 18px 12px; }
.nav-links a { display: flex; align-items: center; min-height: 40px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; color: #263247; font-size: 14px; font-weight: 800; text-decoration: none; }
.nav-links a:hover { border-color: #d9e8ff; background: #eef4ff; color: var(--primary); text-decoration: none; }
.topbar { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.account { display: inline-flex; align-items: center; gap: 12px; }
.role { padding: 3px 9px; border-radius: 999px; background: #eef4ff; color: var(--primary); font-size: 12px; font-weight: 800; }
.logout { min-width: 72px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #f0caca; border-radius: 6px; background: #fff5f5; color: var(--danger); font-weight: 700; }
.main { grid-column: 2; grid-row: 2; padding: 24px; }
h1 { margin: 0; font-size: 24px; }
h2 { margin: 0 0 12px; font-size: 17px; }
.sub { margin: 4px 0 18px; color: var(--muted); }
.panel { margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.card span { display: block; color: var(--muted); font-weight: 700; }
.card strong { display: block; margin-top: 8px; font-size: 26px; }
.grid-form, .filter-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; align-items: end; }
.ledger-filter-grid { grid-template-columns: 1.05fr .8fr .85fr .85fr .9fr auto; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select { width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid #cfd8e5; border-radius: 6px; background: #fff; }
button, .button { min-height: 36px; padding: 0 14px; border: 1px solid #cfd8e5; border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.danger-btn { border-color: #dc9b9b; background: #c93535; color: #fff; }
table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #eaf0f7; font-weight: 800; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 800; }
.danger { color: var(--danger); }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0; }
.inline-form input { width: 100px; }
.inline-form select { width: 150px; }
.account-actions { display: flex; align-items: center; gap: 8px; }
.account-actions .inline-form { margin: 0; }
.search-row { display: flex; gap: 8px; margin: 12px 0; }
.search-row input { max-width: 360px; }
.search-row select { width: 150px; }
.filter-actions { display: inline-flex; align-items: end; gap: 8px; }
.filter-actions .button, .filter-actions button { min-width: 64px; }
.partner-search-row { align-items: end; }
.partner-search-row input { width: 360px; max-width: 360px; }
.partner-search-row .button, .partner-search-row button { min-width: 64px; }
.checkbox-line { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 12px 0; padding: 10px 12px; border: 1px solid #dbe5f1; border-radius: 8px; background: #f8fbff; }
.checkbox-line label { display: inline-flex; grid-template-columns: none; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.checkbox-line input { width: auto; min-height: auto; }
.ledger-type-checks { margin-top: 14px; margin-bottom: 14px; background: #f7fbff; }
.void-form input { width: 140px; }
.void-form button { min-width: 120px; }
.request-form-grid { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.request-form-grid.no-voucher { grid-template-columns: 1.2fr .9fr .9fr 1.5fr auto; }
.request-submit { grid-column: 1 / 2; }
.request-form-grid.no-voucher .request-submit { grid-column: auto; }
.request-search-row { margin: 0; align-items: end; }
.request-search-row input { width: 240px; max-width: 240px; }
.request-search-row button { min-width: 64px; }
.quick-deduct-form select { width: 150px; }
.quick-deduct-form input { width: 110px; }
.quick-deduct-form button { min-width: 64px; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.help-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.help-image { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; background: #eff6ff; color: var(--primary); font-size: 30px; }
.help-card h2 { margin: 0 0 10px; font-size: 16px; }
.help-card ol { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.notice { margin-bottom: 14px; padding: 10px 12px; border-radius: 6px; font-weight: 700; }
.notice.success { background: #e8f7ee; color: #237348; }
.notice.error { background: #fff1f1; color: var(--danger); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pager { margin-top: 12px; }
.login-body { display: grid; min-height: 100vh; place-items: center; min-width: 0; }
.login-card { width: 380px; display: grid; gap: 14px; padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { font-size: 24px; }
.login-card p { margin: 0; color: var(--muted); }
