/* plan.gravitatech.com account pages: the approved overview sample (docs/plan-app/samples/ringkasan.html), on top of plan.css.
   This file is owned by the session; builders ask for changes in their report. */

/* Header extras: sign-out button in the menu */
.nav-form { margin: 0; }
.nav a, .nav-btn { white-space: nowrap; }  /* "Akun saya" wrapped onto two lines at 390 px */
@media (max-width: 420px) { .site-header .nav { gap: 12px; } }
.nav-btn { background: none; border: 0; padding: 10px 0; color: var(--text); font: 700 var(--fs-0) "Carlito", Calibri, sans-serif; cursor: pointer; }

/* Narrow column for sign-in pages */
.wrap.narrow { max-width: 560px; }
.auth-card { margin: var(--s5) 0 var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); display: grid; gap: var(--s3); }
.auth-card h1 { font-size: var(--fs-4); }
.auth-card .btn { justify-self: start; }
.auth-card .wide { width: 100%; justify-self: stretch; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: var(--fs-0); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); }
.errors { margin: 0; padding: 12px 14px; border-left: 4px solid var(--warn); background: var(--warn-bg); border-radius: var(--radius); font-size: var(--fs-0); color: var(--text); list-style: none; }
.flash { margin: 0 0 var(--s3); padding: 12px 14px; border-left: 4px solid var(--ok); background: var(--surface); border-radius: var(--radius); font-size: var(--fs-0); }
.code-box { font: 700 var(--fs-2) ui-monospace, Consolas, monospace; letter-spacing: .08em; background: var(--surface-2); padding: var(--s2); border-radius: var(--radius); word-break: break-all; }
/* Month and year lists (Months page) and the file choice, both in the page's own language */
.month-pick { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 130px); gap: 10px; }
.file-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 52px; }
.file-pick label.btn { cursor: pointer; }
.file-pick input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.file-name { font-size: var(--fs-0); color: var(--muted); overflow-wrap: anywhere; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--s2); }
.copy-status { font-size: var(--fs-0); font-weight: 700; color: var(--ok); }
.qr { background: #FFFFFF; padding: var(--s2); border-radius: var(--radius); justify-self: start; }
.qr svg { display: block; width: 200px; height: 200px; }

/* Account shell */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s5); padding: var(--s5) 0 var(--s6); align-items: start; }
.side { position: sticky; top: var(--s3); display: grid; gap: 2px; }
.side a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-0); }
.side a:hover { background: var(--surface-2); }
.side a[aria-current="page"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.side svg { flex: none; color: var(--muted); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: var(--s2) 0; }
/* sign-out entry: only on phones, where the header hides its own button */
.side-signout { display: none; margin: 0; }
.side-signout button { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius); background: none; color: var(--text); font: 700 var(--fs-0) "Carlito", Calibri, sans-serif; cursor: pointer; }
.side-signout button:hover { background: var(--surface-2); }
.side-signout svg { flex: none; color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.page-head p { color: var(--muted); margin-top: 6px; }
.hero-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s3); }
.month { background: var(--navy); color: #EEF1FA; border-radius: var(--radius-lg); padding: var(--s4); box-shadow: var(--shadow); border: 1px solid transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .month { border-color: var(--line); } }
.month .label { color: #B4BED8; font-size: var(--fs-0); font-weight: 700; }
.month .big { font-size: 52px; font-weight: 700; line-height: 1.05; margin: 6px 0 4px; }
.month .sub { color: #B4BED8; }
.month .row { display: grid; gap: 10px; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid rgba(255,255,255,.14); }
.month .row > div { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.month .row .v { font-size: var(--fs-2); font-weight: 700; white-space: nowrap; }
.month .row .k { font-size: var(--fs-0); color: #C9D2EA; }
.checkin { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.checkin .when { font-size: var(--fs-3); font-weight: 700; line-height: 1.1; }
.checkin ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: var(--fs-0); color: var(--muted); }
.checkin li { display: flex; gap: 10px; align-items: baseline; }
.checkin li::before { content: ""; flex: none; width: 10px; height: 2px; background: var(--accent); transform: translateY(-4px); }
.checkin .btn { margin-top: auto; align-self: flex-start; }
.block { margin-top: var(--s5); }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s3); }
.block-head a { font-weight: 700; font-size: var(--fs-0); }
.goals { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.goals > div { padding: var(--s4); }
.goals > div + div { border-left: 1px solid var(--line); }
.goals h3 { font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: var(--s3); }
.goal + .goal { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px dashed var(--line); }
.goal .top { display: flex; justify-content: space-between; gap: 4px var(--s2); align-items: baseline; flex-wrap: wrap; }
.goal .name { font-weight: 700; }
.goal .status { font-size: 14px; font-weight: 700; }
.goal .status.ok { color: var(--ok); }
.goal .status.behind { color: var(--warn); }
.track { height: 10px; border-radius: 5px; background: var(--surface-2); margin: 10px 0 8px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--seg-1); border-radius: 5px; }
.goal .meta { display: flex; justify-content: space-between; gap: var(--s2); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s4); display: flex; flex-direction: column; }
.card h2 { font-size: var(--fs-2); }
.card h2 + p, .card h2 + .field, .card h2 + form { margin-top: var(--s2); }
.link-end { margin-top: auto; padding-top: var(--s3); font-weight: 700; font-size: var(--fs-0); }
.ef-figure { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ef-figure .v { font-size: var(--fs-4); font-weight: 700; line-height: 1; }
.months-bar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin: var(--s3) 0 var(--s2); }
.months-bar i { height: 28px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.months-bar i.full { background: var(--seg-1); border-color: var(--seg-1); }
.months-bar i.part { background: linear-gradient(90deg, var(--seg-1) var(--p), var(--surface-2) var(--p)); }
.debt-list { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.debt-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s2); padding: 12px 0; border-top: 1px solid var(--line); }
.debt-list li:first-child { border-top: 0; padding-top: 0; }
.debt-list .n { font-weight: 700; }
.debt-list .d { text-align: right; font-weight: 700; }
.debt-list .s { font-size: 14px; color: var(--muted); grid-column: 1 / -1; }
.tag-next { color: var(--accent-text); font-size: 14px; font-weight: 700; }
.footnote { margin-top: var(--s5); font-size: 14px; color: var(--muted); max-width: 72ch; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: var(--s4); color: var(--muted); }
.empty .btn { margin-top: var(--s2); }

/* Tables on account pages (months, sign-in history) */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; font-size: var(--fs-0); }
.table th, .table td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.table thead th { border-top: 0; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.danger-zone { border-color: var(--warn); }
.btn-danger { background: transparent; color: var(--warn); border-color: var(--warn); }
.btn-danger:hover { background: var(--warn-bg); }

@media (max-width: 1100px) { .hero-row { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; gap: var(--s3); padding-top: var(--s3); }
  .side { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .side a { padding: 0 12px; min-height: 40px; }
  .side hr { display: none; }
  .side a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
}
@media (max-width: 760px) {
  .side-signout { display: block; }
  .goals { grid-template-columns: 1fr; }
  .goals > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .two { grid-template-columns: 1fr; }
  .month .big { font-size: 44px; }
  .goals > div, .card, .checkin, .month, .auth-card { padding: var(--s3); }
  .code-box { font-size: 17px; letter-spacing: .03em; }   /* each 21-character recovery code stays on one line at 390 px */
  .code-box li { white-space: nowrap; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-top: 1px solid var(--line); padding: var(--s1) 0; }
  .table td { border-top: 0; padding: 4px var(--s2); }
  .table td.num { text-align: left; }
  .table td[data-th]::before { content: attr(data-th) ": "; color: var(--muted); font-weight: 700; }
}
