﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');
/* Digilog Account — theme. Mobile first; desktop from 960px. */
:root{
  --bar:#1A1A1A;--page:#F1F1F1;--side:#EBEBEB;--card:#FFFFFF;--border:#DADADA;--line:#EBEBEB;
  --text:#202020;--muted:#595959;--primary:#303030;--focus:#005BD3;
  --ok:#006B4F;--ok-bg:#E3F5EB;--warn:#704900;--warn-bg:#FFF1C2;--bad:#9B2525;--bad-bg:#FDE8E8;
  --in:#008060;--out:#517AA3;
  --topbar:56px;--bottomnav:64px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color:var(--text);background:var(--page);font-synthesis:none;-webkit-text-size-adjust:100%;
}
*{box-sizing:border-box}
/* The hidden attribute always wins over component display rules (.field, .newcat, â€¦). */
[hidden]{display:none!important}
body{margin:0;background:var(--page);font-size:14px;line-height:1.45}
button,input,select,textarea{font:inherit;color:inherit}
h1,h2,h3{color:var(--text);margin:0}
h1{font-size:20px;font-weight:650}
h2{font-size:15px;font-weight:650}
h3{font-size:14px;font-weight:600}
p{margin:0}
small{font-size:12px;color:var(--muted)}
.muted{color:var(--muted);font-size:13px}
.center{text-align:center}
.grow{flex:1;min-width:0}
.truncate{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.wrap{overflow-wrap:anywhere;white-space:pre-wrap}
.money,.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.num{text-align:right}
.icon{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}

/* Focus: always a visible blue outline for keyboard users. */
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline-offset:0}

