:root {
    --bg: #f3f7fc;
    --surface: #ffffff;
    --text: #101828;
    --muted: #667085;
    --line: #e8eef6;
    --primary: #0b7cff;
    --primary-dark: #175cd3;
    --partner: #7c3aed;
    --vendor: #ff7a00;
    --success: #17b26a;
    --warning: #ff8a00;
    --danger: #d92d20;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 12px 28px rgba(16, 24, 40, .07);
    --soft-shadow: 0 8px 20px rgba(16, 24, 40, .06);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* ---- Guardrails: nothing (icon, image, svg) is ever allowed to render
   bigger than the box that's meant to hold it. This is what stops icons
   from blowing up to full-width on real devices regardless of how the
   markup sizes them. ---- */
svg, img { max-width: 100%; height: auto; display: block; }

.ui-icon,
.ui-icon svg {
    width: 19px;
    height: 19px;
    display: inline-block;
    flex: 0 0 auto;
}

.hero-icon,
.card-icon,
.activity-icon,
.section-icon,
.avatar,
.icon-btn,
.chevron,
.empty-state div {
    overflow: hidden;
}

.hero-icon > svg, .hero-icon > img,
.card-icon > svg, .card-icon > img,
.activity-icon > svg, .activity-icon > img,
.section-icon > svg, .section-icon > img,
.avatar > svg, .avatar > img,
.icon-btn > svg, .icon-btn > img,
.chevron > svg, .chevron > img {
    width: 100%;
    height: 100%;
    max-width: none;
}

/* Any decorative/illustration graphic dropped straight into a card
   (not wrapped in one of the icon containers above) is capped hard so
   a raw wallet/receipt/etc. SVG can never take over the card. */
.hero-card > svg, .hero-card > img,
.panel > svg, .panel > img,
.money-card > svg, .money-card > img {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 56px;
    height: 56px;
    opacity: .16;
    pointer-events: none;
}
.hero-card, .panel, .money-card { position: relative; }

.lock-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 15%, rgba(116, 86, 255, .28), transparent 28%),
        linear-gradient(145deg, #020813, #101a2a 55%, #06111f);
    color: white;
}

.lock-screen {
    width: min(100%, 390px);
    min-height: min(760px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.brand-orb {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: conic-gradient(from 30deg, #0b7cff, #8a35ff, #ff3f82, #0b7cff);
    box-shadow: 0 16px 44px rgba(107, 77, 255, .45);
    flex: 0 0 auto;
}

.lock-screen h1 { margin: 0; font-size: clamp(22px, 6vw, 28px); }
.lock-screen p { margin: 0 0 16px; color: #bac5d6; }
.lock-screen small { margin-top: auto; color: #9aa7ba; }

.pin-form {
    width: 100%;
    display: grid;
    gap: 14px;
}

.card-form {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    background: rgba(255,255,255,.06);
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.lock-page label { color: #d7deea; }

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    background: white;
    color: var(--text);
    outline: none;
}

select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    background: white;
    color: var(--text);
    outline: none;
    font: inherit;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 124, 255, .12);
}

.pin-label { text-align: center; color: white; }
.pin-input {
    max-width: 210px;
    margin: 0 auto;
    text-align: center;
    letter-spacing: 12px;
    font-size: 24px;
    color: white;
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.15);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 64px));
    justify-content: center;
    gap: 12px 18px;
    margin: 8px 0;
}

.keypad span {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 56px;
    border-radius: 24px;
    background: rgba(255,255,255,.1);
    font-size: 22px;
    font-weight: 800;
}

.primary-btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #0b7cff, #2868ff);
    color: white;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(11, 124, 255, .2);
}
.primary-btn::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-right: 7px;
    border-radius: 8px;
    background: rgba(255,255,255,.18);
    font-weight: 900;
    flex: 0 0 auto;
}
.primary-btn.dark::before { content: ""; display: none; }
.actions-panel .inline-form:nth-of-type(1) .primary-btn::before { content: "+"; }
.actions-panel .inline-form:nth-of-type(2) .primary-btn::before { content: "$"; }
.actions-panel .inline-form:nth-of-type(3) .primary-btn::before { content: "-"; }
.actions-panel .inline-form:nth-of-type(4) .primary-btn::before { content: "$"; }
.actions-panel .inline-form:nth-of-type(5) .primary-btn::before { content: "%"; }
.primary-btn.orange-btn::before { content: "-"; }
.primary-btn.green-btn::before { content: "$"; }
.primary-btn.purple-btn::before { content: "%"; }

