@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;350;400;450;500;600;700&display=swap");

:root {
  --bg: #f5f9ff;
  --panel: rgba(255, 255, 255, 0.94);
  --line: #cfd9ee;
  --text: #0b1d3a;
  --muted: #33476d;
  --accent: #1e4edb;
  --accent-soft: #e6f0ff;
  --permit: #c96a2b;
  --dentist: #1b75bb;
  --shadow: 0 22px 54px rgba(11, 29, 58, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(167, 196, 247, 0.28), transparent 28%),
    radial-gradient(circle at bottom right, rgba(230, 240, 255, 0.74), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: var(--text);
}

.auth-page,
.admin-page {
  min-height: 100vh;
}

.landing-page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
}

#landingScene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(29, 90, 87, 0.16), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(182, 134, 87, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f2e8 0%, #eee5d7 100%);
}

.landing-scene-glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.65;
}

.landing-scene-glow-left {
  top: 110px;
  left: 4%;
  width: min(32vw, 380px);
  height: min(32vw, 380px);
  background: radial-gradient(circle, rgba(44, 113, 109, 0.24) 0%, rgba(44, 113, 109, 0.08) 45%, transparent 72%);
}

.landing-scene-glow-right {
  top: 84px;
  right: 7%;
  width: min(24vw, 300px);
  height: min(24vw, 300px);
  background: radial-gradient(circle, rgba(206, 161, 102, 0.28) 0%, rgba(206, 161, 102, 0.09) 42%, transparent 70%);
}

.landing-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(252, 249, 243, 0.68);
  border: 1px solid rgba(117, 109, 91, 0.14);
  box-shadow: 0 18px 42px rgba(26, 34, 33, 0.08);
  backdrop-filter: blur(14px);
}

.landing-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.landing-brand strong {
  font-size: 16px;
}

.landing-menu {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.landing-menu a,
.landing-footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 430px;
  gap: 28px;
  align-items: center;
  min-height: 72vh;
  padding-top: 24px;
  position: relative;
}

.landing-copy h1 {
  margin: 0;
  max-width: 820px;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(50px, 6.6vw, 82px);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.landing-copy .subtitle {
  max-width: 700px;
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.6;
}

.landing-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(251, 248, 241, 0.72);
  border: 1px solid rgba(117, 109, 91, 0.14);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(26, 34, 33, 0.08);
  backdrop-filter: blur(10px);
}

.landing-card {
  padding: 26px;
  border-radius: 26px;
  background: rgba(252, 249, 243, 0.78);
  border: 1px solid rgba(117, 109, 91, 0.16);
  box-shadow: 0 26px 60px rgba(25, 31, 30, 0.14);
  backdrop-filter: blur(16px);
}

.landing-card h2 {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.05;
}

.landing-form {
  margin-top: 18px;
}

.landing-visual-card {
  margin: 26px 0 0;
  padding: 14px;
  border-radius: 28px;
  background: rgba(252, 249, 243, 0.76);
  border: 1px solid rgba(117, 109, 91, 0.14);
  box-shadow: 0 24px 56px rgba(25, 31, 30, 0.12);
  backdrop-filter: blur(16px);
}

.landing-visual-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 4px 4px 12px;
}

.landing-visual-kicker,
.landing-visual-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-visual-kicker {
  color: var(--accent);
  background: rgba(217, 236, 233, 0.88);
}

.landing-visual-badge {
  color: #786950;
  background: rgba(240, 233, 219, 0.95);
}

.landing-visual-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1082 / 352;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
  border: 1px solid rgba(117, 109, 91, 0.14);
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.landing-panel {
  padding: 22px;
  border-radius: 22px;
  background: rgba(251, 248, 241, 0.68);
  border: 1px solid rgba(117, 109, 91, 0.14);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 42px rgba(26, 34, 33, 0.08);
}

.landing-panel h3 {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.landing-section-head {
  margin-top: 34px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.landing-section-head h2,
.article-list-hero h1,
.article-main h1,
.article-card-large h2 {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.landing-section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.landing-insights {
  margin-top: 36px;
}

.landing-articles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.article-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(251, 248, 241, 0.72);
  border: 1px solid rgba(117, 109, 91, 0.14);
  box-shadow: 0 18px 42px rgba(26, 34, 33, 0.08);
  backdrop-filter: blur(12px);
}

.article-card h3,
.article-card h2 {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.08;
}

.article-card h3 a,
.article-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.article-link,
.related-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.landing-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.landing-footer {
  margin-top: 28px;
  padding: 22px 0 10px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.footer-column {
  min-width: 0;
}

.landing-footer-copy {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.landing-footer-links {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.footer-column:last-child {
  min-width: 220px;
}

.landing-page {
  --clx-navy: #0b1d3a;
  --clx-blue: #1e4edb;
  --clx-blue-soft: #a7c4f7;
  --clx-blue-pale: #e6f0ff;
  --clx-ink: #06183a;
  --clx-muted: #33476d;
  background:
    radial-gradient(circle at 0% 24%, rgba(167, 196, 247, 0.32), transparent 26%),
    radial-gradient(circle at 100% 16%, rgba(230, 240, 255, 0.72), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 46%, #ffffff 100%);
  color: var(--clx-ink);
}

.landing-page::before,
.landing-page::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border: 1px solid rgba(30, 78, 219, 0.1);
  border-radius: 999px;
}

.landing-page::before {
  width: 520px;
  height: 520px;
  left: -310px;
  top: 170px;
  box-shadow:
    0 0 0 34px rgba(30, 78, 219, 0.025),
    0 0 0 70px rgba(30, 78, 219, 0.02),
    0 0 0 112px rgba(30, 78, 219, 0.018);
}

.landing-page::after {
  width: 460px;
  height: 460px;
  right: -300px;
  bottom: -160px;
  box-shadow:
    0 0 0 32px rgba(30, 78, 219, 0.025),
    0 0 0 76px rgba(30, 78, 219, 0.018);
}

.landing-shell {
  width: min(1220px, calc(100% - 44px));
  padding: 0 0 0;
}

.landing-nav {
  position: relative;
  min-height: 98px;
  padding: 18px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing-nav::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  border-bottom: 1px solid rgba(11, 29, 58, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.landing-brand {
  align-items: center;
}

.landing-brand img {
  width: min(258px, 54vw);
  height: auto;
  display: block;
}

.landing-menu {
  gap: 34px;
  align-items: center;
  flex-wrap: nowrap;
}

.landing-menu a,
.landing-footer-links a {
  color: var(--clx-navy);
  font-weight: 800;
  white-space: nowrap;
}

.landing-menu a:last-child {
  color: var(--clx-blue);
}

.landing-page .ghost-button {
  min-height: 48px;
  padding: 0 20px;
  border-color: rgba(30, 78, 219, 0.24);
  border-radius: 8px;
  color: var(--clx-blue);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.76);
}

.landing-hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 438px);
  gap: 78px;
  min-height: 0;
  align-items: start;
  padding: 66px 0 34px;
}

.landing-copy h1 {
  max-width: 720px;
  color: var(--clx-navy);
  font-size: clamp(50px, 6.2vw, 78px);
  line-height: 1.03;
  letter-spacing: 0;
}

.landing-copy h1 span {
  display: block;
  color: var(--clx-blue);
}

.landing-copy .subtitle {
  max-width: 650px;
  color: var(--clx-muted);
  font-size: 19px;
  line-height: 1.75;
}

.landing-pills {
  max-width: 650px;
  gap: 12px 14px;
}

.landing-pill {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid rgba(30, 78, 219, 0.28);
  background: rgba(255, 255, 255, 0.86);
  color: var(--clx-blue);
  box-shadow: none;
}

.landing-card,
.landing-visual-card,
.landing-panel,
.article-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 29, 58, 0.12);
  box-shadow: 0 24px 60px rgba(11, 29, 58, 0.1);
}

.landing-card {
  margin-top: 6px;
  padding: 42px;
  border-radius: 22px;
}

.landing-card h2 {
  color: var(--clx-navy);
  font-size: 34px;
  letter-spacing: 0;
}

.landing-card .hint {
  color: var(--clx-muted);
}

.landing-page .eyebrow {
  color: var(--clx-blue);
}

.landing-form label {
  color: var(--clx-navy);
  font-weight: 800;
}

.landing-form input {
  min-height: 48px;
  border-color: rgba(11, 29, 58, 0.18);
  border-radius: 8px;
  background: #fff;
}

.landing-form button {
  min-height: 52px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1f62f2 0%, #144ac9 100%);
  box-shadow: 0 12px 24px rgba(30, 78, 219, 0.22);
}

.landing-security-note {
  margin: 18px 0 0;
  color: #637493;
  font-size: 13px;
  text-align: center;
}

.landing-visual-card {
  margin: 0 0 36px;
  padding: 22px;
  border-radius: 18px;
}

.landing-visual-meta {
  padding: 0 6px 18px;
}

.landing-visual-kicker,
.landing-visual-badge {
  padding: 0;
  min-height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--clx-blue);
  letter-spacing: 0.16em;
}

.landing-visual-badge {
  color: #4b5f83;
}

.landing-visual-card img {
  aspect-ratio: 1082 / 352;
  border-radius: 10px;
  border-color: rgba(11, 29, 58, 0.12);
}

.landing-grid {
  gap: 28px;
  margin-top: 34px;
}

.landing-panel {
  min-height: 260px;
  padding: 34px;
  border-radius: 16px;
}

.landing-panel-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border-radius: 999px;
  background: var(--clx-blue-pale);
  color: var(--clx-blue);
  position: relative;
}

.landing-panel-icon::before,
.landing-panel-icon::after {
  content: "";
  position: absolute;
}

.landing-panel-icon-target::before {
  width: 24px;
  height: 24px;
  border: 3px solid currentColor;
  border-radius: 999px;
}

.landing-panel-icon-target::after {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 -17px 0 -2px currentColor,
    0 17px 0 -2px currentColor,
    -17px 0 0 -2px currentColor,
    17px 0 0 -2px currentColor;
}

.landing-panel-icon-building::before {
  width: 22px;
  height: 28px;
  border: 3px solid currentColor;
  border-radius: 4px;
}

.landing-panel-icon-building::after {
  width: 4px;
  height: 4px;
  background: currentColor;
  box-shadow:
    8px 0 0 currentColor,
    0 8px 0 currentColor,
    8px 8px 0 currentColor,
    0 16px 0 currentColor,
    8px 16px 0 currentColor;
}

