/* Self-service portal: plain, large type, one column, works on any phone. */
:root { --navy: #00264d; --blue: #004080; --line: #dfe3e8; --muted: #6c757d; }
* { box-sizing: border-box; }
body { margin: 0; background: #f4f6f9; color: #1c2226; font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-size: 16px; }
.p-wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.p-head { background: #fff; border-bottom: 1px solid var(--line); }
.p-head-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.p-brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 700; text-decoration: none; min-width: 0; }
.p-brand img { width: 38px; height: 38px; object-fit: contain; }
.p-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-who { text-align: right; line-height: 1.2; min-width: 0; }
.p-who-name { display: block; font-weight: 600; }
.p-who-sub { display: block; font-size: .78rem; color: var(--muted); }
.p-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 8px; align-items: center; }
.p-tabs a { padding: 8px 12px; border-radius: 6px 6px 0 0; color: var(--blue); text-decoration: none; font-size: .95rem; }
.p-tabs a.on { background: var(--navy); color: #fff; }
.p-out { margin-left: auto; }
.p-link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .9rem; padding: 8px 4px; }
.p-title { font-size: 1.45rem; margin: 18px 0 12px; }
.p-msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.p-success { background: #e8f6ec; border: 1px solid #b7e2c3; }
.p-danger  { background: #fdecea; border: 1px solid #f5c2bd; }
.p-warning { background: #fff8e1; border: 1px solid #ffe6a1; }
.p-info    { background: #e8f1fb; border: 1px solid #c3dcf5; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
.card h2 { font-size: 1.05rem; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card .body { padding: 14px 16px; }
/* A grid, not a flex row: every box is the same size whichever line it lands
   on, so a short figure never sits in a shorter box than the one beside it. */
.big { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
       grid-auto-rows: 1fr; gap: 12px; margin-bottom: 16px; }
.big .box { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.big .box .k { color: var(--muted); font-size: .82rem; }
.big .box .v { font-size: clamp(1.1rem, 5.2vw, 1.5rem); font-weight: 700; margin-top: 2px; white-space: nowrap; }
.big .box.owed .v { color: #b3261e; }
.rows { width: 100%; border-collapse: collapse; }
.rows th, .rows td { text-align: left; padding: 10px 16px; border-bottom: 1px solid #eef1f4; }
.rows th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.rows td.num, .rows th.num { text-align: right; white-space: nowrap; }
.rows tr:last-child td { border-bottom: 0; }
.btn { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 6px;
       padding: 11px 18px; font-size: 1rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy); color: #fff; }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn.small { padding: 7px 12px; font-size: .88rem; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .92rem; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #c7ced6; border-radius: 6px; font-size: 1rem; background: #fff; }
.f { margin-bottom: 14px; }
.two { display: flex; flex-wrap: wrap; gap: 14px; }
.two > * { flex: 1 1 200px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .75rem; font-weight: 600; }
.tag.ok { background: #e8f6ec; color: #1c7a3c; }
.tag.wait { background: #fff4d6; color: #8a6100; }
.tag.no { background: #fdecea; color: #b3261e; }
.empty { color: var(--muted); padding: 18px 16px; }
.sub { color: var(--muted); font-size: .82rem; font-weight: 400; margin-top: 2px; }
.rows .btn { white-space: nowrap; }
.foot-note { color: var(--muted); font-size: .88rem; padding: 0 16px 14px; }
.login { max-width: 380px; margin: 8vh auto; }
.login .card { padding: 6px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--navy); color: #fff; padding: 10px; z-index: 10; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ffb703; outline-offset: 1px; }
@media (max-width: 575.98px) {
  .p-title { font-size: 1.25rem; }
  .rows th, .rows td { padding: 9px 12px; }
  .btn { width: 100%; text-align: center; }
  .btn.small, .rows .btn { width: auto; }

  /* A table with more than two columns becomes one card per row, so nobody
     has to drag the page sideways to read their own figures. */
  .rows.fold thead { position: absolute; left: -9999px; }
  .rows.fold tr { display: block; padding: 10px 12px; border-bottom: 1px solid #eef1f4; }
  .rows.fold tr:last-child { border-bottom: 0; }
  .rows.fold td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
                  border: 0; padding: 3px 0; text-align: right; }
  .rows.fold td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted);
                  text-align: left; white-space: nowrap; }
  .rows.fold td:empty { display: none; }
  /* A cell with no label (an action button) lines up with the values above it,
     never off on its own at the left. */
  .rows.fold td:not([data-label]) { justify-content: flex-end; }
  .rows.fold td .sub { text-align: right; }
}
