/* DDRO Outreach Directory
   Visual language taken from the Texas National Guard Counterdrug seal:
   night-navy field, pewter/silver type, Texas red for action, Texas blue for focus and info,
   a ring of stars as the recurring motif. Dark theme is the brand; it is locked on purpose. */

@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #060a11;
  --bg-2: #0a101a;
  --panel: rgba(16, 24, 37, 0.78);
  --panel-solid: #101825;
  --surface: #121b2a;
  --surface-2: #172234;
  --sunken: #0b121c;
  --border: rgba(170, 188, 214, 0.12);
  --border-strong: rgba(170, 188, 214, 0.24);
  --text: #eef2f8;
  --text-2: #c5cedb;
  --muted: #8a98ae;
  --silver: #b9c4d3;

  --red: #e5364e;
  --red-deep: #bf0a30;
  --red-soft: rgba(229, 54, 78, 0.14);
  --blue: #5b8cff;
  --blue-deep: #1f4fd1;
  --blue-soft: rgba(91, 140, 255, 0.14);
  --ok: #4cd29a;
  --ok-soft: rgba(76, 210, 154, 0.13);
  --warn: #f2b84b;
  --warn-soft: rgba(242, 184, 75, 0.13);

  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  --accent-text: #9dbbff;
  --danger: #ff7085;
  --danger-soft: rgba(255, 112, 133, 0.12);

  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
  --r-ctl: 10px;
  --r-panel: 16px;
  --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --display: "Barlow Condensed", "Barlow", -apple-system, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}