.landing-panel-icon-chart::before {
  left: 19px;
  bottom: 17px;
  width: 5px;
  height: 12px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
  box-shadow:
    9px -7px 0 currentColor,
    18px -15px 0 currentColor;
}

.landing-panel-icon-chart::after {
  left: 17px;
  right: 17px;
  bottom: 14px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.landing-panel h3 {
  color: var(--clx-navy);
  font-size: 26px;
  letter-spacing: 0;
}

.landing-panel p:last-child,
.article-card p,
.landing-footer-copy {
  color: var(--clx-muted);
}

.landing-section-head {
  margin-top: 58px;
}

.landing-section-head h2 {
  max-width: 620px;
  color: var(--clx-navy);
  letter-spacing: 0;
}

.landing-insights {
  margin-top: 20px;
}

.landing-articles {
  gap: 22px;
  margin-top: 20px;
}

.article-card {
  border-radius: 14px;
}

.article-card h3,
.article-card h2 {
  color: var(--clx-navy);
  font-size: 25px;
  letter-spacing: 0;
}

.article-card h3 a,
.article-card h2 a {
  color: var(--clx-navy);
}

.article-link,
.related-link {
  color: var(--clx-blue);
}

.landing-footer {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 60px;
  padding: 50px max(24px, calc((100vw - 1220px) / 2)) 42px;
  display: grid;
  grid-template-columns: 1.15fr 0.62fr 0.9fr;
  background:
    radial-gradient(circle at 0% 50%, rgba(30, 78, 219, 0.18), transparent 24%),
    radial-gradient(circle at 100% 40%, rgba(167, 196, 247, 0.12), transparent 22%),
    linear-gradient(135deg, #08224c 0%, #03172f 100%);
  color: #fff;
}

.landing-footer-logo {
  width: 220px;
  display: block;
  margin-bottom: 16px;
}

.landing-footer .eyebrow,
.landing-footer-links a,
.landing-footer-copy {
  color: rgba(255, 255, 255, 0.86);
}

.footer-cta {
  display: inline-flex;
  margin-top: 18px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--clx-blue);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.article-list-hero {
  max-width: 980px;
  padding: 72px 0 14px;
}

.article-list-hero h1 {
  max-width: 900px;
  font-size: clamp(42px, 5vw, 64px);
  color: var(--clx-navy);
  letter-spacing: 0;
}

.article-list-hero .subtitle {
  max-width: 760px;
  color: var(--clx-muted);
  font-size: 19px;
}

.article-list-grid {
  margin-top: 34px;
}

.article-card-large h2 {
  font-size: 30px;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
  margin-top: 56px;
}

.article-main,
.article-side-card {
  border: 1px solid rgba(11, 29, 58, 0.12);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(11, 29, 58, 0.1);
  backdrop-filter: blur(12px);
}

.article-main {
  padding: 54px;
  border-radius: 18px;
}

.article-side-card {
  padding: 28px;
  border-radius: 16px;
}

.article-main h1 {
  font-size: clamp(42px, 5vw, 64px);
  max-width: 860px;
  color: var(--clx-navy);
  letter-spacing: 0;
  line-height: 1.04;
}

.article-standfirst {
  margin: 18px 0 22px;
  font-size: 21px;
  line-height: 1.6;
  color: var(--clx-muted);
}

.article-main p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--clx-muted);
}

.article-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 24px;
}

.article-side-card p {
  color: var(--clx-muted);
  line-height: 1.65;
}

.related-link {
  display: block;
  margin-top: 12px;
}

.landing-menu a:hover,
.landing-footer-links a:hover,
.article-link:hover,
.related-link:hover,
.article-card h3 a:hover,
.article-card h2 a:hover {
  opacity: 0.78;
}

.auth-shell,
.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 28px;
  align-items: center;
}

.auth-hero,
.auth-card,
.admin-header,
.admin-grid,
.table-wrap {
  width: 100%;
}

