*{box-sizing:border-box;margin:0;padding:0}
html{min-width:320px;-webkit-text-size-adjust:100%}
:root{
  --bg:#f6f8fc;
  --surface:#ffffff;
  --surface-soft:#f1f5fb;
  --surface-muted:#e8eef8;
  --border:#d4dae5;
  --border-strong:#b8c1d0;
  --text:#0f172a;
  --text-muted:#475569;
  --text-subtle:#738094;
  --primary:#111827;
  --primary-hover:#020617;
  --accent:#006a61;
  --accent-soft:#d9fbf4;
  --danger:#ba1a1a;
  --danger-soft:#ffdad6;
  --warning:#b45309;
  --warning-soft:#fef3c7;
  --info:#2454b8;
  --info-soft:#dbeafe;
  --radius:8px;
  --radius-sm:6px;
  --shadow:0 2px 4px rgba(15,23,42,.04),0 8px 22px rgba(15,23,42,.06);
  --sidebar:260px;
}
body{min-height:100vh;background:var(--bg);color:var(--text);font-family:'Inter','DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:14px;line-height:1.45;overflow-x:hidden}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}
a{text-decoration:none;color:inherit}
h1,h2,h3{font-family:'Inter','DM Sans',sans-serif;font-weight:800;letter-spacing:-.02em}
.hidden{display:none!important}

/* App Shell */
.app-shell{display:flex;min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;z-index:100;width:var(--sidebar);display:flex;flex-direction:column;background:#fff;border-right:1px solid var(--border);box-shadow:0 1px 2px rgba(15,23,42,.04)}
.sidebar-brand{display:flex;align-items:center;gap:12px;padding:22px 18px 20px}
.brand-mark{width:72px;height:72px;display:block;overflow:hidden;border-radius:50%;background:#020617;box-shadow:var(--shadow)}
.brand-mark.small{width:44px;height:44px;flex:0 0 auto;box-shadow:none}
.brand-mark img{display:block;width:100%;height:100%;object-fit:contain;border-radius:50%}
.sidebar-brand h2{font-size:24px;line-height:1;color:#020617}
.sidebar-brand h2,.auth-brand h1{display:flex;align-items:baseline;gap:5px}
.sidebar-brand h2{justify-content:flex-start}
.auth-brand h1{justify-content:center}
.sidebar-brand span{display:block;margin-top:4px;color:var(--text-muted);font-size:13px}
.brand-version{display:inline!important;flex:0 0 auto;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--text-muted)!important;font-family:'JetBrains Mono',monospace;font-size:9px!important;font-weight:800;letter-spacing:.02em;line-height:1;vertical-align:baseline}
.nav-list{flex:1;padding:12px 14px}
.nav-item{width:100%;min-height:42px;display:flex;align-items:center;gap:12px;margin:3px 0;padding:10px 14px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text-muted);font-weight:600;text-align:left;transition:background .15s,color .15s}
.nav-item i{width:18px;text-align:center;font-size:16px}
.nav-item:hover{background:var(--surface-soft);color:var(--text)}
.nav-item.active{background:var(--primary);color:#fff}
.sidebar-footer{padding:16px 18px 22px;border-top:1px solid var(--border)}
.session-name{margin-bottom:8px;color:var(--text);font-size:13px;font-weight:700;word-break:break-word}
.role-pill{display:inline-flex;align-items:center;width:max-content;margin-bottom:12px;padding:4px 9px;border-radius:999px;background:var(--surface-soft);color:var(--text-muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.mobile-nav{display:none}
.main-panel{min-height:100vh;margin-left:var(--sidebar);flex:1}
.topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 32px;background:rgba(255,255,255,.9);border-bottom:1px solid var(--border);backdrop-filter:blur(12px)}
.kicker{display:block;margin-bottom:2px;color:var(--text-subtle);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.topbar h1{font-size:24px;color:var(--text)}
.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.page{display:none;padding:28px 32px}
.page.active{display:block}

/* Controls */
.btn,.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;border-radius:var(--radius-sm);border:1px solid transparent;padding:9px 16px;font-weight:700;font-size:14px;line-height:1;white-space:nowrap;transition:background .15s,border-color .15s,color .15s,box-shadow .15s}
.btn-primary{background:var(--primary);color:#fff;box-shadow:none}
.btn-primary:hover{background:var(--primary-hover)}
.btn-secondary,.btn-ghost{background:#fff;border-color:var(--border-strong);color:var(--text)}
.btn-secondary:hover,.btn-ghost:hover{background:var(--surface-soft)}
.btn-ghost{width:100%}
.icon-btn{width:38px;height:38px;padding:0;background:#fff;border-color:var(--border);color:var(--text-muted)}
.icon-btn:hover{background:var(--surface-soft);color:var(--text)}
.icon-btn.compact{width:34px;height:34px;border-color:transparent;background:transparent}
label{display:block;color:var(--text-muted);font-size:13px;font-weight:700}
input,select,textarea{width:100%;min-height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);background:#fff;color:var(--text);padding:9px 12px;outline:none;transition:border-color .15s,box-shadow .15s}
label input,label select,label textarea{margin-top:6px}
textarea{resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(17,24,39,.12)}
.topbar-actions select{width:auto;min-width:180px}

/* Auth */
.auth-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px;background:#f7f8fc}
.auth-layout{width:min(380px,100%);display:grid;gap:22px}
.auth-brand{text-align:center}
.auth-logo{width:42px;height:42px;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:#000;color:#fff;box-shadow:0 8px 18px rgba(15,23,42,.18)}
.auth-logo i{font-size:20px}
.auth-brand h1{font-size:24px;line-height:1.05;color:#000}
.auth-brand p{margin-top:5px;color:#334155;font-size:12px;font-weight:600}
.auth-panel{display:grid;gap:18px;padding:28px;border:1px solid var(--border);border-radius:8px;background:#fff;box-shadow:var(--shadow)}
.auth-copy h2{font-size:22px;color:#0f172a}
.auth-copy p{max-width:260px;margin-top:3px;color:#475569;font-size:12px;line-height:1.45}
.auth-field{position:relative;color:#475569;font-family:'JetBrains Mono',monospace;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.auth-field i{position:absolute;left:14px;bottom:12px;color:#64748b;font-size:14px}
.auth-field input{margin-top:8px;height:42px;border-radius:2px;padding-left:40px;font-family:'Inter','DM Sans',sans-serif;font-size:13px;text-transform:none;letter-spacing:0}
.auth-field input::placeholder{color:#64748b}
.auth-options{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:-2px}
.auth-options label{display:flex;align-items:center;gap:8px;color:#475569;font-size:12px;font-weight:500}
.auth-options input{width:14px;height:14px;min-height:0;margin:0;border-radius:2px}
.auth-options button,.auth-sales button{border:0;background:transparent;color:#006a61;font-size:12px;font-weight:800}
.auth-actions{display:block}
.auth-actions .btn{width:100%;height:44px;border-radius:3px;background:#000;color:#fff;box-shadow:0 8px 18px rgba(15,23,42,.18)}
.auth-actions .btn:hover{background:#111827}
.auth-divider{height:1px;background:var(--border);margin:4px 0}
.auth-sales{color:#475569;font-size:12px;text-align:center}
.auth-footer{text-align:center;color:#64748b}
.auth-footer div{display:flex;justify-content:center;gap:20px;margin-bottom:14px;color:#8a94a6}
.auth-footer p{font-family:'JetBrains Mono',monospace;font-size:9px;line-height:1.6}

/* Shared Cards, Lists, Tables */
.panel,.summary-box,.table-card,.dashboard-panel,.dashboard-table-card,.category-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel{padding:22px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.panel-head h2{font-size:18px}
.panel-head span{color:var(--text-subtle);font-size:13px;font-weight:600}
.panel-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.panel-actions .btn{min-height:38px;padding-inline:13px}
.report-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-bottom:18px}
.toolbar input,.toolbar select,.toolbar .btn{height:40px;min-width:0}
.transaction-toolbar{display:grid;grid-template-columns:128px 126px minmax(148px,.8fr) 128px 128px 132px minmax(180px,1.15fr);justify-content:start}
.transaction-toolbar .btn{padding-inline:12px}
.compact-toolbar{display:grid;justify-content:end;overflow:visible}
.contribution-toolbar{grid-template-columns:minmax(260px,420px) 160px max-content}
.member-toolbar{grid-template-columns:minmax(260px,420px) max-content}
.compact-toolbar .btn{padding-inline:14px}
.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.empty-state,.empty-table{text-align:center!important;color:var(--text-subtle);padding:36px 20px!important}
.empty-state{border:1px dashed var(--border);border-radius:var(--radius);background:#fff}
.table-card{overflow-x:auto;-webkit-overflow-scrolling:touch}
.data-table{width:100%;min-width:820px;border-collapse:collapse}
.data-table th,.data-table td{padding:13px 16px;border-bottom:1px solid var(--border);text-align:left;vertical-align:middle}
.data-table th{background:var(--surface-soft);color:var(--text-muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.data-table tr:last-child td{border-bottom:0}
.data-table tbody tr:hover td{background:#fbfdff}
.transaction-table th:nth-child(5),.transaction-table td:nth-child(5),.contribution-table th:nth-child(2),.contribution-table td:nth-child(2),.contribution-table th:nth-child(3),.contribution-table td:nth-child(3){text-align:right;white-space:nowrap}
.transaction-table th:nth-child(6),.transaction-table td:nth-child(6),.contribution-table th:nth-child(4),.contribution-table td:nth-child(4),.contribution-table th:nth-child(7),.contribution-table td:nth-child(7),.member-table th:nth-child(7),.member-table td:nth-child(7){text-align:center}
.table-subtext{display:block;margin-top:3px;color:var(--text-subtle);font-size:12px;font-weight:600}
.amount-income{color:var(--accent);font-weight:800}
.amount-expense{color:var(--danger);font-weight:800}
.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800}
.status-paid{background:var(--accent-soft);color:var(--accent)}
.status-partial{background:var(--warning-soft);color:var(--warning)}
.status-unpaid{background:var(--danger-soft);color:var(--danger)}

/* Dashboard */
#page-dashboard{min-height:100vh;padding:36px 40px;background:var(--bg);font-family:'Inter','DM Sans',sans-serif}
.dashboard-head{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;margin-bottom:24px}
.dashboard-head h2{font-size:36px;line-height:1.12;color:#020617}
.dashboard-head p{margin-top:6px;color:var(--text-muted);font-size:16px}
.dashboard-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dashboard-actions .btn{min-height:44px;border-radius:var(--radius-sm)}
.dashboard-actions .btn-primary{background:var(--accent)}
.dashboard-actions .btn-primary:hover{background:#00564f}
.dashboard-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px}
.dashboard-metric{min-height:164px;display:flex;align-items:flex-start;gap:14px;padding:20px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow)}
.dashboard-metric.balance{justify-content:space-between}
.dashboard-metric>i{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:var(--radius-sm);font-size:20px}
.dashboard-metric.balance>i{width:auto;height:auto;background:transparent;color:#d8dee8;font-size:44px}
.dashboard-metric.income>i{background:var(--accent-soft);color:var(--accent)}
.dashboard-metric.expense>i{background:var(--danger-soft);color:var(--danger)}
.dashboard-metric.dues>i{background:var(--info-soft);color:var(--info)}
.dashboard-metric span{display:block;margin-bottom:12px;color:var(--text-muted);font-family:'JetBrains Mono',monospace;font-size:12px;text-transform:uppercase;letter-spacing:.05em}
.dashboard-metric strong{display:block;color:#020617;font-family:'JetBrains Mono',monospace;font-size:24px;line-height:1.25;font-weight:700;overflow-wrap:anywhere}
.dashboard-metric.balance strong{font-family:'Inter',sans-serif;font-size:34px;font-weight:800;letter-spacing:-.03em}
.dashboard-metric small{display:block;margin-top:12px;color:var(--text-subtle);font-size:12px;font-weight:600}
.dues-progress{height:6px;margin-top:12px;overflow:hidden;border-radius:999px;background:var(--surface-muted)}
.dues-progress span{display:block;height:100%;width:0;border-radius:999px;background:var(--info);margin:0}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:18px;margin-bottom:22px}
.dashboard-panel{padding:22px}
.dashboard-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:20px}
.dashboard-panel-head h2,.dashboard-table-head h2{font-size:24px;line-height:1.2}
.dashboard-panel-head span{display:block;margin-top:3px;color:var(--text-muted)}
.dashboard-chart-legend{display:flex;align-items:center;gap:14px;font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--text)}
.dashboard-chart-legend span{display:flex;align-items:center;gap:5px;margin:0}
.dashboard-chart-legend i{width:10px;height:10px;border-radius:50%;display:block}
.dashboard-chart-legend i.income{background:#020617}
.dashboard-chart-legend i.expense{background:#858c98}
.cash-chart{position:relative;height:260px;display:flex;align-items:flex-end;gap:10px;padding:0 0 26px;overflow-x:auto;border-bottom:1px solid var(--border)}
.chart-col{display:flex;flex:1;min-width:54px;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px;color:var(--text-subtle);font-family:'JetBrains Mono',monospace;font-size:12px}
.bar-wrap{height:205px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:5px;border-top:1px solid #edf1f7;border-bottom:1px solid #edf1f7}
.bar{width:18px;min-height:4px;border-radius:3px 3px 0 0}
.bar.income{background:#020617}
.bar.expense{background:#858c98}
.top-category-list{display:grid;gap:20px}
.top-category-item div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.top-category-item strong{font-weight:800}
.top-category-item span{font-family:'JetBrains Mono',monospace}
.top-category-bar{height:8px;overflow:hidden;border-radius:999px;background:var(--surface-muted)}
.top-category-bar span{display:block;height:100%;background:#020617}
.top-category-detail{width:100%;margin-top:24px}
.dashboard-table-card{overflow:hidden}
.dashboard-table-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;border-bottom:1px solid var(--border);background:rgba(241,245,251,.65)}
.dashboard-table-tools{display:flex;align-items:center;gap:10px}
.dashboard-search{position:relative;margin:0;color:var(--text-subtle)}
.dashboard-search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:14px}
.dashboard-search input{width:260px;min-height:34px;padding:7px 12px 7px 34px;border-radius:999px;background:#fff}
.dashboard-table-scroll{overflow-x:auto}
.dashboard-recent-table{width:100%;min-width:860px;border-collapse:collapse}
.dashboard-recent-table th{padding:14px 22px;border-bottom:1px solid var(--border);background:var(--surface-soft);color:var(--text-muted);font-family:'JetBrains Mono',monospace;font-size:12px;font-weight:600;text-align:left;text-transform:uppercase;letter-spacing:.05em}
.dashboard-recent-table td{padding:16px 22px;border-bottom:1px solid var(--border);vertical-align:middle}
.dashboard-recent-table td:first-child,.dashboard-recent-table td:nth-child(4){font-family:'JetBrains Mono',monospace;white-space:nowrap}
.dashboard-recent-table td:nth-child(4){text-align:right}
.dashboard-category-pill{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;background:var(--info-soft);font-size:12px;font-weight:700;color:var(--text)}
.dashboard-status{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-weight:700}
.dashboard-status i{width:7px;height:7px;border-radius:50%;background:var(--accent)}
.dashboard-table-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 22px;background:#fbfdff;color:var(--text-muted);border-top:1px solid var(--border)}
.dashboard-pager{display:flex;gap:4px}
.dashboard-pager button{width:40px;height:36px;border:1px solid var(--border);border-radius:var(--radius-sm);background:#fff;color:var(--text)}

/* Categories */
.category-page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-28px -32px 24px;padding:20px 32px;background:#fff;border-bottom:1px solid var(--border)}
.category-page-head h2{font-size:26px}
.category-section{margin-bottom:26px}
.category-section-title{display:flex;align-items:center;gap:7px;margin-bottom:12px;font-size:15px;font-weight:800}
.category-section-title.income{color:var(--accent)}
.category-section-title.expense{color:var(--danger)}
.category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.category-card{min-height:150px;display:flex;flex-direction:column;align-items:flex-start;padding:18px}
.category-icon{height:32px;margin-bottom:10px;font-size:24px;line-height:1}
.category-card strong{font-size:15px}
.category-card span,.category-card small{color:var(--text-subtle);font-size:12px;font-weight:700}
.category-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}
.category-card-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:7px 11px;border-radius:var(--radius-sm);font-size:12px;font-weight:800}
.category-card-btn .category-action-label{color:inherit;font-size:inherit;font-weight:inherit}
.category-card-btn.edit{border:1px solid #bfd0f7;background:var(--info-soft);color:var(--info)}
.category-card-btn.delete{border:1px solid #f2b8b5;background:var(--danger-soft);color:var(--danger)}

/* Reports */
.report-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.summary-box{padding:16px}
.summary-box span{display:block;margin-bottom:7px;color:var(--text-muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.summary-box strong{font-size:22px}

/* Modal */
.modal{position:fixed;inset:0;width:470px;max-width:calc(100vw - 28px);max-height:90vh;margin:auto;padding:26px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--text);box-shadow:0 22px 60px rgba(15,23,42,.25);overflow-y:auto;overflow-x:hidden}
.modal::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(4px)}
.modal form{display:grid;gap:18px}
.modal header,.modal footer{display:flex;align-items:center;gap:12px}
.modal header{justify-content:space-between}
.modal footer{justify-content:flex-end}
.modal h2{font-size:22px}
.modal header .icon-btn{border:0;background:var(--surface-soft)}
.modal footer .btn{min-width:88px;box-shadow:none}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.wide{grid-column:1 / -1}
#category-dialog{width:min(370px,calc(100vw - 28px));max-height:none;overflow:visible}
.category-modal-form{gap:16px}
.category-type-toggle{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--surface-soft)}
.category-type-toggle label{margin:0;color:var(--text-muted);font-size:13px;font-weight:800;text-align:center;cursor:pointer}
.category-type-toggle input{position:absolute;opacity:0;pointer-events:none}
.category-type-toggle span{display:flex;align-items:center;justify-content:center;min-height:40px;padding:10px 12px}
.category-type-toggle input:checked + span{background:var(--accent-soft);color:var(--accent)}
.emoji-input{text-align:center;font-size:22px}
.toast{position:fixed;right:18px;bottom:18px;z-index:300;max-width:min(380px,calc(100vw - 36px));padding:13px 16px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;color:var(--text);box-shadow:var(--shadow);font-weight:800;transform:translateY(120%);opacity:0;transition:.18s ease}
.toast.show{transform:translateY(0);opacity:1}

@media(max-width:1180px){
  .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid,.report-grid{grid-template-columns:1fr}
  .transaction-toolbar{display:flex;justify-content:flex-start;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .transaction-toolbar>*{flex:0 0 auto}
  .transaction-toolbar select{width:128px}
  .transaction-toolbar input[type="date"]{width:128px}
  .transaction-toolbar input[type="search"]{width:220px}
  .transaction-toolbar .btn{width:132px}
}
@media(max-width:900px){
  :root{--sidebar:72px}
  .sidebar-brand{justify-content:center;padding:18px 12px}
  .sidebar-brand .brand-copy,.nav-item span,.sidebar-footer{display:none}
  .nav-item{justify-content:center;padding:12px}
  .page{padding:22px}
  #page-dashboard{padding:26px}
  .dashboard-head{align-items:flex-start;flex-direction:column}
}
@media(max-width:640px){
  .sidebar{display:none}
  .main-panel{margin-left:0;padding-bottom:78px}
  .mobile-nav{position:fixed;left:0;right:0;bottom:0;z-index:120;display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:2px;padding:8px;background:#fff;border-top:1px solid var(--border);box-shadow:0 -10px 28px rgba(15,23,42,.12)}
  .mobile-nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:52px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text-subtle);font-size:10px;font-weight:800}
  .mobile-nav-item.active{background:var(--primary);color:#fff}
  .topbar{align-items:flex-start;flex-direction:column;padding:14px}
  .topbar-actions,.toolbar,.compact-toolbar,.dashboard-actions{display:grid;grid-template-columns:1fr;justify-items:end;width:100%;overflow:visible}
  .topbar-actions .btn,.topbar-actions select,.toolbar input,.toolbar select,.toolbar .btn,.dashboard-actions .btn{width:100%;min-width:0}
  .transaction-toolbar{
    grid-template-columns:repeat(2,minmax(0,1fr));
    justify-content:stretch;
    justify-items:stretch;
  }
  .transaction-toolbar select,.transaction-toolbar .btn,.transaction-toolbar input[type="search"]{
    grid-column:1 / -1;
    justify-self:stretch;
    width:100%;
  }
  .transaction-toolbar input[type="date"]{
    justify-self:stretch;
    width:100%;
  }
  .page,#page-dashboard{padding:16px}
  .dashboard-head h2{font-size:30px}
  .dashboard-metrics{grid-template-columns:1fr}
  .dashboard-metric{min-height:138px}
  .dashboard-panel,.dashboard-table-head{padding:18px}
  .dashboard-panel-head,.dashboard-table-head,.panel-head{align-items:flex-start;flex-direction:column}
  .panel-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .panel-actions .btn{width:100%}
  .dashboard-table-tools{display:grid;grid-template-columns:1fr auto;width:100%}
  .dashboard-search input{width:100%}
  .dashboard-table-foot{align-items:flex-start;flex-direction:column}
  .category-page-head{margin:-16px -16px 20px;padding:16px;align-items:flex-start;flex-direction:column}
  .category-grid{grid-template-columns:1fr}
  .form-grid,.auth-actions,.report-summary{grid-template-columns:1fr}
  .row-actions{justify-content:flex-start}
  .modal{width:min(470px,calc(100vw - 24px));padding:22px}
}
@media(max-width:420px){
  .btn{width:100%}
  .modal footer .btn{width:auto;min-width:88px}
}
