@font-face { font-family: Barlow; src: url('../fonts/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url('../fonts/Barlow-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../fonts/BarlowCondensed-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root {
  --blue: #003e7e; --blue-dark: #003163; --teal: #007e82; --teal-bright: #26b2a6;
  --ink: #212529; --muted: #475569; --border: #cbcfd5; --subtle: #edf1f6;
  --canvas: #f8fafc; --error: #a62424; --focus: #4581be;
  color-scheme: light; font-family: Barlow, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; font-size: 16px; line-height: 1.5; background: white; }
a { color: #00767a; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, legend { color: var(--blue); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; }
h1 { font-size: 36px; line-height: 40px; margin: 0; overflow-wrap: anywhere; }
h2, legend { font-size: 28px; line-height: 32px; margin: 0; }
.app-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; gap: 20px; background: var(--blue); color: white; border-bottom: 4px solid var(--teal-bright); }
.organization { display: block; flex: 0 1 196px; }
.brand-logo { display: block; width: 196px; max-width: 100%; height: auto; }
.account, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.account { font-size: 14px; justify-content: flex-end; }
.header-button { background: transparent; color: white; border: 1px solid #91ddff; padding: 7px 12px; cursor: pointer; min-height: 36px; }
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.side-nav { background: var(--canvas); border-right: 1px solid var(--border); padding: 28px 16px; }
.nav-title { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--blue); padding: 0 12px 24px; }
.side-nav a { display: block; padding: 12px; margin-bottom: 4px; text-decoration: none; border-left: 4px solid transparent; color: var(--muted); }
.side-nav a[aria-current] { border-color: var(--teal); background: var(--subtle); color: var(--blue); font-weight: 700; }
.side-nav a:hover { background: var(--subtle); color: var(--blue); }
main { padding: 28px 32px 0; min-width: 0; }
.page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 3px solid var(--teal-bright); }
.page-heading h1 { flex: 1; min-width: 200px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.breadcrumbs > :not(:last-child)::after { content: '/'; display: inline-block; margin-left: 16px; color: var(--border); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 2px; font-weight: 700; font-size: 14px; line-height: 20px; text-decoration: none; cursor: pointer; text-align: center; }
.primary { color: white; background: var(--blue); }
.primary:hover { color: white; background: var(--blue-dark); }
.secondary { color: var(--blue); background: white; border-color: var(--blue); }
.secondary:hover { background: var(--subtle); }
.destructive { border-color: var(--error); color: var(--error); background: white; }
.confirm-dialog { width: min(30rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); margin: auto; padding: 24px; border: 1px solid var(--border); border-top: 4px solid var(--error); color: var(--ink); box-shadow: 0 16px 48px rgb(0 0 0 / 28%); }
.confirm-dialog::backdrop { background: rgb(15 23 42 / 55%); }
.confirm-dialog h2 { margin: 0 0 12px; }
.confirm-dialog p { margin: 0 0 24px; overflow-wrap: anywhere; }
.confirm-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.text-button { padding: 4px 8px; min-height: 36px; background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; }
.danger { color: var(--error); }
button:disabled { cursor: not-allowed; background: var(--subtle); color: var(--muted); border-color: var(--border); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 0 0 24px; }
.filters .field { flex: 1 1 160px; }
.filters .search-field { flex: 2 1 220px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: 14px; line-height: 18px; }
.required { color: var(--muted); font-weight: 400; }
input:not([type='checkbox']), select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 2px; background: white; color: var(--ink); }
input[readonly] { background: var(--subtle); }
textarea { resize: vertical; }
.alphabet { display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--border); padding: 16px 0; }
.alphabet a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 36px; font-size: 14px; padding: 4px; text-decoration: none; }
.alphabet [aria-current] { background: var(--blue); color: white; }
.results-heading, .section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.results-heading > span { font-size: 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
th { background: var(--subtle); color: var(--blue); font-weight: 700; white-space: nowrap; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
td { overflow-wrap: anywhere; max-width: 480px; }
tbody tr:hover { background: var(--canvas); }
.record-name { font-weight: 700; }
.secondary-line { display: block; margin-top: 4px; color: var(--muted); }
.status { display: inline-block; padding: 2px 8px; white-space: nowrap; font-size: 12px; }
.status.active { background: #b7f7c1; color: #0f172a; }
.status.inactive { background: var(--subtle); color: var(--muted); }
.empty { color: var(--muted); padding: 32px 12px; }
.notice { padding: 12px 16px; margin-bottom: 24px; border-left: 4px solid; }
.success { background: #e9f9ed; border-color: var(--teal); }
.error { background: #fff0e8; border-color: var(--error); color: var(--error); }
.field-error { color: var(--error); margin: 0; font-size: 14px; }
[aria-invalid='true'] { border-color: var(--error); }
.edit-form { max-width: 1100px; }
fieldset { padding: 0 0 28px; margin: 0 0 28px; border: 0; border-bottom: 1px solid var(--border); min-width: 0; }
legend { padding: 0 0 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.full-width { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 36px; padding: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; accent-color: var(--blue); }
.checkbox-group { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.muted { color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px 0; }
.related-section { padding-top: 32px; margin-top: 24px; border-top: 1px solid var(--border); }
.destructive-actions { padding-top: 32px; }
.login-form { max-width: 440px; display: grid; gap: 24px; }
.login-form > .button { justify-self: start; }
.signed-out { display: block; }
.signed-out main { max-width: 780px; margin: 48px auto 0; }
.directory-list { list-style: none; padding: 0; margin: 0; columns: 3; column-gap: 32px; }
.directory-list li { break-inside: avoid; border-bottom: 1px solid var(--border); padding: 12px 0; }
footer { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 64px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 10; background: white; padding: 12px; }
@media (max-width: 1100px) { .app-shell { grid-template-columns: 184px minmax(0, 1fr); } main { padding-inline: 24px; } .side-nav { padding-inline: 8px; } }
@media (max-width: 700px) {
  .app-header { padding: 16px; align-items: center; } .organization { flex-basis: 168px; }
  .app-shell { display: block; } .side-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav-title { display: none; } .side-nav a { padding: 8px; margin: 0; border-left: 0; border-bottom: 3px solid transparent; font-size: 14px; }
  main { padding: 24px 16px 0; } .form-grid, .role-grid { grid-template-columns: minmax(0, 1fr); }
  .page-heading h1 { min-width: 0; flex-basis: 100%; } .directory-list { columns: 1; }
  .signed-out main { margin-top: 12px; } footer { flex-direction: column; }
}