.primary-btn.dark { background: linear-gradient(135deg, #253143, #111827); }
.primary-btn.orange-btn { background: linear-gradient(135deg, #ff7a00, #ff4d00); box-shadow: 0 12px 26px rgba(255, 122, 0, .2); }
.primary-btn.green-btn { background: linear-gradient(135deg, #16b364, #039855); box-shadow: 0 12px 26px rgba(3, 152, 85, .2); }
.primary-btn.purple-btn { background: linear-gradient(135deg, #7c3aed, #9b4dff); box-shadow: 0 12px 26px rgba(124, 58, 237, .2); }

.app-page {
    min-height: 100vh;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.app-shell {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 12px 12px 16px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.page-head p, .page-head span { margin: 0; color: var(--muted); font-size: 11px; }
.page-head h1 { margin: 1px 0; font-size: clamp(16px, 4.6vw, 19px); line-height: 1.15; }
.page-head.compact { align-items: center; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--primary);
    font-weight: 800;
    box-shadow: var(--shadow);
    flex: 0 0 auto;
}

.icon-btn .ui-icon { width: 16px; height: 16px; }
.icon-btn.wide { min-width: 58px; }

/* ---- Hero card: compact summary banner, not a full-bleed illustration ---- */
.hero-card {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
    color: white;
    background: linear-gradient(135deg, #2f57ff 0%, #7347ff 48%, #00b894 100%);
    box-shadow: 0 18px 42px rgba(47, 87, 255, .22);
    overflow: hidden;
}

.hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.hero-card p, .hero-card span { margin: 0; color: rgba(255,255,255,.84); font-size: 12px; }
.hero-card strong {
    display: block;
    margin: 4px 0 2px;
    font-size: clamp(20px, 6.5vw, 26px);
    line-height: 1.1;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.hero-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.16);
    flex: 0 0 auto;
}
.hero-icon .ui-icon { width: 17px; height: 17px; }
.hero-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}
.hero-breakdown span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px 7px;
    border-radius: 10px;
    background: rgba(255,255,255,.13);
    font-size: 10px;
}
.hero-breakdown b {
    color: white;
    font-size: 12px;
    overflow-wrap: anywhere;
}

/* ---- Grids ---- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.overview-panel {
    margin-top: 10px;
}

.compact-kv {
    margin-top: 0;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.quick-grid a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 900;
    text-align: center;
}
.quick-grid a .ui-icon { width: 15px; height: 15px; }
.quick-grid a:nth-child(2),
.quick-grid a:nth-child(4) { background: #f3e8ff; color: var(--partner); }
.quick-grid a:nth-child(3),
.quick-grid a:nth-child(6) { background: #fff1dc; color: var(--vendor); }
.quick-grid a:nth-child(5) { background: #e8f3ff; color: var(--primary-dark); }

.profile-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    border-radius: 14px;
    background: #101828;
    color: white;
    font-weight: 900;
}

.profile-links { display: grid; gap: 10px; }

.audit-list { display: grid; gap: 8px; }

.audit-list a,
.audit-list article {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.audit-list small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
    font-weight: 800;
}

.pager a { color: var(--primary); }

.changes { margin-top: 16px; }
.changes h3 { margin: 0 0 10px; font-size: 16px; }
.changes article {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}
.changes span { color: var(--muted); overflow-wrap: anywhere; }

/* ---- Money / stat cards (Salary Payable, Commission, Vendor, etc.) ---- */
.money-card {
    min-height: 88px;
    padding: 12px;
    border-radius: 16px;
    color: white;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "icon title"
        ".    amount"
        ".    caption";
    align-items: start;
    gap: 2px 10px;
    box-shadow: var(--soft-shadow);
}

.money-card p { grid-area: title; margin: 0; font-size: 11px; line-height: 1.2; font-weight: 800; opacity: .92; }
.money-card strong { grid-area: amount; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.money-card small { grid-area: caption; color: rgba(255,255,255,.84); font-size: 10px; font-weight: 800; }
.card-icon {
    grid-area: icon;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,.18);
    flex: 0 0 auto;
}
.card-icon .ui-icon { width: 15px; height: 15px; }
.blue { background: linear-gradient(135deg, #1195ff, #2868ff); }
.purple { background: linear-gradient(135deg, #8b35ff, #b649f5); }
.orange { background: linear-gradient(135deg, #ff6b00, #ff9f0a); }
.green { background: linear-gradient(135deg, #0aa96f, #15c474); }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow);
}

.tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 0 0 10px;
}

.tabs a {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #edf2f7;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.tabs a.active { background: var(--primary); color: white; }

.list-stack { display: grid; gap: 10px; }

.employee-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dbe7ff;
    color: #0b4ecc;
    font-weight: 900;
    flex: 0 0 auto;
}
.avatar .ui-icon { width: 22px; height: 22px; }

.partner-avatar { background: #efe4ff; color: #6d28d9; }
.vendor-avatar { background: #fff1d6; color: #c05600; }

.employee-row strong,
.history-list strong { display: block; overflow-wrap: anywhere; }

.employee-row p,
.employee-row small,
.history-list span,
.history-list p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.employee-row small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.employee-row small .ui-icon { width: 14px; height: 14px; }
.chevron { color: #98a2b3; display: grid; place-items: center; flex: 0 0 auto; }
.chevron .ui-icon { width: 16px; height: 16px; }

.badge {
    display: inline-grid;
    place-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.badge.active,
.badge.fully-paid,
.badge.success { background: #dcfae6; color: #067647; }

.badge.inactive,
.badge.partially-paid { background: #fff6d6; color: #a15c00; }

.badge.deleted,
.badge.unpaid { background: #fee4e2; color: #b42318; }

.detail-head {
    display: grid;
    grid-template-columns: auto 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.detail-head h1 { margin: 0; font-size: clamp(17px, 5vw, 20px); overflow-wrap: anywhere; }

.detail-head span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin: 2px 0 8px;
}
.compact-detail { grid-template-columns: auto minmax(0, 1fr); }

.detail-grid { margin-bottom: 10px; }

.mini-card,
.advance-card {
    padding: 14px;
    border-radius: 16px;
    background: #eef7ff;
}

.mini-card p,
.advance-card p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mini-card strong,
.advance-card strong { font-size: 18px; }

.mini-card.success { background: #e9fbf1; }
.mini-card.danger { background: #fff0ee; }
.mini-card.warn { background: #fff7e8; }

.advance-card {
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffedf2, #fff7e8);
    color: #c01048;
}

.actions-panel,
.panel + .panel { margin-top: 10px; }

.actions-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.actions-panel .section-title,
.actions-panel .inline-form,
.actions-panel .total-link {
    grid-column: 1 / -1;
}

.action-toggle {
    min-width: 0;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--soft-shadow);
}

.action-toggle::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 7px;
    background: rgba(255,255,255,.18);
}

.action-toggle.blue { background: linear-gradient(135deg, #0b7cff, #2868ff); }
.action-toggle.orange { background: linear-gradient(135deg, #ff7a00, #ff4d00); }
.action-toggle.green { background: linear-gradient(135deg, #16b364, #039855); }
.action-toggle.purple { background: linear-gradient(135deg, #7c3aed, #9b4dff); }
.action-toggle.orange::before { content: "-"; }
.action-toggle.green::before { content: "$"; }
.action-toggle.purple::before { content: "%"; }
.action-toggle.active { outline: 3px solid rgba(11, 124, 255, .14); }

.inline-form {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.actions-panel .inline-form { display: none; }
.actions-panel .inline-form.is-open { display: grid; }
.inline-form:first-of-type { border-top: 0; padding-top: 0; }

.total-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 14px;
    background: linear-gradient(135deg, #475467, #101828);
    color: white;
    font-weight: 900;
}

.salary-month,
.recurring-row { padding: 12px 0; border-top: 1px solid var(--line); }

.bill-link { display: block; color: inherit; }

.salary-month:first-of-type,
.recurring-row:first-of-type { border-top: 0; }

.salary-month > div,
.recurring-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.salary-month dl,
.kv {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    margin: 10px 0 0;
}

.salary-month dt, .kv dt { color: var(--muted); }
.salary-month dd, .kv dd {
    margin: 0;
    font-weight: 900;
    text-align: right;
    overflow-wrap: anywhere;
}

.overview-kv { gap: 6px 10px; }
.overview-kv dt { font-size: 11.5px; font-weight: 750; }
.overview-kv dd { font-size: 13px; color: var(--text); }

.history-list { display: grid; gap: 8px; }

.history-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}
.history-list article.activity-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
}
.activity-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    flex: 0 0 auto;
}
.activity-icon .ui-icon { width: 15px; height: 15px; }
.activity-icon.blue { color: var(--primary); background: #e8f3ff; }
.activity-icon.purple { color: var(--partner); background: #f3e8ff; }
.activity-icon.orange { color: var(--vendor); background: #fff1dc; }
.activity-icon.green { color: var(--success); background: #dcfae6; }

.history-list b { white-space: nowrap; align-self: center; }

.recurring-row form button {
    border: 0;
    border-radius: 999px;
    padding: 9px 13px;
    color: var(--danger);
    background: #fee4e2;
    font-weight: 900;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.section-title h2 { margin: 0; font-size: 16px; }
.section-title.with-icon h2 { display: inline-flex; align-items: center; gap: 8px; }
.section-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--primary);
    background: #eef4ff;
    flex: 0 0 auto;
}
.section-icon .ui-icon { width: 16px; height: 16px; }
.section-title span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    color: var(--muted);
    padding: 0 16px;
}

.empty-state div {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef4ff, #e8fff4);
}

.empty-state h3 { margin: 12px 0 4px; color: var(--text); }
.empty-state p { margin: 0; max-width: 300px; line-height: 1.45; }
.module-empty { min-height: 420px; }

.settings-form { display: grid; gap: 14px; }
.form-split { display: grid; gap: 12px; }

.flash {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.flash.error { color: #8a1f17; background: #fff0ee; border-color: #ffd2cc; }
.flash.success { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.flash.info { color: #175cd3; background: #eff8ff; border-color: #b2ddff; }

/* ---- Bottom nav ---- */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(100%, 430px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px rgba(16,24,40,.08);
    backdrop-filter: blur(16px);
    z-index: 50;
}

.bottom-nav a {
    min-height: 46px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    border-radius: 12px;
    color: #5d6b82;
    font-size: 10px;
    font-weight: 800;
}

.bottom-nav span { font-size: 18px; line-height: 1; }
.bottom-nav .ui-icon { width: 17px; height: 17px; }
.bottom-nav a.active { color: var(--primary); background: #eef4ff; }

/* ---- Responsive breakpoints ---- */

/* Small phones */
@media (max-width: 380px) {
    .app-shell { padding-left: 10px; padding-right: 10px; }
    .hero-card { padding: 13px; }
    .hero-card strong { font-size: clamp(18px, 7vw, 22px); }
    .hero-breakdown span { padding: 6px; font-size: 9px; }
    .hero-breakdown b { font-size: 10.5px; }
    .money-card { min-height: 78px; padding: 10px; }
    .money-card strong { font-size: 15px; }
    .money-card p, .money-card small { font-size: 9.5px; }
    .card-icon { width: 26px; height: 26px; }
    .action-toggle { min-height: 38px; font-size: 10.5px; border-radius: 10px; }
    .employee-row { grid-template-columns: 42px minmax(0, 1fr) auto 12px; gap: 8px; }
    .avatar { width: 42px; height: 42px; }
    .bottom-nav a { font-size: 9px; }
}

@media (max-width: 340px) {
    .app-shell { padding-left: 8px; padding-right: 8px; }
    .summary-grid, .quick-grid { gap: 7px; }
    .money-card { min-height: 72px; padding: 8px; grid-template-columns: 22px minmax(0, 1fr); gap: 1px 7px; }
    .money-card strong { font-size: 13px; }
    .money-card p, .money-card small { font-size: 8.5px; }
    .card-icon { width: 22px; height: 22px; border-radius: 7px; }
    .card-icon .ui-icon { width: 12px; height: 12px; }
    .hero-card { padding: 10px; }
    .hero-card strong { font-size: 19px; }
    .action-toggle { min-height: 36px; font-size: 10px; }
    .overview-grid { gap: 6px; }
}

/* Tablet / desktop preview shell */
@media (min-width: 760px) {
    .app-page { background: linear-gradient(135deg, #dce9fb, #f7f9fc); }
    .app-shell { padding-top: 26px; }
    .bottom-nav { bottom: 16px; border: 1px solid var(--line); border-radius: 22px; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