/* backdrop: glows, tactical grid, drifting stars (fixed, never scrolls, never catches clicks) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(52, 96, 220, 0.28), transparent 60%),
    radial-gradient(800px 600px at 105% 110%, rgba(191, 10, 48, 0.22), transparent 60%),
    radial-gradient(600px 400px at 60% 40%, rgba(91, 140, 255, 0.06), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
body::after {
  content: ""; position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 20px 30px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 140px 90px, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.4px 1.4px at 260px 190px, rgba(157,187,255,.5), transparent 60%),
    radial-gradient(1px 1px at 330px 40px, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1.2px 1.2px at 80px 260px, rgba(255,170,180,.35), transparent 60%),
    linear-gradient(rgba(170,188,214,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170,188,214,.045) 1px, transparent 1px);
  background-size: 380px 300px, 380px 300px, 380px 300px, 380px 300px, 380px 300px, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
@media (prefers-reduced-motion: no-preference) {
  body::after { animation: drift 120s linear infinite; }
  @keyframes drift { to { transform: translate3d(380px, 300px, 0); } }
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: rgba(91, 140, 255, .35); }
[hidden] { display: none !important; }

/* tricolor rule across the top of every page */
.tricolor { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; display: grid; grid-template-columns: 1fr 1fr 1fr; pointer-events: none; }
.tricolor i:nth-child(1) { background: var(--blue-deep); }
.tricolor i:nth-child(2) { background: #f1f4f9; }
.tricolor i:nth-child(3) { background: var(--red-deep); }

/* ------------------------------------------------ buttons & inputs */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: var(--r-ctl); border: 1px solid var(--border-strong); background: rgba(255,255,255,.03);
  color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .12s ease, box-shadow .2s var(--ease);
}
.btn:hover { background: rgba(255,255,255,.07); border-color: rgba(170,188,214,.4); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #ef4a61, var(--red-deep)); border-color: rgba(255,120,140,.45); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 22px rgba(191,10,48,.35);
}
.btn.primary:hover { background: linear-gradient(180deg, #f45c71, #cf1239); box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 10px 28px rgba(191,10,48,.5); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(255,255,255,.06); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn.icon { width: 38px; padding: 0; justify-content: center; }
.btn.icon.sm { width: 32px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--silver); text-transform: uppercase; letter-spacing: .06em; font-family: var(--display); }
.field small { color: var(--muted); font-size: 12.5px; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--r-ctl);
  border: 1px solid var(--border-strong); background: rgba(6,10,17,.55); color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
textarea.input { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: #6f7d93; }
.input:hover { border-color: rgba(170,188,214,.36); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); background: rgba(6,10,17,.8); }
select.input { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option { background: var(--panel-solid); }

/* ------------------------------------------------ seal (logo with orbiting star ring) */
.seal { position: relative; display: grid; place-items: center; flex: none; width: var(--s, 44px); height: var(--s, 44px); }
.seal .brand-logo { width: 64%; height: 64%; object-fit: contain; position: relative; z-index: 2; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
/* header mark: the shield on its own, with a light sweep across it */
.shield-mark { position: relative; width: 44px; height: 48px; flex: none; display: grid; place-items: center;
  -webkit-mask: url("/brand-logo") center / contain no-repeat; mask: url("/brand-logo") center / contain no-repeat; }
.shield-mark .brand-logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.shield-mark::after { content: ""; position: absolute; inset: -20% -60%; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%); transform: translateX(-70%); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .shield-mark::after { animation: sweep 6s var(--ease) infinite; }
  .brand:hover .shield-mark::after { animation-duration: 1.4s; }
  @keyframes sweep { 0%, 70% { transform: translateX(-70%); } 100% { transform: translateX(70%); } }
}
.seal .ring { position: absolute; inset: 0; z-index: 1; }
.seal .ring svg { width: 100%; height: 100%; }
.seal .ring .dash { stroke: rgba(185,196,211,.35); stroke-width: 1; stroke-dasharray: 2 5; fill: none; }
.seal .stars { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.seal .stars span { position: absolute; left: 50%; top: 50%; width: var(--star, 5px); height: var(--star, 5px); margin: calc(var(--star, 5px) / -2); color: #f1f4f9;
  transform: rotate(var(--a)) translateY(calc(var(--s, 44px) / -2 + var(--star, 5px) / 2)) rotate(calc(var(--a) * -1)); }
.seal .stars svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.seal .stars span:nth-child(3n) { color: #ff8b9b; }
.seal .stars span:nth-child(4n) { color: #a8c2ff; }
@media (prefers-reduced-motion: no-preference) {
  .seal .ring { animation: spin 60s linear infinite; }
  .seal .stars { animation: spin 90s linear infinite reverse; }
  .brand:hover .seal .stars { animation-duration: 12s; }
  @keyframes spin { to { transform: rotate(360deg); } }
}

/* ------------------------------------------------ app shell */
.topbar {
  position: sticky; top: 3px; z-index: 20; height: 70px; display: flex; align-items: center; gap: 16px;
  padding: 0 28px; background: rgba(8, 13, 21, 0.72); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-text { display: grid; line-height: 1.1; min-width: 0; }
.brand { text-decoration: none; }
.brand-text strong { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: .04em; text-transform: uppercase; }
.brand-text span { font-size: 12.5px; color: var(--silver); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px; z-index: 30;
  background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg);
  transform-origin: top right;
}
@media (prefers-reduced-motion: no-preference) { .menu-panel:not([hidden]) { animation: pop .18s var(--ease); } @keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } } }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head strong { display: block; font-size: 14px; }
.menu-head span { font-size: 12.5px; color: var(--muted); text-transform: capitalize; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none;
  border-radius: 8px; font-size: 14px; text-align: left; cursor: pointer; color: var(--text);
}
.menu-item:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.menu-item svg { color: var(--muted); }

.layout {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px;
  max-width: 1500px; margin: 0 auto; padding: 26px 28px;
}

/* ------------------------------------------------ hero stats */
.hero { max-width: 1500px; margin: 0 auto; padding: 30px 28px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.02; letter-spacing: .01em; text-transform: uppercase; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #ffffff 0%, #c9d6ee 40%, #ff8b9b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 8px 0 0; color: var(--text-2); max-width: 60ch; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(128px, 1fr)); gap: 12px; }
.stat {
  position: relative; overflow: hidden; text-align: left; border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px 13px;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); color: var(--text); cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--blue)); }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--blue)) 40%, transparent), transparent 70%); opacity: .6; transition: opacity .3s; }
.stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c, var(--blue)) 55%, transparent); }
.stat:hover::after { opacity: 1; }
.stat .v { display: block; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--silver); margin-top: 6px; }
.stat .k svg { width: 15px; height: 15px; color: var(--c, var(--blue)); }

