/* My Money sheet: plain rows like a spreadsheet, using the app's existing colors and fonts. */
.gl{max-width:760px;margin:0 auto}
.gl-open{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;margin-bottom:18px}
.gl-open .b2-main{flex:1}.gl-open small{display:block}
.gl-today{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;margin-bottom:14px;border-radius:18px;background:var(--surface);border:1px solid var(--line);color:inherit;text-decoration:none}
.gl-today small{display:block;font-size:12px;color:var(--muted);margin-bottom:2px}
.gl-today b{font-family:var(--f-mono);font-variant-numeric:tabular-nums;font-size:22px;font-weight:650;color:var(--green)}
.gl-pd{display:flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--muted)}
.gl-pd svg{width:16px;height:16px}
.gl-sheet{background:var(--surface);border:1px solid var(--line);border-radius:22px;overflow:hidden}
.gl-sec{padding:6px 18px 4px}
.gl-sec+.gl-sec{border-top:6px solid var(--line)}
.gl-sh{display:flex;align-items:center;justify-content:space-between;padding:12px 0 6px}
.gl-sh h2{margin:0;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.gl-edit{font-size:13px;font-weight:600;color:var(--accent,#ee8b4f);text-decoration:none}
.gl-r{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.gl-n{min-width:0}
.gl-n b{display:block;font-weight:500;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gl-n small{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.gl-a{flex:none;font-family:var(--f-mono);font-variant-numeric:tabular-nums;font-size:15px;white-space:nowrap}
.gl-a.pos{color:var(--green)}
.gl-tot{border-bottom:0}
.gl-tot .gl-n b,.gl-tot .gl-a{font-weight:700}
.gl-empty{margin:6px 0 10px;font-size:14px;color:var(--muted)}
.gl-final{padding:8px 18px 10px}
.gl-final>.gl-r:first-child{border-bottom:0}
.gl-final>.gl-r:first-child .gl-n b{font-weight:700;font-size:17px}
.gl-final>.gl-r:first-child .gl-a{font-weight:750;font-size:20px;color:var(--green)}
.gl-final.is-neg>.gl-r:first-child .gl-a{color:var(--danger,#d14343)}
.gl-warn{margin:0 0 8px;font-size:13px;color:var(--danger,#d14343)}
.gl-sub{border-top:1px solid var(--line);border-bottom:0;font-size:14px;color:var(--muted)}
.gl-sub .gl-a{font-size:14px}
.gl-actions,.mm-quick{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.gl-sh{gap:12px;flex-wrap:wrap}.gl-add-bill{min-height:44px}.gl-add-bill svg{width:18px;height:18px}
.mm-quick{margin:16px 0}.mm-period{margin:16px 0;border-block:1px solid var(--line);padding:16px 0}
.mm-period summary{cursor:pointer;font-weight:650}.mm-review{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}
.mm-review small,.mm-review b{display:block}.mm-review small{color:var(--muted)}
.mm-period form,.mm-received-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-block:12px}
.mm-period label{display:grid;gap:8px}.mm-received-row span{flex:1;min-width:120px}
[data-mm-income]>.card{background:none;border:0;box-shadow:none;padding:0}[data-mm-income]{margin:20px 0}
@media(max-width:480px){.mm-review{grid-template-columns:1fr}.mm-period .td-payday{display:grid;grid-template-columns:1fr}.mm-period input,.mm-period select{max-width:100%}.mm-quick .btn{min-height:44px}}

/* "Money in & out" heading above the Money In / Bills / Loans list (16 Nov 2026). */
.gl-sheet-h{font-size:18px;font-weight:700;margin:22px 0 10px;letter-spacing:-.01em}

/* My Payday & Cash: both parts open together, each with a small heading (17 Nov 2026). */

/* Payday & money in hand: one block, five boxes, one Save (17 Nov 2026). */
.mm-both{display:grid;grid-template-columns:repeat(3,minmax(0,200px));gap:14px 16px;align-items:end;margin-top:12px;max-width:760px}
.mm-period .mm-both>form.td-payday,.mm-period .mm-both>form.gw-cash-simple{display:contents!important}
.mm-period .mm-both>form>.btn{display:none!important}
.mm-period .mm-both .gw-cash-simple>label:first-of-type{grid-column-start:1}
.mm-both .td-field,.mm-both form>label{margin:0;min-width:0}
.mm-both select,.mm-both input{width:100%!important;max-width:100%}
.mm-both .td-payday .pf-weekly,.mm-both .td-payday .pf-wd,.mm-both .td-payday .pf-d2,.mm-both .td-payday .pf-day{min-width:0}
.mm-both-save{grid-column:1/-1;display:flex;justify-content:flex-end}
.mm-both-save .btn{min-width:120px}
@media(max-width:560px){.mm-both{grid-template-columns:1fr 1fr}.mm-both-save .btn{width:100%}}
.mm-period .mm-both .gw-cash-simple>label,.mm-period .mm-both .td-field>span{font-size:13px;color:var(--muted);font-weight:500}
/* Section headings as pills (17 Nov 2026): green for money coming in, soft dark red for money going out. */
.gl-sh h2{display:inline-flex;align-items:center;padding:6px 14px;border-radius:999px;background:rgba(74,222,128,.14);border:1px solid rgba(74,222,128,.45);color:#86efac;font-size:12.5px;letter-spacing:.06em}
.gl-sec:not(.gl-in) .gl-sh h2{background:rgba(185,28,28,.22);border-color:rgba(220,38,38,.6);color:#fca5a5}
:root[data-theme="light"] .gl-sh h2{color:#15803d;background:rgba(22,163,74,.1)}
:root[data-theme="light"] .gl-sec:not(.gl-in) .gl-sh h2{color:#b91c1c;background:rgba(220,38,38,.08)}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]) .gl-sh h2{color:#15803d;background:rgba(22,163,74,.1)}:root:not([data-theme="dark"]) .gl-sec:not(.gl-in) .gl-sh h2{color:#b91c1c;background:rgba(220,38,38,.08)}}

/* Income received: a small tap button on each income line (17 Nov 2026). */
.mm-recv{flex:none;margin-inline-start:10px;padding:5px 12px;border-radius:999px;border:1px solid var(--line-2,#334155);background:transparent;color:var(--muted);font:600 12.5px/1.2 inherit;cursor:pointer;min-height:32px;touch-action:manipulation}
.mm-recv.on{background:rgba(74,222,128,.14);border-color:rgba(74,222,128,.5);color:#86efac}
.mm-hand{margin-top:14px}.mm-hand .card-head{display:flex;align-items:center;justify-content:space-between}

/* Payday & Money In Hand as a clear panel: open by default, Hide/Show on the right (17 Nov 2026). */
.mm-period>summary{list-style:none;display:flex;align-items:center;gap:12px;padding:14px 18px;border-radius:16px;background:linear-gradient(135deg,rgba(238,139,79,.18),rgba(238,139,79,.08));border:1px solid rgba(238,139,79,.55);cursor:pointer;font-weight:700;font-size:16px}
.mm-period>summary::-webkit-details-marker{display:none}.mm-period>summary::marker{content:''}
.mm-p-ic{width:34px;height:34px;flex:none;border-radius:10px;display:grid;place-items:center;background:#ee8b4f;font-size:18px}
.mm-p-tx{display:flex;flex-direction:column;min-width:0}.mm-p-tx small{font-weight:500;color:var(--muted);font-size:13px}
.mm-p-tg{margin-inline-start:auto;flex:none;font-size:13px;font-weight:600;color:#fdba74;padding:6px 12px;border-radius:999px;border:1px solid rgba(238,139,79,.5);white-space:nowrap}
.mm-p-tg::after{content:attr(data-closed)}.mm-period[open] .mm-p-tg::after{content:attr(data-open)}
.mm-period[open]>summary{border-radius:16px 16px 0 0}
.mm-period[open]>.mm-both{padding:16px 18px;border:1px solid rgba(238,139,79,.3);border-top:0;border-radius:0 0 16px 16px;margin-top:0;max-width:none}
/* Safe to spend today: right under the orange card, green and bigger. */
.gl-today{position:relative;margin:14px 0;padding:20px 22px;border-radius:20px;background:linear-gradient(135deg,rgba(74,222,128,.22),rgba(74,222,128,.06));border:1px solid rgba(74,222,128,.6);box-shadow:0 8px 28px rgba(16,185,129,.12)}
.gl-today small{font-size:14px;font-weight:700;color:#bbf7d0;letter-spacing:.01em}
.view .gl-today b{font-size:38px;color:#4ade80}
.gl-today .gl-pd{padding:8px 14px;border-radius:999px;background:rgba(15,23,42,.6);font-weight:600;color:#e2e8f0}
@media(max-width:480px){.view .gl-today b{font-size:32px}.mm-p-tx small{display:none}}
/* Solid heading pills (17 Nov 2026): deep green for money in, dark red for money out, white text. */
.view .gl-sh h2{background:#15803d;border:0;color:#fff}
.view .gl-sec:not(.gl-in) .gl-sh h2{background:#991b1b;border:0;color:#fff}

/* Total Other Income: solid green pill next to the last box, Save underneath it (17 Nov 2026).
   Money coming in is solid green, money going out solid dark red, as in the headings. */
.mm-period .mm-both{grid-template-columns:repeat(5,minmax(0,170px))}
.mm-period .mm-both .gw-cash-simple>label:first-of-type{grid-column-start:1}
.gw-oi-total{display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:48px;padding:6px 16px;border-radius:14px;background:#15803d;color:#fff;align-self:end}
.gw-oi-total b:first-child{font-size:12px;font-weight:600;opacity:.9}.gw-oi-total [data-oi-total]{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums;color:#fff}
.mm-period .mm-both-save{grid-column:5;justify-content:stretch}.mm-period .mm-both-save .btn{width:100%;min-width:0}
.mm-hand-tot{border-top:1px solid var(--line)}
@media(max-width:860px){.mm-period .mm-both{grid-template-columns:repeat(2,minmax(0,1fr))}.gw-oi-total{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center}.mm-period .mm-both-save{grid-column:1/-1}}
/* Money In Hand items (17 Nov 2026) */
.gw-oi-more{display:block;margin-top:5px;padding:2px 0;border:0;background:none;color:var(--accent,#ee8b4f);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;text-align:start;min-height:24px}
input[data-oi][readonly]{cursor:pointer}
.gw-oi-sheet{grid-column:1/-1;min-width:0}
.gw-oi-card{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:16px;padding:14px 16px;max-width:620px}
.gw-oi-grab{display:none}
.gw-oi-head{display:flex;justify-content:space-between;gap:12px;font-size:16px}
.gw-oi-hint{margin:2px 0 8px;font-size:13px;color:var(--muted)}
.gw-oi-row{display:grid;grid-template-columns:minmax(0,1fr) 120px 44px;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}
.gw-oi-row .input{min-height:44px;width:100%}
.gw-oi-del{width:44px;height:44px;border:1px solid var(--line);border-radius:12px;background:none;color:inherit;cursor:pointer;font-size:16px}
.gw-oi-empty{margin:6px 0;font-size:13px;color:var(--muted)}
.gw-oi-qa{margin:12px 0 6px;font-size:12.5px;color:var(--muted)}
.gw-oi-chips{display:flex;flex-wrap:wrap;gap:6px}
.gw-oi-chips button{border:1px solid var(--line);background:none;color:inherit;font:inherit;font-size:13px;padding:6px 12px;border-radius:999px;cursor:pointer;min-height:34px}
.gw-oi-done{display:block;width:100%;margin-top:14px;min-height:46px;background:#15803d!important;color:#fff!important;border:0!important;font-weight:700}
.gw-oi-sheet.is-phone{position:fixed;inset:0;z-index:95;background:rgba(0,0,0,.45);display:flex;align-items:flex-end}
.gw-oi-sheet.is-phone .gw-oi-card{width:100%;max-width:none;border-radius:20px 20px 0 0;border-width:1px 0 0;padding:8px 16px calc(16px + env(safe-area-inset-bottom));max-height:88dvh;overflow:auto}
.gw-oi-sheet.is-phone .gw-oi-grab{display:block;width:40px;height:4px;border-radius:2px;background:var(--line);margin:0 auto 10px}
html.gw-oi-lock,html.gw-oi-lock body{overflow:hidden}
.mm-hand-its{display:block;font-size:12px;color:var(--muted);margin-top:2px;white-space:normal}
@media(max-width:640px){.mm-period .mm-both{grid-template-columns:1fr}.mm-period .mm-both .td-payday .td-field{grid-column:auto}}
@media(max-width:640px){.mm-period .mm-both .gw-cash-simple>label{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px}.mm-period .mm-both .gw-cash-simple>label>.gw-oi-more{order:1;margin:0}.mm-period .mm-both .gw-cash-simple>label>input{order:2;grid-column:1/-1;margin-top:6px}}
