/* WealthPilot | css/g1.css — page styles of G1 — Dashboard (pages/dashboard.js), her v8 / mobile wireframes (spec 7.1).
 * Only selectors with this group's own prefixes (spec 8.1); shared components live in core/styles.css. */
/* ─── HERO — ใช้ได้จริง: pill label, big value, how it is worked out, three stats under a divider ─── */
.hero{margin-bottom:var(--gap);padding:28px 32px 20px;text-align:center;background:var(--bg2);border:1px solid var(--bd);border-radius:var(--rd-lg);box-shadow:var(--sh)}
.hero-val{margin-top:8px;font-size:var(--fs-38);font-weight:700;letter-spacing:-1px;line-height:1.1}
.hero-meta{margin-top:8px;font-size:var(--fs-13);color:var(--t3)}
.hero-stats{display:grid;grid-template-columns:repeat(3,1fr);align-items:end;gap:8px;margin-top:16px;padding:16px max(0px,calc(50% - 280px)) 0;border-top:1px solid var(--bd)} /* the divider runs full width; the stats stay grouped in the middle (v8) */
.hero-stat-label{display:flex;align-items:center;justify-content:center;gap:4px;margin-bottom:2px;font-size:var(--fs-12);color:var(--t3);white-space:nowrap}
.hero-stat-val{font-size:var(--fs-15);font-weight:600}
/* ─── ACCOUNT CARDS — the account's colour as a dark gradient (--c / --c2 from WP.shade); total card last ─── */
.acc-scroll{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:var(--gap)}
.acc-card{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:0 0 200px;min-height:132px;padding:16px 18px;border-radius:var(--rd);background:linear-gradient(135deg,var(--c),var(--c2));color:var(--bg2)}
.acc-card::after{content:'';position:absolute;top:-30px;right:-30px;width:90px;height:90px;border-radius:50%;background:var(--bg2);opacity:.06}
.acc-card .num{color:inherit}
.acc-type,.acc-bank{font-size:var(--fs-11);opacity:.9}
.acc-name{margin-top:4px;font-size:var(--fs-14);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acc-bal{margin-top:auto;padding-top:12px;font-size:var(--fs-20);font-weight:700;letter-spacing:-.3px}
.acc-total{display:flex;flex-direction:column;justify-content:center;gap:4px;flex:0 0 200px;min-height:132px;padding:16px;background:var(--bg2);border:1px dashed var(--bd);border-radius:var(--rd)}
.acc-total-label,.acc-total-sub{font-size:var(--fs-12);color:var(--t3)}
.acc-total-val{font-size:var(--fs-20);font-weight:700;letter-spacing:-.3px}
/* ─── QUICK ACTIONS — WP.quickButtons(), the same list as the desktop FAB ─── */
.quick-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:var(--gap)}
/* ─── MONTH CARD — in / out / left strip, then one line + bar per budget group ─── */
.flow-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px 14px;background:var(--bg3);border-radius:var(--rd-sm);text-align:center}
.flow-row-cell{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:var(--fs-15);font-weight:600}
.flow-row-label{display:flex;align-items:center;gap:4px;font-size:var(--fs-12);font-weight:400;color:var(--t3);white-space:nowrap}
.dash-bud{margin-top:14px}
.dash-bud-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:6px;font-size:var(--fs-13)}
.dash-bud-name{display:flex;align-items:center;gap:6px;flex-shrink:0;font-weight:600;color:var(--t2)}
.dash-bud-nums{flex:1 1 auto;min-width:0;text-align:right}
/* ─── ต้องทำ — whole rows are buttons: icon · name over the due date · amount over a status tag · chevron ─── */
.todo-list{margin:0 -10px}
.todo-row{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr) auto 16px;align-items:center;gap:10px;min-height:56px;padding:8px 10px;border-radius:var(--rd-sm)}
.todo-row+.todo-row::before{content:'';position:absolute;top:0;left:10px;right:10px;border-top:1px solid var(--bd2)}
.todo-row.urgent:not(:active){background:var(--neg-bg)}
.todo-ic{justify-self:center;color:var(--t3)}
.todo-row.urgent .todo-ic{color:var(--neg-t)}
.todo-main{display:flex;flex-direction:column;min-width:0}
.todo-main .cell-title,.todo-main .cell-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.todo-end{display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-weight:700}
.todo-chev{color:var(--t3)}
/* ─── WIDE (≥1100px) — month card and ต้องทำ side by side (v8 two-column ratio) ─── */
@media (min-width:1100px){
  .dash-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:var(--gap);align-items:start}
  .dash-grid>:only-child{grid-column:1/-1}
}
/* ─── PHONE (≤768px) — 30px hero value, cards scroll sideways edge to edge, quick actions 2 × 2 ─── */
@media (max-width:768px){
  .hero{padding:20px 16px 16px}
  .hero-val{font-size:var(--fs-30)}
  .acc-scroll{flex-wrap:nowrap;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 16px;scrollbar-width:none;margin:0 -16px var(--gap);padding:0 16px}
  .acc-scroll::-webkit-scrollbar{display:none}
  .acc-card,.acc-total{flex-basis:168px;scroll-snap-align:start}
  .acc-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere} /* a long name takes 2 lines; the row's cards stretch to one height and the balance stays at the bottom */
  .quick-bar{display:grid;grid-template-columns:1fr 1fr}
}
