@charset "UTF-8";
:root {
  color-scheme: light;
  --ink: #172b4d;
  --ink-soft: #415a7c;
  --muted: #7c8da7;
  --line: #e3eaf3;
  --line-strong: #d6e0ed;
  --canvas: #f5f7fa;
  --surface: #fff;
  --blue: #246bfd;
  --blue-strong: #1458e6;
  --blue-soft: #eaf2ff;
  --teal: #00a88b;
  --teal-soft: #e5f8f3;
  --orange: #f08a24;
  --orange-soft: #fff2e2;
  --red: #ed5c4d;
  --red-soft: #fff0ee;
  --purple: #8069d9;
  --purple-soft: #f0edff;
  --shadow: 0 5px 18px rgba(34, 65, 108, .045);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(36,107,253,.25); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 220px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid #e8edf4; padding: 24px 15px 17px; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 49px; padding: 0 14px; margin: 0 0 23px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; background: transparent; object-fit: contain; }
.brand-mark img { width: 44px; height: 44px; object-fit: contain; }
.brand-mark svg { width: 37px; height: 44px; }
.brand strong { display: block; font-size: 20px; line-height: 1.2; font-weight: 750; letter-spacing: .02em; }
.brand small { display: block; margin-top: 5px; color: #6d809c; font-size: 12px; letter-spacing: .12em; }
.side-nav { flex: 1; overflow-y: auto; padding-right: 1px; }
.nav-group { padding: 0 0 13px; margin: 0 0 10px; border-bottom: 1px solid var(--line); }
.nav-group:last-child { border-bottom: 0; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 45px; margin: 3px 0; padding: 0 14px; border-radius: 6px; color: #29476f; font-weight: 550; transition: background .16s, color .16s; }
.nav-link:hover { background: #f1f6ff; color: var(--blue); }
.nav-link.active { color: var(--blue); background: #eaf2ff; font-weight: 700; }
.nav-link svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sidebar-foot { padding: 0 16px; color: #49607f; font-size: 13px; }
.sidebar-foot small { display: block; margin-top: 2px; color: #91a0b5; }
.workspace { min-height: 100vh; width: calc(100% - 220px); margin-left: 220px; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 2vw, 32px); background: rgba(255,255,255,.96); border-bottom: 1px solid #e8edf4; backdrop-filter: blur(12px); }
.topbar-title { display: flex; align-items: baseline; gap: 17px; }
.topbar-title strong { font-size: 17px; font-weight: 700; }
.topbar-title span { color: #8191a8; font-size: 12px; }
.version-button { min-height: 40px; padding: 0 9px; border: 1px solid #dce5f0; border-radius: 7px; background: #f8fbff; color: #466889; font-size: 12px; white-space: nowrap; cursor: pointer; }
.version-button:hover { background: #edf4fc; border-color: #b4cae4; }
.version-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.version-summary { display: grid; gap: 16px; }
.version-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.version-actions .btn { min-height: 44px; }
.version-description, .version-notes { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.version-notes { white-space: pre-wrap; }
.version-dialog [data-update-result] { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.icon-button, .profile-button { border: 0; padding: 0; background: transparent; cursor: pointer; }
.icon-button { position: relative; display: grid; place-items: center; width: 32px; height: 34px; color: #3e5b82; }
.icon-button svg { width: 20px; height: 20px; }
.notification-dot { position: absolute; top: 5px; right: 4px; width: 6px; height: 6px; border: 1px solid #fff; border-radius: 99px; background: var(--red); }
.profile-button { display: flex; align-items: center; gap: 9px; color: #365173; font-size: 13px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: linear-gradient(145deg,#4d8bff,#1760ed); font-size: 15px; font-weight: 700; }
.chevron { color: #8797ae; font-size: 16px; }
.main-content { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 26px clamp(22px, 2vw, 32px) 16px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h1 { margin: 0; font-size: clamp(25px, 2vw, 30px); letter-spacing: -.025em; line-height: 1.2; }
.page-heading p { margin: 6px 0 0; color: #657b98; font-size: 14px; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: #375273; font-weight: 600; white-space: nowrap; cursor: pointer; transition: .16s ease; }
.btn:hover { border-color: #a9bfdf; background: #f8fbff; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 2px 6px rgba(36,107,253,.14); }
.btn-primary:hover { color: #fff; border-color: var(--blue-strong); background: var(--blue-strong); }
.btn-soft { color: var(--blue); border-color: #d9e7ff; background: var(--blue-soft); }
.btn-danger { color: var(--red); border-color: #ffd8d3; background: #fff; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-sm { min-height: 31px; padding: 0 10px; font-size: 12px; }
.icon-only { width: 36px; padding: 0; }
.panel { min-width: 0; border: 1px solid #e2eaf3; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.panel-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #edf1f6; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.panel-body { padding: 17px 18px; }
.text-link { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; border: 0; background: none; color: var(--blue); font-weight: 650; white-space: nowrap; cursor: pointer; }
.text-link svg { width: 15px; height: 15px; flex: 0 0 auto; }
.text-link:hover { color: var(--blue-strong); }
.muted { color: var(--muted); }
.auth-screen { display: none; min-height: 100svh; align-items: center; justify-content: center; padding: 24px; background: #f3f7fc; }
.auth-visible .auth-screen { display: flex; }
.auth-visible .app-shell, .auth-visible .mobile-nav, .auth-visible .mobile-backdrop { display: none; }
.auth-card { width: 100%; max-width: 460px; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 12px 36px rgba(24,56,95,.07); }
.auth-mark { display: block; width: 60px; height: 60px; margin-bottom: 18px; background: transparent; object-fit: contain; }
.auth-card h1 { margin: 0 0 8px; font-size: 25px; }
.auth-description { margin: 0 0 24px; color: var(--muted); line-height: 1.7; }
.auth-form { display: grid; gap: 15px; }
.auth-form .btn-primary { width: 100%; margin-top: 6px; }
.auth-form input, .auth-form .btn-primary { min-height: 44px; }
.captcha-box { display: grid; gap: 9px; }
.captcha-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; }
.captcha-preview img { display: block; width: min(190px,66%); height: 54px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; }
.captcha-preview img[hidden] { display: none; }
.captcha-preview .btn { min-height: 44px; margin-left: auto; }
.captcha-box input { letter-spacing: .2em; }
.developer-credit { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.developer-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.main-footer .developer-credit { margin: 0; }
.account-role-description { margin: 0; }
.account-list { display: grid; gap: 10px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px; border: 1px solid var(--border, #e5ebf3); border-radius: 8px; background: #fcfdff; }
.account-identity { display: grid; gap: 3px; min-width: 0; flex: 1 1 140px; overflow-wrap: anywhere; }
.account-identity > span { color: #70839b; font-size: 12px; }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.account-actions .btn { min-height: 42px; }
.account-form .auth-error { margin: 0; }
.account-form .notice { overflow-wrap: anywhere; }
.settings-grid > .panel { min-width: 0; }
.settings-backup-actions { flex-wrap: wrap; }
.auth-error { min-height: 1.4em; color: var(--red); font-size: 13px; }
.auth-meta { margin-top: 22px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.auth-download { display: grid; gap: 7px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.auth-download .btn { min-height: 44px; width: 100%; }
.auth-download small { color: var(--muted); font-size: 11px; }
.connection-status { padding: 8px 22px; color: #4b728f; background: #eef7fc; font-size: 12px; line-height: 1.6; }
.connection-status.warning { color: #8d5b18; background: #fff5e5; }
.connection-status.error { color: #a34444; background: #fff0ef; }
.connection-status button { margin-left: 8px; border: 0; color: inherit; background: transparent; text-decoration: underline; cursor: pointer; }
.save-notice { margin: 12px 16px; color: #8d5b18; background: #fff5e5; border-color: #f2dfb9; }
.small { font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.metric-card { display: flex; align-items: flex-start; gap: 14px; min-height: 118px; padding: 19px 20px; }
.metric-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 11px; color: var(--blue); background: #f0f5ff; }
.metric-icon svg { width: 25px; height: 25px; }
.metric-icon.teal { color: var(--teal); background: #ecf9f6; }
.metric-icon.orange { color: var(--orange); background: #fff7ed; }
.metric-icon.purple { color: var(--purple); background: var(--purple-soft); }
.metric-label { margin: 1px 0 8px; color: #647b98; font-size: 13px; }
.metric-value { margin: 0; font-size: clamp(22px, 1.9vw, 30px); font-weight: 760; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-unit { margin-left: 5px; font-size: 14px; font-weight: 650; }
.metric-trend { margin-top: 7px; color: #8494a9; font-size: 11px; }
.circulation-link { min-width: 0; color: inherit; text-decoration: none; border-radius: 8px; }
.circulation-link .metric-card { height: 100%; }
.circulation-link:hover .metric-card { border-color: #bfd2f2; background: #fbfdff; }
.circulation-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.inventory-controls { margin-top: 8px; }
.positive { color: var(--teal); }
.negative { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(310px,.9fr); gap: 15px; align-items: start; }
.dashboard-primary, .dashboard-secondary { display: grid; gap: 15px; min-width: 0; }
.chart-wrap { padding: 9px 15px 10px; }
.chart-svg { display: block; width: 100%; height: auto; min-height: 205px; overflow: visible; }
.chart-tooltip { position: absolute; padding: 7px 10px; color: #fff; border-radius: 5px; background: #172b4d; box-shadow: 0 4px 12px #172b4d30; font-size: 12px; pointer-events: none; }
.period-switch { display: inline-flex; padding: 3px; border-radius: 6px; background: #f2f5f9; }
.period-switch button { min-width: 43px; min-height: 29px; border: 0; border-radius: 4px; background: transparent; color: #657a95; font-size: 12px; cursor: pointer; }
.period-switch button.selected { color: #fff; background: var(--blue); box-shadow: 0 1px 4px rgba(36,107,253,.2); }
.reminder-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.reminder-item { width: 100%; min-height: 69px; display: flex; align-items: center; gap: 13px; padding: 10px 12px; border: 1px solid #e5ecf4; border-radius: 6px; text-align: left; background: #fff; cursor: pointer; }
.reminder-item:hover { border-color: #bcd0ee; background: #fbfdff; }
.reminder-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 8px; color: var(--orange); background: #fff7ee; }
.reminder-icon svg { width: 23px; height: 23px; }
.reminder-icon.red { color: var(--red); background: #fff2f0; }
.reminder-icon.blue { color: var(--blue); background: #f0f5ff; }
.reminder-copy { min-width: 0; flex: 1; }
.reminder-copy strong { display: block; font-size: 13px; }
.reminder-copy small { display: block; overflow: hidden; margin-top: 3px; color: #8392a7; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.reminder-count { margin-left: auto; color: var(--orange); font-size: 16px; font-weight: 750; white-space: nowrap; }
.reminder-count.red { color: var(--red); }
.reminder-count.blue { color: var(--blue); }
.reminder-arrow { color: #92a1b5; font-size: 20px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; white-space: nowrap; }
.data-table th { padding: 10px 13px; color: #6d819b; background: #f8fafc; font-weight: 600; }
.data-table td { padding: 10px 13px; border-top: 1px solid #edf1f6; color: #385574; }
.data-table tbody tr:hover { background: #fafcff; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .actions-cell { text-align: right; }
.table-footer { padding: 11px 15px; border-top: 1px solid #edf1f6; text-align: right; }
.status { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 9px; border-radius: 5px; color: #607894; background: #f0f3f7; font-size: 11px; font-weight: 650; }
.status.success { color: #009579; background: #e3f8f2; }
.status.warning { color: #dc7a15; background: #fff0db; }
.status.info { color: #286df0; background: #e8f1ff; }
.status.danger { color: #d9473c; background: #ffedeb; }
.status.purple { color: #7156d4; background: #f0edff; }
.stock-list { display: grid; gap: 15px; }
.stock-row-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; font-size: 12px; }
.stock-row-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-row-top span { color: #6b819d; white-space: nowrap; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #e9eef5; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,#4d91ff,#246bfd); transition: width .3s ease; }
.progress-fill.low { background: linear-gradient(90deg,#ffc178,#ef8a25); }
.progress-fill.good { background: linear-gradient(90deg,#57ceb1,#00a88b); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid #edf1f6; }
.toolbar .search-box { flex: 1 1 220px; max-width: 330px; }
.search-box { position: relative; display: flex; align-items: center; min-width: 150px; }
.search-box svg { position: absolute; left: 11px; width: 16px; height: 16px; color: #8a9bb0; }
.search-box input { width: 100%; height: 36px; padding: 0 11px 0 35px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: #fff; }
.control { min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; color: #415a79; background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #526a88; font-size: 12px; font-weight: 650; }
.field label .required { margin-left: 3px; color: var(--red); }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: #fff; }
.field input:disabled, .field select:disabled { color: #8c9aab; background: #f3f6f9; cursor: not-allowed; }
input[type="checkbox"] { flex: 0 0 17px; width: 17px; min-width: 17px; height: 17px; min-height: 0; padding: 0; accent-color: var(--blue); }
.field textarea { min-height: 74px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #a3afbf; }
.field-hint { color: #8797ac; font-size: 11px; }
.inline-fields { display: flex; align-items: center; gap: 8px; }
.inline-fields > * { flex: 1; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; color: #607894; background: #fff; font-size: 12px; cursor: pointer; }
.filter-chip.active { color: var(--blue); border-color: #b8d1ff; background: var(--blue-soft); }
.empty-state { display: grid; place-items: center; min-height: 185px; padding: 25px; color: #8091a8; text-align: center; }
.empty-state svg { width: 38px; height: 38px; margin-bottom: 7px; color: #a5b4c7; }
.empty-state strong { color: #4f6684; font-size: 14px; }
.empty-state p { margin: 5px 0 0; font-size: 12px; }
.summary-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; padding: 13px 17px; color: #657c98; font-size: 12px; }
.summary-strip strong { margin-left: 5px; color: var(--ink); font-size: 14px; }
.tabs { display: flex; gap: 22px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; min-height: 46px; padding: 0 2px; border: 0; color: #72849c; background: none; font-weight: 600; cursor: pointer; }
.tabs button.active { color: var(--blue); }
.tabs button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--blue); content: ""; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.8fr); gap: 15px; }
.detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 18px; }
.detail-item small { display: block; color: #8394a9; font-size: 11px; }
.detail-item strong { display: block; margin-top: 3px; color: #345171; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.split-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 15px; align-items: start; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid #dce8fb; border-radius: 6px; color: #547397; background: #f4f8ff; font-size: 12px; }
.notice svg { flex: 0 0 17px; width: 17px; height: 17px; color: var(--blue); }
.kpi-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.kpi-box { padding: 15px; }
.kpi-box small { color: #8192a8; font-size: 11px; }
.kpi-box strong { display: block; margin-top: 5px; font-size: 22px; font-variant-numeric: tabular-nums; }
.ledger-list { display: grid; }
.ledger-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eff2f6; }
.ledger-row:last-child { border-bottom: 0; }
[hidden] { display: none !important; }
.ledger-title { font-weight: 650; color: #385574; }
.ledger-meta { margin-top: 3px; color: #8898ac; font-size: 11px; }
.ledger-value { color: var(--teal); font-weight: 750; white-space: nowrap; }
.ledger-value.outflow { color: var(--red); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(20,36,61,.4); animation: fade-in .16s ease; }
.modal { width: min(560px,100%); max-height: min(86vh,820px); display: flex; flex-direction: column; border: 1px solid #e5ebf3; border-radius: 10px; background: #fff; box-shadow: 0 24px 80px rgba(20,36,61,.2); animation: modal-in .18s ease; }
.modal.wide { width: min(760px,100%); }
.modal > form { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 20px; border-bottom: 1px solid #edf1f6; }
.modal-head, .modal-foot { flex-shrink: 0; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 5px; color: #7588a1; background: transparent; font-size: 22px; cursor: pointer; }
.modal-close:hover { background: #f1f4f8; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 19px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 20px; border-top: 1px solid #edf1f6; }
.toast { position: fixed; right: 22px; bottom: 24px; z-index: 150; display: flex; align-items: center; gap: 9px; max-width: min(420px,calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #dce8e4; border-radius: 7px; color: #275c51; background: #f1fbf7; box-shadow: 0 8px 26px rgba(23,43,77,.12); animation: modal-in .18s ease; }
.toast.error { color: #9a3932; border-color: #f5d4d0; background: #fff5f3; }
.toast svg { width: 18px; height: 18px; }
.mobile-nav, .mobile-backdrop { display: none; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 13px 16px; color: #8292a7; font-size: 12px; }
.pagination button { min-width: 29px; height: 28px; border: 1px solid var(--line); border-radius: 5px; background: white; color: #627995; cursor: pointer; }
.pagination button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.chart-legend { display: flex; align-items: center; gap: 7px; color: #7790ab; font-size: 11px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.callout-number { color: var(--blue); font-weight: 750; font-variant-numeric: tabular-nums; }
.cell-primary { color: #29476a; font-weight: 650; }
.table-sub { display: block; margin-top: 2px; color: #94a1b2; font-size: 10px; }
.divider { height: 1px; margin: 14px 0; background: #edf1f6; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nowrap { white-space: nowrap; }
.file-input-hidden { display: none; }
.toggle { position: relative; display: inline-flex; align-items: center; width: 36px; height: 21px; padding: 2px; border: 0; border-radius: 99px; background: #cad5e3; cursor: pointer; transition: background .16s; }
.toggle::after { width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #172b4d2a; content: ""; transition: transform .16s; }
.toggle.on { background: var(--blue); }
.toggle.on::after { transform: translateX(15px); }
.main-footer { display: flex; justify-content: space-between; gap: 15px; padding: 10px clamp(22px,2vw,32px) 16px; color: #8999ad; font-size: 11px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1500px) { .metric-card { min-height: 125px; } .dashboard-grid { grid-template-columns: minmax(0,1.62fr) minmax(350px,.92fr); } }
@media (max-width: 1120px) { .sidebar { width: 205px; } .workspace { width: calc(100% - 205px); margin-left: 205px; } .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .dashboard-grid { grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr); } .metric-card { min-height: 105px; } }
@media (max-width: 850px) { .sidebar { width: 76px; padding: 21px 9px 13px; } .brand { justify-content: center; padding: 0; margin-bottom: 22px; } .brand > span:last-child, .nav-link > span, .sidebar-foot { display: none; } .nav-group { padding-bottom: 10px; margin-bottom: 8px; } .nav-link { justify-content: center; min-height: 43px; padding: 0; } .nav-link svg { width: 21px; height: 21px; } .workspace { width: calc(100% - 76px); margin-left: 76px; } .dashboard-grid { grid-template-columns: 1fr; } .dashboard-secondary { grid-template-columns: repeat(2,minmax(0,1fr)); } .split-layout { grid-template-columns: minmax(0,1fr) 270px; } }
@media (max-width: 620px) { body { font-size: 13px; } .sidebar { display: none; } .workspace { width: 100%; margin: 0; min-height: 100svh; padding-bottom: calc(64px + env(safe-area-inset-bottom)); } .topbar { height: 54px; padding: 0 15px; } .topbar-title { gap: 9px; } .topbar-title strong { font-size: 15px; } .topbar-title span { font-size: 10px; } .topbar-actions { gap: 10px; } .profile-button { gap: 6px; } .profile-name, .profile-button .chevron { display: none; } .avatar { width: 31px; height: 31px; } .main-content { padding: 19px 13px 13px; } .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 15px; } .page-heading h1 { font-size: 23px; } .page-heading p { margin-top: 5px; font-size: 12px; } .heading-actions { flex-wrap: wrap; justify-content: flex-end; } .heading-actions .btn { min-height: 35px; padding: 0 10px; font-size: 12px; } .heading-actions .hide-mobile { display: none; } .metric-grid { gap: 9px; margin-bottom: 12px; } .metric-card { min-height: 93px; gap: 10px; padding: 12px 11px; } .metric-icon { flex-basis: 37px; width: 37px; height: 37px; border-radius: 9px; } .metric-icon svg { width: 21px; height: 21px; } .metric-label { margin-bottom: 5px; font-size: 11px; } .metric-value { font-size: clamp(19px,6vw,24px); } .metric-unit { margin-left: 3px; font-size: 11px; } .metric-trend { margin-top: 4px; font-size: 10px; } .dashboard-grid, .dashboard-primary, .dashboard-secondary { gap: 11px; } .dashboard-secondary { grid-template-columns: 1fr; } .panel-head { min-height: 48px; padding: 10px 13px; } .panel-head h2, .panel-head h3 { font-size: 14px; } .panel-body { padding: 13px; } .chart-wrap { padding: 5px 5px 8px; } .chart-svg { min-height: 180px; } .reminder-list { gap: 8px; } .reminder-item { min-height: 61px; gap: 9px; padding: 8px; } .reminder-icon { width: 37px; height: 37px; flex-basis: 37px; } .reminder-copy strong { font-size: 12px; } .reminder-copy small { font-size: 10px; } .reminder-count { font-size: 14px; } .data-table { font-size: 11px; } .data-table th, .data-table td { padding: 9px 10px; } .main-footer { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 13px 14px; text-align: center; } .mobile-nav { position: fixed; inset: auto 0 0; z-index: 35; display: flex; justify-content: space-around; padding: 6px 5px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid #e5ebf3; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); } .mobile-nav a, .mobile-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 49px; border: 0; color: #71839b; background: transparent; font-size: 10px; cursor: pointer; } .mobile-nav svg { width: 20px; height: 20px; } .mobile-nav .active { color: var(--blue); font-weight: 700; } .mobile-backdrop.open { position: fixed; inset: 0; z-index: 30; display: block; background: rgba(21,38,63,.3); } .mobile-drawer { position: fixed; z-index: 40; right: 0; bottom: calc(61px + env(safe-area-inset-bottom)); left: 0; max-height: 70vh; overflow-y: auto; padding: 17px; border-radius: 14px 14px 0 0; background: #fff; box-shadow: 0 -8px 35px rgba(23,43,77,.15); } .mobile-drawer h3 { margin: 0 0 12px; font-size: 15px; } .mobile-drawer-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; } .mobile-drawer-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 7px; color: #45617f; background: #f7f9fc; font-size: 11px; } .mobile-drawer-grid svg { width: 20px; height: 20px; color: #54749d; } .toolbar { gap: 7px; padding: 10px; } .toolbar .search-box { flex-basis: 100%; max-width: none; } .toolbar .control { flex: 1; } .split-layout, .detail-grid { grid-template-columns: 1fr; } .detail-list { gap: 12px; } .summary-strip { gap: 14px; padding: 11px 13px; } .kpi-row { gap: 8px; } .kpi-box { padding: 11px; } .kpi-box strong { font-size: 18px; } .form-grid { gap: 12px; } .modal-backdrop { align-items: end; padding: 0; } .modal, .modal.wide { width: 100%; max-height: 90svh; border-radius: 13px 13px 0 0; } .modal-head { padding: 14px 16px; } .modal-body { padding: 16px; } .modal-foot { padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); } .toast { right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); } .pagination { padding: 10px; } }
@media (max-width: 620px) {
  .page-heading .heading-actions [data-action="quick-repayment"],
  .page-heading .heading-actions [data-action="quick-receive"] { display: none; }
  .chart-svg text { font-size: 20px; }
  .circulation-grid .metric-card { min-height: 112px; }
  .circulation-grid .metric-icon { flex-basis: 30px; width: 30px; height: 30px; }
  .circulation-grid .metric-icon svg { width: 18px; height: 18px; }
  .circulation-grid .metric-label { font-size: 11px; }
  .circulation-grid .metric-trend { max-width: 108px; line-height: 1.5; }
  .inventory-controls { gap: 5px; }
  .notice { flex-wrap: wrap; }
  .notice > span { flex: 1; min-width: 0; }
}
@media (max-width: 380px) { .metric-card { gap: 7px; padding: 11px 8px; } .metric-icon { width: 33px; height: 33px; flex-basis: 33px; } .metric-label { font-size: 10px; } .metric-value { font-size: 19px; } .heading-actions .btn-primary { width: 36px; gap: 0; overflow: hidden; padding: 0; font-size: 0; } .heading-actions .btn-primary svg { flex: 0 0 17px; } .topbar-title span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@media print { body, html { background: #fff; } .sidebar, .topbar, .mobile-nav, .main-footer, .heading-actions, .toolbar, .pagination, .panel-head .text-link { display: none !important; } .workspace { width: 100%; margin: 0; } .main-content { max-width: none; padding: 0; } .panel { border-color: #d5dbe4; box-shadow: none; break-inside: avoid; } .data-table th { color: #334; background: #f2f4f7 !important; print-color-adjust: exact; } .page-heading { margin-bottom: 12px; } }