/* ------------------------------------------------ filter sidebar */
.filters { position: sticky; top: 98px; align-self: start; max-height: calc(100dvh - 120px); overflow: auto; padding: 16px 16px 8px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--panel); backdrop-filter: blur(10px); scrollbar-width: thin; scrollbar-color: rgba(170,188,214,.2) transparent; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.filters-head h2 { font-family: var(--display); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; margin: 0; display: flex; align-items: center; gap: 8px; }
.filters-head h2 svg { color: var(--red); }
.link-btn { border: 0; background: none; color: var(--accent-text); font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.link-btn:hover { text-decoration: underline; }
.facet { border-top: 1px solid var(--border); padding: 12px 0 10px; }
.facet-toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; background: none;
  padding: 2px 0 8px; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; color: var(--silver);
}
.facet-toggle .sel { font-family: var(--font); letter-spacing: 0; font-weight: 700; font-size: 11.5px; color: #fff; background: var(--red); border-radius: 999px; padding: 1px 7px; margin-left: 8px; }
.facet-toggle svg { color: var(--muted); transition: transform .25s var(--ease); }
.facet.collapsed .facet-toggle svg { transform: rotate(-90deg); }
.facet.collapsed .facet-body { display: none; }
.facet-search { height: 34px; font-size: 13.5px; margin-bottom: 6px; }
.opt {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px;
  padding: 5px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: background-color .15s;
}
.opt:hover { background: rgba(255,255,255,.05); }
.opt input { appearance: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid rgba(170,188,214,.45); border-radius: 4px; cursor: pointer; display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.opt input:checked { background: var(--red); border-color: var(--red); }
.opt input:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.opt .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.opt input:checked + .lbl { color: #fff; font-weight: 600; }
.opt .cnt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; background: rgba(255,255,255,.05); border-radius: 999px; padding: 0 7px; }
.facet-more { margin-top: 4px; }
.facet-empty { font-size: 13px; color: var(--muted); padding: 2px 0 4px; }

/* ------------------------------------------------ results */
.searchbar { position: relative; }
.search-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--silver); z-index: 1; display: flex; pointer-events: none; }
.search-ico svg { width: 21px; height: 21px; }
.searchbar .input { height: 54px; padding-left: 48px; font-size: 16.5px; border-radius: 14px; background: var(--panel); backdrop-filter: blur(10px); border-color: var(--border-strong); }
.searchbar .input:focus { box-shadow: 0 0 0 4px var(--blue-soft), 0 12px 40px rgba(31,79,209,.25); }
.searchbar kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 600 12px var(--mono); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 7px; }
.searchbar .input:focus ~ kbd, .searchbar .clear:not([hidden]) ~ kbd { display: none; }
.searchbar .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 7px 0 12px; border-radius: 999px;
  background: var(--red-soft); color: #ffc2cb; font-size: 13px; font-weight: 600; border: 1px solid rgba(229,54,78,.35); cursor: pointer;
  transition: background-color .15s, transform .15s var(--ease);
}
.chip b { font-weight: 500; opacity: .75; }
.chip svg { width: 15px; height: 15px; }
.chip:hover { background: rgba(229,54,78,.24); }
@media (prefers-reduced-motion: no-preference) { .chip { animation: pop .22s var(--ease); } }
.results-bar { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; }
.results-count { font-size: 14px; color: var(--muted); }
.results-count strong { color: #fff; font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; margin-right: 2px; }
.results-bar .sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.results-bar .sort select { height: 36px; width: auto; font-size: 13.5px; }
.mobile-filter-btn { display: none; }

.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; backdrop-filter: blur(10px); box-shadow: var(--shadow); }
table.contacts { width: 100%; border-collapse: collapse; }
.contacts th {
  text-align: left; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 18px;
  background: rgba(255,255,255,.025); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.contacts td { padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--border); font-size: 14px; }
