:root {
  color-scheme: light;
  --ink: #172131;
  --muted: #566479;
  --subtle: #6a7587;
  --accent: #244fc8;
  --accent-hover: #1c3fa7;
  --accent-soft: #eaf0ff;
  --canvas: #f4f6fa;
  --surface: #fff;
  --border: #dce3ed;
  --control-border: #b9c5d6;
  --focus: #2457e5;
  --radius: 18px;
  --shadow: 0 1px 2px #212d4108, 0 5px 20px #212d4105;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; min-height: 100vh; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
input, select, textarea, button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
[id] { scroll-margin-top: 1.25rem; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.22; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4.15vw, 3rem); letter-spacing: -.055em; font-weight: 730; }
h2 { font-size: 1.25rem; font-weight: 680; }
h3 { font-size: 1.0625rem; font-weight: 675; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .875rem; line-height: 1.45; }
.icon { display: block; flex: none; }

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 5;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  border-radius: .6rem;
  background: #172131;
  color: #fff;
  font-weight: 650;
}
.skip-link:focus { transform: none; }

.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  overflow: auto;
  background: #fafbfe;
  border-right: 1px solid var(--border);
  padding: 2rem 1rem 1.2rem;
}
.sidebar-brand { padding: 0 .65rem 2rem; }
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  border-radius: .7rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand-mark { flex: none; object-fit: contain; border-radius: 24%; }
.brand-text, .account-name, .sign-in-brand > div, .brand-preview-surface > div {
  display: grid;
  gap: .07rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.brand-text strong, .account-name strong { font-size: .925rem; font-weight: 680; line-height: 1.25; }
.brand-text > span, .account-name > span { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.workspace-nav, .account-actions { display: grid; gap: .28rem; }
.nav-link {
  display: flex;
  gap: .65rem;
  width: 100%;
  align-items: center;
  text-align: start;
  padding: .62rem .7rem;
  min-height: 43px;
  color: var(--muted);
  font-size: .925rem;
  font-weight: 590;
  line-height: 1.24;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: transparent;
}
.nav-link:hover { background: #eef2f8; color: var(--ink); }
.nav-link[aria-current="page"] { color: #2349ad; background: #e8efff; font-weight: 675; }
.sidebar-account {
  display: grid;
  gap: .5rem;
  margin-top: auto;
  padding-top: 2rem;
}
.account-identity { display: flex; align-items: center; gap: .65rem; padding: .65rem .65rem .35rem; min-width: 0; }
.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  height: 35px;
  border-radius: 50%;
  background: #e8effc;
  color: #26479a;
  font-size: .95rem;
  font-weight: 700;
}
.settings-nav { border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.account-actions .nav-link { min-height: 40px; font-size: .875rem; }

.workspace { min-width: 0; padding: 3.45rem clamp(1.5rem, 4.5vw, 4.5rem) 4rem; }
.workspace-inner { max-width: 1180px; margin-inline: auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1.15rem 1.5rem; margin-bottom: 1.85rem; }
.page-heading-copy { min-width: 0; }
.page-heading h1 { overflow-wrap: anywhere; }
.page-heading p { margin-top: .45rem; color: var(--muted); }
.page-actions { display: flex; align-items: center; flex: none; gap: .65rem; margin-bottom: .12rem; }
.page-actions:empty { display: none; }
.back-link { display: inline-block; margin-bottom: .65rem; font-size: .9rem; font-weight: 650; text-underline-offset: .19em; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .48rem;
  min-height: 44px;
  max-width: 100%;
  padding: .66rem .99rem;
  border: 1px solid transparent;
  border-radius: .71rem;
  text-decoration: none;
  font-size: .925rem;
  line-height: 1.22;
  font-weight: 665;
  text-align: center;
}
.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 4px #1635781c;
}
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { color: var(--ink); border-color: var(--control-border); background: var(--surface); }
.button-secondary:hover { background: #f2f5fb; }
.button-danger { color: #972d27; border-color: #e0b5b2; background: #fff; }
.button-danger:hover { background: #fff0ef; }
.button:disabled { cursor: not-allowed; color: #58647a; background: #e5eaf2; box-shadow: none; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: 1.2rem 1.4rem; }
.list-panel .panel-header { border-bottom: 1px solid #e7ecf4; }
.form-panel { padding: 1.55rem; }
.form-panel > h2 { margin-bottom: 1.12rem; }
.narrow-panel { max-width: 780px; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.55rem; }
.metric {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .95rem 1rem;
}
.metric-copy { min-width: 0; display: grid; gap: .03rem; }
.metric-copy > span { color: var(--muted); font-size: .875rem; line-height: 1.32; }
.metric-copy > strong { font-size: 1.48rem; letter-spacing: -.045em; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-icon { display: grid; place-items: center; flex: 0 0 41px; width: 41px; height: 41px; border-radius: .72rem; }
.metric-blue { color: #2854c6; background: #ecf1ff; }
.metric-amber { color: #805711; background: #fff3d9; }
.metric-green { color: #176143; background: #e6f6ed; }
.report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.55rem; }

.empty-state { padding: 4rem 1.25rem 4.4rem; display: grid; justify-items: center; text-align: center; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: #edf2fc;
  color: #3654a9;
  border: 1px solid #e0e8fa;
  border-radius: .95rem;
  margin-bottom: .9rem;
}
.empty-state p { color: var(--muted); margin: .5rem auto 0; max-width: 25rem; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.data-table th, .data-table td { text-align: left; overflow-wrap: anywhere; vertical-align: middle; }
.data-table th { background: #f8faff; padding: .65rem .68rem; color: var(--muted); font-size: .875rem; font-weight: 660; }
.data-table td { padding: .82rem .68rem; border-top: 1px solid #e7ecf4; font-size: .875rem; }
.data-table :is(th, td):first-child { padding-inline-start: 1.4rem; }
.data-table :is(th, td):last-child { padding-inline-end: 1.4rem; }
.data-table tbody tr:hover { background: #fafcff; }
.data-table .money-column { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-request a { display: inline-block; font-weight: 655; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.request-reference { margin-top: .14rem; color: var(--muted); display: block; font-size: .8125rem; font-weight: 500; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  max-width: 100%;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
  padding: .3rem .54rem;
  border-radius: .45rem;
  background: #eaf0fc;
  color: #294c91;
}
.status-badge > span { flex: none; width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; }
.status-department { color: #744a0f; background: #fff1d9; }
.status-finance { color: #5141a1; background: #eeeafe; }
.status-approved { color: #23499f; background: #e9efff; }
.status-purchased { color: #176042; background: #e7f6ed; }
.status-declined { color: #952b2b; background: #fcebec; }
.page-actions .status-badge { font-size: .875rem; padding: .45rem .7rem; }

.form-stack { display: grid; gap: 1rem; min-width: 0; }
.field { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.field > label, .label-note, .permission-fields legend { font-size: .925rem; font-weight: 640; }
.label-note { color: var(--muted); margin-left: .25rem; font-size: .8rem; }
.field :is(input, select, textarea) {
  display: block;
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: .58rem;
  min-height: 44px;
  width: 100%;
  padding: .53rem .7rem;
  line-height: 1.35;
  min-width: 0;
}
.field input::placeholder, .field textarea::placeholder { color: #69778a; opacity: 1; }
.field input[readonly] { background: #f0f3f8; color: #39475a; }
.field select {
  appearance: none;
  padding-right: 2rem;
  background-image: url("chevron.svg");
  background-position: right .68rem center;
  background-repeat: no-repeat;
  background-size: .9rem;
}
.field textarea { resize: vertical; }
.field input[type="file"] { padding: .35rem; font-size: .875rem; }
.field input[type="file"]::file-selector-button {
  margin-right: .52rem;
  padding: .4rem .6rem;
  color: var(--ink);
  border: 0;
  border-radius: .35rem;
  background: #eaf0fa;
  font: inherit;
  font-weight: 620;
  cursor: pointer;
}
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: #b03335; }
.field-error { color: #992e31; font-size: .875rem; font-weight: 600; line-height: 1.4; }
.input-prefix, .input-icon { position: relative; display: flex; align-items: center; }
.input-prefix > span, .input-icon > svg { position: absolute; left: .7rem; color: var(--muted); pointer-events: none; }
.input-prefix > input, .input-icon > input { padding-left: 2.05rem; }
.form-grid, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.report-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.form-actions .button { min-width: 0; }
.narrow-panel > .notice { margin-bottom: 1rem; }

.notice {
  display: block;
  padding: .77rem .9rem;
  border-radius: .65rem;
  border: 1px solid #d3dff8;
  background: #eef3ff;
  color: #2a447b;
  font-size: .925rem;
  overflow-wrap: anywhere;
}
.notice strong { font-weight: 690; }
.notice-error { color: #852626; background: #fff1f1; border-color: #edc3c3; }
.notice-success { color: #205b43; background: #edf9f1; border-color: #c0e4cf; }
.notice-waiting { display: flex; align-items: flex-start; gap: .55rem; color: #67440f; background: #fff7e9; border-color: #ebd5a9; margin-bottom: 1rem; }
.notice-waiting .icon { margin-top: .1rem; }
.flash-stack { display: grid; gap: .5rem; margin-bottom: 1.1rem; }
.signed-out .flash-stack { width: min(100%, 440px); margin-inline: auto; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr); align-items: start; gap: 1rem; }
.detail-primary { display: grid; gap: 1rem; min-width: 0; }
.detail-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.35rem; margin: 0; }
.detail-list > div { border-top: 1px solid #e7ecf4; padding-top: .78rem; min-width: 0; }
.detail-list dt { color: var(--muted); font-size: .84rem; font-weight: 590; }
.detail-list dd { margin: .18rem 0 0; overflow-wrap: anywhere; }
.detail-list .detail-wide { grid-column: 1 / -1; }
.detail-money { font-variant-numeric: tabular-nums; font-weight: 670; }
.preserve-lines { white-space: pre-wrap; }
.text-link { overflow-wrap: anywhere; text-underline-offset: .18em; }
.timeline { list-style: none; padding: 0; margin: .25rem 0 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: start; gap: .58rem; padding-bottom: 1.05rem; overflow-wrap: anywhere; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; inset: .5rem auto 0 .34rem; background: #dce5fa; width: 2px; }
.timeline-marker { background: #e9efff; border: 2px solid #6083d9; position: relative; width: 13px; height: 13px; border-radius: 50%; margin-top: .28rem; }
.timeline li strong { font-size: .925rem; }
.timeline-byline { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.timeline-note { padding: .6rem .65rem; background: #f2f5fb; border-radius: .48rem; margin-top: .4rem; font-size: .875rem; }
.timeline-note span { display: block; color: var(--muted); font-size: .81rem; font-weight: 620; }

.section-links { display: flex; flex-wrap: wrap; gap: .42rem; margin: -.2rem 0 1.85rem; padding-bottom: 1.15rem; border-bottom: 1px solid var(--border); }
.section-links a { padding: .52rem .78rem; border-radius: .55rem; font-size: .875rem; font-weight: 640; text-decoration: none; }
.section-links a:hover { background: #e7eefc; }
.settings-section + .settings-section { margin-top: 2.15rem; }
.section-heading { display: flex; align-items: center; gap: .72rem; margin-bottom: .85rem; }
.section-heading h2 { font-size: 1.4rem; }
.section-heading p { margin-top: .13rem; color: var(--muted); font-size: .925rem; }
.section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 42px;
  color: #2d55bc;
  background: #e9effe;
  border: 1px solid #dee8fc;
  border-radius: .75rem;
}
.organisation-panel, .settings-tools { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.organisation-panel { gap: 1.65rem; }
.brand-preview {
  background: #f3f6fc;
  border: 1px solid #e2e9f6;
  border-radius: 13px;
  padding: 1rem;
  min-width: 0;
}
.brand-preview h3 { display: flex; align-items: center; gap: .37rem; color: #344665; font-size: .875rem; letter-spacing: 0; }
.brand-preview-surface {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: .73rem 0 .65rem;
  padding: .77rem;
  background: #fff;
  border: 1px solid #e0e7f4;
  border-radius: .66rem;
}
.brand-preview-surface strong { font-weight: 690; }
.brand-preview-surface span { color: var(--muted); font-size: .8125rem; }
.checkbox-line { display: flex; align-items: center; gap: .55rem; width: fit-content; max-width: 100%; min-height: 36px; cursor: pointer; font-size: .925rem; }
.checkbox-line input { width: 1.12rem; height: 1.12rem; margin: 0; accent-color: var(--accent); flex: none; }
.settings-tools > *, .organisation-panel > * { min-width: 0; }
.settings-add { margin-bottom: .9rem; }
.settings-section > .settings-tools { margin-bottom: .9rem; }
.settings-details summary {
  min-height: 50px;
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  padding: .72rem 1rem;
  color: var(--ink);
  border-radius: 10px;
}
.settings-details summary::-webkit-details-marker { display: none; }
.settings-details summary:hover { background: #f7f9fd; }
.settings-details summary > .icon, .directory-summary-tail > .icon { color: var(--muted); }
.settings-details[open] > summary > .icon, .settings-details[open] > summary .directory-summary-tail > .icon { transform: rotate(180deg); }
.details-label { display: flex; align-items: center; gap: .56rem; min-width: 0; overflow-wrap: anywhere; font-size: .925rem; }
.details-label > span { display: grid; }
.details-label .icon { color: #3558b4; }
.details-label strong { font-weight: 650; }
.details-label small { color: var(--muted); font-size: .8125rem; }
.detail-form, .directory-forms { padding: .5rem 1rem 1rem; }
.inline-settings-form { max-width: 40rem; }
.directory-panel .panel-header { padding: .95rem 1rem; }
.directory-details { border-top: 1px solid #e7ecf4; }
.directory-details summary { border-radius: 0; }
.directory-details:last-child summary { border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px); }
.directory-details[open]:last-child summary { border-radius: 0; }
.directory-summary-tail { display: flex; align-items: center; gap: .55rem; color: var(--muted); min-width: 0; font-size: .8125rem; text-align: right; }
.directory-role { overflow-wrap: anywhere; }
.directory-empty { border-top: 1px solid #e7ecf4; padding: .85rem 1rem 1.05rem; color: var(--muted); }
.subtle-count { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.state-pill { flex: none; border-radius: .4rem; background: #eef1f7; color: #47566d; padding: .2rem .43rem; font-size: .8125rem; font-weight: 650; line-height: 1.25; }
.reset-form { padding-left: 1rem; border-left: 1px solid #e7ecf4; }
.permission-fields { border: 1px solid var(--border); border-radius: .65rem; padding: .45rem .85rem .55rem; margin: 0; min-width: 0; }
.permission-fields legend { padding: 0 .25rem; }
.permission-fields .checkbox-line { min-height: 34px; }
.role-form { display: grid; gap: 1rem; }
.role-delete { border-top: 1px solid #e7ecf4; padding-top: .8rem; }
.role-delete .notice { margin-bottom: .55rem; }
.csv-header {
  width: 100%;
  background: #f3f6fb;
  color: #304261;
  border-radius: .4rem;
  font-size: .83rem;
  padding: .39rem .5rem;
  overflow-wrap: anywhere;
}
.import-errors { margin: .35rem 0 0; padding-left: 1.2rem; }
.waiting-panel { border-color: #ecd8ac; background: #fffdf8; margin-bottom: 1.65rem; }
.waiting-panel h3 { margin-bottom: .24rem; }
.waiting-list { padding: 0; margin: .75rem 0 0; list-style: none; }
.waiting-list li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem; border-top: 1px solid #eee2c9; padding: .55rem 0; overflow-wrap: anywhere; }
.waiting-list li:last-child { padding-bottom: 0; }
.waiting-list li > div { display: grid; }
.waiting-list li > div > span { color: var(--muted); font-size: .86rem; }

.public-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  padding: 2rem 1.15rem;
  background: radial-gradient(ellipse at 50% 0%, #e6edfd 0%, transparent 52%), #f4f6fa;
}
.sign-in-layout { width: min(calc(100vw - 2.3rem), 428px); }
.sign-in-brand { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: 0 .4rem 1.2rem; }
.sign-in-brand strong { font-size: 1.08rem; font-weight: 685; line-height: 1.22; }
.sign-in-brand span { color: var(--muted); font-size: .875rem; }
.sign-in-panel {
  width: 100%;
  border-radius: 22px;
  border: 1px solid #dce5f3;
  background: #fff;
  box-shadow: 0 1px 2px #253a6509, 0 16px 56px #253a6513;
  padding: clamp(1.25rem, 6vw, 2.2rem);
}
.sign-in-panel h1 { font-size: 2rem; letter-spacing: -.045em; }
.sign-in-panel p { color: var(--muted); margin: .45rem 0 1.25rem; }
.sign-in-panel .form-stack p { margin: 0; }
.sign-in-panel .form-stack .field-error { color: #992e31; }
.sign-in-panel .button { margin-top: .28rem; }
.sign-in-panel .form-stack .button { width: 100%; }

@media (max-width: 1120px) {
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 930px) {
  .app-shell { grid-template-columns: 211px minmax(0, 1fr); }
  .workspace { padding-inline: 1.75rem; }
  .sidebar { padding-inline: .72rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .organisation-panel { gap: 1rem; }
  .metrics:not(.report-metrics) .metric { align-items: start; flex-direction: column; }
  .table-wrap { overflow: visible; }
  .data-table, .data-table tbody { display: block; }
  .data-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .data-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .78rem; padding: .78rem 1rem; }
  .data-table tbody tr + tr { border-top: 1px solid #e7ecf4; }
  .data-table tbody td, .data-table tbody td:first-child, .data-table tbody td:last-child { display: block; padding: 0; border: 0; }
  .data-table .table-request { grid-column: 1 / -1; }
  .data-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .8125rem; font-weight: 630; }
  .data-table .money-column { white-space: normal; }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    height: auto;
    overflow: visible;
    gap: .5rem .8rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: .85rem 1rem .7rem;
  }
  .sidebar-brand { grid-column: 1 / -1; padding: 0 .18rem .55rem; border-bottom: 1px solid #e5ebf5; }
  .sidebar-brand .brand { width: fit-content; }
  .brand-mark { width: 37px; height: 37px; }
  .workspace-nav { align-content: start; }
  .nav-link { min-height: 38px; }
  .sidebar-account { min-width: 0; border-left: 1px solid #e5ebf5; margin-top: 0; padding-top: 0; padding-left: .65rem; gap: .3rem; }
  .account-identity { padding: .16rem .3rem .08rem; gap: .4rem; }
  .account-avatar { flex-basis: 29px; height: 29px; font-size: .8rem; }
  .nav-link, .account-actions .nav-link { gap: .37rem; padding: .36rem .4rem; min-height: 34px; font-size: .875rem; }
  .nav-link .icon { width: 16px; height: 16px; }
  .settings-nav { padding-bottom: .32rem; }
  .workspace { padding: 1.7rem 1rem 2.5rem; }
  .page-heading { margin-bottom: 1.25rem; }
  .metrics { gap: .48rem; margin-bottom: .85rem; }
  .metric { padding: .65rem; gap: .42rem; border-radius: .72rem; }
  .metric-copy > strong { font-size: 1.26rem; }
  .metric-copy > span { font-size: .8125rem; }
  .metric-icon { flex-basis: 34px; flex-shrink: 0; width: 34px; height: 34px; border-radius: .54rem; }
  .report-metrics { margin-top: .85rem; }
  .panel-header { padding: .95rem 1rem; }
  .form-panel { padding: 1rem; }
  .organisation-panel, .settings-tools { grid-template-columns: 1fr; gap: .65rem; }
  .brand-preview { order: -1; }
  .brand-preview-surface .brand-mark, .sign-in-brand .brand-mark { width: 47px; height: 47px; }
  .reset-form { border-left: 0; border-top: 1px solid #e7ecf4; padding: .75rem 0 0; }
  .section-links { gap: .2rem; margin-bottom: 1.25rem; padding-bottom: .8rem; }
  .section-links a { padding: .35rem .48rem; }
}
@media (max-width: 385px) {
  .form-grid, .report-grid { grid-template-columns: 1fr; gap: .8rem; }
  .detail-list { gap: .75rem; }
  .directory-summary-tail { gap: .3rem; }
  .directory-details summary { padding-inline: .7rem; }
  .directory-summary-tail .state-pill { max-width: 5rem; white-space: normal; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .nav-link { transition: background-color .14s ease, color .14s ease; }
}