/* Buttons: 44px minimum touch target. */
button{cursor:pointer;border-radius:8px;min-height:44px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;font-size:14px;border:1px solid transparent;background:none}
button:disabled{opacity:.55;cursor:not-allowed}
.primary{background:var(--primary);color:#fff;box-shadow:0 1px 0 rgba(0,0,0,.25)}
.primary:hover:not(:disabled){background:#1A1A1A}
.secondary{background:#fff;color:var(--text);border-color:var(--border);box-shadow:0 1px 0 rgba(0,0,0,.05)}
.secondary:hover{background:#F7F7F7}
.block{width:100%}
.link{color:var(--focus);padding:0 4px;font-weight:550;white-space:nowrap;flex-shrink:0}
.link:hover{text-decoration:underline}
.iconbtn{width:44px;padding:0;color:var(--muted)}
.mobile-only{display:flex}
.desktop-only{display:none!important}

/* Status badges: words first, colour second. */
.status{display:inline-flex;align-items:center;border-radius:8px;padding:2px 8px;font-size:12px;font-weight:550;line-height:1.5;white-space:nowrap;background:#EBEBEB;color:#303030;vertical-align:middle}
.status-ok{background:var(--ok-bg);color:var(--ok)}
.status-warn{background:var(--warn-bg);color:var(--warn)}
.status-bad{background:var(--bad-bg);color:var(--bad)}

/* Top bar and navigation */
.topbar{position:sticky;top:0;z-index:20;height:var(--topbar);background:var(--bar);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 max(16px,env(safe-area-inset-left))}
.brand{font-size:17px;font-weight:700;letter-spacing:-.3px;white-space:nowrap}
.brand span{font-weight:500;color:#B5B5B5;margin-left:4px}
.usermenu{position:relative}
.usermenu summary{list-style:none;display:flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border-radius:8px;cursor:pointer;color:#E3E3E3;font-weight:550}
.usermenu summary::-webkit-details-marker{display:none}
.usermenu summary:hover,.usermenu[open] summary{background:#303030}
.menu{position:absolute;right:0;top:calc(100% + 6px);width:230px;background:#fff;color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:6px;display:flex;flex-direction:column}
.menu button{justify-content:flex-start;font-weight:500;width:100%}
.menu button:hover{background:#F1F1F1}
.menu-note{font-size:12px;color:var(--muted);padding:8px 10px;border-bottom:1px solid var(--line);margin-bottom:4px}
.sidebar{display:none}
.bottomnav{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;background:#fff;border-top:1px solid var(--border);padding:4px 4px max(4px,env(safe-area-inset-bottom))}
.bottomnav button{flex:1;flex-direction:column;gap:2px;min-height:56px;padding:4px 2px;font-size:11px;font-weight:550;color:var(--muted);border-radius:8px;min-width:0}
.bottomnav button.active{color:var(--text);font-weight:700;background:#F1F1F1}
.bottomnav button span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.menu-pages{display:flex;flex-direction:column;gap:2px;padding-bottom:4px}
.menu-pages button{justify-content:flex-start;gap:8px;font-weight:500;width:100%}
.menu-pages button:hover{background:#F1F1F1}
.menu-hr{border:none;border-top:1px solid var(--line);margin:4px 0}

/* Page structure */
.main{padding:16px 16px calc(var(--bottomnav) + 32px + env(safe-area-inset-bottom));max-width:1400px;min-width:0}
.pagehead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.pagetitle .muted{margin-top:4px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;box-shadow:0 1px 0 rgba(0,0,0,.05);min-width:0;margin-bottom:16px}
.cardhead,.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;min-width:0}
.sectionhead{margin:24px 0 12px}
.grid2,.split,.reconcile{display:grid;grid-template-columns:minmax(0,1fr);gap:0 16px}
.cards{display:grid;grid-template-columns:minmax(0,1fr);gap:0 16px}
.label{font-size:13px;font-weight:550;color:var(--muted)}
.subtle{font-size:12px;color:var(--muted);margin-top:8px}
.empty{text-align:center;padding:28px 12px;color:var(--muted);font-size:13px;line-height:1.7}
.notice{border:1px solid var(--border);background:#F7F7F7;border-radius:8px;padding:10px 12px;font-size:13px;margin:12px 0;font-variant-numeric:tabular-nums}

/* Home: balance card */
.balancehead{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px 12px}
.balancehead>div{flex:1 1 200px;min-width:0}
.balancehead-right{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex-shrink:0}
button.compact{min-height:36px;padding:0 12px;font-size:13px}
.amount{font-size:clamp(24px,7.6vw,32px);font-weight:700;letter-spacing:-.6px;margin:2px 0;white-space:normal;overflow-wrap:normal}
.balancecard>.primary{margin:14px 0 4px;min-height:48px;font-size:15px}
.kinds{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin-top:12px;border-top:1px solid var(--line)}
.kind{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);color:var(--muted)}
.kind>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex:1;min-width:0}
.kind strong{color:var(--text);font-size:15px}
.closing{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.closing-label{font-weight:600}
.closing .muted{margin-top:4px}
.closing>button{align-self:stretch}

/* Charts */
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:var(--muted);margin-bottom:8px}
.legend span,.readout-values span{display:inline-flex;align-items:center;gap:6px}
.swatch{display:inline-block;width:10px;height:10px;border-radius:3px;flex-shrink:0}
.swatch.in{background:var(--in)}.swatch.out{background:var(--out)}
.chart{display:flex;gap:2px;height:180px;border-bottom:1px solid var(--border)}
.daybar{flex:1;flex-direction:column;justify-content:flex-end;gap:6px;padding:4px 0 6px;min-width:0;min-height:44px;border-radius:8px}
.daybar:hover,.daybar.is-active{background:#F1F1F1}
.daybar.is-active small{color:var(--text);font-weight:650}
.bars{display:flex;align-items:flex-end;justify-content:center;gap:3px;width:100%;flex:1}
.bar{width:34%;max-width:22px;border-radius:4px 4px 0 0}
.bar.in{background:var(--in)}.bar.out{background:var(--out)}
.daybar small{font-size:11px;line-height:1.2;text-align:center;white-space:nowrap}
.daybar small b{display:block;font-size:12px;color:var(--text);font-weight:600}
.readout{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;padding:10px 12px;background:#F7F7F7;border-radius:8px;font-size:13px}
.readout-values{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:2px}
.readout b{font-weight:650}
.chartcard{container-type:inline-size}
.donutrow{display:flex;flex-direction:column;align-items:center;gap:16px}
.donutrow>.accountlist{flex:1;min-width:0}
@container (min-width:440px){.donutrow{flex-direction:row;align-items:center}}
.donut{width:184px;height:184px;flex-shrink:0;border-radius:50%;display:grid;place-items:center}
.donuthole{background:#fff;width:136px;height:136px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6px;text-align:center}
.donuthole strong{font-size:13px;line-height:1.25;white-space:normal;overflow-wrap:normal}
.accountlist,.hbars{width:100%;display:flex;flex-direction:column}
.accountitem,.hbar{width:100%;min-height:52px;padding:6px 4px;border-radius:0;border-bottom:1px solid var(--line);font-weight:400;justify-content:flex-start;text-align:left;gap:10px}
.accountitem:hover,.hbar:hover{background:#F7F7F7}
.acct-name{display:flex;align-items:center;gap:8px;flex:1;min-width:0;color:var(--muted)}
.acct-name>span{min-width:0;display:flex;flex-direction:column}
.acct-name .truncate{color:var(--text);font-weight:550}
.acct-value{display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.hbar{flex-wrap:wrap}
.hbar .acct-name{flex:1 1 60%}
.hbar-value{display:flex;align-items:center;gap:6px;margin-left:auto}
.track{position:relative;order:3;flex:1 1 100%;height:12px;background:#F1F1F1;border-radius:6px;margin:2px 0 4px}
.zero{position:absolute;top:-4px;bottom:-4px;width:2px;background:#8A8A8A}
.fill{position:absolute;top:0;bottom:0;background:var(--in);border-radius:3px}
.fill.neg{background:var(--bad)}

/* Transaction list: compact rows by default; table columns when the container is wide. */
.txwrap{container-type:inline-size}
.txhead{display:none}
.txlist{list-style:none;margin:0;padding:0}
.txrow{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"desc amt" "desc status";gap:2px 12px;align-items:center;text-align:left;font-weight:400;min-height:60px;padding:8px 10px;border-radius:0;border-bottom:1px solid var(--line)}
.txlist li:last-child .txrow{border-bottom:0}
.txrow:hover{background:#F7F7F7}
.txrow.is-selected{background:#F1F1F1;box-shadow:inset 3px 0 0 var(--primary)}
.c-desc{grid-area:desc;display:flex;flex-direction:column;min-width:0}
.c-desc .strong{font-weight:600;color:var(--text)}
.c-desc .sub,.c-meta{font-size:12px;color:var(--muted)}
.c-amt{grid-area:amt;text-align:right;font-weight:650;color:var(--text)}
.c-status{grid-area:status;justify-self:end}
.c-date,.c-acct{display:none}
@container (min-width:640px){
  .txhead,.txrow{display:grid;grid-template-columns:72px minmax(0,1.6fr) minmax(0,1fr) 104px minmax(110px,auto);grid-template-areas:none;gap:12px;align-items:center}
  .txhead{font-size:12px;font-weight:600;color:var(--muted);padding:0 10px 8px;border-bottom:1px solid var(--border)}
  .txrow{min-height:48px;padding:6px 10px}
  .txrow>*{grid-area:auto}
  .c-date,.c-acct{display:block;color:var(--muted);font-size:13px}
  .c-meta{display:none}
  .c-status{justify-self:start}
}
.detailpane{display:none}
.detail-amount{font-size:26px;font-weight:700;margin:4px 0 8px}
.details,.figures{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px;margin:14px 0;font-size:13px}
.details dt,.figures dt{color:var(--muted)}
.details dd,.figures dd{margin:0;text-align:right;min-width:0;overflow-wrap:anywhere}
.details .wrap{white-space:pre-wrap}

/* Filters */
.filtercard{padding:12px 16px}
.filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 12px}
.filters .field{margin-bottom:8px}
.filters .field:first-child{grid-column:1/-1}
.filterbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 12px}
.filterbar span{display:flex;gap:8px}

/* Checks, people, account cards */
.checkitem{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line)}
.checkitem:last-child{border-bottom:0}
.checkicon{color:var(--muted);padding-top:2px}
.checkline{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.checkitem .muted{margin-top:2px}
.personhead{display:flex;align-items:center;gap:10px;color:var(--muted);min-width:0}
.personhead .status{flex-shrink:0}
.amount-md{font-size:22px;font-weight:700;margin:12px 0 0;white-space:normal;overflow-wrap:normal}
.calc{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
.calc strong{color:var(--text)}

/* Tables */
.tablewrap{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-size:13px;min-width:560px}
th{text-align:left;color:var(--muted);font-size:12px;font-weight:600;padding:8px;border-bottom:1px solid var(--border)}
td{padding:10px 8px;border-bottom:1px solid var(--line);vertical-align:top}
th.num,td.num{text-align:right}

/* Forms: single column, 44px fields */
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;font-size:13px;font-weight:550;color:var(--text);min-width:0}
input,select,textarea{min-height:44px;padding:10px 12px;border:1px solid #8A8A8A;border-radius:8px;background:#fff;color:var(--text);width:100%;max-width:100%;font-size:16px;font-weight:400}
textarea{min-height:88px;resize:vertical}
input[type=number]{font-variant-numeric:tabular-nums}
.field.check{flex-direction:row;align-items:flex-start;gap:10px;font-weight:400}
.field.check input{width:22px;min-height:22px;height:22px;margin-top:1px;flex-shrink:0;accent-color:var(--primary)}
.hint{font-size:12px;color:var(--muted);margin:-8px 0 14px}
.error{font-size:13px;color:var(--bad);min-height:18px}
.error:not(:empty){background:var(--bad-bg);padding:8px 10px;border-radius:8px;margin:8px 0}

/* Dialogs: full-height sheet on mobile, footer stays above the keyboard. */
dialog{border:0;padding:0;color:var(--text);background:#fff;box-shadow:0 12px 40px rgba(0,0,0,.25)}
dialog::backdrop{background:rgba(0,0,0,.5)}
dialog.sheet{width:100%;max-width:100%;height:var(--vvh,100dvh);max-height:var(--vvh,100dvh);margin:0;inset:0 0 auto 0;border-radius:0}
dialog.sheet>form{display:flex;flex-direction:column;height:100%}
dialog.sheet:not(.form){overflow-y:auto}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 8px 8px 16px;border-bottom:1px solid var(--border)}
.dialog-body{padding:16px;overflow-y:auto;flex:1;min-height:0}
.dialog-foot{display:flex;gap:10px;padding:12px 16px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--border);background:#fff}
.dialog-foot button{flex:1}

/* Login */
.login{max-width:420px;margin:0 auto;padding:32px 16px}
.login .card{padding:24px}
.login h1{margin-bottom:6px}
.login form{margin-top:20px}

#toast{position:fixed;left:16px;right:16px;bottom:calc(var(--bottomnav) + 16px + env(safe-area-inset-bottom));background:var(--bar);color:#fff;border-radius:8px;padding:12px 16px;display:none;z-index:100;box-shadow:0 8px 24px rgba(0,0,0,.25)}

@media (min-width:480px){
  .kinds{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;border-top:0}
  .kind{border:1px solid var(--line);border-radius:8px;padding:10px;align-items:flex-start}
  .kind>div{flex-direction:column;gap:2px}
  .closing{flex-direction:row;align-items:center;justify-content:space-between}
  .closing>button{align-self:center}
  .filters{grid-template-columns:repeat(4,minmax(0,1fr))}
  .filters .field:first-child{grid-column:auto}
}
@media (min-width:640px){
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  dialog.sheet.form,dialog.sheet:not(.form){width:min(520px,calc(100% - 32px));height:auto;max-height:min(90dvh,var(--vvh,100dvh));margin:auto;inset:0;border-radius:12px}
}
@media (min-width:960px){
  .mobile-only{display:none!important}
  .desktop-only{display:inline-flex!important}
  .bottomnav{display:none}
  .layout{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:calc(100vh - var(--topbar))}
  .sidebar{display:flex;flex-direction:column;background:var(--side);border-right:1px solid var(--border);padding:16px 12px;position:sticky;top:var(--topbar);height:calc(100vh - var(--topbar))}
  .nav{display:flex;flex-direction:column;gap:2px}
  .nav button{justify-content:flex-start;gap:10px;color:#303030;font-weight:500;padding:0 12px;min-height:40px}
  .nav button:hover{background:#E3E3E3}
  .nav button.active{background:#fff;font-weight:700;color:var(--text);box-shadow:0 1px 0 rgba(0,0,0,.08)}
  .sidefoot{margin-top:auto;font-size:12px;color:var(--muted);padding:0 12px}
  .main{padding:24px 32px 40px;width:100%}
  .pagehead{align-items:center}
  h1{font-size:22px}
  .grid2{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .reconcile{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
  .cards{grid-template-columns:repeat(3,minmax(0,1fr))}
  button{min-height:36px}
  .bottomnav button,.daybar{min-height:44px}
  input,select,textarea{font-size:14px;min-height:36px;padding:7px 10px}
  textarea{min-height:80px}
  #toast{left:auto;right:24px;bottom:24px;max-width:420px}
}
@media (min-width:1180px){
  .split.has-detail,.split{grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);align-items:start}
  .detailpane{display:block;position:sticky;top:calc(var(--topbar) + 16px)}
}
@media (prefers-reduced-motion:no-preference){button,.txrow{transition:background-color .12s}}

/* ===== Banking view (approved 2026-11-08): lighter coral/green money actions, Paid and Received in their own columns ===== */
:root{--in-btn:#34A35C;--in-btn-hover:#2B8C4E;--out-btn:#EE4F5E;--out-btn-hover:#D93F4E;--in-text:#1B8A4A;--out-text:#D63645;--in-tint:#F2FAF5;--out-tint:#FEF4F5;--amtw:clamp(84px,24vw,128px)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.in-text{color:var(--in-text)!important}.out-text{color:var(--out-text)!important}.neutral-text{color:var(--muted)}
.btn-in,.btn-out{color:#fff;border-radius:999px;min-height:54px;padding:0 20px;gap:10px;font-size:15px;font-weight:700;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.btn-in{background:var(--in-btn)}.btn-in:hover:not(:disabled){background:var(--in-btn-hover)}
.btn-out{background:var(--out-btn)}.btn-out:hover:not(:disabled){background:var(--out-btn-hover)}
.btn-in .icon,.btn-out .icon{width:22px;height:22px;stroke-width:2.2}
.stack{display:flex;flex-direction:column;align-items:flex-start;line-height:1.15;text-align:left}
.stack small{color:inherit;opacity:.9;font-weight:500;font-size:11.5px;letter-spacing:.01em}
.btn-in.compact,.btn-out.compact{min-height:44px;padding:0 16px;font-size:14px}
.btn-in.compact .stack small,.btn-out.compact .stack small{display:none}
.headbtns{display:flex;gap:8px;flex-wrap:wrap}
.pagehead{flex-wrap:wrap}
.actions2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-top:16px}
.transferlink{margin:8px auto 0;display:flex;gap:6px}
.balancecard .transferlink{width:100%}
.link.inline{min-height:0;padding:0;display:inline;font-size:inherit}
/* Account cards on Home */
.acctcards{display:flex;gap:8px;overflow-x:auto;margin:14px -16px 0;padding:2px 16px 6px;scroll-snap-type:x proximity;scrollbar-width:thin}
.acctcard{flex:0 0 152px;scroll-snap-align:start;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:3px;text-align:left;border:1px solid var(--border);background:#fff;border-radius:12px;padding:10px 12px;min-height:88px;font-weight:400}
.acctcard:hover{background:#F7F7F7}
.acctcard .an{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12.5px;width:100%;min-width:0}
.acctcard .an .icon{width:16px;height:16px}
.acctcard strong{font-size:15px;color:var(--text)}
.acctcard small{font-size:11.5px}
.acctcard.addacct{align-items:center;justify-content:center;border-style:dashed;color:var(--focus);font-weight:600;flex-direction:row}
/* Ledger rows: entry | Paid | Received (+ balance when one account is chosen) */
.txhead{display:grid;grid-template-columns:minmax(0,1fr) var(--amtw) var(--amtw);font-size:12px;font-weight:600;color:var(--muted);border-bottom:1px solid var(--border);padding:0 0 0 10px}
.txhead>span{padding:8px 8px 8px 0;grid-area:auto}
.txhead .c-out,.txhead .c-in{text-align:right;padding:8px 10px}
.txhead .c-out,.txrow .c-out{background:var(--out-tint)}
.txhead .c-in,.txrow .c-in{background:var(--in-tint)}
.txhead .c-date,.txhead .c-cat,.txhead .c-acct,.txhead .c-bal,.txrow .c-date,.txrow .c-cat,.txrow .c-acct,.txrow .c-bal{display:none}
.txrow,.txrow.with-bal{border-width:0 0 1px 0;display:grid;grid-template-columns:minmax(0,1fr) var(--amtw) var(--amtw);grid-template-areas:none;align-items:stretch;padding:0 0 0 10px;gap:0;min-height:60px}
.txrow>*{grid-area:auto}
.txrow .c-desc{padding:9px 8px 9px 0;justify-content:center}
.txrow .c-out,.txrow .c-in{display:flex;align-items:center;justify-content:flex-end;text-align:right;padding:6px 10px;font-weight:650;font-size:13.5px}
.txrow .c-out .money,.txrow .c-in .money{white-space:normal;overflow-wrap:normal;line-height:1.25}
.daylabel{font-size:12px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin:12px 0 2px 10px}
.edge{display:flex;justify-content:space-between;gap:12px;padding:10px;background:#F7F7F7;border-radius:8px;font-size:13px;color:var(--muted);margin:6px 0}
.edge strong{color:var(--text)}
.statsum{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:10px 0}
.statsum>div{border:1px solid var(--line);border-radius:8px;padding:8px 10px;min-width:0}
.statsum small{display:block}
.statsum strong{font-size:16px}
/* Chips and filters */
.chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;margin-bottom:12px;scrollbar-width:thin}
.chip{flex:0 0 auto;border:1px solid var(--border);background:#fff;border-radius:999px;padding:0 14px;font-weight:550;font-size:13px}
.chip[aria-pressed="true"]{background:var(--primary);color:#fff;border-color:var(--primary)}
.search{display:flex;align-items:center;gap:8px;border:1px solid #8A8A8A;border-radius:8px;background:#fff;padding:0 0 0 12px;margin-bottom:10px;color:var(--muted)}
.search input{border:0;min-height:44px;padding-left:0}
.search input:focus-visible{outline:none}
.search:focus-within{outline:2px solid var(--focus);outline-offset:0}
/* Reports tabs and category bars */
.rtabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#E3E3E3;border-radius:10px;padding:3px;gap:3px;margin-bottom:16px}
.rtabs button{min-height:44px;padding:0 4px;font-size:13px;color:var(--muted)}
.rtabs button[aria-pressed="true"]{background:#fff;color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.12)}
.ebars{margin-top:8px}
.ebar{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:10px 6px;border-bottom:1px solid var(--line);border-radius:0;font-weight:400;text-align:left;min-height:64px;align-items:center}
.ebar:last-child{border-bottom:0}
.ebar:hover{background:#F7F7F7}
.ebar .n{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.ebar .v{text-align:right;font-weight:650}
.etrack{grid-column:1/-1;height:8px;background:#F1F1F1;border-radius:4px;overflow:hidden}
.etrack i{display:block;height:100%;border-radius:4px}
.ebar.out .etrack i{background:var(--out-btn)}.ebar.in .etrack i{background:var(--in-btn)}
.ebar.muted .n,.ebar.muted .v{color:var(--muted)!important;font-weight:500}
.ebar.muted .etrack i{background:#B5B5B5}
.ebar small{grid-column:1/-1}
.desktop-table{display:none}
tr.totalrow td{font-weight:700;background:#F7F7F7}
.swatch.out{background:var(--out-btn)}.swatch.in{background:var(--in-btn)}
.bar.out{background:var(--out-btn)}.bar.in{background:var(--in-btn)}
/* Add entry form */
.seg3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;background:#E3E3E3;border-radius:12px;padding:3px;border:0;margin:0 0 12px;min-width:0}
.segopt,.chipopt{position:relative;display:block}
.segopt input,.chipopt input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;min-height:0}
.segopt span{display:flex;align-items:center;justify-content:center;min-height:44px;border-radius:9px;font-weight:700;color:var(--muted)}
.seg-paid input:checked+span{background:var(--out-btn);color:#fff}
.seg-received input:checked+span{background:var(--in-btn);color:#fff}
.seg-transfer input:checked+span{background:#fff;color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.12)}
.segopt input:focus-visible+span,.chipopt input:focus-visible+span{outline:2px solid var(--focus);outline-offset:2px}
.bigamount{display:flex;flex-direction:column;align-items:center;gap:2px;margin:4px 0 14px;font-size:13px;font-weight:550;color:var(--muted)}
.bigrow{display:flex;align-items:baseline;gap:6px;justify-content:center}
.bigrow i{font-style:normal;color:var(--muted);font-size:20px}
.bigamount input{border:0;border-bottom:2px solid var(--border);border-radius:0;text-align:center;font-size:34px;font-weight:700;width:min(240px,62vw);padding:4px 0;min-height:56px;color:var(--text)}
.bigamount input:focus-visible{outline:none;border-bottom-color:var(--focus)}
.quickamounts{display:flex;gap:6px;justify-content:center;margin:-8px 0 10px;flex-wrap:wrap}
.qamt{min-height:36px;padding:0 14px;font-size:13px;font-weight:600;border:1px solid var(--border);background:#fff;border-radius:999px;color:var(--text)}
.qamt:hover{background:#F1F1F1;border-color:#bbb}
.opt{font-weight:400;color:var(--muted)}
.fieldlabel{font-size:13px;font-weight:550}
.chipset{display:flex;flex-wrap:wrap;gap:6px}
.chipopt span{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border:1px solid var(--border);border-radius:999px;background:#fff;font-weight:550;font-size:14px;color:var(--text)}
.chipopt .icon{width:16px;height:16px}
.chipopt input:checked+span{background:var(--primary);color:#fff;border-color:var(--primary)}
.chipnew{border:1px dashed var(--border);border-radius:999px;color:var(--focus);background:#fff;min-height:44px;font-weight:600}
.newcat{display:flex;gap:8px;margin-top:8px}
.dialog-foot .btn-in,.dialog-foot .btn-out{box-shadow:none;min-height:48px}
/* Categories manager */
.sechead{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:14px 0 4px}
.sechead:first-child{margin-top:0}
.catrow{display:flex;align-items:center;gap:6px;padding:8px 0;border-bottom:1px solid var(--line)}
.catrow .grow{display:flex;flex-direction:column;min-width:0}
.catrow small{font-size:12px}
.cat-hidden .strong{color:var(--muted)}
.strong{font-weight:600}
@container (min-width:640px){
  .txhead,.txrow,.txrow.with-bal{gap:0;grid-template-columns:76px minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) 128px 128px}
  .txhead.with-bal,.txrow.with-bal{grid-template-columns:76px minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) 124px 124px 124px}
  .txhead .c-date,.txhead .c-cat,.txhead .c-acct,.txhead .c-bal,.txrow .c-date,.txrow .c-cat,.txrow .c-acct,.txrow .c-bal{display:flex;align-items:center;color:var(--muted);font-size:13px;padding:6px 8px 6px 0;min-width:0}
  .txhead .c-bal,.txrow .c-bal{justify-content:flex-end;padding-right:10px;color:var(--text)}
  .txhead .c-date,.txhead .c-cat,.txhead .c-acct,.txhead .c-bal{font-size:12px}
  .txrow .c-cat,.txrow .c-acct{display:block;align-self:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .txrow .c-meta{display:none}
  .txrow{min-height:50px}
}
@media (min-width:960px){
  .acctcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));overflow:visible;margin:14px 0 0;padding:0}
  .actions2{grid-template-columns:repeat(2,minmax(0,280px))}
  .balancecard .transferlink{width:auto;margin-left:0}
  .desktop-table{display:block}
}
.txrow .c-xfer{grid-column:span 2;display:flex;align-items:center;justify-content:center;background:#F4F4F4;padding:6px 10px;font-weight:650;font-size:13.5px;text-align:center}
.txrow .c-xfer .money{white-space:normal;line-height:1.25}
/* Polish after visual review */
.btn-in .stack small,.btn-out .stack small{white-space:nowrap}
.chipopt{max-width:100%}
.chipopt span{max-width:100%;overflow:hidden}
.chipopt span>.icon{flex-shrink:0}
.desktop-table table{min-width:0}
@media (max-width:479px){.btn-in,.btn-out{padding:0 14px;gap:8px}.btn-in .stack small,.btn-out .stack small{font-size:10.5px}.txrow .c-out,.txrow .c-in,.txrow .c-xfer{padding:6px 8px;font-size:13px}.txhead .c-out,.txhead .c-in{padding:8px}}
@container (min-width:640px){.txhead,.txrow,.txrow.with-bal{grid-template-columns:70px minmax(0,1.5fr) minmax(0,1.1fr) minmax(0,1fr) 140px 140px}.txhead.with-bal,.txrow.with-bal{grid-template-columns:70px minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) 132px 132px 132px}}
/* ── Help page ── */
.helpwrap{display:flex;flex-direction:column;gap:20px}
.helpwrap .card{padding:24px 28px}
.helpwrap h2{font-size:16px;margin-bottom:12px}
.hco{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;color:#111;border:2px solid #111;font-size:11px;font-weight:800;line-height:1;vertical-align:middle;margin:0 3px;flex-shrink:0}
.hsteps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:10px}
.hsteps li{line-height:1.65}
.hbadge{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:600;background:#edf1eb;color:#3a5a40;vertical-align:middle}
.hbadge-out{background:#fce8e3;color:#8c3020}.hbadge-in{background:#e3f5ec;color:#1a6640}
.hbadge .icon{width:14px;height:14px}
.hmock{background:#f5f6f3;border:1px solid #dce4dc;border-radius:12px;padding:16px 18px;margin:14px 0 10px;display:flex;flex-direction:column;gap:10px;position:relative;font-size:13px}
.hrow{display:flex;gap:8px;align-items:center;flex-wrap:wrap;position:relative}
.hrow-balance{background:#fff;border:1px solid #e0e6de;border-radius:9px;padding:12px 14px;justify-content:space-between}
.hlabel{color:#718078;font-size:11px;text-transform:uppercase;letter-spacing:.6px;margin-bottom:3px}
.hamount{font-size:22px;font-weight:700;letter-spacing:-0.5px;color:#203c35}
.hmuted{font-size:11px;color:#718078;margin-top:1px}
.hrow-accts{gap:8px;overflow:hidden}
.hacct{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #e0e6de;border-radius:9px;padding:8px 10px;font-size:12px;min-width:0;position:relative}
.hacct .icon{width:14px;height:14px;color:#718078;flex-shrink:0}
.hacct span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#718078}
.hacct strong{font-size:13px;font-weight:650;white-space:nowrap;color:#203c35}
.hrow-actions{gap:10px}
.hbtn{display:flex;align-items:center;gap:7px;padding:9px 14px;border-radius:999px;font-weight:700;font-size:13px;position:relative;flex:1;justify-content:center}
.hbtn .icon{width:16px;height:16px;flex-shrink:0}
.hbtn-out{background:#c8372a;color:#fff}.hbtn-in{background:#1a6640;color:#fff}
.hbtn-sec{background:#edf1eb;color:#203c35}
.hbtn-sm{flex:0 0 auto;padding:6px 11px;font-size:12px}
.hstack{display:flex;flex-direction:column;line-height:1.3}
.hstack small{font-size:10px;opacity:.8;font-weight:400}
.hrow-recent{flex-direction:column;gap:4px}
.htx{display:flex;align-items:center;gap:8px;padding:7px 10px;background:#fff;border:1px solid #e0e6de;border-radius:7px;width:100%;position:relative}
.htx-date{font-size:11px;color:#718078;min-width:38px}
.htx-desc{flex:1;font-size:12px;line-height:1.3;min-width:0}
.htx-desc small{display:block;color:#718078;font-size:10.5px}
.htx-out{color:#8c3020;font-weight:600;font-size:12px;white-space:nowrap}
.htx-in{color:#1a6640;font-weight:600;font-size:12px;white-space:nowrap}
.hrow-stbar{flex-wrap:nowrap;gap:8px}
.hrow-filters{flex-wrap:wrap;gap:6px}
.hchip{background:#fff;border:1px solid #d0dbc9;border-radius:6px;padding:5px 9px;font-size:11.5px;color:#3a5a40;cursor:default}
.htable{width:100%;border-collapse:collapse;font-size:12px}
.htable th{text-align:left;color:#718078;font-size:10px;text-transform:uppercase;letter-spacing:.6px;padding:6px 6px 8px;border-bottom:1px solid #e0e6de}
.htable td{padding:8px 6px;border-bottom:1px solid #eef1eb}
.htable .htx-out,.htable .htx-in{text-align:right}
.hrow-tabs{background:#fff;border:1px solid #e0e6de;border-radius:8px;padding:4px;gap:4px;flex-wrap:nowrap}
.htab{padding:6px 12px;border-radius:6px;font-size:12px;font-weight:600;color:#718078;cursor:default;white-space:nowrap;position:relative}
.htab-active{background:#194e40;color:#fff}
.hrow-chart{background:#fff;border:1px solid #e0e6de;border-radius:9px;padding:12px 14px;position:relative;overflow:hidden}
.hbars{display:flex;align-items:flex-end;gap:6px;height:80px;width:100%;overflow:hidden}
.hbar-pair{display:flex;gap:2px;align-items:flex-end;flex:1;height:100%}
.hbar-pair .hbar{width:50%;border-radius:3px 3px 0 0;min-height:0;border-bottom:none}
.hbar-out{background:#c8372a}.hbar-in{background:#1a6640}
.hmock-form{gap:8px}
.hfield{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:#3a5a40;position:relative;width:100%}
.hinput{padding:7px 10px;border:1px solid #d0dbc9;border-radius:7px;background:#fff;font-size:12px;color:#203c35;width:100%}
.hmock-menu{background:#f5f6f3;border:1px solid #dce4dc;border-radius:12px;overflow:hidden;margin:14px 0 10px}
.hmenuitem{padding:12px 16px;border-bottom:1px solid #e8ece5;font-size:13px;font-weight:500;position:relative;display:flex;justify-content:space-between;align-items:center}
.hmenuitem:last-child{border-bottom:none}
.hmenuitem-out{color:#8c3020}
.hdl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:12.5px;margin:0;padding:0}
.hdl dt{font-weight:700;color:#000;white-space:nowrap;padding:3px 0}
.hdl dd{margin:0;color:#111;line-height:1.6;padding:3px 0;border-bottom:1px solid #f0f4ee}
.hdl dt:last-of-type+dd,.hdl dd:last-child{border-bottom:none}
.hgloss dt{font-weight:700;padding:5px 0 2px}.hgloss dd{padding-bottom:8px;margin-bottom:2px}
.hlist{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:9px;font-size:13px;line-height:1.65}
.hur{display:block;direction:rtl;text-align:right;font-family:'Noto Nastaliq Urdu','Jameel Noori Nastaleeq','Urdu Typesetting',serif;font-size:16px;font-weight:700;color:#111;line-height:2.3;margin-top:8px;padding:8px 12px 4px;border-top:2px solid #d0dbc9;background:#f8fbf7;border-radius:0 0 7px 7px}
.hur-h{font-family:'Noto Nastaliq Urdu','Jameel Noori Nastaleeq','Urdu Typesetting',serif;font-size:0.9em;font-weight:700;color:#111;margin-left:10px;vertical-align:middle}
.hsteps .hur{border-top:1px solid #d0dbc9;padding:6px 10px 2px;margin-top:5px;font-size:15px;font-weight:700;color:#111}
.hdl .hur{border-top:none;padding:2px 0 0;margin-top:3px;font-size:14px;font-weight:700;background:none}
@media(max-width:760px){.hmock{padding:12px 14px}.hdl{grid-template-columns:1fr}.hdl dt{padding-bottom:0}.hdl dd{padding-top:0;padding-bottom:6px}.hrow-stbar{flex-wrap:wrap}.htable th:nth-child(1),.htable td:nth-child(1){display:none}}
/* Calculator entry sheet */
dialog.entry-sheet{max-width:100%;max-height:100%;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;background:var(--card);display:flex;flex-direction:column;overflow:hidden}
.es-top{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--card);flex-shrink:0}
.es-tabs{flex:1;display:flex;justify-content:center;gap:2px}
.es-tab{cursor:pointer}.es-tab input{display:none}
.es-tab span{display:block;padding:6px 12px;border-radius:6px;font-size:13px;font-weight:500;color:var(--muted)}
.es-tab input:checked+span{background:var(--primary);color:#fff}
.es-save{flex-shrink:0;min-height:36px;padding:0 14px;font-size:14px;font-weight:600}
.es-sels{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 16px;flex-shrink:0}
.es-sel{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 8px;border:1px solid var(--border);border-radius:12px;background:var(--card);min-height:72px;overflow:hidden}
.es-sel .icon{width:24px;height:24px;color:var(--muted)}
.es-sn{font-size:13px;font-weight:600;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.es-sl{color:var(--muted);font-size:11px;text-align:center}
.es-desc{display:block;width:calc(100% - 32px);margin:0 16px;border:1px solid var(--border);border-radius:8px;padding:10px 12px;font-size:14px;resize:none;min-height:44px;max-height:80px;flex-shrink:0}
.es-disp{display:flex;align-items:center;padding:4px 16px 4px 12px;border-top:1px solid var(--line);flex-shrink:0;min-height:60px}
.es-expr{flex:1;font-size:16px;color:var(--muted);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.es-drow{display:flex;align-items:center;gap:8px}
.es-rs{font-size:16px;color:var(--muted)}
.es-num{font-size:36px;font-weight:700;line-height:1;min-width:60px;text-align:right}
.es-bk{color:var(--muted);font-size:18px;min-height:44px;width:44px}
.numpad{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);flex:1;min-height:200px}
.npk{background:var(--card);font-size:22px;font-weight:500;padding:0;min-height:0;border-radius:0;border:0.5px solid var(--line);color:var(--text);flex:1}
.npk:active{background:var(--line)}
.npk-op{background:var(--page);color:var(--focus)}
.npk-op:active{background:var(--border)}
.npk-eq{background:var(--primary);color:#fff}
.npk-eq:active{background:#1A1A1A}
.es-foot{padding:8px 16px;border-top:1px solid var(--line);flex-shrink:0}
.es-date{width:100%;border:1px solid var(--border);border-radius:8px;padding:8px 10px;min-height:40px}
.es-pick{position:fixed;bottom:0;left:0;right:0;background:var(--card);border-top:2px solid var(--border);max-height:60vh;overflow-y:auto;z-index:9999;border-radius:16px 16px 0 0}
.es-ph{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 8px;font-weight:600;font-size:15px;position:sticky;top:0;background:var(--card)}
.es-pr{display:flex;align-items:center;gap:12px;width:100%;padding:12px 16px;border-radius:0;border:0;border-bottom:1px solid var(--line);background:var(--card);font-size:14px;text-align:left;min-height:52px}
.es-pr .icon{flex-shrink:0;color:var(--muted)}
.es-pr span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.es-pr strong{flex-shrink:0;font-weight:600;color:var(--muted)}
@media(min-width:960px){dialog.entry-sheet{inset:unset;top:50%;left:50%;transform:translate(-50%,-50%);width:480px;max-width:480px;height:90vh;max-height:90vh;border-radius:16px}
.es-pick{left:50%;right:auto;width:480px;transform:translateX(-50%);border-radius:16px 16px 0 0}
.numpad .npk{min-height:56px}}