.auth-card,
.admin-header,
.admin-table,
.session-strip {
  background: var(--panel);
  border: 1px solid rgba(11, 29, 58, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 24px;
}

.auth-form,
.admin-form {
  display: grid;
  gap: 14px;
}

.admin-shell {
  display: grid;
  gap: 22px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

.admin-brand-logo {
  display: block;
  width: min(184px, 54vw);
  height: auto;
  margin: 0 0 10px;
}

.admin-header .subtitle,
.landing-card .hint {
  max-width: 760px;
}

.admin-title-block {
  display: grid;
  grid-template-columns: minmax(140px, 184px) minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 6px;
  align-items: center;
  min-width: 0;
}

.admin-title-block .admin-brand-logo {
  grid-row: 1 / span 3;
}

.admin-title-block .eyebrow {
  margin: 0;
}

.admin-header h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.05;
}

.admin-title-block .subtitle {
  margin: 0;
}

.admin-title-block .admin-nav {
  grid-column: 1 / -1;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.admin-grid-detail {
  align-items: start;
}

.table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(11, 29, 58, 0.1);
  font-size: 14px;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-table tr.is-selected td {
  background: rgba(30, 78, 219, 0.06);
}

.admin-table tr.clickable-row {
  cursor: pointer;
}

.admin-table tr.clickable-row:hover td,
.admin-table tr.clickable-row:focus td {
  background: rgba(30, 78, 219, 0.08);
}

.user-row-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.user-row-link:hover {
  color: var(--accent);
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.flash {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}

.flash.success {
  background: rgba(77, 165, 120, 0.14);
  color: #23593f;
}

.flash.error {
  background: rgba(191, 93, 94, 0.12);
  color: #7c3030;
}

.session-strip {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.session-strip strong,
.session-strip span {
  display: block;
}

.session-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.session-strip .eyebrow {
  margin-bottom: 6px;
}

.session-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.session-actions .ghost-button {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(11, 29, 58, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.session-actions .nav-link {
  color: var(--accent);
}

.user-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-status-badge.active {
  background: rgba(30, 78, 219, 0.1);
  color: #1541b7;
}

.user-status-badge.inactive {
  background: rgba(191, 93, 94, 0.12);
  color: #7c3030;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 390px 1fr 340px;
  min-height: 100vh;
}

.sidebar {
  padding: 24px;
  border-right: 1px solid rgba(11, 29, 58, 0.12);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

.brand h1,
.map-header h2,
.card h2 {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.brand h1,
.map-header h2,
.admin-header h1,
.detail-shell h2,
.coverage-detail-header h2,
.coverage-detail-empty h2 {
  color: var(--text);
  font-weight: 900;
}

.app-brand-logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin-bottom: 18px;
}

.map-brand-logo {
  display: block;
  width: min(230px, 42vw);
  height: auto;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.subtitle,
.hint,
.map-footer p,
.header-subtitle {
  color: var(--muted);
  line-height: 1.45;
}

.hint strong {
  color: var(--accent);
}

.card,
.stat-card {
  background: var(--panel);
  border: 1px solid rgba(11, 29, 58, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
  margin-top: 18px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
select,
button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font: inherit;
}

input,
select {
  background: #fff;
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #1f62f2 0%, #144ac9 100%);
  color: white;
  border: none;
  font-weight: 700;
}

.ghost-button {
  width: auto;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  color: var(--accent);
}

.danger-button {
  background: #8d3437;
}

.danger-button:hover {
  background: #77282c;
}

.admin-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.admin-action-row form {
  flex: 1 1 220px;
}

.admin-user-summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(117, 109, 91, 0.12);
  display: grid;
  gap: 14px;
}

.admin-user-summary p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.filter-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.filter-grid label,
.layer-list label,
.layer-select {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.layer-list {
  display: grid;
  gap: 10px;
}

.layer-select {
  margin-top: 14px;
}

.layer-list label {
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(21, 76, 73, 0.05);
  border: 1px solid rgba(21, 76, 73, 0.08);
  color: var(--text);
  font-weight: 600;
}

.layer-list input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.visual-mode {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(117, 109, 91, 0.12);
}

.specialty-mode {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.visual-mode span {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.segment {
  background: rgba(21, 76, 73, 0.08);
  color: var(--accent);
  border: 1px solid rgba(21, 76, 73, 0.14);
}

.segment.active {
  background: var(--accent);
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.stat-card {
  padding: 16px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 28px;
}

.stat-card.wide {
  grid-column: 1 / -1;
}

.county-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
}

.focus-summary {
  color: var(--muted);
  line-height: 1.55;
}

.county-item {
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(244, 242, 236, 0.96) 0%, rgba(233, 239, 233, 0.96) 100%);
  border: 1px solid rgba(21, 76, 73, 0.08);
  color: var(--text);
  box-shadow: none;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.county-item:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 76, 73, 0.18);
  background: linear-gradient(180deg, rgba(248, 246, 240, 1) 0%, rgba(226, 236, 231, 1) 100%);
}

.county-item.active {
  border-color: rgba(21, 76, 73, 0.28);
  background: linear-gradient(180deg, rgba(230, 241, 235, 1) 0%, rgba(215, 233, 224, 1) 100%);
  box-shadow: inset 0 0 0 1px rgba(21, 76, 73, 0.08);
}

.county-item strong,
.county-item span {
  display: block;
}

.county-item span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.main-panel {
  padding: 24px;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 18px;
  align-content: start;
}

.export-report-header {
  display: none;
}

.export-report-intro h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1.05;
}

.export-report-subtitle {
  margin: 10px 0 0;
  max-width: 860px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 16px;
}

.export-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.export-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(217, 236, 233, 0.58);
  border: 1px solid rgba(21, 76, 73, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.export-report-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.export-stat {
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(252, 249, 243, 0.96);
  border: 1px solid rgba(117, 109, 91, 0.14);
  box-shadow: 0 14px 34px rgba(18, 31, 30, 0.08);
}

.export-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.export-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.15;
}

.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(11, 29, 58, 0.12);
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-right: 8px;
}

.dot.permit {
  background: var(--permit);
}

.dot.dentist {
  background: var(--dentist);
}

.dot.dentist.general {
  background: #1b75bb;
}

.dot.dentist.specialist {
  background: #8d4f91;
}

#map {
  border-radius: 28px;
  overflow: hidden;
  height: clamp(620px, 74vh, 920px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(11, 29, 58, 0.12);
}

.map-frame {
  position: relative;
  padding: 10px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08)),
    rgba(230, 240, 255, 0.82);
  box-shadow: 0 22px 48px rgba(11, 29, 58, 0.1);
}

.map-chrome {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.map-actions {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.map-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(11, 29, 58, 0.9);
  color: white;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(18, 31, 30, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.badge.subtle {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid rgba(11, 29, 58, 0.14);
}

.badge.search-provider {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  border: 1px solid rgba(30, 78, 219, 0.16);
}

.map-action {
  width: auto;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border: 1px solid rgba(11, 29, 58, 0.14);
  box-shadow: 0 10px 24px rgba(11, 29, 58, 0.12);
}

.map-action.ghost {
  background: rgba(11, 29, 58, 0.9);
  color: #fff;
  border-color: rgba(11, 29, 58, 0.2);
}

.popup-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.popup-line {
  margin: 0;
  color: var(--muted);
}

.map-tooltip {
  display: grid;
  gap: 3px;
  min-width: 210px;
}

.map-tooltip strong,
.map-tooltip span {
  display: block;
}

.map-tooltip span {
  color: var(--muted);
  line-height: 1.35;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(25, 31, 30, 0.18);
}

.leaflet-popup-content {
  margin: 14px 16px;
}

.permit-hover-tooltip,
.county-hover-label {
  background: rgba(252, 249, 243, 0.97);
  border: 1px solid rgba(117, 109, 91, 0.18);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(18, 31, 30, 0.16);
  color: var(--text);
}

.permit-hover-tooltip:before,
.county-hover-label:before {
  border-top-color: rgba(252, 249, 243, 0.97);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: transparent;
}

.marker-cluster div {
  width: 42px;
  height: 42px;
  margin-left: 0;
  margin-top: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(22, 36, 35, 0.24);
}

.permit-cluster div {
  background: radial-gradient(circle at 30% 30%, #e8a06d 0%, #c96a2b 55%, #8c3d09 100%);
  border: 3px solid rgba(255, 248, 240, 0.92);
}

.dentist-cluster div {
  background: radial-gradient(circle at 30% 30%, #72aee0 0%, #1b75bb 60%, #14507e 100%);
  border: 3px solid rgba(246, 251, 255, 0.92);
}

.specialist-dentist-cluster div {
  background: radial-gradient(circle at 30% 30%, #c08cc4 0%, #8d4f91 60%, #5f2d67 100%);
  border: 3px solid rgba(252, 246, 255, 0.92);
}

.detail-rail {
  padding: 24px 24px 24px 0;
  background: rgba(230, 240, 255, 0.72);
  border-left: 1px solid rgba(11, 29, 58, 0.1);
  height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
}

.detail-shell {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(11, 29, 58, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-shell h2 {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
}

.detail-subtitle {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 10px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-body {
  margin-top: 6px;
  overflow-y: auto;
  padding-right: 6px;
}

.detail-pill {
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(230, 240, 255, 0.86);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-section {
  margin-top: 22px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-summary {
  display: grid;
  gap: 10px;
}

.detail-mix {
  display: grid;
  gap: 12px;
}

.mix-group {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(30, 78, 219, 0.05);
}

.mix-group h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mix-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 14px;
}

.mix-item span:last-child {
  color: var(--muted);
  white-space: nowrap;
}

.detail-summary p {
  margin: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(30, 78, 219, 0.06);
  color: var(--muted);
  line-height: 1.55;
}

.detail-row {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(30, 78, 219, 0.06);
}

.detail-row strong,
.detail-row span {
  display: block;
}

.detail-row span {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.county-legend {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 29, 58, 0.12);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(18, 31, 30, 0.1);
  padding: 12px 14px;
  color: var(--text);
  backdrop-filter: blur(10px);
}

.map-footer {
  padding: 0 6px 10px;
}

.county-legend h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.county-legend-scale {
  display: grid;
  grid-template-columns: repeat(5, 18px);
  gap: 4px;
  margin-bottom: 8px;
}

.county-legend-scale span {
  display: block;
  height: 10px;
  border-radius: 999px;
  opacity: 0.88;
}

.county-legend-steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.county-legend-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.county-legend-steps i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.county-legend-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* ===== Client workspace (Figma: Full Data View) ===== */
.client-page {
  --cx-ink: #1c2b3a;
  --cx-muted: #8b8b8b;
  --cx-value: #2d5fbf;
  --cx-navy: #0d2d6b;
  --cx-link: #1a46d6;
  --cx-chip: #ebf2fb;
  --cx-soft: #f4f7fb;
  --cx-line: #f2f2f2;
  --cx-line-soft: #f1f1f1;
  --cx-control-line: #efefef;
  --cx-panel: #fafafa;
  min-height: 100vh;
  overflow-x: hidden;
}

body.client-page {
  background: #f9f9f9;
  font-family: "Outfit", "Inter", "Segoe UI", sans-serif;
  color: var(--cx-ink);
}

.client-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

/* --- Slim rail (visible only when sidebar collapsed) --- */
.client-rail {
  display: none;
  position: sticky;
  top: 0;
  z-index: 900;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  height: 100vh;
  width: 56px;
  flex: 0 0 56px;
  padding: 16px 8px;
  background: #fff;
  border-right: 1px solid var(--cx-line);
}

.client-shell.sidebar-collapsed .client-rail {
  display: flex;
}

.client-rail-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
}

.client-rail-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.rail-tool {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: var(--cx-muted);
  border: 1px solid var(--cx-control-line);
  box-shadow: none;
}

.rail-tool:hover {
  color: var(--cx-ink);
  border-color: #dfe6f2;
}

.icon-funnel {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-width: 4px;
  border-radius: 50% 50% 3px 3px;
  clip-path: polygon(0 0, 100% 0, 62% 55%, 62% 100%, 38% 100%, 38% 55%);
}

/* --- Sidebar --- */
.app-sidebar {
  display: none;
  flex-direction: column;
  width: 320px;
  flex: 0 0 320px;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 850;
  background: var(--cx-panel);
  border-right: 1px solid var(--cx-line);
}

.app-sidebar.is-open {
  display: flex;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  height: 76px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--cx-line);
}

.sidebar-brand img {
  height: 36px;
  object-fit: contain;
  display: block;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--cx-muted);
  box-shadow: none;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--cx-chip);
  color: var(--cx-ink);
}

.icon-collapse {
  position: relative;
  width: 16px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.icon-collapse::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 13px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-card,
.sidebar-clear {
  flex: 0 0 auto;
}

.side-card {
  border: 1px solid var(--cx-line);
  border-radius: 8px;
  background: var(--cx-panel);
  overflow: hidden;
}

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 12px;
  border-bottom: 1px solid var(--cx-line);
  color: var(--cx-muted);
  font-size: 16px;
  font-weight: 450;
}

.chev {
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--cx-muted);
  border-bottom: 1.6px solid var(--cx-muted);
  transform: rotate(45deg) translateY(-2px);
  flex: 0 0 auto;
}

.side-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 12px;
}

.side-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--cx-ink);
}

.side-field span {
  padding: 0 4px;
}

.client-page .side-field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M4 6.5l4 4 4-4' stroke='%231c2b3a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      no-repeat right 12px center,
    #fff;
  border: 1px solid var(--cx-control-line);
  border-radius: 8px;
  padding: 10px 34px 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--cx-ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

.layers-body {
  gap: 0;
  padding: 10px 12px 14px;
}

.layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px 10px 2px;
  font-size: 14px;
  color: var(--cx-ink);
  border-bottom: 1px solid var(--cx-line-soft);
  cursor: pointer;
}

.layers-body .side-field {
  margin-top: 14px;
}

.layer-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid #b9c2cf;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.layer-row input[type="checkbox"]:checked {
  border-color: var(--cx-navy);
}

.layer-row input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cx-navy);
}

.radio-body {
  flex-direction: row;
  gap: 20px;
  padding: 14px 16px 16px;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cx-ink);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.radio-dot {
  width: 16px;
  height: 16px;
  border: 1.5px solid #b9c2cf;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.radio-option.active .radio-dot {
  border-color: var(--cx-navy);
}

.radio-option.active .radio-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cx-navy);
}

.sidebar-clear {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--cx-navy);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 450;
  cursor: pointer;
  box-shadow: none;
}

.sidebar-clear:hover {
  background: #0d2d6bdd;
}

.sidebar-admin-link {
  text-align: center;
  font-size: 13px;
  color: var(--cx-muted);
  text-decoration: none;
}

.sidebar-admin-link:hover {
  color: var(--cx-link);
}

/* --- Main column --- */
.client-workspace {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.client-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
  flex: 0 0 auto;
  padding: 0 30px 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--cx-line);
}

.topbar-heading h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--cx-ink);
}

.topbar-heading p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--cx-muted);
}

.client-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.client-user-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 450;
  color: #0f1938;
  line-height: 1.2;
}

.client-user-meta span {
  display: block;
  font-size: 14px;
  font-weight: 350;
  color: var(--cx-muted);
  line-height: 1.3;
}

.client-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cx-muted);
  background: var(--cx-chip);
  color: var(--cx-navy);
  font-weight: 600;
}

.topbar-divider {
  width: 1px;
  height: 26px;
  background: var(--cx-line);
}

.client-notification {
  width: 16px;
  height: 16px;
  border: 1.8px solid var(--cx-muted);
  border-radius: 8px 8px 10px 10px;
  position: relative;
}

.client-notification::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 6px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--cx-muted);
  border-radius: 999px;
}

.signout-button {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid var(--cx-control-line);
  background: #fff;
  color: var(--cx-muted);
  box-shadow: none;
}

.signout-button:hover {
  color: var(--cx-ink);
}

.client-body {
  flex: 1 1 auto;
  background: #fff;
  padding: 12px 0 24px;
}

/* --- Command bar --- */
.client-commandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 2px 20px 14px;
  border-bottom: 1px solid var(--cx-line-soft);
}

.commandbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.client-search-label {
  font-size: 18px;
  font-weight: 400;
  color: var(--cx-ink);
  white-space: nowrap;
}

.search-pill {
  display: flex;
  align-items: center;
  width: min(391px, 42vw);
  height: 38px;
  background: #f4f4f4;
  border: 1px solid #f4f4f4;
  border-radius: 8px;
  padding: 0 6px 0 14px;
}

.search-pill input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--cx-ink);
  box-shadow: none;
  outline: none;
}

.search-pill input::placeholder {
  color: #666;
}

.search-pill button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--cx-muted);
  box-shadow: none;
  cursor: pointer;
}

.search-pill button:hover {
  color: var(--cx-ink);
}

.icon-search {
  position: relative;
  width: 10px;
  height: 10px;
  border: 1.6px solid currentColor;
  border-radius: 999px;
}

.icon-search::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1.6px;
  background: currentColor;
  transform: rotate(45deg);
  right: -4px;
  bottom: -2px;
  border-radius: 2px;
}

