:root {
  --navy: #0f2747;
  --blue: #1d4ed8;
  --sky: #eaf2ff;
  --line: #d8e0ea;
  --muted: #64748b;
  --text: #172033;
  --bg: #f5f7fb;
  --white: #fff;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --input-bg: #fff;
  --green: #15803d;
  --red: #b91c1c;
  --amber: #b45309;
  --shadow: 0 12px 35px rgba(15,39,71,.09);
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 Arial, sans-serif; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg,var(--sky),var(--bg) 55%,var(--sky)); }
.login-card { width: min(440px,100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; color: white; display: grid; place-items: center; font-weight: 800; background: linear-gradient(145deg,var(--navy),var(--blue)); }
.brand-logo { width: 100%; height: 100%; padding: 4px; object-fit: contain; border-radius: inherit; background: white; }
.brand h1 { font-size: 19px; line-height: 1.2; margin: 0; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.login-card h2 { margin: 30px 0 5px; font-size: 25px; }
.login-card > p { color: var(--muted); margin: 0 0 22px; }
.access-login-area { display: grid; gap: 9px; margin-bottom: 12px; }
.access-login-area small { text-align: center; line-height: 1.45; }
#local-login-toggle { margin-top: 10px; }
#local-login-area { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
label { display: block; font-size: 12px; color: #475569; font-weight: 700; margin-bottom: 6px; }
input, select, textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: 10px 11px; background: var(--input-bg); color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
textarea { min-height: 92px; resize: vertical; }
.field { margin-bottom: 15px; }
.grid-2,.grid-3,.grid-4,.grid-5 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.grid-5 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.btn { border: 0; border-radius: 9px; padding: 10px 15px; font-weight: 700; background: #e2e8f0; color: var(--navy); }
.btn:hover:not(:disabled) { filter: brightness(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: white; }
.btn-success { background: var(--green); color: white; }
.btn-danger { background: var(--red); color: white; }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.topbar { position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-menu-button { display: none; font-size: 18px; padding: 6px 10px; }
.topbar .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-copy { text-align: right; }
.user-copy strong { display: block; }
.user-copy span { color: var(--muted); font-size: 11px; }
.layout { display: grid; grid-template-columns: 235px minmax(0,1fr); min-height: calc(100vh - 68px); }
.sidebar { display: flex; flex-direction: column; min-height: calc(100vh - 68px); background: var(--navy); padding: 18px 12px; }
#navigation { flex: 1; }
.nav-section { color: #7890ad; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; padding: 15px 13px 5px; }
.nav-group { margin-bottom: 5px; }
.nav-group-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-radius: 9px; padding: 11px 13px; color: #dbe7f5; background: rgba(255,255,255,.055); font-weight: 800; text-align: left; }
.nav-group-toggle:hover { background: rgba(255,255,255,.1); color: white; }
.nav-group-meta { display: inline-flex; align-items: center; gap: 7px; }
.nav-arrow { font-size: 18px; line-height: 1; transition: transform .18s ease; }
.nav-group.open .nav-arrow { transform: rotate(180deg); }
.nav-submenu { padding: 3px 0 6px 10px; }
.nav-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 9px; padding: 11px 13px; margin: 3px 0; text-align: left; color: #cbd5e1; background: transparent; }
.nav-btn:hover,.nav-btn.active { color: white; background: rgba(255,255,255,.12); }
.sidebar-footer { display: grid; gap: 2px; padding: 15px 13px 2px; margin-top: 16px; border-top: 1px solid rgba(255,255,255,.12); color: #91a6bf; font-size: 11px; }
.badge { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: #f59e0b; color: #1f2937; font-size: 11px; font-weight: 800; }
main { padding: 26px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.page-head h2 { margin: 0; font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 3px 12px rgba(15,39,71,.035); }
.card + .card { margin-top: 16px; }
.card h3 { margin: 0 0 15px; font-size: 16px; }
.metric { min-height: 108px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 12px; font-size: 23px; }
.metric.in strong { color: var(--green); }
.metric.out strong { color: var(--red); }
.metric.pending strong { color: var(--amber); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th,td { padding: 10px 11px; border-bottom: 1px solid #e8edf3; text-align: left; vertical-align: top; }
td input[type="checkbox"] { width: auto; }
th { position: sticky; top: 0; background: var(--surface-soft); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
.amount { text-align: right; white-space: nowrap; font-weight: 700; }
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-approved,.status-active { background: #dcfce7; color: #166534; }
.status-pending,.status-open,.status-settlement_pending { background: #fef3c7; color: #92400e; }
.status-settled { background: #dcfce7; color: #166534; }
.status-rejected,.status-inactive,.status-corrected { background: #fee2e2; color: #991b1b; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.notice { padding: 12px 14px; border-radius: 10px; margin: 12px 0; background: var(--sky); color: #1e3a8a; }
.notice.warn { background: #fff7ed; color: #9a3412; }
.notice.success { background: #ecfdf5; color: #166534; }
.muted { color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.section-grid { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 16px; align-items: start; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: auto; }
.check label { margin: 0; }
.permission-group { margin-top: 16px; }
.permission-group h4 { margin: 0; padding: 9px 12px; background: #eef3f9; border-radius: 8px 8px 0 0; }
.permission-row { display: grid; grid-template-columns: minmax(220px,1fr) 210px; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-top: 0; }
.permission-row:last-child { border-radius: 0 0 8px 8px; }
.permission-row small { display: block; color: var(--muted); }
.role-note { display: inline-block; font-size: 11px; padding: 3px 7px; border-radius: 6px; background: #e2e8f0; color: #475569; margin-left: 6px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 380px; padding: 13px 16px; border-radius: 10px; color: white; background: #1e293b; box-shadow: var(--shadow); }
.toast.error { background: var(--red); }
.loading { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(248,250,252,.72); backdrop-filter: blur(2px); }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #bfdbfe; border-top-color: var(--blue); animation: spin .8s linear infinite; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(15,39,71,.55); }
.modal-card { position: relative; width: min(760px,100%); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 15px; padding: 24px; box-shadow: var(--shadow); }
.modal-close { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef2f7; font-size: 22px; }
.public-approval-wrap { min-height: 100vh; padding: 28px 16px; background: linear-gradient(135deg,var(--sky),var(--bg) 55%,var(--sky)); }
.public-approval-shell { width: min(920px,100%); margin: 0 auto; }
.public-brand { margin-bottom: 20px; padding: 0 4px; }
.public-approval-page { padding: 0; }
.approval-detail-card,.approval-pin-card { margin-top: 16px; }
.detail-list { padding: 8px 0; }
.public-receipt { display: grid; gap: 12px; justify-items: start; }
.public-receipt img { display: block; width: min(100%,760px); max-height: 720px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.public-receipt iframe { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.copy-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.amount-in { color: var(--green); }
.amount-out { color: var(--red); }
.row-overdue { background: #fff7ed; }
.allocation-row { padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.readonly-link { background: var(--surface-soft); cursor: copy; }
.receipt-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.receipt-picker small { display: block; margin-top: 6px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.75fr); gap: 16px; align-items: start; }
.summary-metrics { margin-bottom: 16px; }
.summary-metrics .card + .card { margin-top: 0; }
.danger-zone { border-color: #fecaca; }
.danger-zone h3 { color: var(--red); }
.backup-name { font-family: monospace; font-size: 12px; overflow-wrap: anywhere; }
.branding-preview { min-height: 150px; display: grid; place-items: center; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-soft); }
.branding-preview img { display: block; max-width: 100%; max-height: 140px; object-fit: contain; }
.theme-color-row { display: flex; align-items: center; gap: 12px; }
.theme-color-row input[type="color"] { width: 72px; height: 44px; padding: 3px; }
.theme-color-row span { font-family: monospace; font-weight: 700; text-transform: uppercase; }
.nav-backdrop { display: none; }
.mobile-top-actions,.mobile-bottom-nav,.mobile-home-hero,.mobile-dashboard-content,.mobile-account-panel { display: none; }
.mobile-icon-button,.mobile-avatar,.mobile-bottom-nav button,.mobile-quick-action,.mobile-info-card,.mobile-activity-card,.mobile-sheet-action,.mobile-refresh,.mobile-account-actions button,.mobile-feature-list button,.mobile-filter-row button { font: inherit; }

html[data-theme="dark"] {
  --text: #e5edf8;
  --muted: #9fb0c6;
  --bg: #0b1220;
  --surface: #111c2e;
  --surface-soft: #17243a;
  --input-bg: #0e192a;
  --line: #2a3a52;
  --sky: #13233c;
  --shadow: 0 14px 38px rgba(0,0,0,.32);
}
html[data-theme="dark"] label { color: #bdcadb; }
html[data-theme="dark"] .btn { color: var(--text); background: #24344b; }
html[data-theme="dark"] .btn-primary { color: white; background: var(--blue); }
html[data-theme="dark"] .btn-success { color: white; background: var(--green); }
html[data-theme="dark"] .btn-danger { color: white; background: var(--red); }
html[data-theme="dark"] th,html[data-theme="dark"] td { border-color: var(--line); }
html[data-theme="dark"] .permission-group h4,html[data-theme="dark"] .permission-row,html[data-theme="dark"] .allocation-row { background: var(--surface-soft); }
html[data-theme="dark"] .danger-zone { border-color: #7f1d1d; }
html[data-theme="dark"] .loading { background: rgba(11,18,32,.76); }
html[data-theme="dark"] .modal-close { background: #24344b; color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width:1050px) { .grid-5 { grid-template-columns: repeat(3,1fr); } }
@media (max-width:900px) {
  .layout { grid-template-columns: 1fr; }
  .mobile-menu-button { display: inline-flex; }
  .sidebar { position: fixed; left: 0; top: 68px; bottom: 0; z-index: 40; width: min(310px,86vw); min-height: 0; overflow-y: auto; padding: 14px 12px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(0,0,0,.2); }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop { position: fixed; inset: 68px 0 0; z-index: 35; border: 0; background: rgba(2,8,23,.56); }
  body.nav-open .nav-backdrop { display: block; }
  .grid-4,.grid-5 { grid-template-columns: repeat(2,1fr); }
  .section-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width:620px) {
  .topbar { padding: 0 14px; }
  .topbar .brand p,.user-copy { display: none; }
  .topbar .brand h1 { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-user { gap: 6px; }
  .topbar-user .theme-toggle { padding: 6px 8px; font-size: 0; }
  .topbar-user .theme-toggle::after { content: '◐'; font-size: 16px; }
  .login-card { padding: 22px; }
  .login-theme-toggle { font-size: 0; padding: 7px 9px; }
  .login-theme-toggle::after { content: '◐'; font-size: 16px; }
  main { padding: 16px; }
  .grid-2,.grid-3,.grid-4,.grid-5 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .permission-row { grid-template-columns: 1fr; }
  .copy-row { grid-template-columns: 1fr; }
  .receipt-actions { grid-template-columns: 1fr; }
  .public-receipt iframe { height: 420px; }
  .public-brand { align-items: flex-start; }
  .public-brand .theme-toggle { margin-left: auto; font-size: 0; padding: 7px 9px; }
  .public-brand .theme-toggle::after { content: '◐'; font-size: 16px; }
}


@media (max-width:720px) {
  body { font-family: Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
  #app-view { min-height: 100dvh; }
  .topbar { height: 72px; padding: max(10px,env(safe-area-inset-top)) 18px 8px; background: var(--navy); border: 0; color: white; }
  .topbar-left { flex: 1; }
  .mobile-menu-button,.topbar-user { display: none; }
  .topbar .brand { gap: 9px; }
  .topbar .brand-mark { width: 34px; height: 34px; border-radius: 10px; background: white; color: var(--blue); }
  .topbar .brand-logo { padding: 3px; }
  .topbar .brand h1 { max-width: 170px; color: white; font-size: 16px; }
  .topbar .brand p { display: block; margin-top: 1px; color: rgba(255,255,255,.62); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-top-actions { display: flex; align-items: center; gap: 10px; }
  .mobile-icon-button,.mobile-avatar { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; color: white; background: rgba(255,255,255,.12); }
  .mobile-icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-avatar { background: white; color: var(--blue); font-size: 15px; font-weight: 800; }
  .mobile-notification-dot { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--navy); border-radius: 999px; background: var(--red); color: white; font-size: 8px; font-weight: 800; }
  .layout { min-height: calc(100dvh - 72px); }
  .sidebar,.nav-backdrop { display: none !important; }
  main { padding: 16px 16px calc(98px + env(safe-area-inset-bottom)); }
  body.mobile-home-active main { padding: 0 0 calc(98px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); min-height: calc(72px + env(safe-area-inset-bottom)); padding: 7px 5px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: color-mix(in srgb,var(--surface) 96%,transparent); box-shadow: 0 -8px 28px rgba(15,39,71,.1); backdrop-filter: blur(16px); }
  .mobile-bottom-nav button { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 3px 1px; border: 0; color: var(--muted); background: transparent; font-size: 9px; font-weight: 700; }
  .mobile-bottom-nav button > svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-bottom-nav button.active { color: var(--blue); }
  .mobile-bottom-nav .mobile-transaction-button { transform: translateY(-13px); }
  .mobile-bottom-nav .mobile-fab { width: 48px; height: 48px; display: grid; place-items: center; border: 5px solid var(--surface); border-radius: 50%; color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(29,78,216,.28); }
  .mobile-fab svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
  .mobile-bottom-nav button[hidden] { display: none; }
  .mobile-home-hero { display: block; padding: 5px 18px 26px; border-radius: 0 0 28px 28px; background: var(--navy); color: white; }
  .mobile-welcome span,.mobile-welcome small { display: block; color: rgba(255,255,255,.65); font-size: 11px; }
  .mobile-welcome h2 { margin: 2px 0; color: white; font-size: 22px; }
  .mobile-balance-card { margin-top: 18px; padding: 18px; border-radius: 22px; background: linear-gradient(145deg,var(--blue),color-mix(in srgb,var(--blue) 74%,#071f49)); box-shadow: 0 14px 30px rgba(0,0,0,.18); }
  .mobile-balance-title { display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.82); font-size: 12px; }
  .mobile-balance-title button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: white; }
  .mobile-balance-title svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-balance-card .eye-open,.mobile-balance-card.balance-revealed .eye-closed { display: none; }
  .mobile-balance-card.balance-revealed .eye-open { display: block; }
  .mobile-balance-card > strong { display: block; margin-top: 1px; font-size: clamp(24px,7.5vw,31px); letter-spacing: -.02em; }
  .mobile-balance-card > small { display: block; margin-top: 5px; color: rgba(255,255,255,.68); font-size: 10px; }
  .mobile-dashboard-content,.mobile-account-panel { display: block; padding: 18px 16px 0; }
  .dashboard-desktop { display: none; }
  .mobile-section-head { display: flex; align-items: center; justify-content: space-between; margin: 17px 0 9px; }
  .mobile-section-head:first-child { margin-top: 0; }
  .mobile-section-head h3 { margin: 0; font-size: 17px; }
  .mobile-section-head button { padding: 5px; border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; }
  .mobile-quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  .mobile-quick-action { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 2px; border: 0; color: var(--text); background: transparent; }
  .mobile-quick-action > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: var(--blue); background: var(--sky); }
  .mobile-quick-action svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-quick-action strong { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .mobile-info-card,.mobile-activity-card,.mobile-feature-list button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; color: var(--text); background: var(--surface); box-shadow: 0 3px 10px rgba(15,39,71,.04); text-align: left; }
  .mobile-info-card + .mobile-info-card,.mobile-activity-card + .mobile-activity-card { margin-top: 9px; }
  .mobile-info-card.static { cursor: default; }
  .mobile-info-card > span:nth-child(2),.mobile-info-card.static > span:first-child { flex: 1; }
  .mobile-info-card strong,.mobile-info-card small,.mobile-activity-copy strong,.mobile-activity-copy small { display: block; }
  .mobile-info-card small,.mobile-activity-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
  .mobile-info-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--blue); background: var(--sky); font-weight: 800; }
  .mobile-info-icon.success { color: var(--green); background: #dcfce7; }
  .mobile-activity-list { display: grid; gap: 9px; }
  .mobile-activity-card { gap: 10px; padding: 13px; }
  .mobile-activity-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; font-size: 18px; font-weight: 800; }
  .mobile-activity-icon.in { color: var(--green); background: #dcfce7; }
  .mobile-activity-icon.out { color: var(--red); background: #fee2e2; }
  .mobile-activity-copy { flex: 1; min-width: 0; }
  .mobile-activity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-activity-amount { flex: 0 0 auto; text-align: right; font-size: 11px; font-weight: 800; }
  .mobile-activity-amount.in { color: var(--green); }
  .mobile-activity-amount.out { color: var(--red); }
  .mobile-activity-amount small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
  .mobile-page-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .mobile-page-title h2 { margin: 0; font-size: 24px; }
  .mobile-page-title p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
  .mobile-refresh { width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--blue); background: var(--sky); font-size: 22px; }
  .mobile-filter-row { display: flex; gap: 7px; margin: 14px 0; overflow-x: auto; scrollbar-width: none; }
  .mobile-filter-row::-webkit-scrollbar { display: none; }
  .mobile-filter-row button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 700; }
  .mobile-filter-row button.active { border-color: var(--blue); color: white; background: var(--blue); }
  .activity-approval-card { margin-bottom: 2px; }
  .mobile-transaction-sheet h2,.mobile-activity-detail h2 { margin: 3px 0 2px; }
  .mobile-sheet-handle { width: 42px; height: 4px; margin: -4px auto 16px; border-radius: 99px; background: var(--line); }
  .mobile-sheet-list { display: grid; gap: 9px; margin-top: 16px; }
  .mobile-sheet-action { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; color: var(--text); background: var(--surface); text-align: left; }
  .mobile-sheet-action > span:nth-child(2) { flex: 1; }
  .mobile-sheet-action strong,.mobile-sheet-action small { display: block; }
  .mobile-sheet-action small { margin-top: 2px; color: var(--muted); font-size: 10px; }
  .mobile-sheet-icon,.mobile-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: var(--blue); background: var(--sky); }
  .mobile-sheet-icon svg,.mobile-feature-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-chevron { color: var(--muted); font-size: 22px; }
  .mobile-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 16px 0; }
  .mobile-detail-grid > div { padding: 11px; border-radius: 12px; background: var(--surface-soft); }
  .mobile-detail-grid small,.mobile-detail-grid strong { display: block; }
  .mobile-detail-grid small { color: var(--muted); font-size: 9px; }
  .mobile-detail-grid strong { margin-top: 4px; font-size: 12px; }
  .mobile-profile-card { display: flex; align-items: center; gap: 13px; padding: 18px; border-radius: 20px; color: white; background: linear-gradient(145deg,var(--navy),var(--blue)); }
  .mobile-profile-avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: white; font-size: 22px; font-weight: 800; }
  .mobile-profile-card h2,.mobile-profile-card p { margin: 0; color: white; }
  .mobile-profile-card h2 { font-size: 19px; }
  .mobile-profile-card p { opacity: .72; font-size: 11px; }
  .mobile-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
  .mobile-account-actions button { padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font-weight: 700; }
  .mobile-feature-list { display: grid; gap: 8px; }
  .mobile-feature-list button > span:nth-child(2) { flex: 1; }
  .mobile-feature-list strong,.mobile-feature-list small { display: block; }
  .mobile-feature-list small { color: var(--muted); font-size: 9px; }
  .mobile-account-panel + .page-head { margin-top: 20px; }
  .page-head h2 { font-size: 21px; }
  .card { border-radius: 17px; padding: 15px; }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: 88dvh; border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .modal-close { z-index: 2; }
  .toast { left: 14px; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: none; text-align: center; }
  .table-wrap { margin-inline: -2px; border-radius: 14px; scroll-snap-type: x proximity; overscroll-behavior-inline: contain; }
  table { min-width: 700px; }
  input,select,textarea { min-height: 44px; border-radius: 11px; }
  .btn { min-height: 42px; border-radius: 11px; }
}

@media (min-width:721px) {
  .dashboard-desktop { display: block; }
}
