:root {
  --navy: #0b1f3a;
  --navy-2: #14305a;
  --blue: #1d4f91;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5a6677;
  --border: #d5dbe4;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-top: 1.5rem; padding-bottom: 2.5rem; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #f2b705;
  outline-offset: 2px;
}
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }

.env-banner {
  text-align: center;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .6rem 1rem;
  font-size: .95rem;
}
.site-header { background: var(--navy); color: #fff; border-bottom: 4px solid var(--blue); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 2px solid #fff; font-weight: 800; font-size: .85rem; letter-spacing: .05em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-agency { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.brand-app { font-size: 1.2rem; font-weight: 700; }
.site-header nav a { color: #fff; text-decoration: none; padding: .4rem .8rem; border-radius: 4px; }
.site-header nav a:hover { background: var(--navy-2); }

h1 { font-size: 1.7rem; margin: 0 0 1rem; color: var(--navy); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(11, 31, 58, .06); }

.filters { display: flex; flex-wrap: wrap; gap: 1rem; padding: 1rem; margin-bottom: 1rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 12rem; }
.field--grow { flex: 1 1 16rem; }
.field--actions { flex-direction: row; gap: .5rem; min-width: 0; }
label { font-size: .85rem; font-weight: 600; color: var(--muted); }
input[type="search"], select {
  font: inherit; padding: .5rem .6rem; border: 1px solid #aab4c3; border-radius: 6px; background: #fff; color: var(--text); width: 100%;
}
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 6px; padding: .5rem 1rem;
}
.btn:hover { background: var(--navy-2); }
.btn--secondary { background: #fff; color: var(--blue); }
.btn--secondary:hover { background: #e8eef7; }
.btn--disabled { background: #e9edf2; color: #8a94a3; border-color: var(--border); cursor: not-allowed; }

.result-count { color: var(--muted); margin: .5rem 0; font-size: .92rem; }
.table-wrap { overflow-x: auto; }
table.directory { width: 100%; border-collapse: collapse; }
.directory th { text-align: left; background: #e8edf4; color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: .7rem .9rem; }
.directory td { padding: .7rem .9rem; border-top: 1px solid var(--border); vertical-align: middle; }
.directory tbody tr:hover { background: #f7f9fc; }
.person { display: flex; align-items: center; gap: .7rem; font-weight: 600; text-decoration: none; }
.person:hover span:last-child { text-decoration: underline; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; color: #fff; font-weight: 700; font-size: .9rem; letter-spacing: .03em;
}
.avatar--lg { width: 5rem; height: 5rem; font-size: 1.8rem; }
.avatar--0 { background: #1d4f91; }
.avatar--1 { background: #2e6f4e; }
.avatar--2 { background: #7a3e8e; }
.avatar--3 { background: #a4511c; }
.avatar--4 { background: #136f7a; }
.avatar--5 { background: #8a2a3b; }
.avatar--6 { background: #4a5a8a; }
.avatar--7 { background: #5f6b2a; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }
.page-status { color: var(--muted); font-weight: 600; }

.breadcrumb { margin: 0 0 1rem; }
.profile { padding: 1.5rem; }
.profile-head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.profile-head h1 { margin: 0; }
.profile-title { margin: .1rem 0 0; font-weight: 600; }
.profile-dept { margin: 0; color: var(--muted); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.details dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.details dd { margin: .1rem 0 0; overflow-wrap: anywhere; }

.message { padding: 2.5rem 1.5rem; text-align: center; }
.message-code { font-size: 3.5rem; font-weight: 800; color: var(--blue); margin: 0; line-height: 1; }

.site-footer { background: var(--navy); color: #c8d2e0; font-size: .85rem; padding: 1rem 0; text-align: center; }

@media (max-width: 760px) {
  .brand-agency { display: none; }
  .field { min-width: 100%; }
  .field--actions { width: 100%; }
  .field--actions .btn { flex: 1; }
  .table-wrap { border: 0; box-shadow: none; background: transparent; }
  table.directory, .directory tbody, .directory tr, .directory td { display: block; width: 100%; }
  .directory thead { position: absolute; left: -9999px; }
  .directory tr { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .8rem; padding: .4rem 0; }
  .directory td { border: 0; padding: .35rem .9rem; overflow-wrap: anywhere; }
  .directory td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
  .profile-head { flex-direction: column; text-align: center; }
}
