:root {
  --ink: #16191a;
  --ink-2: #262a2c;
  --paper: #f1f2f2;
  --panel: #ffffff;
  --line: #dfe2e2;
  --muted: #6d7477;
  --red: #c73531;
  --red-soft: #f9e8e7;
  --green: #28745a;
  --green-soft: #e4f2ec;
  --amber: #a66f0b;
  --amber-soft: #f7edda;
  --blue: #356980;
  --blue-soft: #e5eff3;
  --shadow: 0 14px 36px rgba(26, 31, 33, 0.08);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--paper); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr); }
.login-brand { position: relative; overflow: hidden; min-height: 100vh; padding: 42px 56px; display: flex; flex-direction: column; color: #fff; background: #151819; }
.login-brand::before, .login-brand::after { content: ""; position: absolute; top: -15%; bottom: -15%; width: 110px; transform: skewX(-26deg); background: #242829; }
.login-brand::before { right: 24%; }
.login-brand::after { right: 5%; background: #353a3c; }
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; }
.brand-lockup img { width: 74px; height: 50px; object-fit: contain; filter: brightness(0) invert(1); }
.brand-lockup div { display: grid; }
.brand-lockup strong { font-size: 25px; line-height: 1.08; }
.brand-lockup span { margin-top: 4px; font-size: 12px; font-weight: 700; color: #cdd1d2; }
.login-copy { position: relative; z-index: 1; margin: auto 0; max-width: 660px; }
.eyebrow, .page-kicker { margin: 0 0 8px; font-size: 12px; font-weight: 800; color: var(--red); text-transform: uppercase; }
.login-copy .eyebrow { color: #ef6a64; }
.login-copy h1 { margin: 0; font-size: clamp(46px, 5.4vw, 78px); line-height: 1.08; letter-spacing: 0; }
.login-copy > p:last-child { max-width: 520px; margin: 26px 0 0; color: #c8cccd; font-size: 17px; line-height: 1.8; }
.brand-foot { position: relative; z-index: 1; color: #9ba2a4; font-size: 13px; }
.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 48px; background: #fff; }
.login-form { width: min(100%, 430px); display: grid; gap: 22px; }
.login-form h2 { margin: 0; font-size: 30px; }
.muted { color: var(--muted); }
.login-form .muted { margin: 7px 0 0; font-size: 14px; }
label { display: grid; gap: 8px; color: #454b4e; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #cfd3d4; border-radius: 6px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 25, 26, .08); }
textarea { min-height: 86px; resize: vertical; }
.primary, .secondary, .danger, .table-action { min-height: 40px; padding: 0 17px; border: 1px solid transparent; border-radius: 6px; font-weight: 800; }
.primary { color: #fff; background: var(--ink); }
.primary:hover { background: #2c3032; }
.secondary { color: var(--ink); background: #fff; border-color: #cfd3d4; }
.danger { color: #fff; background: var(--red); }
.wide { width: 100%; min-height: 50px; }
.apk-download { min-height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); border: 1px solid #cfd3d4; border-radius: 6px; background: #fff; font-size: 13px; font-weight: 800; text-decoration: none; }
.apk-download:hover { background: #f1f3f3; }
.form-error { min-height: 18px; margin: -10px 0; color: var(--red); font-size: 13px; }
.demo-accounts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.demo-accounts button { padding: 5px 9px; border: 0; border-radius: 4px; background: #edf0f0; color: #333; }
.demo-accounts small { width: 100%; }
.mobile-brand { display: none; color: var(--ink); }
.mobile-brand img { filter: none; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 246px; padding: 24px 14px 16px; display: flex; flex-direction: column; color: #fff; background: var(--ink); }
.app-brand { padding: 0 9px 24px; }
.app-brand img { width: 53px; height: 38px; }
.app-brand strong { font-size: 19px; }
.app-brand span { font-size: 11px; }
#main-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; min-height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 12px; color: #bfc5c7; background: transparent; border: 0; border-radius: 6px; text-align: left; font-weight: 700; }
.nav-item:hover { color: #fff; background: #25292b; }
.nav-item.active { color: #fff; background: #323739; }
.nav-item.active::before { content: ""; position: absolute; left: 14px; width: 3px; height: 20px; background: var(--red); }
.nav-icon { width: 22px; text-align: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; padding: 16px 12px 4px; display: flex; align-items: center; gap: 8px; border-top: 1px solid #33383a; color: #aeb5b7; font-size: 11px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #51b889; box-shadow: 0 0 0 4px rgba(81, 184, 137, .12); }
.sync-dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(199,53,49,.15); }
.workspace { min-height: 100vh; margin-left: 246px; }
.topbar { height: 84px; padding: 0 30px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); position: sticky; top: 0; z-index: 20; }
.topbar h1 { margin: 0; font-size: 22px; }
.page-kicker { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.topbar-actions { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-size: 21px; }
.menu-button { display: none; }
.notification-button { height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.notification-button b { min-width: 20px; height: 20px; display: grid; place-items: center; color: #fff; background: var(--red); border-radius: 10px; font-size: 11px; }
.profile-button { height: 46px; margin-left: 5px; padding: 0 8px 0 3px; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; text-align: left; }
.profile-button > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--ink); border-radius: 50%; font-weight: 800; }
.profile-button > span:last-child { display: grid; }
.profile-button strong { font-size: 13px; }
.profile-button small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.account-menu { position: absolute; top: 54px; right: 0; z-index: 60; width: 286px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 22px 60px rgba(12,16,17,.2); }
.account-summary { padding: 12px 11px 15px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.account-summary > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--ink); font-weight: 800; }
.account-summary > div { display: grid; }
.account-summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-menu > button { width: 100%; min-height: 54px; padding: 8px 10px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 5px; color: var(--ink); background: transparent; text-align: left; }
.account-menu > button:hover { background: #f2f4f4; }
.account-menu > button b { width: 26px; color: #697174; font-size: 17px; text-align: center; }
.account-menu > button span { display: grid; gap: 2px; font-size: 12px; font-weight: 800; }
.account-menu > button small { color: var(--muted); font-size: 9px; font-weight: 400; }
.account-menu > button.logout-item { margin-top: 4px; color: var(--red); border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; }
.page-content { padding: 28px 30px 48px; }
.section-head { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 4px 16px rgba(31,35,37,.025); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 6px; background: #eef0f0; color: #4f5659; font-weight: 800; }
.metric-card strong { display: block; margin-top: 18px; overflow-wrap: anywhere; font-size: 27px; }
.metric-card small { display: block; margin-top: 7px; color: var(--muted); }
.metric-card small b { color: var(--green); }
.content-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.panel-head { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head span { color: var(--muted); font-size: 11px; }
.chart { height: 260px; padding: 32px 22px 20px; display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 14px; }
.bar-col { height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 9px; color: var(--muted); font-size: 10px; text-align: center; }
.bar { width: min(46px, 72%); min-height: 8px; margin: 0 auto; background: #33383a; border-radius: 3px 3px 0 0; transition: height .25s ease; }
.bar-col:last-child .bar { background: var(--red); }
.activity-list { list-style: none; margin: 0; padding: 4px 20px 8px; }
.activity-list li { padding: 14px 0; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; border-bottom: 1px solid #eceeee; }
.activity-list li:last-child { border-bottom: 0; }
.activity-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #555d60; font-size: 12px; font-weight: 800; }
.activity-list p { margin: 0; font-size: 12px; line-height: 1.55; }
.activity-list p b { display: block; }
.activity-list small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.alert-strip { margin-top: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; border: 1px solid #edd8d6; border-radius: 7px; background: var(--red-soft); color: #742c28; }
.alert-strip b { margin-left: auto; }

.toolbar { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filter-bar { margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-bar select, .filter-bar > input { width: auto; min-width: 150px; background: #fff; }
.filter-bar .search { margin-right: auto; }
.result-count { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.search { width: min(360px, 100%); position: relative; }
.search input { padding-left: 38px; background: #fff; }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 9px; z-index: 1; color: var(--muted); font-size: 20px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { height: 44px; padding: 0 16px; color: #60686b; background: #f5f6f6; border-bottom: 1px solid var(--line); font-size: 11px; text-align: left; }
td { min-height: 54px; padding: 14px 16px; border-bottom: 1px solid #eaeded; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfb; }
.cell-main { display: grid; gap: 3px; }
.cell-main strong { font-size: 12px; }
.cell-main small { color: var(--muted); }
.money { font-variant-numeric: tabular-nums; font-weight: 800; }
.status { display: inline-flex; min-height: 25px; padding: 0 8px; align-items: center; border-radius: 13px; font-size: 10px; font-weight: 800; }
.status.green { color: var(--green); background: var(--green-soft); }
.status.red { color: var(--red); background: var(--red-soft); }
.status.amber { color: var(--amber); background: var(--amber-soft); }
.status.blue { color: var(--blue); background: var(--blue-soft); }
.status.gray { color: #62696b; background: #ecefef; }
.stock-number { font-size: 16px; font-weight: 900; }
.stock-number.low { color: var(--red); }
.table-actions { display: flex; gap: 6px; }
.table-action { min-height: 30px; padding: 0 10px; color: var(--ink); background: #fff; border-color: #d7dada; font-size: 10px; }
.table-action.approve { color: #fff; background: var(--green); border-color: var(--green); }
.table-action.reject { color: var(--red); border-color: #edc8c6; }
.empty { padding: 60px 20px; color: var(--muted); text-align: center; }

.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.report-card { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.report-card.interactive { border-color: #c9cecf; }
.report-card h3 { margin: 0 0 16px; font-size: 15px; }
.report-list { display: grid; gap: 11px; }
.report-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.report-row b { color: var(--ink); }
.progress { height: 6px; overflow: hidden; background: #eceeee; border-radius: 3px; }
.progress span { display: block; height: 100%; background: var(--red); }
.report-detail-button { width: 100%; min-height: 48px; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; border: 1px solid #efcfcc; border-radius: 5px; color: var(--red); background: var(--red-soft); text-align: left; }
.report-detail-button b { font-size: 14px; }
.report-detail-button small { grid-column: 1 / -1; color: #8a4f4b; }
.detail-section { margin-top: 22px; }
.debt-money { color: var(--red); font-weight: 900; }

.model-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.model-summary article { min-width: 0; padding: 16px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.model-summary article > span { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.model-summary article > strong { font-size: 24px; }
.model-summary article > small { color: var(--muted); line-height: 1.5; }
.payroll-totals, .attendance-totals { margin-bottom: 16px; }
.own-salary { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.own-salary h3 { margin: 0 0 14px; font-size: 15px; }
.own-salary > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.own-salary span { padding: 12px; display: grid; gap: 6px; color: var(--muted); background: #f5f6f6; font-size: 11px; }
.own-salary b { color: var(--ink); font-size: 15px; }
.forecast-warning { padding: 14px; border: 1px solid #ead2a5; border-radius: 6px; color: #6f4e13; background: var(--amber-soft); }
.forecast-warning p { margin: 6px 0 0; line-height: 1.6; }

.barcode-visual { height: 64px; display: flex; align-items: stretch; }
.barcode-visual i { display: block; }
.barcode-visual .bar { background: #000; }
.barcode-visual .space { background: #fff; }
.barcode-visual .narrow { width: 2px; }
.barcode-visual .wide { width: 5px; }
.barcode-text { display: block; margin-top: 6px; letter-spacing: 1px; text-align: center; }
.qr-visual { width: 128px; height: 128px; display: block; margin: 0 auto; image-rendering: pixelated; }

.permissions-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.permissions-form fieldset { margin: 0; padding: 18px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.permissions-form legend { padding: 0 7px; font-size: 14px; font-weight: 800; }
.permission-option { min-height: 42px; padding: 0 10px; display: flex; align-items: center; grid-template-columns: none; gap: 10px; border-bottom: 1px solid #edf0f0; }
.permission-option:last-child { border-bottom: 0; }
.permission-option input { width: 18px; min-height: 18px; margin: 0; }
.permissions-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

.backup-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.backup-summary article { min-width: 0; min-height: 112px; padding: 18px; display: grid; align-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.backup-summary article > span { color: var(--muted); font-size: 11px; }
.backup-summary article > strong { overflow-wrap: anywhere; font-size: 14px; }
.backup-summary article > div { display: grid; justify-items: start; gap: 8px; }
.backup-summary small { color: var(--muted); line-height: 1.5; }
.backup-loading { padding: 64px 20px; color: var(--muted); text-align: center; }
.backup-table td:first-child { overflow-wrap: anywhere; }

dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 36px); padding: 0; overflow: auto; border: 0; border-radius: 8px; box-shadow: 0 26px 80px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(15, 18, 19, .62); }
dialog form > header { position: sticky; top: 0; z-index: 1; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
dialog h2 { margin: 0; font-size: 20px; }
.dialog-fields { padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dialog-fields label.full { grid-column: 1 / -1; }
.dialog-fields .full { grid-column: 1 / -1; margin: 0; }
.bom-editor { display: grid; gap: 12px; }
.bom-head, .bom-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: 8px; align-items: center; }
.bom-head { padding: 0 2px; color: var(--muted); font-size: 11px; font-weight: 800; }
.bom-row + .bom-row { margin-top: 8px; }
.bom-row .icon-button { color: var(--red); }
.bom-editor > .secondary { justify-self: start; }
dialog footer { position: sticky; bottom: 0; padding: 14px 22px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fff; }
.scanner-dialog { width: min(620px, calc(100vw - 28px)); }
.scanner-body { padding: 18px 22px; display: grid; gap: 14px; }
.scanner-body video { width: 100%; min-height: 240px; max-height: 420px; object-fit: cover; border-radius: 6px; background: #16191a; }
.scanner-body p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 360px; padding: 13px 15px; color: #fff; background: var(--ink); border-left: 4px solid #58bd8e; border-radius: 5px; box-shadow: var(--shadow); font-size: 12px; }
.toast.error { border-left-color: var(--red); }
.mobile-nav, .sidebar-backdrop { display: none; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .backup-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { padding-bottom: 68px; }
  .login-screen { display: block; }
  .login-brand { display: none; }
  .login-panel { min-height: 100svh; padding: 28px 22px; align-items: center; }
  .mobile-brand { display: flex; margin-bottom: 18px; }
  .mobile-brand img { width: 60px; }
  .mobile-brand strong { font-size: 20px; }
  .workspace { margin-left: 0; }
  .sidebar { width: min(286px, 84vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 48px rgba(0,0,0,.24); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 29; background: rgba(0,0,0,.4); }
  .sidebar-backdrop.visible { display: block; }
  .topbar { height: 68px; padding: 0 14px; }
  .menu-button { display: grid; }
  .topbar h1 { font-size: 18px; }
  .notification-button span, .profile-button > span:last-child { display: none; }
  .profile-button { margin-left: 0; padding: 0; }
  .profile-button > span:first-child { width: 36px; height: 36px; }
  .account-menu { position: fixed; top: 62px; right: 10px; left: 10px; width: auto; }
  .page-content { padding: 20px 14px 28px; }
  .section-head { align-items: flex-start; }
  .section-head p { max-width: 260px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 15px; }
  .metric-card strong { margin-top: 13px; font-size: 21px; }
  .metric-icon { width: 29px; height: 29px; }
  .content-grid { gap: 12px; }
  .chart { height: 230px; padding-inline: 12px; gap: 7px; }
  .panel-head { padding: 15px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar select, .filter-bar > input { width: 100%; }
  .toolbar .primary { align-self: flex-end; }
  .search { width: 100%; }
  .report-grid { grid-template-columns: 1fr; }
  .permissions-form { grid-template-columns: 1fr; }
  .backup-summary { grid-template-columns: 1fr; }
  .own-salary > div { grid-template-columns: 1fr 1fr; }
  .permissions-actions { grid-column: auto; }
  .dialog-fields { grid-template-columns: 1fr; }
  .dialog-fields label.full { grid-column: auto; }
  .section-head { flex-direction: column; }
  .head-actions { width: 100%; justify-content: flex-start; }
  .head-actions button { flex: 1 1 auto; }
  .scanner-body video { min-height: 210px; }
  .bom-head, .bom-row { grid-template-columns: minmax(0, 1fr) 94px 40px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 25; height: calc(62px + env(safe-area-inset-bottom)); padding: 5px 4px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); }
  .mobile-nav button { padding: 5px 1px; display: grid; place-items: center; gap: 1px; color: #747b7d; background: transparent; border: 0; font-size: 9px; }
  .mobile-nav button b { font-size: 19px; font-weight: 500; }
  .mobile-nav button.active { color: var(--red); }
  .toast-region { right: 12px; bottom: 76px; left: 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (max-width: 420px) {
  .login-form { gap: 18px; }
  .login-form h2 { font-size: 25px; }
  .metric-card strong { font-size: 18px; }
  .metric-card small { font-size: 9px; }
  .head-actions .secondary { display: none; }
}
