/* Computer layout (screens 1000px and wider): sidebar, the answer in the middle, bills and lately on the right. */
.desk { height: 100vh; height: 100dvh; grid-template-columns: 220px minmax(0, 1fr) 292px; background: radial-gradient(130% 90% at 30% -10%, var(--bg-2) 0%, var(--bg) 55%); }
@media (min-width: 1000px) and (max-width: 1179px) { .desk { grid-template-columns: 204px minmax(0, 1fr); } .desk .rail { display: none; } }

/* sidebar */
.desk .side { background: var(--panel); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.desk .brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px; font-family: var(--fd); font-weight: 600; font-size: 1.12rem; }
.desk .brand .mk { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: .9rem; box-shadow: var(--sh-sm); }
.desk .scat { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); padding: 14px 8px 6px; margin: 0; }
.desk .nav { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; cursor: pointer; border: none; background: none; width: 100%; text-align: left; font-weight: 600; font-size: .9rem; color: var(--ink-2); transition: background .12s; }
.desk .nav:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.desk .nav.on { background: var(--ink); color: var(--bg); box-shadow: var(--sh-sm); }
.desk .nav .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.desk .nav .ic { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.desk .nav .ic svg { width: 19px; height: 19px; }
.desk .nav .amt { margin-left: auto; font-size: .76rem; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.desk .nav.on .amt { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.desk .side-sp { display: flex; flex-direction: column; gap: 2px; }

/* main */
.desk .main { padding: 24px 32px 34px; overflow-y: auto; display: flex; flex-direction: column; }
.desk .main > * { flex-shrink: 0; width: 100%; max-width: 1040px; margin-left: auto; margin-right: auto; }
.desk .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.desk .topbar .hi { font-family: var(--fd); font-weight: 600; font-size: 1.5rem; letter-spacing: -.01em; white-space: nowrap; }
.desk .topbar .hi small { display: block; font-family: var(--fb); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.desk .spend-btn { border: none; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .88rem; padding: 11px 18px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; gap: 7px; box-shadow: var(--sh-sm); transition: transform .1s; white-space: nowrap; }
.desk .spend-btn:hover { transform: translateY(-1px); }
.desk .spend-btn svg { width: 17px; height: 17px; }

/* the answer */
.desk .a-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* pots and the bigger picture */
.desk .mhead { display: flex; align-items: baseline; gap: 10px; margin: 24px 2px 12px; }
.desk .mhead h2 { font-family: var(--fd); font-weight: 600; font-size: 1.18rem; margin: 0; }
.desk .mhead .sub { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.desk .mhead a { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--accent); text-decoration: none; cursor: pointer; }
.desk .spaces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.desk .space { border-radius: 16px; padding: 15px 16px; cursor: pointer; text-align: left; border: none; box-shadow: var(--sh-sm); transition: transform .12s, box-shadow .12s; color: var(--ink); }
.desk .space:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.desk .space .sbadge { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; }
.desk .space .sbadge svg { width: 17px; height: 17px; }
.desk .space .sn { font-weight: 700; font-size: .85rem; }
.desk .space .sv { font-family: var(--fd); font-weight: 600; font-size: 1.5rem; margin: 5px 0 3px; }
.desk .space .sv.over { color: var(--over); }
.desk .space .scap { font-size: .72rem; color: var(--ink-3); font-weight: 600; margin-bottom: 9px; }
.desk .space .sbar { height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.desk .space .sbar > span { display: block; height: 100%; }
.desk .sp-food { background: var(--food-bg); } .desk .sp-food .sv { color: var(--food-ink); } .desk .sp-food .sbar > span { background: var(--food); } .desk .sp-food .sbadge { background: var(--food); color: var(--food-on); }
.desk .sp-fun { background: var(--fun-bg); } .desk .sp-fun .sv { color: var(--fun-ink); } .desk .sp-fun .sbar > span { background: var(--fun); } .desk .sp-fun .sbadge { background: var(--fun); color: var(--fun-on); }
.desk .sp-travel { background: var(--travel-bg); } .desk .sp-travel .sv { color: var(--travel-ink); } .desk .sp-travel .sbar > span { background: var(--travel); } .desk .sp-travel .sbadge { background: var(--travel); color: var(--travel-on); }
.desk .sp-home { background: var(--home-bg); } .desk .sp-home .sv { color: var(--home-ink); } .desk .sp-home .sbar > span { background: var(--home); } .desk .sp-home .sbadge { background: var(--home); color: var(--home-on); }
.desk .sp-debt { background: var(--debt-bg); } .desk .sp-debt .sv { color: var(--debt-ink); } .desk .sp-debt .sbadge { background: var(--debt); color: var(--debt-on); }
.desk .space .sn.soft { color: var(--ink-2); }

/* right rail */
.desk .rail { background: var(--panel); border-left: 1px solid var(--line); padding: 24px 22px; overflow-y: auto; }
.desk .rh { font-family: var(--fd); font-weight: 600; font-size: 1.05rem; margin: 0 0 3px; }
.desk .rsub { font-size: .75rem; color: var(--ink-3); font-weight: 600; margin: 0 0 10px; }
.desk .rh.mt { margin-top: 22px; }
.desk .row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.desk .row:last-child { border-bottom: none; }
.desk .row .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.desk .row .ic svg { width: 18px; height: 18px; }
.desk .row .m { flex: 1; min-width: 0; }
.desk .row .t { font-weight: 700; font-size: .88rem; }
.desk .row .s { font-size: .76rem; color: var(--ink-3); font-weight: 600; }
.desk .row .a { font-family: var(--fd); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.desk .ic-due { background: var(--warn-bg); color: var(--warn); } .desk .ic-ok { background: var(--good-bg); color: var(--good); }
.desk .ic-sp { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-2); } .desk .ic-debt { background: var(--debt-bg); color: var(--debt-ink); }
.desk .chip { display: inline-block; font-size: .66rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); margin-top: 3px; }
.desk .railnote { margin-top: 16px; font-size: .78rem; font-weight: 600; text-align: center; background: var(--good-bg); color: var(--good-ink); padding: 10px; border-radius: 12px; }
.desk .row.fresh { animation: dk-fresh 1.6s ease-out; border-radius: 10px; }
@keyframes dk-fresh { from { background: var(--fresh); } to { background: transparent; } }
.desk .row .rm { border: none; background: none; color: var(--ink-3); cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 4px 8px; border-radius: 7px; margin-left: 2px; }
.desk .row .rm:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--over); }

/* pages opened from the sidebar and cards */
.desk .page { animation: dk-pagein .22s ease-out; }
@keyframes dk-pagein { from { opacity: 0; transform: translateY(6px); } }
.desk .page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 2px 2px 16px; }
.desk .page-h h1 { font-family: var(--fd); font-weight: 600; font-size: 2rem; letter-spacing: -.01em; margin: 0; }
.desk .page-h h1:focus { outline: none; }
.desk .page-h p { margin: 4px 0 0; color: var(--ink-3); font-weight: 600; font-size: .88rem; }
.desk .card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--sh-sm); }
.desk .card + .card, .desk .grid2 + .card, .desk .card + .grid2 { margin-top: 14px; }
.desk .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.desk .ch { font-family: var(--fd); font-weight: 600; font-size: 1.08rem; margin: 0 0 4px; }
.desk .lab { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); margin: 0 0 6px; }
.desk .big2 { font-family: var(--fd); font-weight: 600; font-size: 2.6rem; letter-spacing: -.02em; line-height: 1; margin: 0; }
.desk .big2.over { color: var(--over); }
.desk .mid { font-family: var(--fd); font-weight: 600; font-size: 1.5rem; margin: 0; }
.desk .mid small { font-family: var(--fb); font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.desk .sm { font-size: .84rem; color: var(--ink-2); font-weight: 600; margin: 6px 0 0; }
.desk .kv3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; align-items: end; }
.desk .bar { height: 9px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; margin-top: 16px; }
.desk .bar > span { display: block; height: 100%; border-radius: 999px; transition: width .4s; }
.desk .tip { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: .86rem; font-weight: 600; margin-top: 16px; line-height: 1.45; }
.desk .tip svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.desk .tip.ok { background: var(--good-bg); color: var(--good-ink); } .desk .tip.warn { background: var(--warn-bg); color: var(--warn-ink); } .desk .tip.over { background: var(--over-bg); color: var(--over-ink); }
.desk .sbtn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 13px; font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--ink); white-space: nowrap; margin-left: 10px; }
.desk .sbtn:hover { border-color: var(--ink-3); }
.desk .sbtn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); padding: 10px 16px; margin-left: 0; }
.desk .paid { font-size: .7rem; font-weight: 800; color: var(--good-ink); background: var(--good-bg); padding: 3px 9px; border-radius: 999px; margin-left: 6px; }
.desk .goal + .goal { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.desk .goal .gt { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.desk .goal .gn { font-weight: 700; }
.desk .goal .gv { font-family: var(--fd); font-weight: 600; }
.desk .goal .gv small { font-family: var(--fb); color: var(--ink-3); font-weight: 600; }
.desk .goal .bar { margin-top: 10px; height: 7px; }
.desk .hb { display: grid; grid-template-columns: 150px 1fr 120px; align-items: center; gap: 14px; padding: 9px 0; }
.desk .hb .hn { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: .9rem; }
.desk .hb .hn i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.desk .hb .track { height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow: hidden; }
.desk .hb .track span { display: block; height: 100%; border-radius: 999px; }
.desk .hb .hv { text-align: right; font-family: var(--fd); font-weight: 600; }
.desk .hb .hv small { display: block; font-family: var(--fb); font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.desk .set { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.desk .set:last-child { border-bottom: none; }
.desk .set .k { font-weight: 700; }
.desk .set .v { color: var(--ink-2); font-weight: 600; text-align: right; }
.desk .total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 4px; border-top: 2px solid var(--ink); font-weight: 800; }
.desk .total .a { font-family: var(--fd); }

/* add-spending dialog */
.desk .scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: .25s; z-index: 20; display: grid; place-items: center; }
.desk .scrim.show { opacity: 1; pointer-events: auto; }
.desk .scrim:not(.show) { visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.desk .modal { width: 370px; background: var(--card); border-radius: 20px; padding: 22px; transform: scale(.96); transition: .25s; box-shadow: 0 30px 70px rgb(0 0 0 / .3); }
.desk .scrim.show .modal { transform: scale(1); }
.desk .modal h3 { font-family: var(--fd); font-weight: 600; margin: 0 0 2px; }
.desk .modal .msub { font-size: .8rem; color: var(--ink-3); font-weight: 600; margin: 0; }
.desk .mamt { font-family: var(--fd); text-align: center; font-size: 3rem; font-weight: 600; margin: 10px 0; letter-spacing: -.02em; }
.desk .mamt.empty { color: var(--ink-3); }
.desk .magain .ml { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); margin: 0 0 7px; }
.desk .magain .mrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.desk .magain button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--ink); }
.desk .magain small { color: var(--ink-3); font-weight: 600; }
.desk .mpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.desk .mpad button { border: none; background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: 12px; height: 46px; font-family: var(--fd); font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.desk .mpad button:active { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.desk .msave { margin-top: 10px; width: 100%; border: none; border-radius: 13px; padding: 13px; background: var(--ink); color: var(--bg); font-weight: 700; cursor: pointer; }

.desk .toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .88rem; opacity: 0; transition: .25s; z-index: 30; pointer-events: none; display: flex; align-items: center; gap: 14px; max-width: min(560px, 90vw); }
.desk .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.desk .toast button { border: none; background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); font-weight: 800; padding: 6px 12px; border-radius: 9px; cursor: pointer; flex: none; }
.desk .toast button:hover { background: color-mix(in srgb, var(--bg) 26%, transparent); }
.desk .hbig.pop { animation: dk-pop .4s ease-out; }
@keyframes dk-pop { 40% { transform: scale(1.04); } }

/* theme picker (Settings, both layouts) */
.themes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 2px solid transparent; background: none; border-radius: 14px; padding: 5px; cursor: pointer; font-weight: 700; font-size: .7rem; color: var(--ink-2); min-width: 52px; }
.theme-sw[aria-pressed='true'] { border-color: var(--ink); color: var(--ink); }
.theme-sw .tdot { width: 38px; height: 38px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); display: grid; place-items: center; }
.theme-sw .tdot i { width: 14px; height: 14px; border-radius: 50%; }
