:root {
  --ink: #172235;
  --muted: #68758a;
  --line: #dfe5ed;
  --canvas: #f4f7fa;
  --surface: #ffffff;
  --navy: #142a46;
  --navy-2: #1d3a5d;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --teal: #0f766e;
  --green: #13795b;
  --green-soft: #e7f6f0;
  --amber: #a15c06;
  --amber-soft: #fff4d7;
  --slate-soft: #eef2f6;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(30, 52, 76, .08);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 44px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .35rem; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.035em; }
h2 { margin-bottom: .25rem; font-size: 1.15rem; letter-spacing: -.015em; }
p { color: var(--muted); }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 260px; display: flex; flex-direction: column; padding: 28px 20px 20px; background: var(--navy); color: white; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; font-size: 1.12rem; font-weight: 750; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #36b5a5, #168577); color: white; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-mark-large { width: 44px; height: 44px; border-radius: 12px; font-size: 1.2rem; }
.class-card { display: grid; gap: 2px; margin: 30px 0 22px; padding: 14px 15px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; background: rgba(255,255,255,.06); }
.class-card strong { font-size: .98rem; }
.class-card small, .user-line small { color: #b9c7d8; }
.eyebrow { display: block; margin-bottom: 5px; color: #617187; font-size: .73rem; font-weight: 800; letter-spacing: .105em; text-transform: uppercase; }
.class-card .eyebrow { color: #92a7bf; font-size: .65rem; }
.eyebrow-light { color: #9fd8d2; }
.main-nav { display: grid; gap: 5px; }
.main-nav a { padding: 11px 13px; border-radius: 9px; color: #cbd6e3; font-size: .91rem; font-weight: 600; }
.main-nav a:hover { background: rgba(255,255,255,.07); color: white; text-decoration: none; }
.main-nav a.active { background: rgba(55, 187, 171, .18); color: #fff; box-shadow: inset 3px 0 #3ec8b5; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.user-line { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.user-line > span:last-child { display: grid; min-width: 0; }
.user-line strong { overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #35506e; color: #eff6ff; font-size: .72rem; font-weight: 800; }
.link-button { padding: 6px 0; border: 0; background: none; color: #aebed0; cursor: pointer; font-size: .82rem; }
.link-button:hover { color: white; }
.mobile-header { display: none; }

.app-main { width: calc(100% - 260px); min-height: 100vh; margin-left: 260px; padding: 38px clamp(24px, 4vw, 64px) 64px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-header p { margin-bottom: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: .88rem; line-height: 1.15; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 5px 14px rgba(37,99,235,.18); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border-color: #cfd8e4; background: white; color: #31445d; }
.button-secondary:hover { border-color: #9badc3; background: #f8fafc; }
.button-small { min-height: 36px; padding: 7px 11px; font-size: .79rem; }
.button-full { width: 100%; }

.balance-hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 165px; margin-bottom: 18px; padding: 27px 32px; overflow: hidden; border-radius: 18px; background: linear-gradient(120deg, var(--navy), #174f5c); color: white; box-shadow: 0 14px 30px rgba(20,42,70,.17); }
.balance-hero::after { position: absolute; right: 8%; bottom: -45px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; content: ""; }
.balance-hero > div:first-child { z-index: 1; display: grid; }
.balance-hero strong { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.055em; line-height: 1.05; }
.balance-hero small { margin-top: 9px; color: #bed0dd; }
.balance-hero.compact { min-height: 145px; }
.balance-symbol { z-index: 1; display: grid; place-items: center; width: 78px; height: 78px; border: 1px solid rgba(255,255,255,.2); border-radius: 24px; background: rgba(255,255,255,.08); font-size: 2rem; font-weight: 800; transform: rotate(4deg); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-bottom: 22px; }
.metric-card { display: grid; min-height: 132px; padding: 20px 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 13px rgba(30,52,76,.035); }
.metric-card > span { color: var(--muted); font-size: .79rem; font-weight: 700; }
.metric-card > strong { align-self: center; font-size: 1.75rem; letter-spacing: -.035em; }
.metric-card a, .metric-card small { align-self: end; font-size: .78rem; }
.metric-card small { color: var(--muted); }
.metric-status { font-size: 1.05rem !important; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); gap: 18px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 16px rgba(30,52,76,.04); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 13px; }
.panel-heading h2 { margin: 0; }
.transaction-list { padding: 0 9px 10px; }
.transaction-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 63px; padding: 8px 12px; border-top: 1px solid #edf0f4; }
.transaction-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #feeceb; color: #b42318; font-weight: 800; }
.transaction-icon.incoming { background: var(--green-soft); color: var(--green); }
.transaction-main { display: grid; min-width: 0; }
.transaction-main strong { overflow: hidden; font-size: .87rem; text-overflow: ellipsis; white-space: nowrap; }
.transaction-main small { color: var(--muted); font-size: .74rem; }
.transaction-amount { font-size: .88rem; }
.positive { color: var(--green); }
.compact-list { display: grid; padding: 0 10px 10px; }
.compact-list > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-top: 1px solid #edf0f4; color: inherit; }
.compact-list > a:hover { background: #f8fafc; text-decoration: none; }
.compact-list span:first-child { display: grid; }
.compact-list strong { font-size: .87rem; }
.compact-list small { color: var(--muted); font-size: .75rem; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .71rem; font-weight: 800; white-space: nowrap; }
.status-success { background: var(--green-soft); color: var(--green); }
.status-warning { background: var(--amber-soft); color: var(--amber); }
.status-neutral { background: var(--slate-soft); color: #58677a; }
.status-legend { margin-top: 24px; }
.status-legend-body { padding: 0 22px 22px; font-size: .85rem; }
.status-legend-list { margin: 0; }
.status-legend-list > div { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.status-legend-list dt { margin: 0; }
.status-legend-list dd { margin: 0; color: var(--muted); }
.status-legend-list .status-pill { white-space: normal; }
.status-legend-note { margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.empty-state { display: grid; place-items: center; min-height: 130px; padding: 28px; text-align: center; }
.empty-state p { margin: 4px 0 0; font-size: .88rem; }

.card-list { display: grid; gap: 13px; }
.request-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; color: inherit; box-shadow: 0 3px 13px rgba(30,52,76,.035); }
.request-card:hover { border-color: #b8c6d8; box-shadow: var(--shadow); text-decoration: none; }
.request-card h2 { margin: 10px 0 4px; font-size: 1.1rem; }
.request-card p { margin: 0; font-size: .82rem; }
.request-totals { display: flex; gap: 34px; text-align: right; }
.request-totals span { display: grid; }
.request-totals small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.request-totals strong { font-size: 1.05rem; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th { padding: 11px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9fb; color: #637186; font-size: .69rem; letter-spacing: .045em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 18px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.table-empty { height: 120px; color: var(--muted); text-align: center; }
.table-actions { text-align: right; }
.table-note { display: block; margin-top: 3px; color: var(--muted); }
.person-chip { display: block; width: fit-content; margin: 3px 0; padding: 3px 7px; border-radius: 6px; background: #eef4fb; color: #3c526d; font-size: .74rem; }
.person-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mini-link { padding: 2px 0; border: 0; background: none; color: var(--blue); cursor: pointer; font-size: .7rem; font-weight: 700; }
.table-subaction { display: block; margin-top: 3px; font-size: .72rem; font-weight: 650; }
.muted { color: var(--muted); }
.child-summary { margin-bottom: 18px; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: .83rem; font-weight: 700; }
.page-narrow { max-width: 720px; margin: 0 auto; }
.form-panel { padding: 24px; }
.confirmation-panel { padding: 30px; }

.stack-form { display: grid; gap: 17px; }
.field-group, form > div:has(> input), form > div:has(> select), form > div:has(> textarea) { display: grid; gap: 6px; }
.field-group label, form > div > label { color: #34455b; font-size: .81rem; font-weight: 750; }
.form-control, form > div > input, form > div > select, form > div > textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd4e0; border-radius: 8px; outline: none; background: white; color: var(--ink); }
textarea.form-control, form > div > textarea { min-height: 90px; resize: vertical; }
.form-control:focus, form > div > input:focus, form > div > select:focus, form > div > textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field-error, .errorlist { margin: 0; padding: 0; color: var(--danger); font-size: .78rem; list-style: none; }
.help-text, .helptext { color: var(--muted); font-size: .75rem; }
.helptext ul { margin: 5px 0; padding-left: 18px; }
.form-errors { padding: 10px 12px; border: 1px solid #f2b8b5; border-radius: 8px; background: #fff1f0; color: var(--danger); font-size: .82rem; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 6px; }

.auth-body { background: linear-gradient(135deg, #f1f5f9, #f7fafc 50%, #eaf3f3); }
.auth-main { display: grid; min-height: 100vh; place-items: center; padding: 32px 18px; }
.auth-shell { display: grid; width: min(100%, 440px); gap: 18px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 11px; font-size: 1.18rem; font-weight: 800; letter-spacing: -.025em; }
.auth-card { padding: 31px; border: 1px solid #dae2eb; border-radius: 17px; background: rgba(255,255,255,.97); box-shadow: 0 18px 50px rgba(31,49,72,.11); }
.auth-card-wide { width: min(100%, 500px); }
.auth-heading { margin-bottom: 22px; text-align: center; }
.auth-heading h1, .auth-card h1 { font-size: 1.65rem; }
.auth-heading p, .auth-card > p { margin-bottom: 0; font-size: .88rem; }
.auth-link { display: block; margin-top: 17px; text-align: center; font-size: .82rem; font-weight: 650; }
.auth-note { margin: 0; color: #7d8998; font-size: .75rem; text-align: center; }
.invite-email { margin: 18px 0; padding: 10px 12px; border-radius: 8px; background: var(--slate-soft); color: #41526a; font-size: .85rem; font-weight: 700; text-align: center; }
.messages { position: relative; z-index: 30; display: grid; gap: 8px; margin-bottom: 18px; }
.message { padding: 11px 14px; border: 1px solid #cbd9e8; border-radius: 9px; background: #edf5ff; color: #284d79; font-size: .83rem; }
.message-success { border-color: #b8decf; background: var(--green-soft); color: #116149; }
.message-error { border-color: #f2b8b5; background: #fff1f0; color: var(--danger); }
.message-warning { border-color: #d6a844; background: #fff5d6; color: #654700; margin-bottom: 12px; }

@media (max-width: 900px) {
  .sidebar { width: 218px; }
  .app-main { width: calc(100% - 218px); margin-left: 218px; padding-inline: 22px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .metric-card:last-child { grid-column: span 2; }
}

@media (max-width: 680px) {
  .status-legend-list > div { grid-template-columns: 1fr; gap: 7px; }
  .sidebar { position: static; width: 100%; padding: 0; }
  .sidebar > .brand, .class-card, .sidebar-footer { display: none; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 10px 16px; background: var(--navy); color: white; }
  .mobile-header .brand-mark { width: 31px; height: 31px; }
  .mobile-class { color: #bdcbd9; font-size: .77rem; }
  .main-nav { display: flex; overflow-x: auto; gap: 0; padding: 0 8px 8px; background: var(--navy); }
  .main-nav a { flex: 0 0 auto; padding: 8px 10px; font-size: .78rem; }
  .main-nav a.active { box-shadow: inset 0 -2px #3ec8b5; }
  .app-main { width: 100%; margin-left: 0; padding: 24px 15px 48px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header .button { width: 100%; }
  .header-actions { width: 100%; }
  .header-actions > * { flex: 1; }
  .balance-hero { min-height: 150px; padding: 24px 22px; }
  .balance-symbol { width: 58px; height: 58px; border-radius: 18px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card:last-child { grid-column: auto; }
  .request-card { align-items: flex-start; flex-direction: column; }
  .request-totals { width: 100%; justify-content: space-between; text-align: left; }
  .auth-card { padding: 25px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* ECOLE-inspired palette: gymnasium red, quiet surfaces and a five-colour band. */
:root { --blue: #ba083b; --blue-dark: #94052e; --navy: #292b30; --navy-2: #404249; --canvas: #f6f5f3; --ink: #272a31; --muted: #62636b; --line: #e5e1df; --radius: 12px; }
html { scroll-padding-top: 24px; }
body { overflow-wrap: anywhere; }
.ecole-stripe { position: fixed; inset: 0 0 auto; height: 5px; z-index: 100; background: linear-gradient(to right, #7caf00 0 20%, #f49300 20% 40%, #bd083b 40% 60%, #103d61 60% 80%, #0285ab 80% 100%); }
.skip-link { position: fixed; top: -80px; left: 15px; z-index: 110; background: white; padding: 14px; }
.skip-link:focus { top: 10px; }
:focus-visible { outline: 3px solid #087e9f; outline-offset: 4px; }
.sidebar { background: #fff; color: var(--ink); border-right: 1px solid var(--line); padding-top: 38px; }
.brand { font-size: 1.3rem; letter-spacing: .035em; }
.brand small, .auth-brand small { display: block; font-size: .7rem; color: var(--muted); letter-spacing: .04em; font-weight: 600; }
.brand-mark { border-radius: 3px 12px 12px 12px; background: #ba083b; box-shadow: none; font-size: 1.65rem; font-style: italic; font-family: Georgia, serif; }
.class-card { margin-top: 26px; background: #faf2f4; border-color: #efdde2; }
.class-card strong { font-size: 1.7rem; }
.class-card .eyebrow, .class-card small, .user-line small { color: var(--muted); }
.main-nav a { color: #52545d; font-size: .85rem; min-height: 44px; display: flex; align-items: center; }
.main-nav a:hover { color: #94052e; background: #faf2f4; }
.main-nav a.active { color: #a00634; background: #faf0f3; box-shadow: inset 3px 0 #ba083b; }
.sidebar-footer { border-color: var(--line); }
.avatar { color: #a00634; background: #f6e6eb; }
.link-button { color: #68636a; min-height: 44px; }
.link-button:hover { color: #a00634; }
.balance-hero { background: linear-gradient(115deg, #a50935, #c9164b); box-shadow: 0 12px 25px #880d2c15; border-radius: 12px; }
.balance-hero small, .eyebrow-light { color: #ffe4ec; }
.button-primary { box-shadow: none; }
.button { transition: background .15s ease; }
.button:hover { transform: none; }
.button-small, .mini-link { min-height: 44px; }
.auth-body { background: #f6f5f3; }
.auth-main { background: radial-gradient(ellipse at 80% 5%, #f6dce5, transparent 50%); }
.auth-card { border-top: 4px solid #ba083b; border-radius: 8px; background: white; }
.auth-brand { text-align: left; letter-spacing: .08em; }
.metric-link { color: var(--ink); text-decoration: none; }
.metric-link:hover { text-decoration: none; border-color: #c5748b; background: #fffafd; }
.metric-link small { color: #a00634; }
.parent-metrics { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.parent-metrics .balance-hero { margin: 0; padding: 24px; }
.parent-metrics .balance-hero strong { font-size: clamp(2rem, 3.3vw, 3rem); }
.parent-metrics .metric-card { margin: 0; }
.transaction-link { color: var(--ink); }
.transaction-link:hover { text-decoration: none; background: #fcf5f7; }
.transaction-main strong { white-space: normal; text-overflow: clip; overflow: visible; }
.payment-route { color: #55565f; font-size: .78rem; margin: 3px 0; }
.payment-route b { font-weight: 650; color: #3f4048; }
.transaction-amount { white-space: nowrap; }
.filter-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.filter-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); font-size: .85rem; }
.filter-nav a[aria-current] { background: #ba083b; color: white; border-color: #ba083b; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 24px 0; font-size: .85rem; }
.detail-panel { padding: 24px; }
.spaced { margin-top: 20px; }
.detail-amount { font-size: 2.6rem; letter-spacing: -.04em; }
.detail-list { margin: 16px 0 0; }
.detail-list > div { display: grid; grid-template-columns: 85px 1fr; padding: 12px 0; border-top: 1px solid var(--line); gap: 12px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 650; }
.receipt-list { list-style: none; padding: 0; margin: 16px 0 24px; }
.receipt-list li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.receipt-list small { color: var(--muted); }
.person-chip { background: #f4f1f2; color: #49424a; }
.table-subaction { padding-block: 8px; min-height: 36px; }
.status-pill { white-space: normal; }
input[type=file] { max-width: 100%; font-size: .85rem; }
input[type=file]::file-selector-button { border: 0; padding: 8px; border-radius: 5px; margin-right: 8px; background: #f7eaf0; color: #94052e; }
.page-header > div, .content-grid > *, .metric-grid > *, .parent-metrics > *, .request-card > * { min-width: 0; }
.menu-toggle { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: white; color: var(--blue); cursor: pointer; font-weight: 700; font-size: .8rem; }
@media (max-width: 900px) {
  .js .sidebar:not(.is-open) { display: none; }
}
@media (max-width: 1100px) {
  .parent-metrics { grid-template-columns: 1fr 1fr; }
  .parent-metrics .balance-hero { grid-column: 1 / -1; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; padding: 0; border: 0; }
  .sidebar > .brand, .sidebar .class-card { display: none; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; min-height: 70px; background: white; color: var(--ink); }
  .mobile-class { color: #a00634; font-weight: 800; font-size: 1.2rem; }
  .main-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 16px; background: white; border-bottom: 1px solid var(--line); }
  .main-nav a { padding: 8px 12px; font-size: .8rem; }
  .main-nav a.active { box-shadow: inset 0 -3px #ba083b; }
  .sidebar-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; background: white; }
  .user-line { margin: 0; }
  .user-line .avatar { display: none; }
  .app-main { width: 100%; margin: 0; padding: 26px 22px 48px; }
}
@media (max-width: 680px) {
  .app-main { padding: 24px 14px 40px; }
  .mobile-header { padding-inline: 16px; }
  .main-nav { padding-inline: 10px; }
  .sidebar-footer { display: flex; padding: 6px 16px; }
  .parent-metrics { grid-template-columns: 1fr; }
  .parent-metrics .balance-hero { grid-column: auto; min-height: 150px; }
  .parent-metrics .metric-card { min-height: 126px; }
  .transaction-row { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 14px 7px; }
  .transaction-icon { width: 27px; height: 27px; align-self: start; }
  .transaction-amount { grid-column: 2; }
  .request-totals { gap: 12px; flex-wrap: wrap; }
  .panel-heading { padding: 18px 16px 12px; }
  .form-panel, .detail-panel { padding: 20px 16px; }
  .header-actions > * { flex-basis: 100%; }
  .compact-list > a { align-items: flex-start; flex-direction: column; }
  .table-wrap:has(td[data-label]) { overflow: visible; }
  table:has(td[data-label]), table:has(td[data-label]) tbody { display: block; }
  table:has(td[data-label]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table:has(td[data-label]) tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table:has(td[data-label]) td { display: block; border: 0; padding: 7px 0; text-align: left; }
  td[data-label]::before { display: block; content: attr(data-label); margin-bottom: 3px; color: var(--muted); font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
  .table-empty { height: auto; }
  .auth-shell { max-width: 430px; }
}
:root { scroll-padding-top: 1rem; }
.list-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin: 1.25rem 0; padding: 1.25rem; background: #fff; border: 1px solid #e7e3e1; border-radius: 14px; }
.list-filters .field-group { flex: 1 1 160px; min-width: 0; }
.list-filters .form-errors { flex-basis: 100%; }
.filter-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.policy-help { font-size: .9rem; color: #585451; }
.policy-help summary { cursor: pointer; font-weight: 700; }
.policy-help li { margin-top: .35rem; }
.form-panel input[type="checkbox"] { width: 1.2rem; height: 1.2rem; accent-color: #bc2034; }
.button { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) { .list-filters { padding: 1rem; } .list-filters .field-group { flex-basis: 100%; } .filter-actions { width: 100%; } .header-actions form { width: 100%; } .header-actions form .button { width: 100%; } }

/* Four financial figures remain readable on narrow screens. */
.request-totals-four { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; flex-shrink: 0; }
.request-card h2 a { color: inherit; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .metric-grid-four { grid-template-columns: 1fr; } }