.client-command-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.soft-button,
.navy-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #f4f4f4;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  box-shadow: none;
  width: auto;
}

.soft-button {
  background: var(--cx-soft);
  color: var(--cx-ink);
  font-weight: 500;
}

.soft-button:hover {
  background: #e8eff9;
}

.navy-button {
  background: var(--cx-navy);
  color: #fff;
  font-weight: 400;
}

.navy-button:hover {
  background: #0d2d6bdd;
}

.icon-refresh {
  width: 12px;
  height: 12px;
  border: 1.6px solid currentColor;
  border-radius: 999px;
  border-top-color: transparent;
  position: relative;
}

.icon-refresh::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -1px;
  border: 3px solid transparent;
  border-left-color: currentColor;
  transform: rotate(-40deg);
}

.icon-download {
  position: relative;
  width: 12px;
  height: 10px;
  border-bottom: 1.6px solid currentColor;
}

.icon-download::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 1.6px;
  height: 7px;
  margin-left: -0.8px;
  background: currentColor;
}

.icon-download::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

/* --- KPI cards --- */
.client-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--cx-line-soft);
}

.client-kpi-card {
  background: var(--cx-panel);
  border: 1px solid var(--cx-line);
  border-radius: 8px;
  padding: 14px 16px;
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cx-line-soft);
}

.client-kpi-card .kpi-head span {
  font-size: 18px;
  color: var(--cx-ink);
}

.client-kpi-card .kpi-head strong {
  font-size: 22px;
  font-weight: 600;
  color: var(--cx-value);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.client-kpi-card p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--cx-muted);
}

/* --- Content: map + snapshot --- */
.client-content {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 20px;
}

.client-mapcol {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 12px;
}

.client-page .main-panel {
  padding: 0;
}

.client-page .map-frame {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

.client-page #map {
  height: clamp(560px, calc(100vh - 360px), 820px);
  min-height: 520px;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.map-topchip {
  position: absolute;
  z-index: 500;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dedede;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
}

.focus-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 450;
}

.focus-chip-label {
  color: var(--cx-ink);
  white-space: nowrap;
}

.focus-chip-value {
  color: var(--cx-value);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.growth-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 450;
  color: var(--cx-ink);
}

.growth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.growth-legend .dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.dot.tier-green {
  background: #2fbf8f;
}

.dot.tier-yellow {
  background: #f5c542;
}

.dot.tier-red {
  background: #e8618c;
}

.map-bottomchip {
  position: absolute;
  z-index: 500;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.client-page .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dedede;
  color: var(--cx-ink);
  font-size: 12px;
  font-weight: 450;
}

.client-page .badge.subtle {
  color: var(--cx-muted);
}

.client-page .leaflet-control-zoom {
  border: 0;
  box-shadow: none;
}

.client-page .leaflet-control-zoom a {
  width: 40px;
  height: 40px;
  line-height: 40px;
  background: var(--cx-panel);
  border: 1px solid var(--cx-line-soft);
  color: var(--cx-ink);
  font-weight: 400;
}

.client-page .leaflet-control-zoom-in {
  border-radius: 4px 4px 0 0;
}

.client-page .leaflet-control-zoom-out {
  border-radius: 0 0 4px 4px;
}

/* --- Priority Growth Markets --- */
.growth-markets {
  border: 1px solid var(--cx-line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 12px 0;
}

.growth-markets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--cx-line-soft);
  font-size: 18px;
  color: var(--cx-ink);
}

.client-page .county-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 14px 12px 2px;
}

.client-page .county-item {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--cx-panel);
  border: 1px solid var(--cx-line-soft);
  border-radius: 6px;
  padding: 13px 15px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
  color: var(--cx-ink);
}

.client-page .county-item:hover {
  border-color: #d8e2f2;
  background: #f4f7fb;
}

.client-page .county-item.active {
  border-color: var(--cx-value);
  background: var(--cx-chip);
}

.client-page .county-item strong {
  display: block;
  font-size: 16px;
  font-weight: 400;
}

.client-page .county-item span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 350;
  color: var(--cx-ink);
}

/* --- Snapshot panel --- */
.client-page .detail-rail {
  flex: 0 0 332px;
  width: 332px;
  padding: 20px 0 0 12px;
  margin-left: 12px;
  background: transparent;
  border-left: 1px solid var(--cx-line-soft);
  height: auto;
  position: static;
}

.client-page .detail-shell {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-right: 8px;
}

.snapshot-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--cx-chip);
  color: var(--cx-link);
  font-size: 14px;
  font-weight: 350;
}

.icon-expand {
  position: relative;
  width: 12px;
  height: 12px;
}

.icon-expand::before,
.icon-expand::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
}

.icon-expand::before {
  top: 0;
  right: 0;
  border-top: 1.6px solid currentColor;
  border-right: 1.6px solid currentColor;
}

.icon-expand::after {
  bottom: 0;
  left: 0;
  border-bottom: 1.6px solid currentColor;
  border-left: 1.6px solid currentColor;
}

.client-page .detail-shell h2 {
  margin: 12px 0 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  color: var(--cx-ink);
}

.client-page .detail-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--cx-muted);
  line-height: 1.5;
}

.client-page .detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.client-page .detail-pill {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--cx-panel);
  border: 1px solid var(--cx-line-soft);
  color: var(--cx-ink);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.client-page .detail-body {
  margin-top: 4px;
  overflow-y: auto;
  padding-right: 8px;
}

.client-page .detail-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--cx-line-soft);
}

.client-page .detail-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cx-muted);
}

.client-page .detail-list,
.client-page .detail-summary {
  display: grid;
  gap: 8px;
}

.client-page .detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--cx-line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  font-size: 14px;
}

.client-page .detail-row strong {
  font-weight: 400;
  color: var(--cx-ink);
}

.client-page .detail-row span {
  margin: 0;
  color: var(--cx-ink);
  white-space: nowrap;
}

.client-page .narrative-section {
  border: 1px solid var(--cx-line-soft);
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
}

.client-page .narrative-section h3 {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cx-line-soft);
}

.client-page .detail-summary p {
  margin: 0;
  border-radius: 0;
  padding: 0 0 10px;
  background: transparent;
  border-bottom: 1px solid var(--cx-line-soft);
  color: var(--cx-ink);
  font-size: 14px;
  font-weight: 350;
  line-height: 1.7;
}

.client-page .detail-summary p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.client-page .mix-group {
  border-radius: 8px;
  border: 1px solid var(--cx-line-soft);
  padding: 10px 12px;
  background: var(--cx-panel);
}

.client-page .mix-group h4 {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 450;
  color: var(--cx-muted);
}

.client-page .mix-item {
  font-size: 14px;
  padding: 3px 0;
}

.empty-detail {
  color: var(--cx-muted, #8b8b8b);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 1280px) {
  .client-content {
    flex-direction: column;
  }

  .client-page .detail-rail {
    flex: 1 1 auto;
    width: auto;
    border-left: 0;
    margin-left: 0;
    padding: 20px 0 0;
  }

  .client-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 24, 0.38);
  backdrop-filter: blur(8px);
}

.export-modal.hidden {
  display: none;
}

.export-dialog {
  width: min(480px, 100%);
  background: rgba(252, 249, 243, 0.98);
  border: 1px solid rgba(117, 109, 91, 0.16);
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(18, 31, 30, 0.2);
  padding: 22px;
}

.export-header {
  margin-bottom: 18px;
}

.export-close {
  flex: 0 0 auto;
}

.export-field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.export-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.export-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.search-radius-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  background: rgba(252, 249, 243, 0.96);
  border: 1px solid rgba(117, 109, 91, 0.16);
  color: var(--accent);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(18, 31, 30, 0.12);
  font-weight: 700;
  white-space: nowrap;
}

.search-radius-marker {
  background: transparent;
  border: none;
}

.admin-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(30, 78, 219, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.admin-nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.admin-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.admin-inline-form {
  margin-top: 14px;
}

.admin-quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.admin-coverage-shell {
  width: min(1540px, calc(100% - 40px));
}

.admin-coverage-layout {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(560px, 1fr) minmax(320px, 390px);
  gap: 18px;
  align-items: start;
}

.admin-coverage-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(560px, 1fr) minmax(320px, 420px);
  gap: 18px;
  align-items: start;
}

.admin-coverage-layout > *,
.admin-coverage-grid > * {
  min-width: 0;
}

.admin-coverage-layout .card,
.admin-coverage-grid .card {
  margin-top: 0;
}

.coverage-sidebar,
.coverage-detail-card {
  position: sticky;
  top: 18px;
  align-self: start;
}

.coverage-map-shell {
  min-width: 0;
}

.coverage-map-header {
  margin-bottom: 14px;
}

.coverage-legend-table {
  display: grid;
  gap: 8px;
  min-width: 230px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 29, 58, 0.12);
}

.coverage-legend-table div {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.coverage-map-frame {
  min-height: 620px;
}

#coverageMap {
  height: clamp(620px, 74vh, 920px);
  min-height: 620px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(117, 109, 91, 0.14);
  box-shadow: var(--shadow);
}

.leaflet-coverage-pane {
  z-index: 420 !important;
}

.leaflet-coverageTooltip-pane {
  z-index: 760 !important;
}

#coverageMap .coverage-county-path {
  mix-blend-mode: multiply;
}

.dot.coverage.red {
  background: #c85555;
}

.dot.coverage.yellow {
  background: #d9a53a;
}

.dot.coverage.green {
  background: #4b9a6c;
}

.coverage-export-link,
.coverage-sidebar .ghost-button {
  width: 100%;
  margin-top: 12px;
}

.coverage-county-search {
  position: relative;
  margin-bottom: 16px;
  z-index: 1;
}

.coverage-county-search.is-open {
  z-index: 120;
}

.coverage-county-search label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.coverage-search-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
}

.coverage-search-field {
  position: relative;
}

.coverage-county-search input[type="search"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(117, 109, 91, 0.22);
  background: #fff;
  color: var(--text);
}

.coverage-search-results {
  position: absolute;
  z-index: 200;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 240px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #b8c4dc;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(11, 29, 58, 0.18);
}

/* div[role=option] — not <button>, so global blue button styles never apply */
.coverage-search-results .coverage-search-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #0b1d3a;
  text-align: left;
  cursor: pointer;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.coverage-search-results .coverage-search-option + .coverage-search-option {
  border-top: 1px solid #e2e8f4;
}

