/* Brandity · 2040 — dark glass interface */
:root {
  color-scheme: dark;
  --bg: #070914;
  --panel: rgba(18, 22, 40, .72);
  --panel-solid: #121628;
  --panel-hi: rgba(255, 255, 255, .035);
  --line: rgba(148, 160, 255, .12);
  --line-hi: rgba(148, 160, 255, .28);
  --text: #e9ecff;
  --muted: #8a92b8;
  --faint: #5c6489;
  --primary: #8b7cff;
  --primary-2: #4fd8ff;
  --glow: 0 0 0 1px rgba(139, 124, 255, .35), 0 8px 32px rgba(110, 90, 255, .35);
  --series-1: #3987e5;   /* influencers   — validated on #121628 */
  --series-2: #d95926;   /* public figures */
  --good: #3ddc97;
  --danger: #ff5c7a;
  --glow-1: rgba(79, 216, 255, .13);
  --glow-2: rgba(139, 124, 255, .18);
  --glow-3: rgba(217, 89, 38, .07);
  --grid-line: rgba(148, 160, 255, .045);
  --sidebar-bg: rgba(10, 13, 28, .6);
  --field-bg: rgba(5, 7, 18, .55);
  --well-bg: rgba(0, 0, 0, .25);
  --popover-bg: #161b35;
  --card-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 20px 50px -24px rgba(0,0,0,.6);
  --pop-shadow: 0 24px 60px rgba(0,0,0,.6);
  --label: #c6cbea;
  --hover-bg: rgba(139, 124, 255, .06);
  --ghost-hover: rgba(255, 255, 255, .07);
  --accent-soft: rgba(139, 124, 255, .22);
  --accent-ring: rgba(139, 124, 255, .35);
  --hero-grad: linear-gradient(90deg, #fff 30%, #b9b0ff 70%, #7fe3ff);
  --ok-bg: rgba(61, 220, 151, .1);   --ok-text: #8ff0c4;  --ok-line: rgba(61, 220, 151, .3);
  --err-bg: rgba(255, 92, 122, .1);  --err-text: #ff9fb1; --err-line: rgba(255, 92, 122, .3);
  --warn-text: #ffcf8a;
  --avatar-fg: 82%;
  --avatar-bg-a: .3;
  --radius: 18px;
  --display: "Space Grotesk", Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f5fb;
    --panel: rgba(255, 255, 255, .82);
    --panel-solid: #ffffff;
    --panel-hi: rgba(20, 24, 60, .035);
    --line: rgba(40, 48, 110, .11);
    --line-hi: rgba(40, 48, 110, .22);
    --text: #121530;
    --muted: #5a6183;
    --faint: #7c82a1;
    --primary: #5b4ff0;
    --primary-2: #0b7fb3;
    --glow: 0 0 0 1px rgba(91, 79, 240, .25), 0 8px 24px rgba(91, 79, 240, .25);
    --series-1: #2a78d6;   /* validated on #ffffff */
    --series-2: #eb6834;
    --good: #12a36b;
    --danger: #d92d4f;
    --glow-1: rgba(79, 190, 255, .16);
    --glow-2: rgba(139, 124, 255, .16);
    --glow-3: rgba(235, 104, 52, .06);
    --grid-line: rgba(40, 48, 110, .05);
    --sidebar-bg: rgba(255, 255, 255, .7);
    --field-bg: #ffffff;
    --well-bg: rgba(20, 24, 60, .05);
    --popover-bg: #ffffff;
    --card-shadow: 0 1px 2px rgba(20, 24, 60, .05), 0 14px 40px -24px rgba(20, 24, 60, .25);
    --pop-shadow: 0 18px 50px rgba(20, 24, 60, .18);
    --label: #2b3052;
    --hover-bg: rgba(91, 79, 240, .05);
    --ghost-hover: rgba(20, 24, 60, .06);
    --accent-soft: rgba(91, 79, 240, .12);
    --accent-ring: rgba(91, 79, 240, .3);
    --hero-grad: linear-gradient(90deg, #121530 30%, #5b4ff0 70%, #0b7fb3);
    --ok-bg: #e7f8ef;   --ok-text: #0e6b45; --ok-line: #b9e9d0;
    --err-bg: #fdecef;  --err-text: #b4233f; --err-line: #f6c3cd;
    --warn-text: #9a5b00;
    --avatar-fg: 32%;
    --avatar-bg-a: .22;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font: 14px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 85% -10%, var(--glow-1), transparent 60%),
    radial-gradient(800px 600px at 10% 0%, var(--glow-2), transparent 60%),
    radial-gradient(700px 500px at 60% 110%, var(--glow-3), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before { /* faint blueprint grid */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
}
a { color: var(--primary-2); text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; }
h1 { font-size: 30px; margin: 0; font-weight: 600; }
h2 { font-size: 16px; margin: 0; font-weight: 600; }
h3 { margin: 0 0 4px; }
.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.strong { font-weight: 600; color: var(--text); }
::selection { background: rgba(139,124,255,.4); }

/* layout */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px;
  background: var(--sidebar-bg); border-right: 1px solid var(--line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; font: 700 18px var(--display); color: var(--text); letter-spacing: -.01em; }
.brand.center { justify-content: center; margin-bottom: 22px; }
.logo {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700;
  background: conic-gradient(from 210deg, #8b7cff, #4fd8ff, #8b7cff);
  box-shadow: 0 0 24px rgba(139,124,255,.55);
}
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 500; border: 1px solid transparent; transition: .15s; }
.sidebar nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar nav a:hover { color: var(--text); background: var(--panel-hi); }
.sidebar nav a.active { color: var(--text); background: linear-gradient(90deg, var(--accent-soft), transparent); border-color: var(--accent-ring); }
.sidebar nav a.active svg { stroke: var(--primary-2); filter: drop-shadow(0 0 6px rgba(79,216,255,.7)); }
.me { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid var(--line); }
.me-name { font-weight: 600; }
.me-email { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; word-break: break-all; }
.main { padding: 36px 44px 60px; max-width: 1240px; width: 100%; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin: 6px 0 0; }
.hero h1 { font-size: 34px; background: var(--hero-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.back:hover { color: var(--text); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }

/* glass cards */
.card, .stat {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--card-shadow);
}
.card { padding: 24px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 480px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head p { margin: 3px 0 0; }
.panels { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panels { margin-bottom: 20px; }
.panels > .card { margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { padding: 18px 20px 16px; overflow: hidden; transition: border-color .2s, transform .2s; }
.stat:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.stat::after { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(139,124,255,.7), rgba(79,216,255,.7), transparent); }
.stat span { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.stat strong { display: block; font: 600 34px/1.15 var(--display); letter-spacing: -.03em; margin-top: 10px; }
.stat em { display: block; font-style: normal; color: var(--faint); font-size: 12.5px; margin-top: 4px; }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: rgba(255,92,122,.22); }
.danger-zone p { margin: 4px 0 0; }
.empty { text-align: center; padding: 56px 20px; }
.empty.sm { padding: 28px 20px; }
.empty p { margin: 0 0 18px; }

/* series keys (identity is a swatch beside text, never colored text) */
.key { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; flex: none; }
.stat .key { margin-right: 0; }
.key.s1 { background: var(--series-1); }
.key.s2 { background: var(--series-2); }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; }

/* horizontal stacked bars */
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar-row { display: grid; grid-template-columns: minmax(70px, 160px) minmax(0, 1fr); gap: 14px; align-items: center; }
.hbar-label { color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-label:hover { color: var(--primary-2); }
.hbar-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hbar { display: flex; gap: 2px; height: 14px; min-width: 6px; }
.seg { height: 100%; min-width: 3px; cursor: default; transition: filter .15s; outline: none; }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.seg:only-child { border-radius: 4px; }
.seg.s1 { background: var(--series-1); }
.seg.s2 { background: var(--series-2); }
.seg:hover, .seg:focus-visible { filter: brightness(1.25); }
.hbar-value { font: 500 12.5px var(--mono); color: var(--muted); flex: none; }
.tip {
  position: fixed; z-index: 50; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap;
  padding: 7px 11px; border-radius: 9px; font-size: 12.5px; color: var(--text);
  background: var(--popover-bg); border: 1px solid var(--line-hi); box-shadow: var(--pop-shadow);
}

/* logos */
img.avatar { object-fit: cover; background: #fff; border: 1px solid var(--line-hi); padding: 0; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.page-head .who { gap: 16px; }
.me-name { display: flex; align-items: center; gap: 8px; }
.me-logo { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; background: #fff; }
.logo-field { display: flex; align-items: center; gap: 18px; padding: 16px; border: 1px dashed var(--line-hi); border-radius: 14px; background: var(--field-bg); }
.logo-preview { width: 76px; height: 76px; flex: none; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--panel-hi); border: 1px solid var(--line); color: var(--faint); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.logo-preview.round { border-radius: 50%; }
.logo-field.missing { border-color: var(--danger); }
.logo-field.missing .hint { color: var(--err-text); }
.stack-sm { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.file-btn { position: relative; overflow: hidden; flex-direction: row; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.hint { margin: 0; color: var(--faint); font-size: 12.5px; }
.ch-field .hint { margin-top: 7px; }
.section-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Instagram autofill */
.ig-box { padding: 16px; border-radius: 14px; border: 1px solid rgba(225, 48, 108, .28);
  background: linear-gradient(135deg, rgba(225,48,108,.08), rgba(139,124,255,.06) 60%, rgba(79,216,255,.04)); display: flex; flex-direction: column; gap: 12px; }
.ig-head { display: flex; gap: 12px; align-items: center; }
.ig-head .hint { margin-top: 2px; }
.ig-glyph { width: 34px; height: 34px; flex: none; border-radius: 10px; position: relative;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ig-glyph::before { content: ""; position: absolute; inset: 8px; border: 2px solid #fff; border-radius: 6px; }
.ig-glyph::after { content: ""; position: absolute; width: 8px; height: 8px; left: 13px; top: 13px; border: 2px solid #fff; border-radius: 50%; box-sizing: content-box; margin: -1px; }
.ig-row { display: flex; gap: 10px; }
.ig-row input { flex: 1; min-width: 0; }
.ig-result { font-size: 13px; }
.ig-result.warn { color: var(--warn-text); }
.warn-text { color: var(--warn-text); font-weight: 500; }
.ig-card { display: flex; align-items: center; gap: 12px; }
.ig-card img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(225,48,108,.6); }
.ig-card > div { flex: 1; min-width: 0; }
input.filled, textarea.filled { animation: filled 1.4s ease-out; }
@keyframes filled { 0% { border-color: var(--good); box-shadow: 0 0 0 3px rgba(61,220,151,.25); } 100% { } }

img.avatar.round { border-radius: 50%; object-fit: cover; }
.ig-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ig-stats > div { padding: 10px 12px; border-radius: 11px; background: var(--field-bg); border: 1px solid var(--line); min-width: 0; }
.ig-stats span { display: block; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-stats strong { display: block; font: 600 18px var(--display); margin-top: 2px; }
.ig-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ig-tags span { font: 11.5px var(--mono); color: var(--muted); background: var(--panel-hi); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.ig-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ig-result .hint { margin-top: 8px; }

/* Companies House autocomplete */
.ch-field { position: relative; }
.ch-results { position: absolute; z-index: 20; left: 0; right: 0; top: 74px; max-height: 340px; overflow-y: auto; padding: 6px;
  background: var(--popover-bg); border: 1px solid var(--line-hi); border-radius: 14px; box-shadow: var(--pop-shadow); }
.ch-opt { padding: 9px 11px; border-radius: 10px; cursor: pointer; }
.ch-opt:hover, .ch-opt.on { background: var(--accent-soft); }
.ch-opt .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-msg { padding: 10px 12px; color: var(--muted); font-size: 13px; }

/* company profile */
.profile-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-main { flex: 1; min-width: 220px; }
.profile-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.profile-name h2 { font-size: 18px; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.profile-facts span { overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 18px 0 0; }
.facts > div { min-width: 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.facts dd { margin: 3px 0 0; overflow-wrap: anywhere; }

/* per-platform followers */
.socials-grid { display: flex; flex-direction: column; gap: 10px; }
.socials-rule { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.socials-rule .pill { font: 600 11.5px var(--mono); color: var(--primary); border-color: var(--accent-ring); background: var(--accent-soft); }
.social-row.below input.count { border-color: var(--danger); box-shadow: 0 0 0 3px var(--err-bg); }
.social-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.social-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px 20px; }
.socials-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; padding: 4px 2px 0; color: var(--muted); font-size: 13px; }
.socials-total strong { font-size: 20px; color: var(--text); }

/* invite link + public join page */
.invite-card { border-color: var(--accent-ring); }
.invite-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.invite-head p { margin: 4px 0 0; }
.invite-card .hint { margin-top: 10px; }
.pill.tiny { font-size: 10.5px; padding: 1px 7px; vertical-align: 1px; color: var(--muted); }
.join { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 48px 20px 64px; }
.join-head { display: flex; gap: 18px; align-items: center; margin-bottom: 24px; }
.join-head h1 { font-size: 30px; }
.join-head p { margin: 6px 0 0; }
.hint.center { text-align: center; margin-top: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* tag input (industry & services) */
.tags-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 8px; border-radius: 11px;
  background: var(--field-bg); border: 1px solid var(--line); min-height: 44px; cursor: text; transition: border-color .15s, box-shadow .15s; }
.tags-input:focus-within { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.tags-input input { flex: 1; min-width: 140px; border: 0; padding: 4px 6px; background: transparent; box-shadow: none !important; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 8px; font-size: 13px;
  background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent-ring); }
.tag button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 5px; }
.tag button:hover { color: var(--text); background: var(--ghost-hover); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-tags { margin-top: 8px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--label); }

/* add panel on the company dashboard */
.add-panel { padding: 0; scroll-margin-top: 16px; }
.add-panel > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer; border-radius: var(--radius); }
.add-panel > summary::-webkit-details-marker { display: none; }
.add-panel > summary:hover { background: var(--hover-bg); }
.add-panel > summary > div { flex: 1; min-width: 0; }
.add-panel > summary p { margin: 3px 0 0; }
.add-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 600 20px var(--display); color: #fff;
  background: linear-gradient(135deg, #8b7cff, #5b6cff 55%, #3fb8ff); box-shadow: var(--glow); flex: none; }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
.add-panel[open] .chev { transform: rotate(-135deg); }
.add-panel[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.add-body { padding: 22px; display: flex; flex-direction: column; gap: 22px; }
.add-body .invite-card { margin: 0; box-shadow: none; }

/* ---- new-gen person form ---- */
.nx-form { display: flex; flex-direction: column; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }

.kind-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kind-card { display: block; cursor: pointer; font-weight: 400; }
.kind-card input { position: absolute; opacity: 0; pointer-events: none; }
.kind-body { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px;
  background: var(--field-bg); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, transform .2s; }
.kind-card:hover .kind-body { border-color: var(--line-hi); transform: translateY(-1px); }
.kind-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--panel-hi); border: 1px solid var(--line); color: var(--muted); transition: .2s; }
.kind-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.kind-title { display: block; font: 600 15px var(--display); color: var(--text); }
.kind-desc { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kind-check { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-hi); flex: none; transition: .2s; }
.kind-card input:checked + .kind-body { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft), var(--glow); }
.kind-card input:checked + .kind-body .kind-icon { color: #fff; border-color: transparent; background: linear-gradient(135deg, #8b7cff, #5b6cff 55%, #3fb8ff); }
.kind-card input:checked + .kind-body .kind-check { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 45%, transparent 50%); }
.kind-card input:focus-visible + .kind-body { outline: 2px solid var(--primary-2); outline-offset: 2px; }

.nx-step { position: relative; padding: 20px 22px 22px; border-radius: 18px; background: var(--panel-hi); border: 1px solid var(--line); }
.nx-step::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(139,124,255,.8), rgba(79,216,255,.6), transparent 70%); }
.nx-step > header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.nx-step h3 { margin: 0; font-size: 16px; font-weight: 600; }
.nx-step > header p { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }
.nx-num { font: 600 12px var(--mono); letter-spacing: .08em; color: var(--primary); padding: 6px 8px; border-radius: 9px;
  background: var(--accent-soft); border: 1px solid var(--accent-ring); }

.identity-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center; }
.photo-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 14px 10px; border-radius: 16px;
  border: 1px dashed var(--line-hi); transition: border-color .2s, background .2s; }
.photo-drop.dragging { border-color: var(--primary); background: var(--accent-soft); }
.photo-drop.missing { border-color: var(--danger); }
.photo-drop.missing .hint { color: var(--err-text); }
.photo-drop .hint { font-size: 11.5px; }
.photo-ring { padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, #8b7cff, #4fd8ff, #eb6834, #8b7cff); box-shadow: 0 0 28px rgba(139,124,255,.35); }
.photo-ring .logo-preview { width: 112px; height: 112px; border: 3px solid var(--panel-solid); background: var(--panel-solid); }

.pf-label { display: inline-flex; align-items: center; gap: 8px; }
.pf-badge { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; font: 700 9.5px Inter, sans-serif; letter-spacing: -.02em; flex: none; }
.pf-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.pf-youtube { background: #ff0033; }
.pf-tiktok { background: #111; box-shadow: inset 2px 0 0 #25f4ee, inset -2px 0 0 #fe2c55; }
.pf-x { background: #111; }
.pf-facebook { background: #1877f2; font-size: 13px; }
.pf-linkedin { background: #0a66c2; }
.pf-snapchat { background: #fffc00; color: #111; }
.pf-threads { background: #111; font-size: 12px; }
.pf-pinterest { background: #e60023; }
.pf-twitch { background: #9146ff; }
@media (prefers-color-scheme: dark) { .pf-tiktok, .pf-x, .pf-threads { background: #000; border: 1px solid rgba(255,255,255,.25); } }

.nx-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-hi);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--pop-shadow); }
.nx-meter { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.nx-ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--line) 0); transition: background .4s; position: relative; }
.nx-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--panel-solid); }
.nx-ring span { position: relative; font: 600 11.5px var(--mono); }
.nx-meter-text { display: flex; flex-direction: column; min-width: 0; }
.nx-meter-text .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-reach { display: flex; flex-direction: column; align-items: flex-end; }
.nx-reach strong { font-size: 20px; line-height: 1.1; }
.nx-actions { flex-wrap: nowrap; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed li:first-child { padding-top: 0; }
.feed-body { flex: 1; min-width: 0; }
.feed-body .muted { display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 500 11px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .1em; padding: 12px 22px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--hover-bg); }
.actions { text-align: right; white-space: nowrap; }
.actions form { display: inline; }
.who { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; font: 600 13px var(--display);
  background: linear-gradient(135deg, hsl(var(--h) 70% 60% / var(--avatar-bg-a)), hsl(var(--h) 70% 40% / .15));
  color: hsl(var(--h) 85% var(--avatar-fg)); border: 1px solid hsl(var(--h) 70% 60% / .35);
}
.socials { line-height: 2; }
.socials span { display: inline-block; margin: 0 4px 2px 0; line-height: 1.5; }
.socials span { font: 12px var(--mono); background: var(--panel-hi); border: 1px solid var(--line); border-radius: 7px; padding: 1px 7px; white-space: nowrap; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 99px; white-space: nowrap; border: 1px solid var(--line); background: var(--panel-hi); color: var(--text); }
.pill > i:not(.key) { width: 7px; height: 7px; border-radius: 50%; }
.pill.green > i { background: var(--good); box-shadow: 0 0 8px var(--good); }
.pill.grey { color: var(--muted); }
.pill.grey > i { background: var(--faint); }
.pill.kind .key { margin-right: 0; }

/* toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; background: var(--well-bg); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tabs a { padding: 6px 14px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.search input { width: 280px; max-width: 100%; }

/* forms */
.stack { display: flex; flex-direction: column; gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 500; color: var(--label); }
input, textarea, select {
  font: inherit; padding: 11px 13px; border-radius: 11px; color: var(--text); outline: none;
  background: var(--field-bg); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { border-color: rgba(139,124,255,.7); box-shadow: 0 0 0 3px rgba(139,124,255,.18), 0 0 20px rgba(139,124,255,.2); }
textarea { resize: vertical; }
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--panel-solid); color: var(--text); }
.search.row { flex-wrap: nowrap; }
.search select { max-width: 200px; }
.segmented { display: inline-flex; background: var(--well-bg); border: 1px solid var(--line); padding: 4px; border-radius: 12px; align-self: flex-start; }
.segmented label { flex-direction: row; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { padding: 7px 16px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.segmented input:checked + span { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px Inter, system-ui, sans-serif; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; transition: .15s; white-space: nowrap; color: var(--text); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.primary { color: #fff; background: linear-gradient(135deg, #8b7cff, #5b6cff 55%, #3fb8ff); box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.12); box-shadow: 0 0 0 1px rgba(139,124,255,.5), 0 10px 40px rgba(110,90,255,.5); }
.btn.ghost { background: var(--panel-hi); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--line-hi); background: var(--ghost-hover); }
.btn.danger { background: var(--err-bg); color: var(--err-text); border-color: var(--err-line); }
.btn.danger:hover { background: rgba(255,92,122,.16); }

/* flash */
.flash { padding: 12px 15px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-line); }
.flash.error { background: var(--err-bg); color: var(--err-text); border-color: var(--err-line); }

/* auth */
.auth { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 410px; padding: 40px 34px; border-radius: 24px;
  background: var(--panel); border: 1px solid var(--line-hi); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(139,124,255,.08), 0 30px 80px -20px rgba(80,60,255,.45);
}
.auth-card h1 { text-align: center; }
.auth-card > p { text-align: center; margin: 8px 0 26px; }

@media (max-width: 1000px) {
  .social-rows { grid-template-columns: minmax(0, 1fr); }
  .panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .search.row { flex-wrap: wrap; }
  .logo-field { align-items: flex-start; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .kind-cards, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .identity-grid { grid-template-columns: minmax(0, 1fr); }
  .nx-step { padding: 16px; }
  .nx-bar { bottom: 8px; gap: 12px; }
  .nx-reach { align-items: flex-start; }
  .nx-actions { width: 100%; }
  .nx-actions .btn { flex: 1; }
  .join { padding-top: 28px; }
  .join-head { flex-direction: column; align-items: flex-start; }
  .invite-head { flex-direction: column; }
  .social-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
  .social-rows { grid-template-columns: minmax(0, 1fr); }
  .ig-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ig-card { flex-wrap: wrap; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 12px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar nav a { padding: 8px 10px; }
  .me { margin: 0 0 0 auto; padding: 0; border: 0; }
  .me-name, .me-email { display: none; }
  .main { padding: 22px 16px 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat strong { font-size: 28px; }
  .hbar-row { grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
  .page-head .row { width: 100%; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
