:root {
  color-scheme: light;
  --nav: #06243a;
  --nav-deep: #041b2d;
  --nav-text: #d9e5eb;
  --teal: #087f88;
  --teal-strong: #056d75;
  --teal-soft: #e6f4f3;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f7f9fa;
  --text: #102b3d;
  --muted: #627988;
  --border: #d9e2e6;
  --border-strong: #c7d3d8;
  --danger: #a53b46;
  --danger-soft: #fbecee;
  --success: #167354;
  --success-soft: #e9f6ef;
  --warning: #9a6a13;
  --warning-soft: #fff7df;
  --shadow: 0 12px 34px rgba(5, 33, 51, .11);
  --radius: 6px;
  --sidebar: 232px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --nav: #041b2d;
  --nav-deep: #031522;
  --nav-text: #e1ebef;
  --teal: #28a8aa;
  --teal-strong: #47b8b9;
  --teal-soft: #103e44;
  --bg: #091824;
  --surface: #102534;
  --surface-raised: #142b3b;
  --surface-muted: #0d202e;
  --text: #edf4f6;
  --muted: #9db0ba;
  --border: #294250;
  --border-strong: #3b5663;
  --danger: #f08d97;
  --danger-soft: #3a202a;
  --success: #74d4ad;
  --success-soft: #173a31;
  --warning: #f0ca76;
  --warning-soft: #3a321c;
  --shadow: 0 16px 38px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { flex: 0 0 auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(24px, 3vw, 31px); line-height: 1.18; letter-spacing: -.025em; margin-bottom: 8px; }
h2 { font-size: 17px; line-height: 1.3; margin-bottom: 7px; }
h3 { font-size: 16px; }
p { color: var(--muted); line-height: 1.55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 42%, transparent);
  outline-offset: 2px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.spin { animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); padding: 22px 14px 16px;
  display: flex; flex-direction: column; background: linear-gradient(180deg, var(--nav), var(--nav-deep));
  color: var(--nav-text); border-right: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 7px; }