.coverage-search-results .coverage-search-option:hover,
.coverage-search-results .coverage-search-option.active {
  background: #dbeafe;
  color: #0f3d99;
}

.coverage-search-results .coverage-search-option:active {
  background: #c7d9f8;
  color: #0a2d75;
}

.coverage-sidebar .admin-form.is-filter-dimmed {
  opacity: 0.28;
  pointer-events: none;
  filter: grayscale(0.15);
}

.coverage-metric-card-date strong.coverage-metric-date {
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.coverage-seed-panel,
.coverage-empty-state {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(30, 78, 219, 0.16);
  background: rgba(230, 240, 255, 0.72);
  padding: 14px;
}

.coverage-seed-panel .admin-form {
  margin-top: 12px;
}

.coverage-seed-panel input[type="file"] {
  padding: 10px;
}

.coverage-empty-state h3 {
  margin: 0 0 8px;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 20px;
}

.coverage-map-empty-state {
  margin: 0 0 14px;
}

.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
}

.pagination-nav span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.pagination-nav .disabled {
  opacity: 0.46;
  pointer-events: none;
}

.sort-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.sort-link span {
  color: var(--accent);
  font-size: 10px;
}

.coverage-stat-grid,
.coverage-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.coverage-stat-card,
.coverage-metric-card {
  min-height: 92px;
  border-radius: 14px;
  border: 1px solid rgba(11, 29, 58, 0.12);
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
}

.coverage-stat-card span,
.coverage-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.coverage-stat-card strong,
.coverage-metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.05;
}

.coverage-detail-card {
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.coverage-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.coverage-detail-header h2,
.coverage-detail-empty h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.coverage-status-pill,
.coverage-mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.coverage-status-pill {
  min-height: 34px;
  padding: 8px 12px;
}

.coverage-mini-pill {
  min-height: 28px;
  padding: 6px 10px;
}

.coverage-status-pill.red,
.coverage-mini-pill.red {
  background: rgba(200, 85, 85, 0.16);
  color: #803134;
}

.coverage-status-pill.yellow,
.coverage-status-pill.unknown,
.coverage-mini-pill.yellow,
.coverage-mini-pill.unknown {
  background: rgba(217, 165, 58, 0.2);
  color: #725414;
}

.coverage-status-pill.green,
.coverage-mini-pill.green {
  background: rgba(75, 154, 108, 0.16);
  color: #285d40;
}

.coverage-tab-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
  margin-top: 16px;
}

.coverage-tab {
  flex: 0 0 auto;
  width: auto;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(117, 109, 91, 0.18);
  background: rgba(255, 253, 250, 0.78);
  color: var(--text);
  font-size: 12px;
}

.coverage-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.coverage-tab-panel {
  display: none;
  margin-top: 8px;
}

.coverage-tab-panel.active {
  display: block;
}

.coverage-progress {
  height: 12px;
  margin: 16px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(117, 109, 91, 0.16);
}

.coverage-progress-fill {
  height: 100%;
  border-radius: inherit;
}

.coverage-progress-fill.red {
  background: #c85555;
}

.coverage-progress-fill.yellow,
.coverage-progress-fill.unknown {
  background: #d9a53a;
}

.coverage-progress-fill.green {
  background: #4b9a6c;
}

.coverage-source-summary {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(30, 78, 219, 0.16);
  background: rgba(232, 240, 255, 0.5);
}

.coverage-source-summary-header,
.coverage-contact-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coverage-source-summary-header .eyebrow {
  margin: 0;
}

.mini-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.coverage-source-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.coverage-source-list div {
  display: grid;
  gap: 4px;
}

.coverage-source-list dt,
.coverage-source-note span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.coverage-source-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
}

