/* Halaman akun & admin. */
body.acct { min-height: 100vh; display: grid; place-items: start center; padding: 40px 16px; background: var(--bg); }
.acct-wrap { width: min(420px, 100%); display: grid; gap: 20px; justify-items: center; }
.acct-card { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 18px; }
.acct-card h1 { font-size: 26px; letter-spacing: -0.03em; }
.acct-card form { display: grid; gap: 14px; }
.acct-card .btn.primary { width: 100%; }
.acct-note { text-align: center; max-width: 40ch; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { font-size: 13.5px; border-radius: 10px; padding: 10px 12px; }
.msg.err { background: var(--cost-soft); color: var(--cost); }
.msg.ok { background: var(--good-soft); color: var(--good); }
.switch { text-align: center; font-size: 14px; color: var(--ink-2); }
.pw { position: relative; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.plan { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); }
.plan b { display: block; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }

/* admin */
body.admin { background: var(--bg); }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 18px; }
.admin-grid { display: grid; gap: 22px; padding-bottom: 48px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat b { display: block; font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { font-size: 12.5px; color: var(--ink-3); font-weight: 650; }
.tbl tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.auth-tabs button { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 14.5px; padding: 10px; border-radius: 9px; color: var(--ink-2); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 10%); }

/* ---------- Auth V2: halaman masuk/daftar (akun.html) ---------- */
body.acct .acct-head { display: grid; gap: 6px; }
body.acct .acct-head .muted { margin: 0; }
body.acct .acct-tag { margin: -8px 0 0; text-align: center; color: var(--ink-2); font-size: 14px; max-width: 34ch; }
body.acct .acct-card .btn { min-height: 46px; }
body.acct .acct-card input.plain { min-height: 46px; font-size: 16px; }   /* 16px: tidak zoom otomatis di iOS */
body.acct .g-btn { width: 100%; min-height: 48px; justify-content: center; gap: 10px; font-weight: 700; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-xs); }
body.acct .g-btn:hover { background: var(--surface-2); }
body.acct .or { text-transform: none; }
body.acct .forgot { justify-self: start; margin-top: -4px; }
body.acct .field-err { display: flex; gap: 6px; align-items: flex-start; color: var(--cost); font-size: 13px; line-height: 1.4; }
body.acct .field-err::before, body.acct .msg.err::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%;
  background: var(--cost); color: var(--surface); font-size: 11px; font-weight: 800; }
body.acct .msg { display: flex; gap: 8px; align-items: flex-start; }
body.acct .msg.err { color: color-mix(in srgb, var(--cost) 80%, var(--ink)); border: 1px solid color-mix(in srgb, var(--cost) 30%, transparent); }   /* kontras ≥ 4,5:1 di kedua tema */
body.acct .msg.ok::before { content: "✓"; flex: none; font-weight: 800; }
body.acct input[aria-invalid="true"] { border-color: var(--cost); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cost) 16%, transparent); }
body.acct .pw input { padding-right: 52px; }
body.acct .pw button { min-height: 40px; min-width: 40px; }
body.acct .btn[aria-busy="true"] { cursor: progress; opacity: .8; }
body.acct .btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: acct-spin .8s linear infinite; }
@keyframes acct-spin { to { transform: rotate(360deg); } }
body.acct .msg { margin: 0; line-height: 1.5; }
body.acct .acct-card :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* sisi kiri (desktop): nota laba contoh + poin manfaat */
@media (min-width: 960px) {
  body.acct .acct-tag { display: none; }
  body.acct .acct-side { align-content: center; gap: 28px; }
  body.acct .acct-side > .brand { align-self: start; }
  body.acct .side-eyebrow { margin: 0 0 10px; color: var(--side-accent); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  body.acct .acct-side h2 { max-width: 18ch; margin: 0; }
  body.acct .side-lead { margin: 14px 0 0; max-width: 46ch; color: var(--side-ink); opacity: .86; line-height: 1.6; }
  body.acct .side-nota { margin: 0; width: min(380px, 100%); background: #fbfaf6; color: #1d2a25; border-radius: 16px 16px 0 0; padding: 18px 20px 26px; position: relative;
    box-shadow: 0 24px 60px rgb(0 0 0 / 28%);
    -webkit-mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x; mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x; }
  body.acct .sn-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px dashed #c9d3ce; font-size: 13px; }
  body.acct .sn-head span { color: #6b7d75; font-size: 11.5px; }
  body.acct .side-nota dl { margin: 10px 0 0; display: grid; gap: 7px; font-size: 13px; }
  body.acct .side-nota dl div { display: flex; justify-content: space-between; gap: 12px; }
  body.acct .side-nota dt { color: #4f615a; } body.acct .side-nota dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 650; }
  body.acct .side-nota dd.neg { color: #b4472f; }
  body.acct .sn-total { padding-top: 8px; border-top: 1px dashed #c9d3ce; } body.acct .sn-total dt, body.acct .sn-total dd { color: #0c5a47; font-weight: 800; }
  body.acct .sn-bars { display: flex; align-items: flex-end; gap: 6px; height: 52px; margin-top: 16px; padding-bottom: 1px; border-bottom: 1px solid #c9d3ce; }
  body.acct .sn-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 1px 1px; background: linear-gradient(#17916b, #0f6e56); transform-origin: bottom; }
  body.acct .sn-chip { display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 700; color: #0c5a47; background: #dff3ea; border-radius: 999px; padding: 3px 9px; }
  body.acct .side-points { margin: 0 !important; }
  /* gerak halus: nota naik perlahan, batang tumbuh; mati bila pengguna memilih kurangi gerakan */
  @media (prefers-reduced-motion: no-preference) {
    body.acct .side-nota { animation: acct-rise .7s cubic-bezier(.2, .7, .2, 1) both .1s; }
    body.acct .sn-bars i { animation: acct-grow .8s cubic-bezier(.2, .7, .2, 1) both; }
    body.acct .sn-bars i:nth-child(2) { animation-delay: .35s; } body.acct .sn-bars i:nth-child(3) { animation-delay: .4s; } body.acct .sn-bars i:nth-child(4) { animation-delay: .45s; }
    body.acct .sn-bars i:nth-child(5) { animation-delay: .5s; } body.acct .sn-bars i:nth-child(6) { animation-delay: .55s; } body.acct .sn-bars i:nth-child(1) { animation-delay: .3s; }
  }
}
@keyframes acct-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes acct-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { body.acct .btn[aria-busy="true"]::before { animation: none; } }
/* HP: ruang atas lebih ringkas agar form langsung terlihat; ukuran kolom dan tombol tetap nyaman (≥46px). */
@media (max-width: 480px) {
  html body.acct { padding: 16px 16px 28px; }
  body.acct .acct-wrap { gap: 14px; }
  body.acct .acct-tag { margin: -6px 0 0; font-size: 13px; }
  body.acct .acct-card { padding: 20px 16px; gap: 16px; border-radius: 18px; }
  body.acct .acct-card h1 { font-size: 24px; }
  body.acct .auth-tabs button { padding: 9px; }
}