.brand img { display: block; width: 118px; height: auto; filter: brightness(0) invert(1); }
.brand span { padding-left: 8px; border-left: 1px solid rgba(255,255,255,.3); font-size: 12px; color: #9fc0cc; }
.workspace-label { margin: 29px 8px 10px; color: #7fa3b1; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 3px; }
.sidebar nav button { border: 0; background: transparent; color: #b8cbd3; width: 100%; height: 42px; border-radius: 4px; padding: 0 11px; display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; }
.sidebar nav button:hover { background: rgba(255,255,255,.06); color: white; }
.sidebar nav button.active { background: rgba(48,169,171,.17); box-shadow: inset 3px 0 #28a8aa; color: white; }
.sidebar__foot { margin-top: auto; display: grid; gap: 15px; padding: 0 4px; }
.sidebar__foot > a { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 4px; color: #c9dae1; text-decoration: none; font-size: 12px; }
.sidebar__foot > a:hover { border-color: rgba(255,255,255,.3); color: white; }
.security-note { display: flex; gap: 9px; padding: 12px; border-radius: 4px; background: rgba(255,255,255,.04); color: #83cbc9; }
.security-note div { display: grid; gap: 3px; }
.security-note strong { color: #e2edef; font-size: 11px; }
.security-note span { color: #829eaa; font-size: 10px; line-height: 1.4; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 20; top: 0; height: 64px; padding: 0 26px; display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(15px); }
.organization-picker { min-width: 180px; max-width: 330px; height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid var(--border); background: var(--surface-muted); border-radius: 4px; }
.organization-picker select { min-width: 0; flex: 1; border: 0; appearance: none; color: var(--text); background: transparent; font-weight: 650; outline: 0; cursor: pointer; }
.role-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-strong); background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent); border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 700; }
.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.account { display: flex; align-items: center; gap: 8px; padding: 0 8px; color: var(--muted); font-size: 12px; }
.avatar { width: 31px; height: 31px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--teal-soft); color: var(--teal-strong); border: 1px solid color-mix(in srgb, var(--teal) 20%, var(--border)); font-size: 10px; font-weight: 750; }
.icon-button { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-button:hover { background: var(--surface-muted); color: var(--text); border-color: var(--border); }
.icon-button--danger:hover { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.icon-button:disabled { cursor: wait; opacity: .55; }
.mobile-menu { display: none; }

.page { width: min(1420px, 100%); margin: 0 auto; padding: 34px clamp(22px, 3.2vw, 46px) 64px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin: 0 0 27px; }
.page-header > div:first-child { max-width: 730px; }
.page-header p:not(.eyebrow) { margin-bottom: 0; font-size: 14px; }
.page-header__action { flex: 0 0 auto; }
.eyebrow { margin-bottom: 7px; color: var(--teal-strong); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.button { min-height: 38px; padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; font-size: 12px; cursor: pointer; }
.button:hover { border-color: color-mix(in srgb, var(--teal) 45%, var(--border)); }
.button--primary { background: var(--teal); border-color: var(--teal); color: white; }
.button--primary:hover { background: var(--teal-strong); border-color: var(--teal-strong); }
.button--ghost { border-color: transparent; background: transparent; color: var(--teal-strong); }
.button--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); background: var(--danger-soft); }
.button:disabled { opacity: .48; cursor: not-allowed; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.metric-card, .panel, .team-card, .resource-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.metric-card { position: relative; min-height: 154px; padding: 19px; overflow: hidden; }
.metric-card__icon { position: absolute; top: 16px; right: 16px; width: 35px; height: 35px; display: grid; place-items: center; color: var(--teal-strong); background: var(--teal-soft); border-radius: 4px; }
.metric-card__icon svg { width: 18px; }
.metric-card > span { display: block; padding-right: 42px; color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card > strong { display: block; margin: 22px 0 7px; font-size: 26px; letter-spacing: -.03em; }
.metric-card > strong small { color: var(--muted); font-size: 14px; font-weight: 550; }
.metric-card p { margin: 5px 0 0; font-size: 10px; }
progress { width: 100%; height: 5px; display: block; border: 0; border-radius: 10px; overflow: hidden; accent-color: var(--teal); background: var(--surface-muted); }
progress::-webkit-progress-bar { background: var(--surface-muted); }
progress::-webkit-progress-value { background: var(--teal); }
progress::-moz-progress-bar { background: var(--teal); }
.content-grid { display: grid; gap: 17px; }
.content-grid--overview { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); }
.panel { padding: 20px; }
.panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel__header > svg { color: var(--muted); }
.panel__intro { max-width: 680px; font-size: 12px; }
.allowance-list { margin: 18px 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.allowance-row { min-height: 87px; padding: 13px; display: grid; grid-template-columns: auto 1fr; gap: 7px 9px; align-items: center; border-right: 1px solid var(--border); }
.allowance-row:last-child { border-right: 0; }
.allowance-row__icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 3px; color: var(--teal-strong); background: var(--teal-soft); }
.allowance-row__icon svg { width: 15px; }
.allowance-row > span:nth-child(2) { font-size: 11px; font-weight: 700; }
.allowance-row .status { grid-column: 2; justify-self: start; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; color: var(--muted); border: 1px solid var(--border); background: var(--surface-muted); border-radius: 999px; text-transform: capitalize; white-space: nowrap; font-size: 9px; font-weight: 750; }
.status > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--active, .status--enabled { color: var(--success); background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.status--pending, .status--provisioning { color: var(--warning); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 20%, transparent); }
.status--suspended, .status--revoked, .status--expired, .status--not-enabled { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.rule-box { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 22%, transparent); border-radius: 4px; color: var(--teal-strong); }
.rule-box p { margin: 0; color: var(--muted); font-size: 11px; }
.rule-box p strong { display: block; margin-bottom: 2px; color: var(--text); }
.overview-list { margin-top: 14px; display: grid; }
.overview-list > div { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--border); }
.overview-list span { color: var(--muted); font-size: 12px; }
.overview-list strong { font-size: 16px; }

.notice { margin-bottom: 18px; min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid; border-radius: 4px; }
.notice span { flex: 1; font-size: 12px; }
.notice button { border: 0; background: transparent; color: currentColor; display: flex; align-items: center; gap: 6px; font-weight: 750; cursor: pointer; }
.notice--error { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.notice--success { color: var(--success); background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.table-panel { padding: 0; overflow: hidden; }
.table-tools { min-height: 62px; padding: 12px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.table-tools > span { color: var(--muted); font-size: 11px; }
.standalone-tools { margin-bottom: 14px; padding: 0; border: 0; }
.search-field { width: min(330px, 100%); height: 36px; padding: 0 10px; display: flex; align-items: center; gap: 8px; color: var(--muted); background: var(--surface-muted); border: 1px solid var(--border); border-radius: 4px; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: var(--surface-muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
td { font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--teal-soft) 25%, transparent); }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell > div, .person-cell > span:last-child { display: grid; gap: 2px; }
.person-cell strong { font-size: 11px; }
.person-cell span:not(.avatar), .person-cell small { color: var(--muted); font-size: 10px; }
.table-select { max-width: 160px; padding: 6px 27px 6px 8px; border: 1px solid transparent; background: transparent; color: var(--text); border-radius: 3px; font-size: 11px; }
.table-select:hover { border-color: var(--border); }
.row-actions { text-align: right; }
.row-actions .icon-button { width: 31px; height: 31px; }
.compact-list { display: grid; }
.compact-list > div { min-height: 58px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); }

.empty-state { min-height: 280px; padding: 42px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state__icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 15px; color: var(--teal-strong); background: var(--teal-soft); border-radius: 50%; }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { max-width: 440px; margin-bottom: 17px; font-size: 12px; }
.page-loading { min-height: 280px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.team-card { padding: 18px; }
.team-card__top { display: flex; align-items: center; justify-content: space-between; }
.team-icon, .resource-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; color: var(--teal-strong); background: var(--teal-soft); }
.team-icon svg, .resource-icon svg { width: 19px; }
.team-card h2 { margin-top: 18px; }
.team-card > p { min-height: 36px; margin-bottom: 14px; font-size: 11px; }
.avatar-stack { min-height: 31px; display: flex; padding-left: 7px; }
.avatar-stack .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.team-card footer { margin-top: 18px; padding-top: 12px; display: flex; justify-content: space-between; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.team-card footer button { border: 0; background: transparent; color: var(--teal-strong); cursor: pointer; font-weight: 750; }

.policy-banner { margin-bottom: 17px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 11px; color: var(--teal-strong); background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 22%, transparent); border-radius: 4px; }
.policy-banner strong { color: var(--text); font-size: 12px; }
.policy-banner p { margin: 3px 0 0; font-size: 11px; }
.resource-list { display: grid; gap: 13px; }
.resource-card { overflow: hidden; }
.resource-card__head { min-height: 78px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.resource-card__head > div { min-width: 0; flex: 1; }
.resource-card__head h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.resource-card__head p { margin: 3px 0 0; font-size: 10px; }
.visibility-control { display: grid; gap: 4px; flex: 0 0 230px; }
.visibility-control > span { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.visibility-control select { height: 34px; padding: 0 9px; border: 1px solid var(--border); background: var(--surface-muted); color: var(--text); border-radius: 4px; }
.allowance-chips { padding: 9px 18px; display: flex; gap: 7px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.allowance-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 3px; font-size: 9px; font-weight: 750; }
.allowance-chips .allowed { color: var(--success); background: var(--success-soft); }
.allowance-chips .blocked { color: var(--muted); text-decoration: line-through; opacity: .75; }
.grant-section { padding: 14px 18px 17px; }
.grant-section > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 10px; }
.grant-section > div:first-child span, .muted, .helper { color: var(--muted); }
.grant-section > .muted { margin: 9px 0; font-size: 10px; }
.grant-section .button { margin-top: 7px; }
.helper { display: block; margin-top: 4px; font-size: 9px; }
.grant-list { display: grid; }
.grant-row { min-height: 50px; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--border); }
.grant-row > div { display: grid; gap: 2px; flex: 1; }
.grant-row strong { font-size: 10px; }
.grant-row span { color: var(--muted); font-size: 9px; }

.drawer-layer { position: fixed; z-index: 100; inset: 0; background: rgba(1, 13, 22, .58); display: flex; justify-content: flex-end; animation: fade-in .15s ease-out; }
.drawer { width: min(480px, 100%); height: 100%; overflow-y: auto; background: var(--surface); box-shadow: -20px 0 50px rgba(0,0,0,.22); animation: drawer-in .2s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(24px); } }
.drawer__header { min-height: 130px; padding: 25px 26px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.drawer__header h2 { font-size: 22px; }
.drawer__header p:last-child { margin: 0; font-size: 11px; }
.drawer__body { padding: 23px 26px 34px; }
.form-stack { display: grid; gap: 18px; }
.form-stack > label, .success-card > label { display: grid; gap: 7px; color: var(--text); font-size: 11px; font-weight: 700; }
.label-note { color: var(--muted); font-weight: 450; }
input, select, textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface-muted); color: var(--text); }
input, select { height: 40px; padding: 0 11px; }
textarea { resize: vertical; padding: 10px 11px; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 65%, transparent); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 9px; font-size: 11px; font-weight: 750; }
.role-explainer { display: flex; align-items: flex-start; gap: 10px; padding: 13px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 4px; color: var(--teal-strong); }
.role-explainer p { margin: 0; display: grid; gap: 3px; }
.role-explainer strong { color: var(--text); font-size: 11px; }
.role-explainer span { font-size: 10px; }
.form-error { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: 4px; font-size: 11px; }
.form-actions { padding-top: 17px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }
.form-actions--split { justify-content: space-between; }
.form-actions--split > span { display: flex; gap: 8px; }
.check-list, .permission-list { display: grid; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.check-list > label, .permission-list > label { min-height: 54px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.check-list > label:last-child, .permission-list > label:last-child { border-bottom: 0; }
.check-list input, .permission-list input { width: 17px; height: 17px; accent-color: var(--teal); }
.permission-list > label > span { display: flex; align-items: center; gap: 10px; color: var(--teal-strong); }
.permission-list > label > span > span { display: grid; gap: 2px; }
.permission-list strong { color: var(--text); font-size: 10px; }
.permission-list small { color: var(--muted); font-size: 9px; }
.permission-list label.disabled { cursor: not-allowed; opacity: .6; }
.success-card { padding: 21px; display: grid; gap: 10px; color: var(--success); background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 25%, transparent); border-radius: 4px; }
.success-card h3, .success-card p { margin: 0; }
.success-card p { font-size: 11px; }
.success-card label { margin-top: 7px; color: var(--text); }
.success-card input { font-size: 10px; }
.success-card .button { justify-self: start; margin-top: 6px; }

.activity-panel { padding: 0 20px; }
.timeline { display: grid; }
.timeline__item { min-height: 69px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.timeline__item:last-child { border: 0; }
.timeline__dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-strong); background: var(--teal-soft); }
.timeline__item > div { display: grid; gap: 3px; }
.timeline__item strong { font-size: 11px; }
.timeline__item p { margin: 0; font-size: 9px; text-transform: capitalize; }
.timeline__item time { color: var(--muted); font-size: 9px; }

.toast { position: fixed; z-index: 200; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); min-height: 44px; padding: 11px 14px; display: flex; align-items: center; gap: 9px; color: white; background: #123748; border: 1px solid rgba(255,255,255,.16); border-radius: 4px; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.center-screen, .accept-page { min-height: 100vh; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 50% 20%, var(--teal-soft), var(--bg) 48%); }
.center-screen > svg { color: var(--teal-strong); }
.center-screen h1 { margin-top: 15px; font-size: 24px; }
.center-screen p { max-width: 430px; }
.signed-out > img { width: 145px; margin-bottom: 35px; filter: var(--logo-filter, none); }
:root[data-theme="dark"] .signed-out > img, :root[data-theme="dark"] .accept-card > img { filter: brightness(0) invert(1); }
.accept-page { position: relative; }
.theme-corner { position: absolute; top: 20px; right: 20px; }
.accept-card { width: min(440px, 100%); padding: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); text-align: center; }
.accept-card > img { width: 150px; margin-bottom: 30px; }
.accept-icon { width: 48px; height: 48px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-strong); background: var(--teal-soft); }
.accept-card > p:not(.eyebrow) { display: flex; align-items: center; justify-content: center; gap: 7px; }
.accept-card .button { margin-top: 8px; }
.mobile-scrim { display: none; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --sidebar: 238px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 15px 0 40px rgba(0,0,0,.3); }
  .sidebar--open { transform: translateX(0); }
  .mobile-scrim { position: fixed; z-index: 25; inset: 0; display: block; border: 0; background: rgba(0, 12, 20, .52); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .account > span:last-child, .role-pill { display: none; }
  .topbar { padding: 0 14px; }
  .organization-picker { min-width: 0; flex: 1; }
  .page { padding: 27px 18px 54px; }
  .content-grid--overview { grid-template-columns: 1fr; }
  .allowance-list { grid-template-columns: 1fr; }
  .allowance-row { min-height: 63px; border-right: 0; border-bottom: 1px solid var(--border); }
  .allowance-row:last-child { border-bottom: 0; }
}

@media (max-width: 620px) {
  h1 { font-size: 24px; }
  .page-header { align-items: stretch; flex-direction: column; gap: 16px; }
  .page-header__action .button { width: 100%; }
  .metric-grid, .card-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 140px; }
  .topbar__actions { gap: 2px; }
  .account { padding: 0; }
  .topbar__actions > .icon-button:last-child { display: none; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .resource-card__head { align-items: flex-start; flex-wrap: wrap; }
  .visibility-control { flex-basis: 100%; }
  .allowance-chips { flex-wrap: wrap; }
  .drawer__header, .drawer__body { padding-left: 20px; padding-right: 20px; }
  .drawer__header { min-height: 118px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .form-actions--split > span { display: grid; }
  .form-actions--split > span:last-child { width: 100%; }
  .notice { align-items: flex-start; flex-wrap: wrap; }
  .timeline__item { grid-template-columns: auto 1fr; padding: 10px 0; }
  .timeline__item time { grid-column: 2; }
  .accept-card { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