.coverage-source-list a {
  color: var(--accent);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.coverage-source-list a:hover,
.mini-link:hover {
  text-decoration: underline;
}

.coverage-source-note {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(11, 29, 58, 0.1);
}

.coverage-source-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.copy-button {
  width: auto;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(30, 78, 219, 0.22);
  color: var(--accent);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

.coverage-city-list,
.coverage-history-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.coverage-city-item,
.history-item {
  border-radius: 14px;
  border: 1px solid rgba(117, 109, 91, 0.14);
  background: rgba(21, 76, 73, 0.045);
  padding: 12px;
}

.coverage-city-item strong,
.coverage-city-item span,
.history-item strong,
.history-item span,
.history-item p {
  display: block;
}

.coverage-city-item span,
.history-item span,
.history-item p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.coverage-detail-empty {
  min-height: 280px;
  display: grid;
  align-content: center;
}

.coverage-count-marker {
  background: transparent;
}

.coverage-count-marker div {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 3px solid rgba(255, 248, 240, 0.92);
  box-shadow: 0 10px 24px rgba(22, 36, 35, 0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.coverage-count-marker span {
  max-width: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coverage-count-marker.red div {
  background: radial-gradient(circle at 30% 30%, #e08282 0%, #c85555 58%, #803134 100%);
}

.coverage-count-marker.yellow div,
.coverage-count-marker.unknown div {
  background: radial-gradient(circle at 30% 30%, #efca72 0%, #d9a53a 58%, #8a6417 100%);
}

.coverage-count-marker.green div {
  background: radial-gradient(circle at 30% 30%, #7ec494 0%, #4b9a6c 58%, #285d40 100%);
}

body.export-clean .sidebar {
  display: none;
}

body.export-clean .shell {
  grid-template-columns: minmax(880px, 1fr) 360px;
  min-height: auto;
  align-items: start;
}

body.export-clean .main-panel,
body.export-clean .detail-rail {
  background: #f8f4ec;
}

body.export-clean .main-panel {
  padding: 34px 30px 30px;
  gap: 20px;
}

body.export-clean .export-report-header {
  display: block;
}

body.export-clean .map-header {
  align-items: flex-end;
  padding: 0 4px;
}

body.export-clean .map-header > div:first-child .eyebrow,
body.export-clean .map-header > div:first-child h2,
body.export-clean .map-header > div:first-child .header-subtitle {
  display: none;
}

body.export-clean .map-header {
  justify-content: flex-end;
}

body.export-clean .map-status,
body.export-clean .map-actions,
body.export-clean .leaflet-control-zoom,
body.export-clean .leaflet-popup,
body.export-clean .leaflet-marker-pane .search-radius-marker {
  display: none !important;
}

body.export-clean .map-frame {
  padding: 14px;
  border-radius: 34px;
}

body.export-clean #map {
  height: 700px;
}

body.export-clean .detail-rail {
  padding: 34px 30px 30px 0;
  position: static;
  top: auto;
  height: auto;
  align-self: stretch;
}

body.export-clean .detail-shell {
  position: static;
  top: auto;
  max-height: none;
  min-height: auto;
  border-radius: 28px;
  padding: 26px;
  overflow: visible;
}

body.export-clean .detail-shell .eyebrow {
  margin-bottom: 10px;
}

body.export-clean .detail-shell h2 {
  font-size: 24px;
  line-height: 1.1;
}

body.export-clean .detail-subtitle {
  font-size: 15px;
}

body.export-clean .detail-body {
  margin-top: 12px;
  overflow: visible;
  padding-right: 0;
}

body.export-clean .detail-section {
  margin-top: 18px;
}

body.export-clean .detail-row,
body.export-clean .detail-summary p,
body.export-clean .mix-group {
  background: rgba(21, 76, 73, 0.045);
}

body.export-clean .export-modal {
  display: none;
}

@media (max-width: 1100px) {
  .landing-shell {
    width: min(100%, calc(100% - 32px));
    padding-top: 22px;
  }

  .landing-nav,
  .landing-hero,
  .landing-grid,
  .landing-articles,
  .article-shell,
  .shell {
    grid-template-columns: 1fr;
  }

  .landing-nav,
  .landing-hero {
    min-height: auto;
  }

  .landing-copy h1 {
    font-size: clamp(42px, 12vw, 62px);
  }

  .landing-grid,
  .landing-articles,
  .admin-grid,
  .admin-coverage-layout,
  .admin-coverage-grid,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .landing-visual-meta {
    align-items: flex-start;
  }

  .landing-nav,
  .landing-section-head,
  .landing-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-menu {
    gap: 12px 18px;
    flex-wrap: wrap;
  }

  .landing-brand img {
    width: min(230px, 64vw);
  }

  .landing-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .landing-hero {
    gap: 28px;
    padding-top: 34px;
  }

  .landing-card {
    padding: 28px;
  }

  .article-main {
    padding: 34px 28px;
  }

  .article-sidebar {
    position: static;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(98, 93, 84, 0.15);
  }

  .detail-rail {
    padding: 0 24px 24px;
    border-left: none;
    height: auto;
    position: static;
  }

  .detail-shell {
    max-height: none;
  }

  .detail-body {
    overflow: visible;
    padding-right: 0;
  }

  .map-chrome {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .map-actions {
    justify-content: flex-end;
  }

  .session-strip,
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-title-block {
    grid-template-columns: 1fr;
  }

  .admin-title-block .admin-brand-logo,
  .admin-title-block .admin-nav {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-coverage-shell {
    width: min(100%, calc(100% - 28px));
  }

  .coverage-sidebar,
  .coverage-detail-card {
    position: static;
    max-height: none;
  }

  #map {
    height: 62vh;
    min-height: 520px;
  }

  #coverageMap {
    height: 62vh;
    min-height: 520px;
  }

  .export-report-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.coverage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.summary-card {
  background: var(--surface-elevated, #fff);
  border: 1px solid rgba(98, 93, 84, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-card span {
  font-size: 0.78rem;
  color: var(--muted, #6b6560);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-card strong {
  font-size: 1.4rem;
}

.coverage-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.coverage-pill.red { background: #fde8e8; color: #9b1c1c; }
.coverage-pill.yellow { background: #fff4d6; color: #8a5b00; }
.coverage-pill.green { background: #e5f6ea; color: #1f6b3f; }

.row-overdue td { background: rgba(255, 244, 214, 0.35); }

.tag-warn {
  color: #8a5b00;
  font-size: 0.72rem;
  font-weight: 600;
}

.job-status.failed,
.qa-status.failed { color: #9b1c1c; }
.job-status.completed,
.qa-status.passed { color: #1f6b3f; }
.job-status.validating,
.qa-status.needs_review { color: #8a5b00; }

.validation-row pre.validation-dump {
  font-size: 0.78rem;
  white-space: pre-wrap;
  margin: 8px 0 0;
}

.completion-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.completion-badge.good { background: rgba(31, 107, 63, 0.12); color: #1f6b3f; }
.completion-badge.warn { background: rgba(138, 91, 0, 0.12); color: #8a5b00; }
.completion-badge.bad { background: rgba(155, 28, 28, 0.12); color: #9b1c1c; }

.mapping-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 0;
  font-size: 0.82rem;
}
.mapping-table th,
.mapping-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(98, 93, 84, 0.12);
}
.mapping-table th { font-weight: 600; color: #625d54; }
.mapping-table code {
  background: rgba(98, 93, 84, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}
.mapping-table .conf.good { color: #1f6b3f; font-weight: 600; }
.mapping-table .conf.warn { color: #8a5b00; font-weight: 600; }

.error-csv-link {
  margin-left: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1d4ed8;
}

.chunk-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(98, 93, 84, 0.18);
  border-radius: 12px;
  background: rgba(98, 93, 84, 0.04);
}
.chunk-stage { margin-bottom: 4px; }
.chunk-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(98, 93, 84, 0.15);
  overflow: hidden;
  margin: 8px 0;
}
.chunk-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1f6b3f, #34a853);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.chunk-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
.chunk-panel .loading-title { font-weight: 600; margin: 0 0 4px; }

.foia-preview {
  white-space: pre-wrap;
  background: rgba(98, 93, 84, 0.06);
  border-radius: 10px;
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.template-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 24px;
}

.template-list li + li { margin-top: 6px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .coverage-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

@media (max-width: 720px) {
  .admin-import-grid {
    grid-template-columns: 1fr;
  }
}

.bulk-assign-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #f4f6fb;
  border: 1px solid #e1e6f0;
  border-radius: 10px;
}

.bulk-assign-bar label {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a5468;
  gap: 4px;
}

.bulk-assign-bar select,
.bulk-assign-bar input[type="date"] {
  font-size: 0.85rem;
  padding: 6px 8px;
}

.bulk-count {
  align-self: center;
  font-weight: 700;
  color: #1f2a44;
  white-space: nowrap;
}

.bulk-assign-bar button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.loading-overlay.is-active {
  display: flex;
}

.loading-overlay .loading-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 28px 34px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  max-width: 360px;
}

.loading-overlay .spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 4px solid #dce3f2;
  border-top-color: #2f57d6;
  border-radius: 50%;
  animation: crelabx-spin 0.8s linear infinite;
}

.loading-overlay .loading-title {
  font-weight: 700;
  color: #1f2a44;
  margin: 0 0 6px;
}

.loading-overlay .loading-sub {
  font-size: 0.85rem;
  color: #5a6378;
  margin: 0;
}

@keyframes crelabx-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1320px) {
  .filter-drawer.is-open ~ .client-workspace {
    margin-left: 300px;
  }

  .filter-drawer {
    width: 300px;
  }

  .client-map-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .client-commandbar {
    grid-template-columns: auto minmax(280px, 1fr) auto;
  }

  .client-search-hint {
    display: none;
  }
}

@media (max-width: 1100px) {
  .client-shell {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .client-rail {
    padding: 14px 10px;
  }

  .filter-drawer {
    left: 64px;
  }

  .filter-drawer.is-open ~ .client-workspace {
    margin-left: 0;
  }

  .client-map-layout,
  .client-kpi-grid {
    grid-template-columns: 1fr;
  }

  .client-page .detail-rail {
    position: static;
  }

  .client-page .detail-shell {
    max-height: none;
  }

  .client-commandbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .client-command-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .client-shell {
    grid-template-columns: 1fr;
  }

  .client-rail {
    position: sticky;
    min-height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(11, 29, 58, 0.1);
  }

  .rail-admin-link {
    margin-top: 0;
  }

  .filter-drawer {
    left: 0;
    width: min(340px, 88vw);
  }

  .client-workspace {
    padding: 14px;
  }

  .client-topbar,
  .client-user,
  .client-command-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-user {
    min-width: 0;
  }

  .client-search-box {
    grid-template-columns: 1fr;
  }

  .client-page #map {
    height: 68vh;
    min-height: 460px;
  }
}

/* ===== Admin console redesign (Figma: Admin Side) ===== */
body.admin-page {
  --cx-ink: #1c2b3a;
  --cx-muted: #8b8b8b;
  --cx-value: #2d5fbf;
  --cx-navy: #0d2d6b;
  --cx-link: #1a46d6;
  --cx-chip: #ebf2fb;
  --cx-soft: #f4f7fb;
  --cx-line: #f2f2f2;
  --cx-line-soft: #f1f1f1;
  --cx-control-line: #efefef;
  --cx-panel: #fafafa;
  background: #f9f9f9;
  font-family: "Outfit", "Inter", "Segoe UI", sans-serif;
  color: var(--cx-ink);
}

.admin-layout {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  width: 260px;
  flex: 0 0 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--cx-panel);
  border-right: 1px solid var(--cx-line);
}

.admin-rail {
  display: none;
  position: sticky;
  top: 0;
  z-index: 900;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  height: 100vh;
  width: 56px;
  flex: 0 0 56px;
  padding: 16px 8px;
  background: var(--cx-panel);
  border-right: 1px solid var(--cx-line);
}

.admin-layout.admin-nav-collapsed .admin-rail {
  display: flex;
}

.admin-rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--cx-line);
  width: 100%;
  overflow-y: auto;
}

.admin-rail-nav a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--cx-muted);
}

.admin-rail-nav a svg {
  width: 17px;
  height: 17px;
}

.admin-rail-nav a:hover {
  background: #fff;
  color: var(--cx-ink);
}

.admin-rail-nav a.active {
  background: #fff;
  border-color: var(--cx-line-soft);
  color: var(--cx-navy);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

.admin-layout.admin-nav-collapsed .admin-sidebar {
  display: none;
}

.admin-side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 10px;
  overflow-y: auto;
}

.admin-side-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--cx-muted);
  font-size: 14px;
  text-decoration: none;
}

.admin-side-nav a:hover {
  color: var(--cx-ink);
  background: #fff;
}

.admin-side-nav a.active {
  background: #fff;
  border-color: var(--cx-line-soft);
  color: var(--cx-ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

.admin-side-foot {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--cx-line);
}

.admin-side-foot a {
  font-size: 13px;
  color: var(--cx-muted);
  text-decoration: none;
}

.admin-side-foot a:hover {
  color: var(--cx-link);
}

.admin-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0;
  padding: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  flex: 0 0 auto;
  padding: 10px 30px 10px 24px;
  background: #fff;
  border-bottom: 1px solid var(--cx-line);
  position: sticky;
  top: 0;
  z-index: 700;
}

.admin-topbar .topbar-heading h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--cx-ink);
}

.admin-topbar .topbar-heading p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--cx-muted);
}

.admin-content {
  flex: 1 1 auto;
  padding: 20px 24px 32px;
  background: #fff;
}

.admin-backlink {
  margin: 0 0 14px;
  font-size: 14px;
}

.admin-backlink a {
  color: var(--cx-link);
  text-decoration: none;
}

/* Cards, forms, and text */
body.admin-page .card {
  background: #fff;
  border: 1px solid var(--cx-line);
  border-radius: 8px;
  box-shadow: none;
  padding: 20px;
}

body.admin-page .card h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--cx-ink);
  letter-spacing: 0;
}

body.admin-page .card h3 {
  font-weight: 500;
}

body.admin-page .eyebrow {
  color: var(--cx-muted);
  letter-spacing: 0.06em;
}

body.admin-page .subtitle,
body.admin-page .hint {
  color: var(--cx-muted);
  font-size: 14px;
}

body.admin-page input,
body.admin-page select,
body.admin-page textarea {
  border: 1px solid var(--cx-control-line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--cx-ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

body.admin-page label {
  font-size: 14px;
  color: var(--cx-ink);
}

body.admin-page input[type="checkbox"],
body.admin-page input[type="radio"] {
  width: auto;
  flex: 0 0 auto;
  box-shadow: none;
  accent-color: var(--cx-navy);
}

body.admin-page input[type="file"] {
  box-shadow: none;
}

body.admin-page .rail-tool {
  background: #fff;
  color: var(--cx-muted);
  border: 1px solid var(--cx-control-line);
  padding: 0;
}

body.admin-page .rail-tool:hover {
  background: #fff;
  color: var(--cx-ink);
  border-color: #dfe6f2;
}

body.admin-page .icon-button {
  background: transparent;
  color: var(--cx-muted);
  padding: 0;
}

body.admin-page .icon-button:hover {
  background: var(--cx-chip);
  color: var(--cx-ink);
}

body.admin-page a.ghost-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}

body.admin-page button {
  background: var(--cx-navy);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 450;
  padding: 10px 14px;
}

body.admin-page button:hover {
  background: #0d2d6bdd;
}

body.admin-page .ghost-button {
  background: #fff;
  border: 1px solid var(--cx-control-line);
  color: var(--cx-ink);
  font-weight: 450;
}

body.admin-page .ghost-button:hover {
  background: var(--cx-soft);
}

body.admin-page .danger-button {
  background: #b3261e;
  color: #fff;
}

body.admin-page .danger-button:hover {
  background: #931f18;
}

/* Tables */
body.admin-page .table-wrap,
body.admin-page .table-scroll {
  border: 1px solid var(--cx-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body.admin-page .admin-table {
  font-size: 14px;
}

body.admin-page .admin-table th {
  background: var(--cx-soft);
  color: var(--cx-ink);
  font-weight: 450;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--cx-line);
}

body.admin-page .admin-table td {
  border-bottom: 1px solid var(--cx-line);
  color: var(--cx-ink);
}

body.admin-page .admin-table tr:hover td {
  background: var(--cx-panel);
}

body.admin-page .admin-table tr.is-selected td {
  background: var(--cx-chip);
}

body.admin-page .user-row-link {
  color: var(--cx-ink);
  text-decoration: none;
  font-weight: 450;
}

body.admin-page .user-row-link:hover {
  color: var(--cx-link);
}

/* Status pills */
body.admin-page .user-status-badge {
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
}

body.admin-page .user-status-badge.active {
  background: #e8f7ee;
  color: #219653;
}

body.admin-page .user-status-badge.inactive {
  background: #fdecec;
  color: #eb5757;
}

body.admin-page .coverage-pill,
body.admin-page .coverage-status-pill,
body.admin-page .coverage-mini-pill {
  border-radius: 4px;
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
}

/* Summary + coverage cards */
body.admin-page .summary-card,
body.admin-page .coverage-stat-card,
body.admin-page .coverage-metric-card {
  background: var(--cx-panel);
  border: 1px solid var(--cx-line);
  border-radius: 8px;
  box-shadow: none;
}

body.admin-page .summary-card span,
body.admin-page .coverage-stat-card span,
body.admin-page .coverage-metric-card span {
  color: var(--cx-muted);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

body.admin-page .summary-card strong,
body.admin-page .coverage-stat-card strong,
body.admin-page .coverage-metric-card strong {
  color: var(--cx-value);
  font-weight: 600;
}

body.admin-page .coverage-tab-bar {
  flex-wrap: wrap;
}

body.admin-page .coverage-tab {
  background: #fff;
  border: 1px solid var(--cx-line);
  color: var(--cx-muted);
  border-radius: 8px;
  font-weight: 450;
}

body.admin-page .coverage-tab:hover {
  background: var(--cx-soft);
  color: var(--cx-ink);
}

body.admin-page .coverage-tab.active {
  background: var(--cx-navy);
  color: #fff;
  border-color: var(--cx-navy);
}

/* Data Coverage: top command bar layout */
.coverage-command-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.coverage-command-bar .coverage-county-search {
  flex: 0 1 280px;
  min-width: 220px;
  position: relative;
  margin-bottom: 0;
}

.coverage-command-bar .coverage-search-field input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  line-height: 40px;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  background: #f4f4f4;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.coverage-command-bar .coverage-search-field input[type="search"]::-webkit-search-decoration,
.coverage-command-bar .coverage-search-field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.coverage-command-bar .coverage-search-field input[type="search"]:focus {
  background: #fff;
  border-color: #dfe6f2;
  outline: none;
}

.coverage-filter-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-dropdown {
  position: relative;
}

.filter-dropdown > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--cx-control-line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 450;
  color: var(--cx-ink);
  white-space: nowrap;
  user-select: none;
}

.filter-dropdown > summary::-webkit-details-marker {
  display: none;
}

.filter-dropdown > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--cx-muted);
  border-bottom: 1.5px solid var(--cx-muted);
  transform: rotate(45deg) translateY(-2px);
}

.filter-dropdown[open] > summary {
  border-color: #dfe6f2;
}

.filter-dropdown[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.filter-dropdown > summary.primary {
  background: var(--cx-navy);
  border-color: var(--cx-navy);
  color: #fff;
}

.filter-dropdown > summary.primary::after {
  border-color: #fff;
}

.filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 950;
  min-width: 220px;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--cx-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(13, 32, 60, 0.12);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.filter-menu label:hover {
  background: var(--cx-soft);
}

.coverage-command-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.coverage-command-actions button,
.coverage-command-actions .ghost-button {
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
}

.coverage-command-actions .filter-menu {
  left: auto;
  right: 0;
  min-width: 300px;
}

.seed-menu {
  gap: 10px;
}

/* Data Sources: top filter bar + workspace */
.sources-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.sources-filter-bar .coverage-county-search {
  flex: 0 1 280px;
  min-width: 200px;
  margin-bottom: 0;
}

body.admin-page .select-chip {
  width: auto;
  height: 40px;
  padding: 0 32px 0 14px;
  font-size: 13px;
  font-weight: 450;
  color: var(--cx-ink);
  border: 1px solid var(--cx-control-line);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b8b8b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.sources-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.acq-status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 450;
  background: var(--cx-soft);
  color: var(--cx-muted);
  white-space: nowrap;
}

.acq-status-pill.status-not-started {
  background: #fdecec;
  color: #eb5757;
}

.acq-status-pill.status-sources-identified {
  background: #e9f1fd;
  color: #2d5fbf;
}

.acq-status-pill.status-in-progress {
  background: #f0ecfd;
  color: #7050d8;
}

.acq-status-pill.status-planning-stage {
  background: #fdf3e5;
  color: #d07c12;
}

.acq-status-pill.status-completed {
  background: #e8f7ee;
  color: #219653;
}

body.admin-page .pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 0 4px;
  font-size: 13px;
}

body.admin-page .pagination-nav .page-step,
body.admin-page .pagination-nav .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--cx-muted);
  text-decoration: none;
}

body.admin-page .pagination-nav .page-step:hover,
body.admin-page .pagination-nav .page-num:hover {
  background: var(--cx-soft);
  color: var(--cx-ink);
}

body.admin-page .pagination-nav .page-num.current {
  background: var(--cx-navy);
  color: #fff;
}

body.admin-page .pagination-nav .disabled {
  pointer-events: none;
  opacity: 0.45;
}

@media (max-width: 1280px) {
  .sources-workspace {
    grid-template-columns: 1fr;
  }
}

/* API Details */
.api-doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.api-doc-toc {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.api-doc-toc h2 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cx-muted);
}

.api-doc-toc a {
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--cx-muted);
  font-size: 13px;
  text-decoration: none;
}

.api-doc-toc a:hover {
  background: var(--cx-soft);
  color: var(--cx-navy);
}

.api-doc-main {
  min-width: 0;
}

.api-doc-card {
  margin-bottom: 14px;
  scroll-margin-top: 16px;
}

.api-doc-card h3 {
  margin: 18px 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cx-muted);
}

