:root {
  --navy-950: #0b1424;
  --navy-900: #101d31;
  --navy-800: #172940;
  --ink: #172033;
  --muted: #68758a;
  --subtle: #8b97aa;
  --line: #dfe5ed;
  --line-soft: #edf1f5;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --canvas: #f3f6fa;
  --primary: #1e63d5;
  --primary-dark: #174fa9;
  --primary-soft: #eaf2ff;
  --success: #087f5b;
  --success-soft: #e8f7f1;
  --warning: #c46a08;
  --warning-soft: #fff5df;
  --danger: #c83442;
  --danger-soft: #ffedef;
  --shadow: 0 8px 28px rgba(15, 30, 52, .06);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a, input, select, textarea { outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid rgba(30, 99, 213, .55); }
button { border: 0; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  display: flex;
  width: 246px;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px 16px;
  color: #c8d4e4;
  background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 0 8px 20px; color: #fff; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: linear-gradient(140deg, #397ee5, #1d56b7);
  box-shadow: 0 8px 20px rgba(2, 23, 61, .28);
  font-size: 18px;
  font-weight: 800;
}
.brand b { display: block; max-width: 155px; overflow: hidden; font-size: 16px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.brand small { display: block; margin-top: 2px; color: #8495ad; font-size: 9px; letter-spacing: .12em; }
.nav { display: grid; gap: 18px; }
.nav-group { display: grid; gap: 4px; }
.nav-label { padding: 0 11px 5px; color: #657991; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 39px; border-radius: 8px; padding: 7px 10px; color: #aebdd0; transition: .16s ease; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(53, 119, 221, .31), rgba(53, 119, 221, .15)); box-shadow: inset 3px 0 #5b96ee; }
.nav-icon { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.09); border-radius: 7px; background: rgba(255,255,255,.05); font-size: 11px; font-weight: 700; }
.nav a.active .nav-icon { border-color: rgba(117,170,247,.35); background: rgba(59,130,246,.18); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 18px 10px 2px; color: #708198; font-size: 12px; }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: #3fc893; box-shadow: 0 0 0 3px rgba(63,200,147,.12); }
.sidebar-overlay { display: none; }
.workspace {
  width: calc(100% - 246px);
  min-width: 0;
  min-height: 100vh;
  margin-left: 246px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
}
.topbar-title { display: flex; align-items: center; gap: 10px; }
.today-pill { border-radius: 7px; padding: 4px 9px; color: #425169; background: #f0f3f7; font-size: 12px; font-variant-numeric: tabular-nums; }
.topbar-hint { color: var(--muted); font-size: 13px; }
.user-menu { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #174b9d; background: #e6effe; font-size: 12px; font-weight: 800; }
.user-copy { display: grid; line-height: 1.3; }
.user-copy b { font-size: 13px; }
.user-copy small { color: var(--subtle); font-size: 10px; }
.menu-btn { display: none !important; margin-right: 10px; }
.main { width: 100%; min-width: 0; min-height: calc(100vh - 64px); padding: 28px 30px 48px; overflow-x: hidden; }
.page { position: relative; top: auto; bottom: auto; width: 100%; max-width: 1680px; min-width: 0; margin: 0 auto; padding: 0; transform: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { margin: 0; color: #162137; font-size: 25px; line-height: 1.25; letter-spacing: -.015em; }
.subtitle { margin: 5px 0 0; color: var(--muted); }
.head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }

.cards { display: grid; width: 100%; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.cards.five { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.stat-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat-card { position: relative; min-height: 112px; overflow: hidden; padding: 18px 19px; }
.stat-card::after { position: absolute; right: -13px; bottom: -18px; width: 70px; height: 70px; border-radius: 50%; background: var(--primary-soft); content: ''; opacity: .55; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { position: relative; z-index: 1; margin-top: 7px; color: #101b30; font-size: 25px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-foot { position: relative; z-index: 1; margin-top: 3px; color: var(--subtle); font-size: 11px; }
.stat-card.accent::after { background: var(--success-soft); }
.stat-card.warn::after { background: var(--warning-soft); }
.stat-card.danger::after { background: var(--danger-soft); }
.panel { min-width: 0; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 19px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { min-width: 0; padding: 19px; }
.panel-body.flush { padding: 0; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(120px,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.summary-item { min-height: 82px; padding: 14px 16px; background: #fff; }
.summary-item span { display: block; color: var(--muted); font-size: 12px; }
.summary-item b { display: block; margin-top: 5px; font-size: 21px; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.toolbar.between { justify-content: space-between; }
.filters { display: flex; align-items: flex-end; flex: 1; flex-wrap: wrap; gap: 10px; }
.field { display: grid; min-width: 130px; gap: 5px; }
.field.grow { flex: 1; min-width: 200px; }
.field > label, .field > span { color: #5d6a7d; font-size: 12px; font-weight: 600; }
.field-hint { color: var(--subtle); font-size: 11px; font-weight: 400; }
.input, input[type="text"], input[type="password"], input[type="date"], input[type="number"], input[type="file"], select, textarea {
  width: 100%;
  min-height: 39px;
  border: 1px solid #ced7e2;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: #acb8c8; }
input:focus, select:focus, textarea:focus { border-color: #7aa7e9; box-shadow: 0 0 0 3px rgba(30,99,213,.1); outline: 0; }
textarea { min-height: 84px; resize: vertical; }
input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.btn { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; color: #314057; background: #e8edf3; font-weight: 650; cursor: pointer; transition: .15s ease; white-space: nowrap; }
.btn:hover:not(:disabled) { filter: brightness(.98); transform: translateY(-1px); }
.btn.primary { color: #fff; background: var(--primary); box-shadow: 0 5px 12px rgba(30,99,213,.17); }
.btn.primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn.success { color: #fff; background: var(--success); }
.btn.danger { color: #fff; background: var(--danger); }
.btn.warning { color: #8a4804; border-color: #f1d29d; background: var(--warning-soft); }
.btn.ghost { border-color: var(--line); background: #fff; }
.btn.link { min-height: auto; padding: 3px 5px; color: var(--primary); background: transparent; font-weight: 600; }
.btn.compact { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.icon-btn { display: inline-grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #526075; background: transparent; cursor: pointer; font-size: 19px; }
.icon-btn:hover { background: #edf1f5; }

.upload-zone { position: relative; display: grid; min-height: 186px; place-items: center; border: 1px dashed #aab8ca; border-radius: 11px; padding: 28px; text-align: center; background: #f9fbfd; transition: .16s ease; }
.upload-zone.dragover { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.upload-illustration { display: grid; width: 49px; height: 49px; place-items: center; margin: 0 auto 12px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); font-size: 23px; font-weight: 300; }
.upload-zone strong { display: block; font-size: 15px; }
.upload-zone p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.selected-file { display: flex; align-items: center; gap: 10px; margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fff; }
.file-mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #13734f; background: #e6f6ef; font-size: 10px; font-weight: 800; }
.file-copy { min-width: 0; flex: 1; }
.file-copy b, .file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy small { color: var(--muted); }
.progress { height: 7px; overflow: hidden; border-radius: 99px; background: #e8edf3; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2469d8, #55a0ef); transition: width .2s; }
.stepper { display: flex; align-items: center; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 12px; }
.step::after { width: 54px; height: 1px; margin: 0 10px; background: var(--line); content: ''; }
.step:last-child::after { display: none; }
.step-mark { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: #e8edf3; font-size: 11px; font-weight: 750; }
.step.active { color: var(--primary); font-weight: 700; }
.step.active .step-mark, .step.done .step-mark { color: #fff; background: var(--primary); }
.step.done { color: var(--success); }
.step.done .step-mark { background: var(--success); }
.header-map { display: flex; flex-wrap: wrap; gap: 8px; }
.map-chip { border-radius: 7px; padding: 5px 8px; color: #385273; background: #edf3fa; font-size: 12px; }
.map-chip b { color: #1c63c7; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: #fff; white-space: nowrap; }
th, td { height: 47px; border-bottom: 1px solid var(--line-soft); padding: 8px 11px; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; color: #566378; background: #f7f9fc; font-size: 11px; font-weight: 750; letter-spacing: .015em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
td { color: #2c384c; font-size: 13px; }
td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; }
.table-actions { display: flex; justify-content: flex-end; gap: 3px; }
.table-check { width: 39px; text-align: center; }
.primary-cell { display: grid; gap: 1px; }
.primary-cell b { color: #1b273a; }
.primary-cell small { color: var(--subtle); }
.sensitive { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .01em; }
.status { display: inline-flex; align-items: center; min-height: 23px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.status.success { color: #076748; background: var(--success-soft); }
.status.danger { color: #a72d3a; background: var(--danger-soft); }
.status.info { color: #1a55ad; background: var(--primary-soft); }
.status.muted-status { color: #647083; background: #edf1f5; }
.status.neutral { color: #5a6371; background: #eef1f4; }
.badge { display: inline-flex; align-items: center; border-radius: 5px; padding: 2px 6px; color: #536176; background: #edf1f5; font-size: 10px; font-weight: 700; }
.badge.lock { color: #7b4f0b; background: #fff0cf; }
.pagination { display: flex; align-items: center; justify-content: space-between; min-height: 54px; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.pagination-actions { display: flex; align-items: center; gap: 10px; }

.state { display: grid; min-height: 210px; place-items: center; align-content: center; gap: 5px; padding: 30px; color: var(--muted); text-align: center; }
.state-icon { display: grid; width: 43px; height: 43px; place-items: center; margin-bottom: 5px; border-radius: 50%; color: #78869a; background: #f0f3f7; font-size: 20px; font-weight: 700; }
.state.error .state-icon { color: var(--danger); background: var(--danger-soft); }
.state strong { color: #455269; }
.state span { font-size: 12px; }
.spinner { display: inline-block; width: 19px; height: 19px; border: 2px solid #c9d5e3; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.tiny { width: 14px; height: 14px; border-width: 2px; border-color: rgba(255,255,255,.45); border-top-color: #fff; }
.btn.ghost .spinner.tiny { border-color: #c4cedb; border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { display: none; border: 1px solid transparent; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.notice.show { display: block; }
.notice.info { color: #235aa5; border-color: #cbdcf6; background: #edf4ff; }
.notice.success { color: #096548; border-color: #bfe6d7; background: var(--success-soft); }
.notice.warning { color: #89510b; border-color: #efd7a9; background: var(--warning-soft); }
.notice.error { color: #a02937; border-color: #efc6cb; background: var(--danger-soft); }
.toast-region { position: fixed; top: 76px; right: 20px; z-index: 100; display: grid; width: min(360px, calc(100vw - 40px)); gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; transform: translateY(-8px); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; opacity: 0; background: #fff; box-shadow: 0 16px 38px rgba(14,25,43,.16); transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-mark { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-size: 11px; font-weight: 800; }
.toast.error .toast-mark { background: var(--danger); }
.toast.warning .toast-mark { background: var(--warning); }

.modal-open { overflow: hidden; }
.modal-layer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,16,28,.58); backdrop-filter: blur(2px); }
.modal { position: relative; display: flex; width: min(560px, 100%); max-height: calc(100vh - 48px); flex-direction: column; overflow: hidden; border-radius: 13px; background: #fff; box-shadow: 0 30px 80px rgba(4,12,25,.28); }
.modal.wide { width: min(900px, 100%); }
.modal.xwide { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { overflow: auto; padding: 19px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line-soft); background: #fafbfd; }
.confirm-copy { display: flex; align-items: flex-start; gap: 14px; padding: 4px; }
.confirm-copy p { margin: 4px 0 0; color: #475469; }
.confirm-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.confirm-icon.danger { color: var(--danger); background: var(--danger-soft); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.detail-item { min-height: 66px; padding: 11px 13px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.detail-item:nth-child(2n) { border-right: 0; }
.detail-item span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.detail-item b { display: block; overflow-wrap: anywhere; color: #263348; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.code-block { max-height: 190px; overflow: auto; border-radius: 8px; padding: 12px; color: #d8e3f0; background: #152136; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.section-title { margin: 20px 0 9px; color: #27354a; font-size: 13px; }
.section-title:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.danger-text { color: var(--danger); }
.success-text { color: var(--success); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }

.batch-list { display: grid; gap: 11px; }
.batch-card { display: grid; grid-template-columns: 1.4fr repeat(5, minmax(90px, .8fr)) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.batch-number b { display: block; font-size: 14px; }
.batch-number small, .batch-metric span { display: block; color: var(--muted); font-size: 11px; }
.batch-metric b { display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }
.settings-section { border-bottom: 1px solid var(--line-soft); padding: 19px; }
.settings-section:last-child { border-bottom: 0; }
.settings-section h3 { margin: 0 0 3px; font-size: 14px; }
.settings-section > p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }

.login-page { min-height: 100vh; overflow-x: hidden; background: #eef3f9; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(380px, 1.05fr) minmax(430px, .95fr); }
.login-visual { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 54px clamp(42px, 7vw, 100px); color: #fff; background: linear-gradient(145deg, #0d1d34 0%, #142e51 55%, #174e85 100%); }
.login-visual::before { position: absolute; top: -140px; right: -130px; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ''; }
.login-visual::after { position: absolute; right: 8%; bottom: -220px; width: 520px; height: 520px; border-radius: 50%; background: rgba(44,123,224,.17); content: ''; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 750; }
.login-brand .brand-mark { width: 42px; height: 42px; }
.login-copy { position: relative; z-index: 1; max-width: 600px; margin: auto 0; }
.login-copy .eyebrow { color: #7cb5fa; font-size: 12px; font-weight: 750; letter-spacing: .16em; }
.login-copy h1 { max-width: 540px; margin: 14px 0 14px; font-size: clamp(34px, 4vw, 52px); line-height: 1.17; letter-spacing: -.035em; }
.login-copy > p { max-width: 520px; margin: 0; color: #b7c8da; font-size: 15px; line-height: 1.8; }
.workflow { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 34px; }
.workflow div { border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 12px; background: rgba(255,255,255,.045); }
.workflow b { display: block; color: #e9f3ff; font-size: 12px; }
.workflow small { color: #8099b5; font-size: 10px; }
.login-foot { position: relative; z-index: 1; color: #6f88a5; font-size: 11px; }
.login-side { display: grid; place-items: center; padding: 38px; background: #f7f9fc; }
.login-card { width: min(420px, 100%); border: 1px solid var(--line); border-radius: 15px; padding: 34px; background: #fff; box-shadow: 0 20px 55px rgba(22,43,72,.1); }
.login-card h2 { margin: 0; font-size: 24px; }
.login-card > p { margin: 6px 0 25px; color: var(--muted); }
.login-card .field { margin-bottom: 15px; }
.login-card .btn { width: 100%; margin-top: 4px; }
.login-security { display: flex; justify-content: center; gap: 7px; margin-top: 19px; color: var(--subtle); font-size: 11px; }
.login-error { min-height: 22px; margin-bottom: 5px; color: var(--danger); font-size: 12px; }

@media (max-width: 1260px) {
  .cards.five { grid-template-columns: repeat(3, minmax(140px,1fr)); }
  .batch-card { grid-template-columns: 1.4fr repeat(3, minmax(90px,.8fr)) auto; }
  .batch-card .optional { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 25; display: none; background: rgba(8,16,28,.45); }
  .sidebar-open .sidebar-overlay { display: block; }
  .sidebar-open { overflow: hidden; }
  .workspace { width: 100%; margin-left: 0; }
  .menu-btn { display: inline-grid !important; }
  .cards { grid-template-columns: repeat(2, minmax(140px,1fr)); }
  .summary-grid { grid-template-columns: repeat(2,minmax(120px,1fr)); }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-side { min-height: 100vh; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 15px; }
  .topbar-hint, .user-copy { display: none; }
  .main { padding: 20px 14px 38px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 17px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .cards, .cards.five { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card { min-height: 100px; padding: 15px; }
  .stat-value { font-size: 21px; }
  .panel-grid, .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .detail-item { border-right: 0; }
  .toolbar.between { align-items: stretch; flex-direction: column; }
  .filters { width: 100%; }
  .field { min-width: min(140px,100%); flex: 1; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .batch-card { grid-template-columns: 1fr 1fr; }
  .batch-card .optional { display: block; }
  .batch-card > .btn { grid-column: 1 / -1; }
  .modal-layer { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); }
  .login-side { padding: 18px; }
  .login-card { padding: 25px 20px; }
}
@media (max-width: 440px) {
  .cards, .cards.five, .summary-grid { grid-template-columns: 1fr; }
  .today-pill { display: none; }
}
