/* Loan page styles (account page, its tabs and panels). Shared look-and-feel lives in styles.css. */

/* ---- Tab strip: small amber badge on a tab ("set by hand", "stale") ------------------------------- */
.tabcount-amber { background: var(--amber-bg); color: var(--amber); }

/* ---- Account actions menu (B32): wider, with a "needs sign-off" hint and dividers ------------------ */
.menu-list { min-width: 250px; }
.menu-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.menu-hint { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--amber); background: var(--amber-bg); border-radius: 999px; padding: 1px 8px; }
.menu-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }

/* ---- Key terms (B30): two columns, dates that never wrap, the rate on two short lines ------------- */
.facts.keyterms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 28px; }
.facts.keyterms > div { min-width: 0; overflow-wrap: anywhere; }
.facts.keyterms > div.wide { grid-column: 1 / -1; }
.keyterms .rate-line { display: block; }
.keyterms .rate-line.muted { font-size: 13px; }
details.account-history { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-2); }
@media (max-width: 480px) { .facts.keyterms { grid-template-columns: minmax(0, 1fr); } }

/* ---- "Arrears basis under review": a small tag; the instruction is in the pop-up (B13) ------------ */
details.more.basis-tag { margin-top: 8px; }
details.more.basis-tag > summary { color: var(--amber); background: var(--amber-bg); border-radius: 999px; padding: 2px 10px 2px 7px; }
details.more.basis-tag > .more-body { max-width: 640px; }

/* ---- Activity lists (B26): raw codes behind a small "details" toggle; accrued interest looks different */
details.rawcode { display: inline; font-size: 12px; }
details.rawcode > summary { display: inline; cursor: pointer; color: var(--brand2); font-size: 12px; font-weight: 600; list-style: none; margin-left: 4px; }
details.rawcode > summary::-webkit-details-marker { display: none; }
details.rawcode > summary::before { content: "▸ "; }
details.rawcode[open] > summary::before { content: "▾ "; }
details.rawcode > span { display: block; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; font-weight: 400; }
table tr.accrued td { font-style: italic; color: var(--muted); background: var(--tint); }
table.statement tbody tr.accrued td, table.statement tbody tr.accrued td.desc { background: var(--tint); color: var(--muted); font-weight: 400; }
table tr.accrued .neg { color: var(--muted); }
.todate { display: inline-block; font-style: normal; font-size: 12px; font-weight: 600; color: var(--amber); background: var(--amber-bg); border-radius: 999px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; }

/* ---- Statement tab (B31): jump links, and a heading row that wraps instead of squeezing the title -- */
.jumplinks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; }
.jumplinks a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; font-size: 13px; color: var(--brand2); }
.jumplinks a:hover { border-color: var(--gold-soft); background: var(--tint); }
#st-statement, #st-breakdown, #st-payments, #st-quote, #st-demand, #st-fees { scroll-margin-top: 76px; }
.statement-toolbar h2 { flex: 0 0 auto; white-space: nowrap; }
.statement-toolbar .stmt-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 auto; justify-content: flex-end; }
.stmt-asat { margin: 0; display: flex; gap: 7px; align-items: center; font-weight: 600; white-space: nowrap; }
.stmt-asat input { margin: 0; width: auto; }

/* ---- What is owed: Balance, Fees, Total due (B22) -------------------------------------------------- */
dl.owed { margin: 14px 0 0; padding: 12px 4px 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
dl.owed > div { display: flex; gap: 18px; justify-content: space-between; min-width: 260px; }
dl.owed dt { color: var(--ink-2); }
dl.owed dd { margin: 0; font-variant-numeric: tabular-nums; }
dl.owed .total { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; font-size: 15px; font-weight: 700; }
dl.owed .total dt { color: var(--ink); }

/* ---- Change status / Move to another book panels (B29) --------------------------------------------- */
.panel-current { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--tint); }
.panel-current .label { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; margin: 0; }
.panel-current strong { font-size: 15px; }
.panel .panel-b form button[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Credit reporting tab (B28) --------------------------------------------------------------------- */
.cais-manual fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cais-manual fieldset[disabled] select, .cais-manual fieldset[disabled] input, .cais-manual fieldset[disabled] textarea { background: var(--tint); color: var(--ink-2); }