.api-docs code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--cx-soft);
  color: var(--cx-navy);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12.5px;
}

.api-endpoint-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.api-endpoint-stack {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--cx-line);
}

.api-endpoint-head > code {
  font-size: 14px;
  font-weight: 500;
  background: none;
  padding: 0;
  color: var(--cx-ink);
}

.api-method {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.api-method.sm {
  padding: 2px 7px;
  font-size: 11px;
}

.api-method.get {
  background: #e8f7ee;
  color: #219653;
}

.api-method.post {
  background: #e9f1fd;
  color: #2d5fbf;
}

.api-method.patch {
  background: #fdf3e5;
  color: #d07c12;
}

.api-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
}

.api-pill.token {
  background: #f0ecfd;
  color: #7050d8;
}

.api-pill.session {
  background: var(--cx-soft);
  color: var(--cx-muted);
}

.api-pill.ok {
  background: #e8f7ee;
  color: #219653;
}

.api-pill.warn {
  background: #fdecec;
  color: #eb5757;
}

.api-field-table {
  display: flex;
  flex-direction: column;
}

.api-field-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cx-line);
}

.api-field-row:last-child {
  border-bottom: 0;
}

.api-field-row > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.api-field-row p {
  margin: 0;
  font-size: 13.5px;
  color: var(--cx-muted);
  line-height: 1.55;
}

.api-field-req {
  font-size: 11.5px;
  font-weight: 500;
  color: #eb5757;
}

.api-field-type {
  font-size: 11.5px;
  color: var(--cx-muted);
}

body.admin-page .api-code {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #10203f;
  color: #dfe8fa;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}

.api-keys-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.api-keys-head h2 {
  margin-bottom: 6px;
}

.api-keys-head .hint {
  max-width: 640px;
  margin: 0;
}

.api-keys-head form {
  flex: 0 0 auto;
}

.api-new-token {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #e8f7ee;
  border: 1px solid #bfe6cd;
}

.api-new-token p {
  margin: 0 0 10px;
  color: #17693f;
  font-size: 13.5px;
}

.api-token-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.admin-page .api-token-row code {
  flex: 1 1 auto;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #bfe6cd;
  border-radius: 8px;
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
}

body.admin-page .ghost-button.danger-ghost {
  color: #eb5757;
  border-color: #f3c1c1;
}

body.admin-page .ghost-button.danger-ghost:hover {
  background: #fdecec;
}

.hint-inline {
  color: var(--cx-muted);
  font-size: 12px;
}

.api-note-list {
  margin: 0;
  padding-left: 18px;
}

.api-note-list li {
  margin-bottom: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--cx-ink);
}

@media (max-width: 1100px) {
  .api-doc-layout {
    grid-template-columns: 1fr;
  }

  .api-doc-toc {
    position: static;
  }

  .api-field-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Users & Access */
.users-command-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.users-command-bar .coverage-county-search {
  flex: 0 1 340px;
  min-width: 240px;
  margin-bottom: 0;
}

.users-command-bar .coverage-search-field input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  background: #f4f4f4;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.users-command-bar .coverage-search-field input[type="search"]:focus {
  background: #fff;
  border-color: #dfe6f2;
  outline: none;
}

.users-command-actions {
  margin-left: auto;
}

.create-user-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  background: var(--cx-navy);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.create-user-button svg {
  width: 16px;
  height: 16px;
}

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cx-ink);
  text-decoration: none;
}

.user-cell strong {
  font-weight: 500;
}

.users-scope-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 450;
  white-space: nowrap;
}

.user-pill.pill-active {
  background: #e8f7ee;
  color: #219653;
}

.user-pill.pill-suspended {
  background: #fdecec;
  color: #eb5757;
}

.users-actions-col {
  width: 64px;
  text-align: center;
}

/* Let the row-actions dropdown escape the table scroll container */
.users-table-card .table-wrap,
body.admin-page .users-table-card .admin-table {
  overflow: visible;
}

.row-actions {
  position: relative;
  display: inline-block;
}

.row-actions > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--cx-muted);
}

.row-actions > summary::-webkit-details-marker {
  display: none;
}

.row-actions > summary:hover {
  background: var(--cx-soft);
}

.row-actions > summary svg {
  width: 4px;
  height: 16px;
}

.row-actions-menu {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 40;
  min-width: 180px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--cx-line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 33, 71, 0.12);
  text-align: left;
}

.row-actions-menu a,
body.admin-page .row-actions-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  box-shadow: none;
  color: var(--cx-muted);
  font-size: 13px;
  font-weight: 450;
  text-decoration: none;
  cursor: pointer;
}

.row-actions-menu a:hover,
body.admin-page .row-actions-menu button:hover {
  background: var(--cx-soft);
}

.row-actions-menu svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

body.admin-page .row-actions-menu .menu-danger {
  color: #eb5757;
}

.admin-dialog {
  width: min(480px, 92vw);
  max-height: 86vh;
  padding: 22px 24px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 33, 71, 0.25);
}

.admin-dialog::backdrop {
  background: rgba(11, 25, 56, 0.45);
}

.admin-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.admin-dialog-head h2 {
  margin: 0;
}

.dialog-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--cx-soft);
  color: var(--cx-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* User detail view */
.user-back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--cx-muted);
  font-size: 13px;
  text-decoration: none;
}

.user-back-link:hover {
  color: var(--cx-navy);
}

.user-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.user-hero-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-hero-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--cx-navy);
  color: #fff;
  font-style: normal;
  font-size: 20px;
  font-weight: 600;
}

.user-hero-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.user-hero-name h2 {
  margin: 0;
}

