:root {
    --navy: #092d68;
    --navy-2: #0e3d86;
    --blue: #1558c9;
    --blue-soft: #eaf1ff;
    --orange: #f47a20;
    --orange-soft: #fff0e4;
    --ink: #17233c;
    --muted: #68758c;
    --line: #dfe5ee;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --green: #117a55;
    --green-soft: #e6f6ef;
    --red: #b53737;
    --red-soft: #fdecec;
    --amber: #9a6500;
    --amber-soft: #fff4d7;
    --shadow: 0 10px 32px rgba(26, 43, 75, .08);
    --radius: 16px;
    --sidebar: 260px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }
.icon { flex: none; }
.muted { color: var(--muted); }
.text-danger { color: var(--red); }
.text-success { color: var(--green); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.mobile-only { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #071f4b; color: #fff; display: flex; flex-direction: column; z-index: 50; box-shadow: 8px 0 32px rgba(3, 19, 48, .12); }
.brand { height: 82px; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px 13px 13px 5px; background: var(--orange); color: #fff; display: inline-grid; place-items: center; font-weight: 900; font-size: 1.45rem; box-shadow: inset 0 -5px 12px rgba(120, 48, 0, .16); flex: none; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; }
.brand-copy strong { letter-spacing: .12em; font-size: 1rem; }
.brand-copy small { color: #aebfde; font-size: .72rem; white-space: nowrap; }
.primary-nav { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px 20px; overflow: auto; }
.nav-section { color: #7892bd; padding: 18px 12px 7px; font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-link { min-height: 44px; border-radius: 10px; display: flex; align-items: center; gap: 12px; color: #c8d5ea; padding: 0 12px; font-size: .9rem; font-weight: 650; transition: .16s ease; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: #fff; color: var(--navy); box-shadow: 0 7px 20px rgba(0,0,0,.16); }
.nav-link.active .icon { color: var(--orange); }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: space-between; padding: 16px; }
.owner-mini { min-width: 0; display: flex; align-items: center; gap: 10px; }
.owner-mini > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.owner-mini strong { white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; }
.owner-mini small { color: #9fb2d2; font-size: .72rem; }
.sidebar-footer .icon-button { color: #aebfde; }

.main-area { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.global-search { width: min(590px, 70%); display: flex; align-items: center; gap: 10px; background: var(--canvas); border: 1px solid transparent; border-radius: 11px; padding: 0 14px; }
.global-search:focus-within { background: #fff; border-color: #a9c4ef; box-shadow: 0 0 0 3px rgba(21, 88, 201, .1); }
.global-search .icon { color: #8390a5; }
.global-search input { border: 0; outline: 0; background: transparent; height: 42px; width: 100%; color: var(--ink); font-size: .9rem; }
.notification-button { margin-left: auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: var(--ink); position: relative; }
.notification-button:hover { background: var(--blue-soft); color: var(--blue); }
.notification-button span { position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 20px; background: var(--orange); color: #fff; font-size: .64rem; font-weight: 800; border: 2px solid #fff; }
.content { width: min(1510px, 100%); margin: 0 auto; padding: 30px; flex: 1; }
.app-footer { padding: 18px 30px; display: flex; justify-content: space-between; color: #8490a3; font-size: .76rem; border-top: 1px solid var(--line); }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.page-heading h1 { margin: 2px 0 0; font-size: clamp(1.65rem, 2.5vw, 2.15rem); letter-spacing: -.035em; line-height: 1.14; }
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }

.button { min-height: 42px; border: 1px solid #cdd6e3; background: #fff; color: var(--ink); border-radius: 10px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; font-size: .86rem; cursor: pointer; transition: .15s ease; }
.button:hover { border-color: #9aa8bc; box-shadow: 0 4px 12px rgba(20, 41, 78, .08); }
.button.primary { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 6px 18px rgba(21, 88, 201, .22); }
.button.primary:hover { background: #104cad; }
.button.orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.button.ghost { background: transparent; border-color: transparent; color: var(--blue); box-shadow: none; }
.button.danger { color: var(--red); border-color: #efc9c9; background: #fff8f8; }
.button.small { min-height: 34px; padding: 0 11px; font-size: .78rem; border-radius: 8px; }
.button.wide { width: 100%; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; background: transparent; border: 0; border-radius: 9px; cursor: pointer; color: inherit; }
.icon-button:hover { background: rgba(128,145,172,.14); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(20, 42, 76, .045); overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-header { min-height: 66px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 1rem; }
.panel-header p, .panel-header span { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }
.panel-footer { padding: 14px 20px; background: #fbfcfe; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric { min-height: 145px; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px; position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; width: 88px; height: 88px; border-radius: 50%; right: -38px; top: -38px; background: var(--blue-soft); }
.metric.orange::after { background: var(--orange-soft); }
.metric.green::after { background: var(--green-soft); }
.metric.red::after { background: var(--red-soft); }
.metric-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); z-index: 1; }
.metric.orange .metric-icon { background: var(--orange-soft); color: var(--orange); }
.metric.green .metric-icon { background: var(--green-soft); color: var(--green); }
.metric.red .metric-icon { background: var(--red-soft); color: var(--red); }
.metric-value { font-size: clamp(1.65rem, 2.2vw, 2.15rem); font-weight: 850; letter-spacing: -.04em; margin-top: 12px; }
.metric small { color: var(--muted); font-size: .73rem; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th { text-align: left; padding: 12px 15px; color: #66748a; background: #f8fafd; font-size: .69rem; letter-spacing: .045em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px 15px; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdff; }
.data-table .person { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.person-copy { display: flex; flex-direction: column; min-width: 0; }
.person-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-copy small { color: var(--muted); }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty-cell { padding: 28px !important; text-align: center; color: var(--muted); }

.avatar { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; background: #dfeaff; color: var(--navy-2); font-size: .76rem; font-weight: 900; flex: none; }
.avatar.large { width: 68px; height: 68px; border-radius: 19px; font-size: 1.12rem; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-success { background: var(--green-soft); color: var(--green); }
.status-danger { background: var(--red-soft); color: var(--red); }
.status-warning { background: var(--amber-soft); color: var(--amber); }
.status-info { background: var(--blue-soft); color: var(--blue); }
.tag { display: inline-flex; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: .7rem; background: #fff; }

.toolbar { padding: 14px 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); }
.search-control { min-width: 260px; flex: 1; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 0 11px; }
.search-control input { height: 39px; border: 0; outline: 0; width: 100%; }
.filter-control { height: 40px; min-width: 150px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--ink); background: #fff; }

label { display: flex; flex-direction: column; gap: 6px; color: #34435b; font-size: .78rem; font-weight: 700; }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; border: 1px solid #ccd5e2; border-radius: 9px; color: var(--ink); background: #fff; padding: 10px 11px; outline: 0; transition: .15s ease; }
input, select { min-height: 42px; }
textarea { min-height: 105px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #7da5e3; box-shadow: 0 0 0 3px rgba(21,88,201,.1); }
input[type="checkbox"], input[type="radio"] { width: 17px; min-height: 17px; accent-color: var(--blue); }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-two { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 18px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
fieldset legend { font-weight: 850; font-size: .92rem; padding: 0; margin: 0 0 13px; }
.check-label { flex-direction: row; align-items: center; gap: 9px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 65px; }
.password-wrap button { position: absolute; inset: 0 5px 0 auto; border: 0; background: transparent; color: var(--blue); font-weight: 750; font-size: .75rem; cursor: pointer; }

.alert { border-radius: 10px; padding: 12px 14px; margin: 14px 0; font-size: .82rem; }
.alert.danger { background: var(--red-soft); border: 1px solid #f2c6c6; color: #8f2c2c; }
.alert.success { background: var(--green-soft); border: 1px solid #bee5d4; color: #0d6849; }
.alert.warning { background: var(--amber-soft); border: 1px solid #ecd8a1; color: #7d5600; }
.alert ul { margin: 7px 0 0; padding-left: 20px; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 11px; padding: 12px 14px; margin-bottom: 16px; background: var(--blue-soft); color: var(--navy-2); border: 1px solid #cfe0ff; box-shadow: 0 5px 18px rgba(24, 50, 91, .06); }
.toast.success { background: var(--green-soft); color: var(--green); border-color: #c4e8d8; }
.toast.warning { background: var(--amber-soft); color: var(--amber); border-color: #efdaa0; }
.toast.danger { background: var(--red-soft); color: var(--red); border-color: #f2c8c8; }
.toast button { background: transparent; border: 0; color: inherit; font-size: 1.25rem; cursor: pointer; }

.profile-hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.profile-person { display: flex; align-items: center; gap: 16px; min-width: 0; }
.profile-person h2 { margin: 0; font-size: 1.35rem; }
.profile-person p { margin: 4px 0 0; color: var(--muted); }
.profile-stats { display: flex; gap: 25px; }
.profile-stat { display: flex; flex-direction: column; text-align: right; }
.profile-stat strong { font-size: 1.12rem; }
.profile-stat span { color: var(--muted); font-size: .7rem; }
.detail-list { display: grid; }
.detail-row { min-height: 43px; display: flex; justify-content: space-between; gap: 15px; align-items: center; border-bottom: 1px solid #eef1f5; font-size: .8rem; }
.detail-row:last-child { border-bottom: 0; }
.detail-row > span:first-child { color: var(--muted); }
.detail-row strong { text-align: right; }
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); padding: 0 18px; overflow-x: auto; }
.tab-button { min-height: 48px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 750; font-size: .8rem; white-space: nowrap; cursor: pointer; }
.tab-button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; padding: 20px; }
.tab-panel.active { display: block; }
.record-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.record-card + .record-card { margin-top: 10px; }
.record-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 7px; }
.record-head h3 { margin: 0; font-size: .9rem; }
.record-card p { margin: 4px 0; color: #4d5b71; font-size: .82rem; }
.record-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .7rem; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: #dbe4f2; }
.timeline-item { position: relative; padding: 0 0 20px; }
.timeline-item::before { content: ""; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.timeline-item h4 { margin: 0; font-size: .84rem; }
.timeline-item p { margin: 4px 0; color: var(--muted); font-size: .78rem; }
.timeline-item small { color: #8995a8; font-size: .68rem; }

.account-card { border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: linear-gradient(145deg, #fff, #f8fbff); }
.account-card .account-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-card .account-balance { margin-top: 13px; font-size: 1.55rem; font-weight: 850; letter-spacing: -.04em; }
.account-card small { color: var(--muted); }
.amount-positive { color: var(--green); font-weight: 800; }
.amount-negative { color: var(--red); font-weight: 800; }
.progress { height: 8px; border-radius: 20px; background: #e9edf3; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-action { min-height: 88px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; }
.quick-action:hover { border-color: #a9c4ef; box-shadow: 0 5px 16px rgba(21,88,201,.08); }
.quick-action .icon { color: var(--blue); }
.quick-action span { font-size: .78rem; font-weight: 750; }

.empty-state { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty-state .empty-icon { width: 52px; height: 52px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 15px; background: var(--blue-soft); color: var(--blue); }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); font-size: 1rem; }
.empty-state p { margin: 0 auto 15px; max-width: 480px; font-size: .82rem; }

.modal { position: fixed; inset: 0; display: none; place-items: center; padding: 20px; z-index: 100; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 18, 43, .58); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 17px; box-shadow: 0 22px 80px rgba(0,0,0,.26); }
.modal-card.wide { width: min(920px, 100%); }
.modal-header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 20px; }
.modal-footer { padding: 15px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
body.modal-open { overflow: hidden; }

.file-drop { border: 1.5px dashed #abc0df; background: #f8fbff; border-radius: 13px; padding: 28px; text-align: center; cursor: pointer; }
.file-drop:hover { border-color: var(--blue); background: var(--blue-soft); }
.file-drop input { display: none; }
.file-drop .icon { color: var(--blue); margin-bottom: 7px; }
.file-drop strong, .file-drop span { display: block; }
.file-drop span { color: var(--muted); font-size: .76rem; margin-top: 3px; }
.import-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; counter-reset: import; }
.import-step { border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--muted); font-size: .75rem; }
.import-step strong { display: block; color: var(--ink); margin-bottom: 3px; }
.import-step.active { border-color: #a8c4ed; background: var(--blue-soft); }

.auth-body { min-height: 100vh; background: #f1f5fb; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(420px, .9fr); }
.auth-visual { min-height: 100vh; padding: 32px clamp(34px, 6vw, 85px); display: flex; flex-direction: column; color: #fff; background-color: #092d68; background-image: radial-gradient(circle at 12% 16%, rgba(244,122,32,.24), transparent 24%), radial-gradient(circle at 82% 64%, rgba(56,128,244,.26), transparent 29%), linear-gradient(145deg, #08245a 0%, #0d3980 100%); }
.brand.light { padding: 0; height: auto; }
.brand.light .brand-copy small { color: #b9cae5; }
.auth-message { margin: auto 0; max-width: 660px; }
.auth-message .eyebrow { color: #ffad70; }
.auth-message h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.04; letter-spacing: -.055em; margin: 10px 0 30px; }
.auth-points { display: grid; gap: 11px; color: #cbd8ed; }
.auth-points span::before { content: "✓"; color: #ff9a4d; font-weight: 900; margin-right: 10px; }
.auth-company { color: #91a7ca; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.login-card { width: min(470px, calc(100% - 40px)); margin: auto; padding: clamp(26px, 5vw, 48px); }
.login-card h2, .install-card h1, .success-card h1 { margin: 5px 0 6px; font-size: 1.75rem; letter-spacing: -.035em; }
.login-card form { display: grid; gap: 16px; margin-top: 25px; }
.security-note { text-align: center; color: var(--muted); font-size: .7rem; margin: 20px 0 0; }
.mobile-auth-logo { display: none; }
.install-shell { width: min(930px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 60px; }
.install-brand { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 22px; }
.install-brand > div:last-child { display: flex; flex-direction: column; }
.install-brand strong { letter-spacing: .12em; }
.install-brand span { color: var(--muted); font-size: .74rem; }
.install-card { padding: clamp(24px, 4vw, 44px); }
.success-card { text-align: center; max-width: 580px; margin: 90px auto; padding: 48px; }
.success-icon { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 22px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 2rem; font-weight: 900; }

.report-paper { width: min(900px, 100%); margin: 0 auto; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 42px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 20px; border-bottom: 3px solid var(--navy); }
.report-title h1 { margin: 0; font-size: 1.65rem; }
.report-title p { margin: 5px 0 0; color: var(--muted); }
.report-section { margin-top: 26px; }
.report-section h2 { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.report-field { display: flex; flex-direction: column; }
.report-field span { color: var(--muted); font-size: .7rem; }
.report-field strong { font-size: .86rem; }
.report-signature { margin-top: 50px; display: flex; justify-content: space-between; gap: 40px; }
.signature-line { width: 220px; border-top: 1px solid #9ca8b8; padding-top: 7px; color: var(--muted); font-size: .7rem; text-align: center; }

.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.main-side { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .mobile-only { display: inline-grid !important; }
    .sidebar { transform: translateX(-102%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(5,17,40,.5); z-index: 45; }
    .sidebar.open + .sidebar-backdrop { display: block; }
    .brand .mobile-only { margin-left: auto; }
    .main-area { margin-left: 0; }
    .topbar { padding: 0 15px; }
    .global-search { width: auto; flex: 1; }
    .content { padding: 22px 15px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .heading-actions { justify-content: flex-start; width: 100%; }
    .heading-actions .button { flex: 1; }
    .grid.two, .grid.three, .form-grid.three { grid-template-columns: 1fr; }
    .profile-hero { align-items: flex-start; flex-direction: column; }
    .profile-stats { width: 100%; justify-content: space-between; }
    .profile-stat { text-align: left; }
    .auth-shell { display: block; padding: 28px 0; }
    .auth-visual { display: none; }
    .mobile-auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
    .install-shell { padding-top: 22px; }
    .import-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .metric-grid { grid-template-columns: 1fr; }
    .form-grid.two { grid-template-columns: 1fr; }
    .span-two { grid-column: auto; }
    .panel-header { align-items: flex-start; flex-direction: column; }
    .panel-header .button { width: 100%; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .search-control, .filter-control { width: 100%; min-width: 0; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .profile-person { align-items: flex-start; }
    .profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
    .profile-stat strong { font-size: .92rem; }
    .app-footer { flex-direction: column; gap: 4px; }
    .report-paper { padding: 24px 18px; }
    .report-head, .report-signature { flex-direction: column; }
    .report-grid { grid-template-columns: 1fr; }
}

@media print {
    body { background: #fff; }
    .sidebar, .topbar, .page-heading, .app-footer, .no-print, .toast { display: none !important; }
    .main-area { margin: 0; }
    .content { padding: 0; max-width: none; }
    .report-paper { width: 100%; border: 0; box-shadow: none; padding: 0; }
    @page { size: A4; margin: 14mm; }
}

