/* The donor's account pages (p20 notes 2A and 10L). Every value comes from tokens.css (--s-*). The charts of the dashboard are drawn by charts.css, which the panel loads too. */

.account-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-space-4); margin-bottom: var(--s-space-4); }
.account-title { margin: 0; font-size: var(--s-text-section); font-weight: var(--s-weight-title); line-height: var(--s-line-tight); }
.account-h2 { margin: 0 0 var(--s-space-3); font-size: var(--s-text-md); font-weight: var(--s-weight-title); }
.account-h3 { margin: var(--s-space-5) 0 var(--s-space-2); font-size: var(--s-text-sm); font-weight: var(--s-weight-title); color: var(--s-muted); }
.account-card { padding: var(--s-space-7); gap: var(--s-space-4); }
@media (max-width: 600px) { .account-card { padding: var(--s-space-5) var(--s-space-4); } }
.account-form { display: grid; gap: var(--s-space-4); padding: var(--s-space-5); }
.account-card .account-form { padding: 0; }
.account-switch { margin: 0; font-size: var(--s-text-sm); color: var(--s-muted); }
.account-notice { margin: 0 0 var(--s-space-4); padding: var(--s-space-3) var(--s-space-4); border-radius: var(--s-radius-sm); background: var(--s-primary-light); color: var(--s-primary-dark-text); }
.account-notice.is-problem { background: var(--s-card-bg); border: var(--s-hairline) solid var(--s-error); color: var(--s-error); }
.account-notice ul { margin: var(--s-space-2) 0 0; padding-inline-start: var(--s-space-5); }

.account-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-space-3); margin-bottom: var(--s-space-5); border-bottom: var(--s-hairline) solid var(--s-border); padding-bottom: var(--s-space-3); }
.account-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-space-2); }
.account-nav a { display: inline-flex; align-items: center; min-height: var(--s-touch); padding: 0 var(--s-space-4); border-radius: var(--s-radius-pill); color: var(--s-text); }
.account-nav a:hover { background: var(--s-primary-light); color: var(--s-primary-text); }
.account-nav a.is-current { background: var(--s-primary); color: var(--s-on-primary); }
.account-logout { margin: 0; }

.account-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--s-account-stat-min)), 1fr)); gap: var(--s-space-4); margin-bottom: var(--s-space-4); }
.account-stat { padding: var(--s-space-5); gap: var(--s-space-1); }
.account-stat-label { color: var(--s-muted); font-size: var(--s-text-sm); }
.account-stat strong { font-size: var(--s-text-section); font-weight: var(--s-weight-strong); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--s-account-card-min)), 1fr)); gap: var(--s-space-4); align-items: start; }
.account-grid > .card { padding: var(--s-space-5); gap: var(--s-space-3); }
.account-empty { padding: var(--s-space-6); gap: var(--s-space-3); }
.account-empty p { margin: 0; }
.account-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-space-2); }
.account-list li { display: flex; justify-content: space-between; gap: var(--s-space-3); border-bottom: var(--s-hairline) solid var(--s-border); padding-bottom: var(--s-space-2); }
.account-list li span { min-width: 0; overflow-wrap: anywhere; }
/* The buttons of a plan: a form is a block, so without a row each button stood on a line of its own. They wrap on a phone. */
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-space-2); }

/* position: relative keeps the absolutely placed .sr-only label of a column head inside the scroller: without it the label sat at the edge of the wide table, outside the
   phone's screen, and widened the whole page (final review 2026-11-17, R02-14). */
.table-wrap { position: relative; overflow-x: auto; }
.account-table { width: 100%; border-collapse: collapse; }
.account-table th, .account-table td { padding: var(--s-space-3) var(--s-space-4); text-align: start; border-bottom: var(--s-hairline) solid var(--s-border); vertical-align: top; }
.account-table thead th { color: var(--s-muted); font-size: var(--s-text-sm); font-weight: var(--s-weight-label); white-space: nowrap; }
.account-table tbody th { font-weight: var(--s-weight-label); }
.account-claims { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--s-account-card-min)), 1fr)); gap: var(--s-space-4); margin-top: var(--s-space-5); }
.account-year { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-space-3); margin-bottom: var(--s-space-4); }
.account-year .select { width: auto; min-width: var(--s-account-select-min); }
.account-statement { padding: var(--s-space-6); gap: var(--s-space-2); }
.account-statement-note { font-size: var(--s-text-xs); }
.account-operation { padding: var(--s-space-6); gap: var(--s-space-4); }
.account-danger { margin-top: var(--s-space-6); font-size: var(--s-text-sm); }
.account-danger-btn { border-color: var(--s-error); color: var(--s-error); }
.account-danger-btn:hover { background: var(--s-error); color: var(--s-on-status); }

/* The live meter under a new-password field (owner's note of 2026-11-20): the cells and the word take the colour of the strength, and a line of the rule is ticked when it holds.
   The show button stands at the end of the label's row, so the field is the box it is placed in. */
.pwm-field { position: relative; }
.pwm { display: grid; gap: var(--s-space-2); margin-top: var(--s-space-2); }
.pwm[hidden] { display: none; }
.pwm-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-space-1); }
.pwm-bar i { display: block; height: var(--s-space-2); border-radius: var(--s-radius-pill); background: var(--s-border); }
.pwm.is-weak .pwm-bar i.is-on { background: var(--s-error); }
.pwm.is-medium .pwm-bar i.is-on { background: var(--s-warning); }
.pwm.is-strong .pwm-bar i.is-on { background: var(--s-success); }
.pwm-label { min-height: 1lh; font-size: var(--s-text-sm); font-weight: var(--s-weight-label); }
.pwm.is-weak .pwm-label { color: var(--s-error); }
.pwm.is-medium .pwm-label { color: var(--s-warning); }
.pwm.is-strong .pwm-label { color: var(--s-success); }
.pwm-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--s-pwm-rule-min)), 1fr)); gap: var(--s-space-1) var(--s-space-4); font-size: var(--s-text-sm); }
.pwm-rules li { display: flex; align-items: center; gap: var(--s-space-2); color: var(--s-muted); }
.pwm-rules li::before { content: "○"; flex: none; }
.pwm-rules li.is-ok { color: var(--s-text); }
.pwm-rules li.is-ok::before { content: "✓"; color: var(--s-success); }
.pwm-eye { position: absolute; inset-inline-end: 0; top: 0; padding: 0; border: 0; background: none; font: inherit; font-size: var(--s-text-sm); font-weight: var(--s-weight-label); color: var(--s-link); cursor: pointer; }

@media print {
  .account-statement { border: 0; box-shadow: none; padding: 0; }
  .account-nav, .account-year, .account-head { display: none !important; }
}