.role-chip {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--cx-soft);
  color: var(--cx-muted);
  font-size: 12px;
  font-weight: 500;
}

.user-hero .hint {
  margin: 4px 0 0;
}

.user-hero-stats {
  display: flex;
  align-items: stretch;
}

.user-hero-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 22px;
  border-left: 1px solid var(--cx-line);
}

.user-hero-stats > div:first-child {
  border-left: 0;
}

.user-hero-stats strong {
  font-size: 20px;
  font-weight: 600;
  color: var(--cx-ink);
}

.user-hero-stats span {
  font-size: 12px;
  color: var(--cx-muted);
}

.user-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.user-detail-main {
  min-width: 0;
}

.user-tab-bar {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--cx-line);
  border-radius: 10px;
}

.user-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--cx-muted);
  font-size: 13px;
  font-weight: 450;
  text-decoration: none;
  white-space: nowrap;
}

.user-tab.active {
  background: var(--cx-navy);
  color: #fff;
}

.user-tab-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--cx-muted);
  font-size: 13px;
}

.tab-counts strong {
  color: var(--cx-navy);
}

.user-activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.user-activity-feed li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--cx-line);
}

.user-activity-feed li:last-child {
  border-bottom: 0;
}

.activity-title {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 450;
  color: var(--cx-ink);
}

.activity-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cx-soft);
  color: var(--cx-muted);
  font-size: 11.5px;
  font-weight: 500;
}

.activity-tag.tag-import {
  background: #e8f7ee;
  color: #219653;
}

.activity-tag.tag-foia {
  background: #e9f1fd;
  color: #2d5fbf;
}

.activity-tag.tag-work_queue,
.activity-tag.tag-coverage {
  background: #f0ecfd;
  color: #7050d8;
}

.activity-when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 0 auto;
  color: var(--cx-muted);
  font-size: 12px;
}

.activity-empty {
  color: var(--cx-muted);
}

.user-profile-rail {
  position: sticky;
  top: 16px;
}

.profile-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.profile-rail-head h2 {
  margin: 0;
}

.profile-edit-link {
  color: var(--cx-muted);
  font-size: 13px;
  text-decoration: none;
}

.profile-edit-link:hover {
  color: var(--cx-navy);
}

.profile-section {
  padding: 14px 0;
  border-top: 1px solid var(--cx-line);
}

.profile-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.profile-field {
  margin-bottom: 12px;
}

.profile-field:last-child {
  margin-bottom: 0;
}

.profile-field > span {
  display: block;
  margin-bottom: 3px;
  color: var(--cx-muted);
  font-size: 12px;
}

.profile-field p {
  margin: 0;
  font-size: 13.5px;
  color: var(--cx-ink);
}

.scope-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scope-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e9f1fd;
  color: #2d5fbf;
  font-size: 12px;
  font-weight: 450;
}

.permission-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.permission-list li {
  position: relative;
  padding: 3px 0 3px 22px;
  font-size: 13px;
  color: var(--cx-ink);
}

.permission-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 9px;
  height: 5px;
  border-left: 1.6px solid #219653;
  border-bottom: 1.6px solid #219653;
  transform: rotate(-45deg);
}

.user-account-card {
  margin-bottom: 14px;
}

@media (max-width: 1100px) {
  .user-detail-layout {
    grid-template-columns: 1fr;
  }

  .user-profile-rail {
    position: static;
  }
}

/* Audit Log + FOIA */
.audit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.audit-toolbar h2 {
  margin: 0;
}

.audit-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-toolbar-controls .coverage-county-search {
  width: 260px;
  margin-bottom: 0;
}

.audit-toolbar-controls .coverage-search-field input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  background: #f4f4f4;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.audit-toolbar-controls .coverage-search-field input[type="search"]:focus {
  background: #fff;
  border-color: #dfe6f2;
  outline: none;
}

.audit-events-card {
  margin-bottom: 16px;
}

.audit-entity {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foia-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.foia-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.foia-template-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.foia-template-head h2 {
  margin: 0 0 4px;
}

.foia-template-head .hint {
  margin: 0;
}

.foia-template-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.template-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--cx-control-line);
  background: #fff;
  color: var(--cx-muted);
  font-size: 13px;
  font-weight: 450;
  text-decoration: none;
  white-space: nowrap;
}

.template-pill::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex: 0 0 auto;
}

.template-pill.active {
  border-color: var(--cx-navy);
  color: var(--cx-navy);
}

.template-pill.active::before {
  border-width: 4px;
}

.foia-copy-note {
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fdf8e7;
  border: 1px solid #f3e4b0;
  color: #8a6d1a;
  font-size: 13px;
}

body.admin-page .foia-preview {
  background: #fff;
  border: 0;
  padding: 4px 0 0;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cx-ink);
  white-space: pre-wrap;
}

.foia-status-pill {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 450;
  background: var(--cx-soft);
  color: var(--cx-muted);
  white-space: nowrap;
}

.foia-status-pill.status-sent {
  background: #e9f1fd;
  color: #2d5fbf;
}

.foia-status-pill.status-acknowledged {
  background: #f0ecfd;
  color: #7050d8;
}

.foia-status-pill.status-fulfilled {
  background: #e8f7ee;
  color: #219653;
}

.foia-status-pill.status-denied {
  background: #fdecec;
  color: #eb5757;
}

.foia-status-pill.status-stalled {
  background: #fdf3e5;
  color: #d07c12;
}

@media (max-width: 1100px) {
  .foia-layout {
    grid-template-columns: 1fr;
  }
}

/* Work Queue */
.coverage-kpi-grid.queue-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bulk-assign-bar button {
  width: auto;
  margin-left: auto;
}

.queue-filters .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-reset {
  font-size: 12px;
  color: var(--cx-muted);
  text-decoration: none;
}

.queue-reset:hover {
  color: var(--cx-link);
}

.queue-status {
  font-size: 12px;
  font-weight: 450;
  white-space: nowrap;
}

.queue-status.status-open {
  color: #219653;
}

.queue-status.status-in-progress {
  color: #2d5fbf;
}

.queue-status.status-waiting {
  color: #7050d8;
}

.queue-status.status-stalled {
  color: #d07c12;
}

.queue-status.status-done {
  color: var(--cx-muted);
}

.queue-assignee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.queue-assignee.unassigned {
  color: var(--cx-muted);
}

.assignee-avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cx-chip);
  color: var(--cx-navy);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}

.priority-pill {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 450;
  white-space: nowrap;
}

.priority-pill.priority-urgent {
  background: #fbdcdc;
  color: #c0392b;
}

.priority-pill.priority-high {
  background: #fdecec;
  color: #eb5757;
}

.priority-pill.priority-normal {
  background: #fdf3e5;
  color: #d07c12;
}

.priority-pill.priority-low {
  background: #e8f7ee;
  color: #219653;
}

.queue-next-step {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .coverage-kpi-grid.queue-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Data Coverage: KPI row */
.coverage-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.coverage-kpi-card {
  background: var(--cx-soft);
  border: 1px solid #e8eef7;
  border-radius: 8px;
  padding: 14px 16px;
}

.coverage-kpi-card .kpi-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.coverage-kpi-card .kpi-top span {
  font-size: 14px;
  color: var(--cx-ink);
}

.coverage-kpi-card .kpi-top strong {
  font-size: 19px;
  font-weight: 600;
  color: var(--cx-value);
  white-space: nowrap;
}

.coverage-kpi-card p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--cx-muted);
}

/* Data Coverage: map + detail rail */
.coverage-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.coverage-legend-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coverage-legend-chip .badge i.dot {
  width: 8px;
  height: 8px;
}

.dot.coverage.gray {
  background: #c9ced6;
}

.counties-data-card {
  position: absolute;
  right: 14px;
  bottom: 110px;
  z-index: 800;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--cx-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(13, 32, 60, 0.14);
  padding: 12px 14px;
}

.counties-data-card p {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cx-ink);
}

.counties-data-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 0;
  font-size: 12px;
  color: var(--cx-muted);
}

.counties-data-card div span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.counties-data-card div strong {
  color: var(--cx-ink);
  font-weight: 600;
}

@media (max-width: 1280px) {
  .coverage-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coverage-workspace {
    grid-template-columns: 1fr;
  }
}

body.admin-page .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dedede;
  color: var(--cx-ink);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
}

body.admin-page .badge.subtle {
  color: var(--cx-muted);
}

body.admin-page .badge.chip-primary {
  background: var(--cx-navy);
  border-color: var(--cx-navy);
  color: #fff;
}

body.admin-page .coverage-map-frame {
  padding: 0;
  border-radius: 10px;
  background: none;
  box-shadow: none;
  min-height: 560px;
}

body.admin-page #coverageMap {
  height: clamp(560px, calc(100vh - 340px), 900px);
  min-height: 560px;
  border-radius: 10px;
  border: 1px solid var(--cx-line);
  box-shadow: none;
}

body.admin-page .coverage-map-frame .map-chrome {
  top: 12px;
  left: 12px;
  right: 12px;
  gap: 10px;
}

body.admin-page .map-action {
  background: #fff;
  color: var(--cx-ink);
  border: 1px solid var(--cx-control-line);
  box-shadow: 0 1px 2px rgba(13, 32, 60, 0.08);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 450;
}

body.admin-page .map-action:hover {
  background: var(--cx-soft);
}

body.admin-page .leaflet-control-zoom {
  border: 0;
  box-shadow: none;
}

body.admin-page .leaflet-control-zoom a {
  width: 40px;
  height: 40px;
  line-height: 40px;
  background: var(--cx-panel);
  border: 1px solid var(--cx-line-soft);
  color: var(--cx-ink);
  font-weight: 400;
}

body.admin-page .leaflet-control-zoom-in {
  border-radius: 4px 4px 0 0;
}

body.admin-page .leaflet-control-zoom-out {
  border-radius: 0 0 4px 4px;
}

body.admin-page .flash {
  border-radius: 8px;
  border: 1px solid var(--cx-line);
  font-size: 14px;
}

body.admin-page .flash.success {
  background: #e8f7ee;
  color: #219653;
  border-color: #cdeeda;
}

body.admin-page .flash.error {
  background: #fdecec;
  color: #b3261e;
  border-color: #f6d5d3;
}

body.admin-page .sort-link {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .admin-side-nav {
    flex-direction: row;
    padding: 10px;
  }

  .admin-side-foot {
    margin: 0 10px 0 auto;
    border-top: 0;
    white-space: nowrap;
  }
}
