:root {
  --ink: #122425;
  --muted: #6d7a78;
  --line: #dfe5e1;
  --canvas: #f4f5f0;
  --surface: #ffffff;
  --forest: #0b2f35;
  --forest-2: #14464a;
  --teal: #1f786f;
  --mint: #dff1e9;
  --lime: #bfde67;
  --amber: #d98b2b;
  --amber-soft: #fff0d9;
  --red: #bd4d45;
  --red-soft: #fbe5e2;
  --shadow: 0 18px 50px rgba(17, 45, 45, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(191, 222, 103, .55); outline-offset: 2px; }
[hidden] { display: none !important; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 560px) minmax(320px, 1fr); background: var(--forest); }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 8vw, 96px); background: #fff; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(42px, 8vh, 78px); }
.auth-brand strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.auth-brand small { display: block; color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .24em; }
.auth-card h1 { font-size: clamp(38px, 5vw, 58px); }
.auth-copy { max-width: 440px; margin: 12px 0 26px; color: var(--muted); line-height: 1.65; }
.auth-form { display: grid; gap: 16px; max-width: 440px; }
.auth-form label { display: grid; gap: 8px; color: #3e514f; font-size: 12px; font-weight: 800; }
.auth-form input { min-height: 50px; }
.auth-submit { width: 100%; min-height: 48px; }
.form-error { margin: -3px 0 0; padding: 11px 13px; border-radius: 10px; color: #8a302b; background: var(--red-soft); font-size: 12px; font-weight: 700; }
.password-hint { margin-top: -8px; color: var(--muted); line-height: 1.5; }
.auth-promise { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(38px, 8vw, 100px); color: #f5faf7; background: radial-gradient(circle at 70% 10%, rgba(191,222,103,.22), transparent 38%), linear-gradient(145deg, #103c41, #071f24); }
.auth-promise h2 { max-width: 620px; margin: 20px 0 12px; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 64px); font-weight: 500; line-height: 1.02; letter-spacing: -.04em; }
.auth-promise p { max-width: 580px; color: #b7cfca; font-size: 16px; line-height: 1.7; }
.auth-lock { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: var(--forest); background: var(--lime); font-size: 24px; font-weight: 900; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; z-index: 20; display: flex; flex-direction: column; padding: 28px 20px 22px; color: #f8fbf8; background: var(--forest); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; margin: 0 8px 30px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--forest); background: var(--lime); font-weight: 900; letter-spacing: -.06em; box-shadow: inset 0 -4px 0 rgba(11,47,53,.12); }
.brand strong { display: block; font-size: 21px; letter-spacing: -.035em; }
.brand small { display: block; margin-top: 1px; color: #a9c5be; font-size: 9px; font-weight: 800; letter-spacing: .24em; }
.business-picker { padding: 13px; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(255,255,255,.06); }
.business-picker > label { display: block; margin-bottom: 9px; color: #9eb9b3; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.select-wrap { display: flex; align-items: center; gap: 9px; }
.business-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: var(--forest); background: #eef7d4; font-size: 11px; font-weight: 900; }
.business-picker select { min-width: 0; width: 100%; border: 0; color: #fff; background: transparent; font-weight: 750; appearance: auto; }
.business-picker option { color: var(--ink); }
.business-picker p { margin: 7px 0 0 40px; color: #9eb9b3; font-size: 11px; }
.nav-list { display: grid; gap: 4px; margin-top: 28px; }
.nav-section-label { margin: 14px 12px 5px; color: #76958f; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 12px; color: #bad0cb; background: transparent; text-align: left; font-weight: 650; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-item.active { color: #102e31; background: var(--lime); box-shadow: 0 7px 20px rgba(0,0,0,.13); }
.nav-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; font-size: 11px; font-weight: 900; border: 1px solid currentColor; opacity: .9; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 20px; color: #254345; background: #e9f5c4; font-size: 10px; text-align: center; }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; padding-top: 24px; }
.support-card, .user-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; color: #fff; background: rgba(255,255,255,.05); text-align: left; }
.support-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--forest); background: var(--lime); font-weight: 900; }
.support-card strong, .user-card strong { display: block; font-size: 12px; }
.support-card small, .user-card small { display: block; margin-top: 2px; color: #94b0aa; font-size: 10px; }
.user-card { border: 0; padding: 7px; background: transparent; }
.user-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #1e4849; background: #d9ece7; font-size: 11px; font-weight: 900; }
.user-card .icon-button { margin-left: auto; color: #93afa9; }
.main-content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; min-height: 94px; padding: 18px clamp(22px, 4vw, 52px); background: rgba(244,245,240,.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(16,53,55,.07); }
.eyebrow { margin: 0 0 4px; color: var(--teal); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 3vw, 37px); font-weight: 500; letter-spacing: -.035em; }
h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.date-chip, .button, .icon-button { border: 0; }
.date-chip { padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; color: #51605e; background: rgba(255,255,255,.72); font-size: 12px; font-weight: 700; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #37a36c; box-shadow: 0 0 0 4px rgba(55,163,108,.12); }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--ink); background: transparent; }
.icon-button:hover { background: rgba(11,47,53,.07); }
.notification-button { position: relative; border: 1px solid var(--line); background: #fff; font-weight: 900; }
.notification-button span { position: absolute; top: -5px; right: -4px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 20px; color: white; background: var(--red); font-size: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border-radius: 11px; font-weight: 800; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--teal); box-shadow: 0 8px 18px rgba(31,120,111,.19); }
.button-primary:hover { background: #17675f; }
.button-ghost { border: 1px solid var(--line); color: #42504e; background: #fff; }
.button-dark { color: white; background: var(--forest); }
.mobile-menu { display: none; }
.view { max-width: 1500px; margin: 0 auto; padding: 28px clamp(22px, 4vw, 52px) 70px; }
.loading-state { min-height: 55vh; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.loader { width: 34px; height: 34px; border: 3px solid #d5ded9; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 22px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric-card { min-height: 139px; padding: 20px; border: 1px solid rgba(12,49,52,.08); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 30px rgba(17,45,45,.035); }
.metric-card.accent { color: #f6fff9; background: var(--forest); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-card.accent .metric-top { color: #aac7c0; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--teal); background: var(--mint); font-size: 10px; font-weight: 900; }
.metric-card.accent .metric-icon { color: var(--forest); background: var(--lime); }
.metric-value { display: block; margin-top: 19px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -.035em; }
.metric-foot { display: flex; gap: 6px; align-items: center; margin-top: 8px; color: var(--muted); font-size: 11px; }
.metric-card.accent .metric-foot { color: #9dbab4; }
.trend-up { color: #24835e; font-weight: 850; }
.trend-down { color: var(--red); font-weight: 850; }
.panel { border: 1px solid rgba(12,49,52,.08); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 30px rgba(17,45,45,.035); overflow: hidden; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.panel-link { border: 0; color: var(--teal); background: transparent; font-weight: 800; font-size: 12px; }
.chart-wrap { padding: 8px 22px 22px; }
.chart-summary { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.chart-summary strong { font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.chart-summary span { color: var(--muted); font-size: 11px; }
.bar-chart { height: 190px; display: flex; align-items: end; gap: 10px; padding: 15px 0 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 45px, rgba(12,49,52,.06) 46px); }
.bar-group { flex: 1; height: 100%; display: flex; align-items: end; justify-content: center; gap: 4px; position: relative; }
.bar { width: min(18px, 34%); min-height: 5px; border-radius: 5px 5px 0 0; background: var(--teal); transition: height .4s ease; }
.bar.out { background: #dce5df; }
.bar-group label { position: absolute; bottom: -23px; color: var(--muted); font-size: 10px; }
.chart-legend { display: flex; gap: 16px; margin-top: 31px; color: var(--muted); font-size: 10px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 3px; background: var(--teal); }
.legend-dot.out { background: #dce5df; }
.attention-list { display: grid; padding: 0 12px 12px; }
.attention-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 13px 10px; border-top: 1px solid #edf0ed; }
.attention-item:first-child { border-top: 0; }
.attention-dot { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-size: 12px; font-weight: 900; }
.attention-dot.warning { color: #995e1c; background: var(--amber-soft); }
.attention-dot.danger { color: var(--red); background: var(--red-soft); }
.attention-dot.success { color: var(--teal); background: var(--mint); }
.attention-item strong { display: block; font-size: 12px; }
.attention-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.attention-item time { color: #8e9a97; font-size: 10px; }
.module-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.module-card { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.65); }
.module-card span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--forest); background: var(--mint); font-weight: 900; font-size: 11px; }
.module-card strong { display: block; font-size: 12px; }
.module-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 13px 18px; border-top: 1px solid #edf0ed; text-align: left; vertical-align: middle; }
.data-table th { color: #7b8986; background: #fbfcfa; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { font-size: 12px; }
.data-table strong { display: block; font-size: 12px; }
.data-table small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.amount { font-weight: 850; white-space: nowrap; }
.amount.in { color: #177452; }
.amount.out { color: var(--ink); }
.status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 20px; color: #2b5b4b; background: var(--mint); font-size: 9px; font-weight: 850; white-space: nowrap; }
.status.warning { color: #8c5719; background: var(--amber-soft); }
.status.danger { color: #9c3f38; background: var(--red-soft); }
.page-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 22px; }
.page-heading p { margin: 7px 0 0; color: var(--muted); }
.account-grid, .summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.account-card { padding: 20px; border-radius: var(--radius); color: white; background: linear-gradient(135deg, var(--forest), #1a5959); box-shadow: var(--shadow); }
.account-card:nth-child(2) { color: var(--ink); background: #e6edc4; }
.account-card:nth-child(3) { color: var(--ink); background: #e5ece9; }
.account-card p { margin: 0; opacity: .72; font-size: 11px; font-weight: 700; }
.account-card strong { display: block; margin: 24px 0 9px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.account-card small { opacity: .66; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; }
.filter-chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: white; font-size: 10px; font-weight: 750; }
.filter-chip.active { border-color: var(--forest); color: white; background: var(--forest); }
.progress { height: 7px; margin-top: 7px; border-radius: 10px; background: #e7ece9; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.stock-grid, .report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stock-card, .report-card { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stock-card .stock-top, .report-card .report-top { display: flex; justify-content: space-between; gap: 10px; }
.stock-card p, .report-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.stock-number { display: block; margin-top: 26px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.report-card { min-height: 170px; display: flex; flex-direction: column; }
.report-card .report-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--teal); background: var(--mint); font-weight: 900; }
.report-card button { margin-top: auto; align-self: start; }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
.settings-nav { align-self: start; position: sticky; top: 112px; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.settings-nav button { padding: 10px 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; text-align: left; font-size: 12px; font-weight: 700; }
.settings-nav button.active { color: white; background: var(--forest); }
.settings-section { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.settings-section + .settings-section { margin-top: 16px; }
.settings-section > p { margin: 7px 0 22px; color: var(--muted); }
.module-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.toggle-row strong { display: block; font-size: 12px; }
.toggle-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 24px; background: #d7ded9; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(18px); }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-form label, .form-grid label { display: grid; gap: 7px; color: #485653; font-size: 11px; font-weight: 800; }
input, select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #d6ddd9; border-radius: 10px; color: var(--ink); background: white; }
input:disabled { color: var(--muted); background: #f4f6f3; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.staff-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.staff-form-card { position: sticky; top: 112px; }
.staff-form { display: grid; gap: 13px; margin-top: 20px; }
.staff-form label { display: grid; gap: 7px; color: #485653; font-size: 11px; font-weight: 800; }
.staff-list { display: grid; gap: 10px; }
.staff-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(120px, .7fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.staff-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.staff-person strong, .staff-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-person small, .staff-meta small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.staff-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.button-small { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.empty-state { padding: 65px 25px; text-align: center; }
.empty-state span { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 15px; border-radius: 17px; color: var(--teal); background: var(--mint); font-weight: 900; }
.empty-state p { max-width: 470px; margin: 8px auto 18px; color: var(--muted); }
.dialog { width: min(590px, calc(100vw - 28px)); max-width: calc(100vw - 28px); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 22px; overflow-x: hidden; overflow-y: auto; box-shadow: 0 30px 100px rgba(7,35,38,.3); }
.dialog::backdrop { background: rgba(6,31,33,.58); backdrop-filter: blur(4px); }
.dialog form { padding: 24px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dialog-head .icon-button { font-size: 23px; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 18px; padding: 5px; border-radius: 12px; background: #eef1ed; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 9px; border-radius: 8px; color: var(--muted); text-align: center; font-size: 12px; font-weight: 800; }
.segmented input:checked + span { color: white; background: var(--forest); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid > *, .dialog form, .dialog input, .dialog select { min-width: 0; }
.span-2 { grid-column: 1 / -1; }
.calculation-note { display: flex; justify-content: space-between; gap: 14px; margin-top: 17px; padding: 13px; border-radius: 12px; color: #765019; background: var(--amber-soft); font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.credentials-dialog { padding: 24px; }
.credential-warning { margin: 0 0 18px; padding: 12px 14px; border-radius: 11px; color: #765019; background: var(--amber-soft); font-size: 12px; line-height: 1.5; }
.credential-box { display: grid; gap: 5px; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf7; }
.credential-box span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.credential-box strong { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: 340px; padding: 13px 16px; border-radius: 12px; color: #fff; background: var(--forest); box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }
.danger-text { color: var(--red); }

@media (max-width: 1160px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .page-grid { grid-template-columns: 1fr; }
  .module-strip { grid-template-columns: repeat(2, 1fr); }
  .stock-grid, .report-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-card { min-height: 100vh; }
  .auth-promise { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 270px; transition: .25s; box-shadow: 20px 0 60px rgba(0,0,0,.22); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .topbar { padding: 15px 18px; }
  .topbar > div:nth-child(2) { margin-right: auto; margin-left: 10px; }
  .date-chip, .notification-button { display: none; }
  .view { padding: 22px 18px 92px; }
  .settings-layout { grid-template-columns: 1fr; }
  .staff-layout { grid-template-columns: 1fr; }
  .staff-form-card { position: static; }
  .settings-nav { position: static; grid-template-columns: repeat(3, 1fr); }
  .mobile-nav { position: fixed; z-index: 19; left: 10px; right: 10px; bottom: 9px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 7px; border: 1px solid rgba(11,47,53,.15); border-radius: 17px; background: rgba(255,255,255,.95); backdrop-filter: blur(15px); box-shadow: 0 15px 40px rgba(11,47,53,.18); }
  .mobile-nav button { display: grid; place-items: center; gap: 3px; padding: 6px 3px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 750; }
  .mobile-nav button span { font-size: 11px; font-weight: 900; }
  .mobile-nav button.active { color: white; background: var(--forest); }
}
@media (max-width: 620px) {
  .topbar-actions .button { width: 41px; overflow: hidden; padding: 0; font-size: 0; }
  .topbar-actions .button::before { content: "+"; font-size: 21px; }
  .metrics-grid, .account-grid, .summary-grid, .stock-grid, .report-grid, .module-config, .settings-form, .form-grid { grid-template-columns: 1fr; }
  .module-strip { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: auto; }
  .metric-card { min-height: 128px; }
  .panel { overflow-x: auto; }
  .data-table { min-width: 680px; }
  .staff-row { grid-template-columns: 1fr; }
  .staff-actions { justify-content: flex-start; }
  .page-heading { align-items: start; flex-direction: column; }
  .page-heading .button { width: 100%; }
  .calculation-note { flex-direction: column; }
  .dialog { width: calc(100vw - 18px); max-width: calc(100vw - 18px); max-height: calc(100vh - 18px); border-radius: 16px; }
  .dialog form, .credentials-dialog { padding: 18px; }
  .dialog-actions { flex-wrap: wrap; }
}
