/* GoldGen Hub - theme A "Midnight Gold" (approved 2026-12-02; tokens in docs/P2_PLAN.md). Mobile first. */
:root {
  --bg: #0D0F14; --surface: #161A22; --raised: #20252F; --border: #2A2F3A; --divider: #1F232C;
  --text: #EDEAE2; --muted: #A9A49A; --subtle: #8E897F;
  --gold: #E2B33C; --gold-text: #F2D27A; --btn-ink: #14110A;
  --ok: #7FD8A4; --warn: #F0B45C; --info: #8DB4F5; --debit: #FF9B85;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Sarabun, system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
h1, h2, h3, .num { font-family: Kanit, Sarabun, sans-serif; font-weight: 500; }
a { color: var(--gold-text); }
a:hover { color: #F7E2A6; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 18px; }
.signout { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer;
  min-height: 44px; padding: 10px 6px; text-decoration: underline; }                 /* UX 20: not a gold button */
.signout:hover { color: var(--text); }
.narrow { max-width: 480px; margin: 0 auto; padding: 24px 18px 40px; display: flex; flex-direction: column; gap: 16px; }
.top { border-bottom: 1px solid var(--divider); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
         font-family: Kanit, sans-serif; font-weight: 600; font-size: 19px; letter-spacing: .5px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.card.gold { border-color: var(--gold); }
.rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--raised); }
.rows > div:last-child { border-bottom: 0; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); font-size: 14px; }                       /* UX 28: 13 px was hard to read */
.big { font-family: Kanit, sans-serif; font-size: 38px; color: var(--gold-text); margin: 2px 0 0; }
.ok { color: var(--ok); } .warn { color: var(--warn); }
.btn { display: block; width: 100%; text-align: center; padding: 15px; border-radius: 14px; border: 0; cursor: pointer;
       font: inherit; font-weight: 600; text-decoration: none; min-height: 48px;
       background: linear-gradient(180deg, #F0CB64, #D9A630); color: var(--btn-ink); }
.btn.line { background: transparent; border: 1px solid var(--gold); color: var(--gold-text); }
label { display: block; margin-bottom: 6px; }
/* 2026-12-05 (Michael): every box you type in looks the same, whatever its type */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea {
  width: 100%; padding: 14px 12px; border: 1px solid var(--border); border-radius: 12px; font: inherit;
  background: var(--raised); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); }
.error { color: var(--debit); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 520px)); gap: 18px; }   /* UX 31 */
.check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check li::before { content: "✓"; color: var(--gold); margin-right: 8px; }
table.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lines th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 4px; border-bottom: 1px solid var(--border); }
table.lines td { padding: 10px 4px; border-bottom: 1px solid var(--raised); }
.r { text-align: right; }
.foot { color: var(--subtle); font-size: 13px; padding: 24px 0; border-top: 1px solid var(--divider); margin-top: 32px; }
/* P7 dashboards (Michael 2026-12-04): mobile first - one summary card, then compact account cards you tap to open. */
.dash { max-width: 760px; margin: 0 auto; padding: 18px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dash-head h1 { margin: 0; font-size: 22px; }
.dash-head .btn { width: auto; padding: 10px 14px; min-height: 42px; font-size: 15px; }
.sum { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.sum .label { color: var(--muted); font-size: 13px; }
.sum .big { font-size: 34px; margin: 0; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.trio > div { background: var(--raised); border-radius: 12px; padding: 8px 10px; }
.trio .label { font-size: 12px; }
.trio .v { font-family: Kanit, sans-serif; font-size: 16px; white-space: nowrap; }
.up { color: var(--ok); } .down { color: var(--debit); }
details.acct { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
details.acct > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid;
  grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
details.acct > summary::-webkit-details-marker { display: none; }
details.acct .nm { font-family: Kanit, sans-serif; font-size: 17px; }
details.acct .st { font-size: 13px; }
details.acct .bal { font-family: Kanit, sans-serif; font-size: 18px; text-align: right; }
details.acct .td { font-size: 13px; text-align: right; }
details.acct .chev { grid-column: 1 / -1; text-align: center; color: var(--subtle); font-size: 12px; line-height: 1; }
details.acct .chev::after { content: "▾ ดูเพิ่ม"; }
details.acct[open] .chev::after { content: "▴ ซ่อน"; }
details.acct .more { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; }
.bar { height: 6px; background: var(--raised); border-radius: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--gold); }
/* 2026-12-05 UX review: five tabs no longer run off a 375 px screen - they wrap to a second row, 44 px tall */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs a { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.tabs a:hover, .btn:hover { filter: brightness(1.08); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* 2026-12-05 watch.js: "last checked HH:MM:SS · check now" under a waiting page (the page never goes quiet). */
.watch-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.watch-now { background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; cursor: pointer;
  color: var(--gold-text); text-decoration: underline; }
@media (max-width: 560px) {
  table.lines thead { display: none; }
  table.lines, table.lines tbody, table.lines tr, table.lines td { display: block; width: 100%; }
  table.lines tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  table.lines td { display: flex; justify-content: space-between; padding: 3px 0; border: 0; text-align: right; }
  table.lines td::before { content: attr(data-l); color: var(--muted); text-align: left; padding-right: 10px; }
}
@media print { header.top, .tabs, .noprint { display: none !important; } body { background: #fff; color: #000; } }
.tabs a.on { border-color: var(--gold); color: var(--gold-text); }

/* 2026-12-05 UX review, desktop (31, 33, 34): readable line length, header in line with the content, buttons that
   look like buttons, summary boxes side by side. Mobile is unchanged. */
.muted, .subtle, p { max-width: 70ch; }
details summary { min-height: 44px; display: flex; align-items: center; }       /* UX 21: a bigger tap area */
@media (min-width: 900px) {
  .top .wrap { max-width: 800px; }                                   /* in line with the pages (760 px) */
  .dash .btn, .narrow .btn.line { width: auto; min-width: 220px; display: inline-block; }
}