.contacts td:nth-child(3) { white-space: nowrap; }
.contacts tbody tr:last-child td { border-bottom: 0; }
.contacts tbody tr { cursor: pointer; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.contacts tbody tr:hover { background: rgba(91,140,255,.06); box-shadow: inset 3px 0 0 var(--c, var(--red)); }
.contacts tbody tr.active { background: rgba(91,140,255,.1); box-shadow: inset 3px 0 0 var(--c, var(--red)); }
@media (prefers-reduced-motion: no-preference) {
  .contacts tbody tr.enter { animation: rowIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
  @keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
}
.cell-main { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cell-contact { display: grid; gap: 3px; }
.cell-contact a { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; width: fit-content; max-width: 100%; color: var(--text-2); }
.cell-contact a:hover { color: #fff; text-decoration: none; }
.cell-contact a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-contact svg { width: 15px; height: 15px; color: var(--c, var(--blue)); }
.name-cell { display: flex; gap: 12px; align-items: flex-start; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c, var(--blue)) 38%, #0b121c), color-mix(in srgb, var(--c, var(--blue)) 12%, #0b121c));
  color: #fff; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: .04em;
  border: 1px solid color-mix(in srgb, var(--c, var(--blue)) 45%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--c, var(--blue)) 22%, transparent);
}
.type-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--c, var(--blue)); }
.type-tag svg { width: 14px; height: 14px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status[data-s="New"] { background: var(--blue-soft); color: #9dbbff; border-color: rgba(91,140,255,.25); }
.status[data-s="Contacted"] { background: var(--warn-soft); color: var(--warn); border-color: rgba(242,184,75,.25); }
.status[data-s="Active partner"] { background: var(--ok-soft); color: var(--ok); border-color: rgba(76,210,154,.25); }
.status[data-s="Active partner"]::before { box-shadow: 0 0 0 0 currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .status[data-s="Active partner"]::before { animation: ping 2.4s ease-out infinite; }
  @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(76,210,154,.6); } 70%, 100% { box-shadow: 0 0 0 6px rgba(76,210,154,0); } }
}
.status[data-s="Inactive"] { background: rgba(255,255,255,.05); color: var(--muted); }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.pager div { display: flex; gap: 8px; }

.empty { padding: 60px 24px; text-align: center; }
.empty h3 { margin: 14px 0 6px; font-family: var(--display); font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.empty p { margin: 0 auto 18px; color: var(--muted); max-width: 42ch; }
.empty .glyph { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; background: var(--blue-soft); display: grid; place-items: center; color: var(--blue); border: 1px solid rgba(91,140,255,.3); }
.empty .glyph svg { width: 26px; height: 26px; }
.empty .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.skeleton td div { height: 12px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; }
.skeleton td div + div { width: 60%; margin-top: 8px; }
@media (prefers-reduced-motion: no-preference) { .skeleton td div { animation: shimmer 1.3s linear infinite; } @keyframes shimmer { to { background-position: -200% 0; } } }

.site-footer { max-width: 1500px; margin: 0 auto; padding: 8px 28px 34px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.credit { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.03); }
.credit .stars-mini { display: inline-flex; gap: 2px; color: var(--red); }
.credit .stars-mini svg { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.credit .stars-mini svg:nth-child(2) { color: #f1f4f9; }
.credit .stars-mini svg:nth-child(3) { color: var(--blue); }
.credit strong { color: #fff; font-family: var(--display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }

/* ------------------------------------------------ drawer & modals */
.scrim { position: fixed; inset: 0; background: rgba(3, 6, 12, 0.62); backdrop-filter: blur(3px); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 41; background: var(--panel-solid);
  border-left: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.drawer-head { position: relative; padding: 24px 24px 18px; border-bottom: 1px solid var(--border); overflow: hidden;
  background: radial-gradient(420px 180px at 0% 0%, color-mix(in srgb, var(--c, var(--blue)) 30%, transparent), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.drawer-head::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c, var(--blue)), transparent); }
.drawer-top { display: flex; align-items: flex-start; gap: 16px; position: relative; }
.drawer-top .avatar { width: 58px; height: 58px; font-size: 22px; border-radius: 16px; }
.drawer-top h2 { margin: 0; font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: .02em; line-height: 1.1; text-transform: uppercase; }
.drawer-top p { margin: 5px 0 0; color: var(--text-2); font-size: 14px; }
.drawer-top .btn.icon { margin-left: auto; }
.quick { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; position: relative; }
.drawer-body { overflow: auto; padding: 8px 24px 24px; flex: 1; }
.dl { display: grid; grid-template-columns: 124px 1fr; gap: 0 16px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.dl dd { margin: 0; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); word-break: break-word; }
.dl dd.none { color: #5f6c81; }
.section-title { font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 24px 0 10px; color: var(--silver); }
.notes-box { white-space: pre-wrap; background: rgba(255,255,255,.035); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 12px 14px; font-size: 14px; }
.card-img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--sunken); transition: transform .3s var(--ease); }
a:hover > .card-img { transform: scale(1.015); }
.card-img-empty { border: 1px dashed var(--border-strong); border-radius: var(--r-ctl); padding: 18px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; }
.meta { font-size: 12.5px; color: var(--muted); margin-top: 20px; }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; background: rgba(0,0,0,.2); }
.drawer-foot .danger { margin-left: auto; }

.about-box { position: relative; background: linear-gradient(160deg, rgba(91,140,255,.09), rgba(91,140,255,.02)); border: 1px solid rgba(91,140,255,.22); border-radius: 14px; padding: 16px 18px; }
.about-box h4 { margin: 0 0 4px; font-family: var(--display); font-size: 13.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #9dbbff; }
.about-box p { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.about-box p:last-of-type { margin-bottom: 0; }
.sources { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(91,140,255,.18); font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; }
.sources a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal {
  width: min(760px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; position: relative;
  background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--blue-deep), #f1f4f9 50%, var(--red-deep)); }
.modal.narrow { width: min(520px, 100%); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.modal-head .btn { margin-left: auto; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: rgba(0,0,0,.2); }
.form-section + .form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-section h3 { margin: 0 0 12px; font-family: var(--display); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px 16px; }
.span2 { grid-column: 1 / -1; }
.error-msg { color: #ffc2cb; background: var(--danger-soft); border: 1px solid rgba(255,112,133,.3); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }

.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 18px; display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,.025); transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.dropzone.over { border-color: var(--blue); background: var(--blue-soft); }
.dropzone .thumb { width: 120px; aspect-ratio: 1.75; border-radius: 8px; background: var(--sunken); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--muted); border: 1px solid var(--border); }
.dropzone .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dropzone p { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.dropzone .row { display: flex; gap: 8px; flex-wrap: wrap; }

.users-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.users-table th { text-align: left; font-family: var(--display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border); }
.users-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.users-table select { height: 34px; font-size: 13px; width: auto; }
.users-table .cell-main { white-space: nowrap; }
.users-table tr.removed td { opacity: .55; }
.access-settings { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: end; background: linear-gradient(160deg, rgba(229,54,78,.08), rgba(91,140,255,.05)); border: 1px solid var(--border-strong); border-radius: 14px; padding: 16px; margin-bottom: 20px; }
.access-settings .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--red); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--silver); }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--danger-soft); color: var(--danger); }
.stat-row { display: flex; gap: 20px; font-size: 13.5px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.stat-row strong { color: #fff; font-family: var(--display); font-size: 17px; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: #f1f4f9; color: #0b121c;
  padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
}
.toast.err { background: var(--red-deep); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slideIn .38s var(--ease); }
  .drawer-body > * { animation: rowIn .45s var(--ease) both; }
  .drawer-body > *:nth-child(2) { animation-delay: 60ms; }
  .drawer-body > *:nth-child(3) { animation-delay: 110ms; }
  .drawer-body > *:nth-child(n+4) { animation-delay: 150ms; }
  .modal { animation: rise .32s var(--ease); }
  .scrim { animation: fade .25s ease; }
  .toast { animation: toastIn .3s var(--ease); }
  .hero > *, .stats .stat { animation: rowIn .6s var(--ease) both; }
  .stats .stat:nth-child(2) { animation-delay: 60ms; }
  .stats .stat:nth-child(3) { animation-delay: 120ms; }
  .stats .stat:nth-child(4) { animation-delay: 180ms; }
  @keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
  @keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0; } }
  @keyframes toastIn { from { transform: translate(-50%, 10px); opacity: 0; } }
  @keyframes fade { from { opacity: 0; } }
}

/* ------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 0; }
  .hero { padding: 22px 16px 0; }
  .filters {
    position: fixed; inset: 0 0 0 auto; width: min(360px, 92vw); max-height: none; top: 0; z-index: 45; border-radius: 0;
    background: var(--panel-solid); padding: 20px; border-left: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
    transform: translateX(105%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .filters.open { transform: none; visibility: visible; }
  .mobile-filter-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .brand-text span { display: none; }
  .hide-sm { display: none; }
  .searchbar kbd { display: none; }
}
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .v { font-size: 26px; }
  .brand-text strong { font-size: 17px; }
  .table-wrap { background: none; border: 0; border-radius: 0; overflow: visible; box-shadow: none; backdrop-filter: none; }
  table.contacts, .contacts tbody, .contacts tr, .contacts td { display: block; }
  .contacts thead { display: none; }
  .contacts tbody tr { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-panel); padding: 14px 16px; margin-bottom: 10px; box-shadow: inset 3px 0 0 var(--c, var(--red)); }
  .contacts td { border: 0; padding: 0; }
  .contacts td + td { margin-top: 8px; }
  .contacts td:nth-child(3) { white-space: normal; }
  .pager { border: 0; padding: 12px 0; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding: 10px 0 0; }
  .dl dd { padding-top: 2px; }
  .results-bar { flex-wrap: wrap; }
  .results-bar .sort { margin-left: 0; width: 100%; }
  .site-footer { flex-direction: column; padding: 8px 16px 28px; }
  .dropzone { flex-direction: column; align-items: flex-start; }
  .access-settings { grid-template-columns: 1fr; }
  .users-table thead { display: none; }
  .users-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .users-table td { border: 0; padding: 0; }
}

/* ------------------------------------------------ sign-in page */
.login-page { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); }
.login-hero { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 56px clamp(28px, 6vw, 96px); overflow: hidden; border-right: 1px solid var(--border); }
.login-hero .radar { position: absolute; left: 50%; top: 50%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; border-radius: 50%; pointer-events: none; opacity: .5;
  background:
    repeating-radial-gradient(circle, transparent 0 89px, rgba(170,188,214,.07) 89px 90px),
    conic-gradient(from 0deg, rgba(91,140,255,.22), transparent 18%, transparent);
  mask-image: radial-gradient(circle, #000 25%, transparent 68%);
}
@media (prefers-reduced-motion: no-preference) { .login-hero .radar { animation: spin 14s linear infinite; } }
.login-hero .seal { --s: 250px; --star: 13px; margin: -20px 0 18px -30px; }
.login-hero .seal .brand-logo { filter: drop-shadow(0 0 28px rgba(91,140,255,.35)) drop-shadow(0 18px 30px rgba(0,0,0,.6)); }
.login-hero .seal::before { content: ""; position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(circle, rgba(91,140,255,.22), transparent 65%); }
@media (prefers-reduced-motion: no-preference) {
  .login-hero .seal::before { animation: breathe 5s ease-in-out infinite; }
  @keyframes breathe { 50% { transform: scale(1.08); opacity: .7; } }
  .login-hero > *:not(.radar) { animation: rowIn .8s var(--ease) both; }
  .login-hero h1 { animation-delay: 120ms !important; }
  .login-hero p { animation-delay: 220ms !important; }
  .login-hero .pillars { animation-delay: 320ms !important; }
}
.login-hero h1 { position: relative; margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 5.2vw, 72px); line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.login-hero h1 span { display: block; background: linear-gradient(90deg, #ffffff, #c9d6ee 45%, #ff8b9b); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 4px; }
.login-hero p { position: relative; margin: 18px 0 0; max-width: 46ch; color: var(--text-2); font-size: 16.5px; }
.pillars { position: relative; display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.pillars span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255,255,255,.04); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.pillars svg { width: 16px; height: 16px; }
.pillars span:nth-child(1) svg { color: var(--blue); }
.pillars span:nth-child(2) svg { color: #f1f4f9; }
.pillars span:nth-child(3) svg { color: var(--red); }
.login-side { display: grid; grid-template-rows: 1fr auto; background: rgba(6,10,17,.55); backdrop-filter: blur(8px); }
.login-main { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(420px, 100%); }
.login-card .brand { display: none; margin-bottom: 22px; }
.login-card h2 { font-family: var(--display); font-size: 30px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 18px; }
.login-card form { display: grid; gap: 16px; }
.login-card .btn.primary { width: 100%; justify-content: center; height: 46px; font-size: 15px; }
.login-note { font-size: 12.5px; color: var(--muted); margin-top: 22px; display: flex; gap: 8px; align-items: flex-start; }
.login-note svg { width: 16px; height: 16px; margin-top: 1px; color: var(--silver); }
.login-footer { display: flex; justify-content: center; padding: 18px; }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 22px; }
.tabs button { position: relative; z-index: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; transition: color .2s; }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); border-radius: 9px; background: linear-gradient(180deg, #ef4a61, var(--red-deep)); box-shadow: 0 6px 18px rgba(191,10,48,.35); transition: transform .35s var(--ease); }
.tabs[data-active="up"] .pill { transform: translateX(calc(100% + 4px)); }
.form-lead { margin: 0 0 2px; color: var(--muted); font-size: 14px; }
@media (max-width: 960px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 20px 8px; align-items: center; text-align: center; border-right: 0; }
  .login-hero .seal { --s: 170px; --star: 9px; margin: 0 0 12px; }
  .login-hero h1 { font-size: 40px; }
  .login-hero p, .pillars { display: none; }
  .login-side { background: none; backdrop-filter: none; }
  .login-main { padding-top: 16px; align-items: start; }
}
