/* =========================================================
   VLN Digital Business Cards — Vasculearn Network
   Brand: purple #7c64af · charcoal #332e2e
   Per-card accent overrides --accent* (set inline by renderCard).
   ========================================================= */

:root {
  --vln-purple: #7c64af;
  --vln-purple-dark: #5f4a8c;
  --vln-charcoal: #332e2e;
  --vln-charcoal-soft: #564f4f;
  --vln-muted: #6c6668;          /* darkened to meet WCAG AA on white */
  --vln-line: #ece9ef;
  --vln-bg: #f4f2f7;
  --vln-white: #ffffff;

  /* accent (defaults to brand purple; per-card values injected inline) */
  --accent: #7c64af;
  --accent-dark: #5f4a8c;
  --accent-darker: #483667;
  --accent-light: #a48fd0;
  --accent-tint: #f3f0f9;
  --accent-tint-2: #e9e3f4;
  --accent-ink: #ffffff;          /* readable text on the accent fill */

  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 50px -18px rgba(51, 46, 46, 0.32);
  --shadow-soft: 0 6px 18px -8px rgba(51, 46, 46, 0.28);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* keep the hidden attribute authoritative over display rules */
html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--vln-charcoal);
  background: var(--vln-bg);
  background-image: radial-gradient(1200px 600px at 50% -10%, rgba(124, 100, 175, 0.16), transparent 60%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* Full-page layouts (card viewer, event page): the hero supplies all the
   colour, so the body below is a single seamless fill — no ambient glow
   that would fade into a visible mid-page seam. */
body.full-page { background-image: none; }

img { display: block; max-width: 100%; }
a { color: inherit; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Card viewer layout (full-page, like the event page) ---------- */
.stage {
  min-height: 100vh;
  min-height: 100dvh;
}

/* The card is now a full-bleed page: a hero banner spanning the width, then a
   centered content column — no floating shell, no shadow, no rounded frame. */
.card {
  width: 100%;
  position: relative;
}
.card-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
}

/* Banner + presets — a full-width hero with a rounded bottom edge */
.banner {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
}
.banner--default  { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-darker) 100%); }
.banner--dusk     { background: linear-gradient(140deg, var(--accent) 0%, #332e2e 122%); }
.banner--mesh {
  background-color: var(--accent);
  background-image:
    radial-gradient(at 18% 24%, var(--accent-light) 0, transparent 55%),
    radial-gradient(at 84% 12%, rgba(255,255,255,0.32) 0, transparent 46%),
    radial-gradient(at 76% 90%, var(--accent-darker) 0, transparent 58%);
}
.banner:not(.has-image)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../brand/vln-icon-white.svg") no-repeat right -18px bottom -14px;
  background-size: 120px;
  opacity: 0.16;
  pointer-events: none;
}
.banner.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

/* Corner QR — sits on the banner for quick in-person sharing */
.qr-corner {
  position: absolute; top: 16px; right: 16px; left: auto; z-index: 4;
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  cursor: pointer; transition: background 0.12s ease, transform 0.12s ease;
}
.qr-corner:hover { background: rgba(255, 255, 255, 0.32); }
.qr-corner:active { transform: scale(0.93); }
.qr-corner svg { width: 21px; height: 21px; }

/* Photo */
.photo-wrap { display: flex; justify-content: center; margin-top: -58px; position: relative; z-index: 2; }
.photo {
  width: 116px; height: 116px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-tint);
  border: 4px solid var(--vln-white);
  box-shadow: var(--shadow-soft);
}
.photo.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-darker); font-weight: 700; font-size: 38px;
}

/* Identity */
.identity { text-align: center; padding: 14px 24px 4px; }
.identity h1 {
  margin: 0;
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--vln-charcoal);
}
.identity h1 .cred { font-weight: 500; color: var(--vln-muted); font-size: 0.95rem; }
.identity .title { margin: 6px 0 0; color: var(--accent-darker); font-weight: 600; font-size: 0.98rem; }
.identity .company { margin: 2px 0 0; color: var(--vln-muted); font-size: 0.9rem; }
.identity .meta {
  margin: 10px 0 0;
  color: var(--vln-charcoal-soft); font-size: 0.85rem;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
}
.identity .meta svg { width: 16px; height: 16px; flex: none; }
.identity .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bio { text-align: center; padding: 12px 26px 0; color: var(--vln-charcoal-soft); font-size: 0.92rem; }

/* Primary actions — wraps gracefully, never clips */
.actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; padding: 20px 22px 4px;
}
.action {
  flex: 1 1 62px; min-width: 60px; max-width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; min-height: 64px;
  border: none; border-radius: var(--radius-sm);
  background: var(--accent-tint); color: var(--accent-darker);
  font-family: inherit; font-size: 0.74rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.action:hover { background: var(--accent-tint-2); }
.action:active { transform: scale(0.96); }
.action svg { width: 22px; height: 22px; }
.action.primary { background: var(--accent); color: var(--accent-ink); }
.action.primary:hover { background: var(--accent-dark); }

/* Mutual exchange CTA */
.exchange { padding: 14px 22px 0; }
.exchange-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 16px; border-radius: var(--radius-sm); cursor: pointer;
  font: inherit; font-size: 0.92rem; font-weight: 700;
  background: var(--accent-tint); color: var(--accent-darker); border: 1.5px solid var(--accent);
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.exchange-btn:hover { background: var(--accent); color: var(--accent-ink); }
.exchange-btn:active { transform: scale(0.99); }
.exchange-btn svg { width: 19px; height: 19px; }

/* Links */
.links { padding: 18px 22px 6px; display: grid; gap: 10px; }
.link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--vln-white); border: 1px solid var(--vln-line);
  text-decoration: none; color: var(--vln-charcoal);
  font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.link:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); }
.link:active { transform: scale(0.99); }
.link .ic {
  width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--accent-tint); color: var(--accent-darker);
}
.link .ic svg { width: 20px; height: 20px; }
.link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link .chev { color: var(--vln-muted); flex: none; }
.link .chev svg { width: 18px; height: 18px; }

/* Footer */
.card-footer {
  margin-top: 18px; padding: 18px 22px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vln-line);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.card-footer img { height: 36px; opacity: 0.95; }

.page-foot { margin-top: 22px; font-size: 0.74rem; color: var(--vln-muted); }
.page-foot a { color: var(--accent-dark); text-decoration: none; font-weight: 600; }

/* Entrance animation (respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes vln-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .card > .banner, .card-main > * { animation: vln-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .card > .banner { animation-delay: 0s; }
  .card-main > .photo-wrap { animation-delay: 0.06s; }
  .card-main > .identity { animation-delay: 0.12s; }
  .card-main > .bio { animation-delay: 0.16s; }
  .card-main > .actions { animation-delay: 0.2s; }
  .card-main > .links { animation-delay: 0.26s; }
  .card-main > .card-footer { animation-delay: 0.32s; }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--vln-charcoal); color: #fff;
  padding: 12px 18px; border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600; box-shadow: var(--shadow-card);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* QR modal */
.qr-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(36, 32, 33, 0.62);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.qr-overlay.show { opacity: 1; pointer-events: auto; }
.qr-panel {
  position: relative;
  background: #fff; border-radius: var(--radius);
  padding: 26px 26px 22px; width: 100%; max-width: 320px;
  text-align: center; box-shadow: var(--shadow-card);
  transform: scale(0.96); transition: transform 0.18s ease;
}
.qr-overlay.show .qr-panel { transform: scale(1); }
.qr-panel h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--vln-charcoal); }
.qr-panel p { margin: 0 0 16px; font-size: 0.82rem; color: var(--vln-muted); }
.qr-canvas {
  display: inline-block; padding: 12px; background: #fff;
  border: 1px solid var(--vln-line); border-radius: 14px;
}
.qr-canvas img, .qr-canvas canvas { width: 200px; height: 200px; image-rendering: pixelated; }
.qr-actions { display: flex; gap: 10px; margin-top: 18px; }
.qr-actions .btn { flex: 1; }
.qr-close {
  position: absolute; top: 12px; right: 12px;
  background: #fff; border: 1px solid var(--vln-line); border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; color: var(--vln-charcoal);
  display: flex; align-items: center; justify-content: center;
}
.qr-close svg { width: 16px; height: 16px; }

/* Exchange capture form (in the modal) */
.xc-panel { text-align: left; max-width: 340px; }
.xc-panel h3, .xc-panel > p { text-align: center; }
.xc-form { display: grid; gap: 10px; margin-top: 16px; }
.xc-form input:not([type=checkbox]), .xc-form textarea, .xc-form select {
  /* 16px keeps iOS Safari from auto-zooming when a field is focused */
  width: 100%; font: inherit; font-size: 16px; padding: 11px 13px; color: var(--vln-charcoal);
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-bg);
}
.xc-form input:not([type=checkbox]):focus, .xc-form textarea:focus, .xc-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); background: var(--vln-white);
}
.xc-form textarea { resize: vertical; min-height: 52px; }
.xc-form select:required:invalid { color: var(--vln-muted); }
.xc-check { display: flex; align-items: flex-start; gap: 9px; font-size: 0.9rem; color: var(--vln-charcoal-soft); text-align: left; line-height: 1.4; cursor: pointer; }
.xc-check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.xc-check .req { color: #c0392b; }
.xc-submit { width: 100%; margin-top: 4px; }
.xc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.xc-done { color: var(--accent-dark); display: flex; justify-content: center; margin: 6px 0; }
.xc-done svg { width: 42px; height: 42px; }

/* Empty / error notice */
.notice {
  max-width: 420px; margin: 15vh auto; text-align: center; background: var(--vln-white);
  border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 40px 30px;
}
.notice img { height: 30px; margin: 0 auto 18px; }
.notice h2 { margin: 0 0 8px; font-size: 1.2rem; }
.notice p { margin: 0; color: var(--vln-muted); font-size: 0.92rem; }
.notice a { color: var(--accent-dark); font-weight: 600; }

/* Login */
.login-card {
  width: calc(100% - 32px); max-width: 380px; margin: 16vh auto 0; background: var(--vln-white);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 40px 34px; text-align: center; display: flex; flex-direction: column;
}
.login-logo { height: 40px; margin: 0 auto 18px; }
.login-card h1 { margin: 0; font-size: 1.4rem; color: var(--vln-charcoal); }
.login-card > p { margin: 6px 0 18px; color: var(--vln-muted); font-size: 0.9rem; }
.login-card input[type="password"] {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px;
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-bg);
}
.login-card input:focus { outline: none; border-color: var(--vln-purple); box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); background: #fff; }
.login-btn { margin-top: 14px; width: 100%; }
.login-err { color: #c0392b; font-size: 0.82rem; margin-top: 12px; }

/* ---------- Dark mode (per-card, opt-in via data-theme="dark") ---------- */
/* Brand standard is light. A card can choose dark; the chosen theme is set on
   the viewer's <html> (whole page) and on the editor's preview frame (card only),
   so it never follows the visitor's OS setting. */
[data-theme="dark"] {
  --vln-charcoal: #ece9ef;
  --vln-charcoal-soft: #c4bfc8;
  --vln-muted: #9b949e;
  --vln-line: #3a343c;
  --vln-bg: #1a171c;
  --vln-white: #232027;
}
[data-theme="dark"] body,
[data-theme="dark"].preview-frame {
  background-image: radial-gradient(1200px 600px at 50% -10%, rgba(124, 100, 175, 0.28), transparent 60%);
}
[data-theme="dark"] body.full-page { background-image: none; }
[data-theme="dark"] .photo { border-color: var(--vln-white); }
/* accent text sits on the dark card surface, so lighten it for contrast */
[data-theme="dark"] .identity .title { color: var(--accent-light); }
[data-theme="dark"] .dir-card .role { color: var(--accent-light); }
[data-theme="dark"] .link { background: #2a2730; }
[data-theme="dark"] .qr-panel { background: #232027; }
[data-theme="dark"] .qr-canvas { background: #fff; } /* QR must stay light for scanners */
[data-theme="dark"] .qr-close { background: #232027; }
[data-theme="dark"] .notice { background: #232027; }
[data-theme="dark"] .card-footer img { filter: brightness(0) invert(1); opacity: 0.85; }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  body::before, .page-foot, .toast, .qr-overlay { display: none !important; }
  .stage { padding: 0; display: block; }
  .card-main { max-width: 460px; margin: 0 auto; }
  .card > *, .card-main > * { animation: none !important; }
  .actions { display: none; } /* buttons aren't useful on paper */
}

/* =========================================================
   Editor
   ========================================================= */
body.editor { background: var(--vln-bg); }

/* App bar — one clean nav bar across every internal screen:
   [back]   Section title   ·············   [sign out] */
.appbar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; background: var(--vln-white);
  border-bottom: 1px solid var(--vln-line);
  position: sticky; top: 0; z-index: 20;
  padding-top: calc(11px + env(safe-area-inset-top));
}
.appbar-title {
  flex: 1; min-width: 0; margin: 0;
  font-size: 1.18rem; font-weight: 700; letter-spacing: -0.01em; color: var(--vln-charcoal);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.appbar-logo { height: 27px; width: auto; margin-right: auto; }
.appbar-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--vln-line); background: var(--vln-white); color: var(--vln-charcoal-soft);
  cursor: pointer; text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}
.appbar-btn:hover { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-dark); }
.appbar-btn:active { transform: scale(0.94); }
.appbar-btn svg { width: 20px; height: 20px; }

.ed-layout {
  display: grid; grid-template-columns: 1fr 460px; gap: 34px;
  max-width: 1180px; margin: 0 auto; padding: 30px 26px 70px; align-items: start;
}
@media (max-width: 900px) {
  /* Stack to one column: form first so editing is immediate, then the live
     preview and Save below — a natural edit → preview → save flow. */
  .ed-layout { grid-template-columns: 1fr; }
  .ed-preview { position: static !important; }
}

.ed-form { display: grid; gap: 22px; }
.fieldset {
  background: var(--vln-white); border: 1px solid var(--vln-line);
  border-radius: var(--radius); padding: 22px 22px 24px;
}
.fieldset h3 {
  margin: 0 0 16px; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--vln-muted);
}
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label, .field-label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--vln-charcoal-soft); margin-bottom: 6px;
}
.field .opt { font-weight: 400; color: var(--vln-muted); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"],
.field input[type="url"], .field textarea, .field select,
.link-row input[type="text"], .link-row input[type="url"] {
  width: 100%; font: inherit; font-size: 0.92rem; color: var(--vln-charcoal);
  padding: 11px 13px; border: 1px solid var(--vln-line);
  border-radius: var(--radius-sm); background: var(--vln-bg);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input:focus, .field textarea:focus, .field select:focus,
.link-row input:focus {
  outline: none; border-color: var(--vln-purple);
  box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); background: var(--vln-white);
}
.field textarea { resize: vertical; min-height: 70px; }
.field .hint { font-size: 0.74rem; color: var(--vln-muted); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

/* image pickers */
.imgpick { display: flex; align-items: center; gap: 14px; }
.imgpick .thumb {
  width: 64px; height: 64px; flex: none; border-radius: 12px;
  background: var(--accent-tint) center/cover no-repeat; border: 1px solid var(--vln-line);
  display: flex; align-items: center; justify-content: center; color: var(--accent-dark); font-weight: 700;
}
.imgpick.banner .thumb { width: 110px; border-radius: 10px; }
.imgpick .controls { display: grid; gap: 6px; flex: 1; }

/* accent + preset choosers */
/* segmented Light/Dark appearance control */
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--vln-bg); border: 1px solid var(--vln-line); border-radius: var(--radius-pill); }
.seg-btn {
  border: none; background: transparent; cursor: pointer; font: inherit;
  font-size: 0.84rem; font-weight: 600; color: var(--vln-charcoal-soft);
  padding: 7px 18px; border-radius: var(--radius-pill); transition: all 0.12s ease;
}
.seg-btn[aria-pressed="true"] { background: var(--vln-purple); color: #fff; }

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
  flex: 1 1 80px; min-width: 72px; height: 42px; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer; position: relative;
  font-size: 0.66rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3);
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 5px 7px;
}
.preset[aria-pressed="true"] { border-color: var(--vln-charcoal); }

/* toggles */
.toggles { display: grid; gap: 10px; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; color: var(--vln-charcoal-soft); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--vln-purple); cursor: pointer; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.88rem; padding: 11px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--vln-line);
  background: var(--vln-white); color: var(--vln-charcoal); cursor: pointer;
  transition: all 0.12s ease; text-decoration: none;
}
.btn:hover { border-color: var(--vln-purple); color: var(--vln-purple-dark); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--vln-purple); border-color: var(--vln-purple); color: #fff; }
.btn.primary:hover { background: var(--vln-purple-dark); border-color: var(--vln-purple-dark); color: #fff; }
.btn.small { padding: 8px 12px; font-size: 0.82rem; }
.btn.ghost { background: transparent; }
.btn.danger { color: #c0392b; }
.btn.danger:hover { border-color: #c0392b; background: #fbeaea; color: #c0392b; }
.ed-load {
  max-width: 190px; padding: 8px 12px; font: inherit; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm);
  background: var(--vln-white); color: var(--vln-charcoal); cursor: pointer;
}
.ed-load:focus { outline: none; border-color: var(--vln-purple); box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); }

.link-row {
  display: grid; grid-template-columns: 44px 1fr 1.3fr auto;
  gap: 10px; align-items: center; margin-bottom: 10px;
}
/* visual icon picker trigger (replaces the old text dropdown) */
.icon-picker-btn {
  width: 44px; height: 44px; padding: 0; flex: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--accent-tint); color: var(--accent-darker);
  border: 1px solid var(--vln-line);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.icon-picker-btn:hover { border-color: var(--vln-purple); }
.icon-picker-btn svg { width: 20px; height: 20px; }
.link-del {
  border: none; background: transparent; cursor: pointer; color: var(--vln-muted);
  font-size: 1.3rem; line-height: 1; padding: 6px 8px; border-radius: 8px;
}
.link-del:hover { color: #c0392b; background: #fbeaea; }
@media (max-width: 560px) {
  .link-row { grid-template-columns: 44px 1fr auto; }
  .link-row .lr-url { grid-column: 2 / -1; }
}

/* visual icon picker popover */
.icon-popover {
  position: fixed; z-index: 90;
  background: var(--vln-white); border: 1px solid var(--vln-line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  padding: 10px; width: 236px;
}
.icon-popover .auto {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; margin-bottom: 8px; border-radius: 9px;
  border: 1px solid var(--vln-line); background: var(--vln-bg);
  font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--vln-charcoal-soft);
  cursor: pointer; text-align: left;
}
.icon-popover .auto svg { width: 18px; height: 18px; flex: none; }
.icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.icon-opt {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--vln-line); background: var(--vln-bg);
  color: var(--vln-charcoal-soft); cursor: pointer; transition: all 0.1s ease;
}
.icon-opt:hover { border-color: var(--vln-purple); color: var(--accent-darker); background: var(--accent-tint); }
.icon-opt svg { width: 19px; height: 19px; }
.icon-popover .auto[aria-pressed="true"], .icon-opt[aria-pressed="true"] {
  border-color: var(--vln-purple); background: var(--accent-tint); color: var(--accent-darker);
}

.ed-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* preview pane */
.ed-preview { position: sticky; top: 96px; }
.preview-frame {
  background: var(--vln-bg);
  background-image: radial-gradient(700px 360px at 50% -10%, rgba(124, 100, 175, 0.18), transparent 60%);
  border: 1px solid var(--vln-line); border-radius: 24px; padding: 26px 20px;
  display: flex; justify-content: center;
}
.preview-frame .card { max-width: 380px; }
.preview-label {
  text-align: center; font-size: 0.74rem; color: var(--vln-muted);
  margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.06em;
}

/* =========================================================
   Manage (admin card list)
   ========================================================= */
.manage-wrap { max-width: 760px; margin: 0 auto; padding: 30px 24px 70px; }
.manage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 22px; }
.manage-head > div { min-width: 0; }
.manage-head > .btn { flex: none; white-space: nowrap; }
.manage-head h1 { margin: 0; font-size: 1.5rem; color: var(--vln-charcoal); }
.manage-head p, .manage-head .manage-sub { margin: 0; color: var(--vln-muted); font-size: 0.92rem; min-width: 0; }
.card-list { display: flex; flex-direction: column; gap: 10px; }
.cl-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  background: var(--vln-white); border: 1px solid var(--vln-line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-soft);
}
.cl-row.dragging { opacity: 0.45; }
.cl-grip { cursor: grab; color: var(--vln-muted); flex: none; font-size: 1.05rem; line-height: 1; padding: 2px 4px; letter-spacing: -2px; }
.cl-av {
  width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--accent-tint); display: flex; align-items: center; justify-content: center;
  color: var(--accent-darker); font-weight: 700; font-size: 0.95rem;
}
.cl-meta { flex: 1; min-width: 0; }
.cl-meta h2 { margin: 0; font-size: 1rem; color: var(--vln-charcoal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-meta p { margin: 2px 0 0; color: var(--vln-muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-actions { display: flex; gap: 8px; flex: none; }
/* On phones the three actions (Edit / View / Delete) drop to their own full-width
   row as equal buttons — nothing gets hidden, everything stays one tap away. */
@media (max-width: 560px) {
  .cl-row { flex-wrap: wrap; row-gap: 12px; }
  .cl-actions { flex-basis: 100%; }
  .cl-actions .btn { flex: 1; }
}
.manage-empty { text-align: center; padding: 54px 20px; color: var(--vln-muted); }
.manage-empty a { color: var(--vln-purple-dark); font-weight: 600; }

/* Leads — stats, filters, lead cards */
.leads-wrap { max-width: 940px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--vln-white); border: 1px solid var(--vln-line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-soft); }
.stat-num { font-size: 1.75rem; font-weight: 700; color: var(--vln-charcoal); line-height: 1; }
.stat-label { margin-top: 6px; font-size: 0.8rem; color: var(--vln-muted); font-weight: 600; }

.leads-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.leads-search {
  flex: 1; min-width: 190px; font: inherit; font-size: 0.9rem; padding: 10px 14px; color: var(--vln-charcoal);
  border: 1px solid var(--vln-line); border-radius: var(--radius-pill); background: var(--vln-white);
}
.leads-search:focus { outline: none; border-color: var(--vln-purple); box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); }

.lead-list { display: flex; flex-direction: column; gap: 10px; }
.lead-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px;
  background: var(--vln-white); border: 1px solid var(--vln-line); border-radius: var(--radius-sm); box-shadow: var(--shadow-soft);
}
.lead-av {
  width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--accent-tint);
  color: var(--accent-darker); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.88rem;
}
.lead-main { flex: 1; min-width: 0; }
.lead-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lead-name { font-weight: 700; color: var(--vln-charcoal); }
.lead-company { font-size: 0.85rem; color: var(--vln-muted); }
.lead-contact { margin-top: 3px; font-size: 0.86rem; color: var(--vln-charcoal-soft); }
.lead-contact a { color: var(--vln-purple-dark); text-decoration: none; }
.lead-contact .dot { color: var(--vln-line); }
.lead-note { margin-top: 6px; font-size: 0.85rem; color: var(--vln-muted); font-style: italic; }
.lead-extra { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.lead-xf { font-size: 0.78rem; color: var(--vln-charcoal-soft); background: var(--vln-bg); border: 1px solid var(--vln-line); border-radius: 999px; padding: 3px 10px; }
.lead-xk { color: var(--vln-muted); font-weight: 600; }
.lead-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lead-pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.lead-src, .lead-ref { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 0.72rem; font-weight: 600; border-radius: var(--radius-pill); padding: 3px 9px; }
.lead-src { background: var(--accent-tint); color: var(--accent-darker); border: none; cursor: pointer; }
.lead-src:hover { background: var(--accent-tint-2); }
.lead-src svg { width: 13px; height: 13px; }
.lead-ref { background: var(--vln-bg); color: var(--vln-charcoal-soft); border: 1px solid var(--vln-line); }
.lead-ref svg { width: 12px; height: 12px; }
.lead-time { font-size: 0.74rem; color: var(--vln-muted); white-space: nowrap; }
@media (max-width: 560px) {
  .lead-card { flex-wrap: wrap; }
  .lead-meta { align-items: flex-start; flex-direction: row; width: 100%; justify-content: space-between; margin-top: 4px; }
}

/* =========================================================
   Events — public landing page (/e/:slug)
   ========================================================= */
.event-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 58px 22px 50px; text-align: center; color: #fff;
  background-size: cover; background-position: center;
  border-radius: 0 0 30px 30px;
}
/* layered glows add depth to the flat gradient */
.event-hero::before {
  content: ""; position: absolute; inset: -10%; pointer-events: none; z-index: -1;
  background:
    radial-gradient(58% 48% at 16% 8%, rgba(255, 255, 255, 0.22), transparent 62%),
    radial-gradient(52% 42% at 92% 4%, rgba(184, 164, 224, 0.40), transparent 60%),
    radial-gradient(80% 62% at 80% 112%, rgba(51, 46, 46, 0.55), transparent 60%);
}
@media (prefers-reduced-motion: no-preference) {
  .event-hero:not(.has-image)::before { animation: hero-drift 16s ease-in-out infinite alternate; }
  @keyframes hero-drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(1%,-2%,0) scale(1.07); } }
}
/* large VLN watermark */
.event-hero::after {
  content: ""; position: absolute; right: -34px; bottom: -48px; width: 240px; height: 220px; z-index: -1;
  background: url("../brand/vln-icon-white.svg") no-repeat center/contain; opacity: 0.09; pointer-events: none;
}
.event-hero.has-image::before { background: linear-gradient(180deg, rgba(30, 26, 28, 0.28) 0%, rgba(30, 26, 28, 0.64) 100%); }
.event-hero.has-image::after { display: none; }
.event-hero .qr-corner { top: 16px; left: auto; right: 16px; z-index: 2; }
.event-hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.event-logo { height: 42px; width: auto; max-width: 230px; margin: 0 auto 20px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18)); }
.event-hero h1 { margin: 0; font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-shadow: 0 2px 16px rgba(30, 26, 28, 0.22); }
.event-sub { margin: 12px 0 0; font-size: 1.08rem; font-weight: 500; opacity: 0.96; }
.event-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 0; }
.event-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius-pill); padding: 6px 13px; font-size: 0.82rem; font-weight: 600;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.event-pill svg { width: 15px; height: 15px; }

/* rich event link cards (OG-style image + title + subtitle) */
.event-links-grid { display: grid; gap: 14px; }
.event-link-card {
  display: block; text-decoration: none; color: inherit; overflow: hidden;
  background: var(--vln-white); border: 1px solid var(--vln-line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.event-link-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--accent); }
.elc-img { aspect-ratio: 1200 / 630; background: var(--accent-tint) center/cover no-repeat; }
.elc-body { padding: 15px 17px; }
.elc-title { margin: 0; font-size: 1.04rem; font-weight: 700; color: var(--vln-charcoal); line-height: 1.25; }
.elc-sub { margin: 5px 0 0; font-size: 0.9rem; color: var(--vln-charcoal-soft); line-height: 1.4; }
.elc-host { display: inline-block; margin-top: 9px; font-size: 0.76rem; color: var(--accent-dark); font-weight: 600; }
/* One consistent gap between every section so they read as distinct blocks */
.event-body { max-width: 640px; margin: 0 auto; padding: 26px 20px calc(50px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 44px; }
/* Intro block — a card that centers its text, or sits image-left / text-right */
.event-intro-card {
  background: var(--vln-white); border: 1px solid var(--vln-line); border-radius: var(--radius);
  padding: 30px 28px; margin: 0; box-shadow: var(--shadow-soft); text-align: center;
}
.event-intro-card.has-img {
  display: flex; align-items: center; gap: 20px; text-align: left; padding: 20px;
}
.eic-img {
  flex: none; width: 116px; aspect-ratio: 1 / 1; border-radius: calc(var(--radius) - 6px);
  background: var(--accent-tint) center/cover no-repeat; border: 1px solid var(--vln-line);
}
.eic-body { min-width: 0; }
.eic-title { margin: 0 0 6px; font-size: 1.16rem; font-weight: 700; color: var(--vln-charcoal); line-height: 1.25; }
.event-intro-card.has-img .eic-title { font-size: 1.08rem; }
.eic-text { margin: 0; color: var(--vln-charcoal-soft); font-size: 1rem; line-height: 1.5; }
.event-intro-card.has-img .eic-text { font-size: 0.94rem; }
@media (max-width: 460px) {
  .event-intro-card.has-img { gap: 16px; padding: 18px; }
  .eic-img { width: 92px; }
}
.capture-card {
  background: var(--vln-white); border: 1px solid var(--vln-line); border-radius: var(--radius);
  padding: 24px; margin: 0; box-shadow: var(--shadow-soft);
}
.capture-card h2 { margin: 0 0 4px; font-size: 1.2rem; text-align: center; color: var(--vln-charcoal); }
.capture-card > p { margin: 0 0 4px; text-align: center; color: var(--vln-muted); font-size: 0.9rem; }
.capture-card .xc-form { margin-top: 16px; }
.event-section { margin: 0; }
.event-h { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--vln-muted); font-weight: 700; text-align: center; margin: 0 0 16px; }
.event-section-desc { text-align: center; color: var(--vln-charcoal-soft); font-size: 0.96rem; line-height: 1.5; margin: -8px auto 18px; max-width: 520px; }
.event-section .links { padding: 0; }
.event-body .card-footer { border-top: 1px solid var(--vln-line); margin-top: 0; padding-top: 26px; }

/* Podcast block — Spotify embeds + "listen elsewhere" links */
.pod-embed { margin: 0 0 14px; }
.pod-embed:last-of-type { margin-bottom: 0; }
.pod-embed iframe { display: block; width: 100%; border: 0; border-radius: 12px; }
.pod-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.pod-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-radius: var(--radius-pill); background: var(--vln-white); border: 1px solid var(--vln-line);
  text-decoration: none; color: var(--vln-charcoal); font-weight: 600; font-size: 0.9rem;
  transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.pod-link:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.pod-link svg { width: 18px; height: 18px; color: var(--accent-dark); flex: none; }
/* Podcast editor rows */
.pod-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pod-row { display: flex; align-items: center; gap: 8px; }
.pod-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 0.88rem; padding: 9px 12px;
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white); color: var(--vln-charcoal);
}
.pod-row input:focus { outline: none; border-color: var(--vln-purple); box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); }

/* Event editor — live preview frame (mobile view of the event page) */
.event-preview-frame {
  display: block; padding: 0; overflow: hidden; overflow-y: auto;
  border-radius: 22px; background: var(--vln-bg); max-height: 76vh;
  background-image: none;
}
.event-preview { pointer-events: none; }
.event-preview .event-hero { border-radius: 0 0 24px 24px; padding: 44px 18px 38px; }
.event-preview .event-hero h1 { font-size: 1.7rem; }
.event-preview .event-body { padding: 22px 16px 34px; }
.event-preview .dir-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

/* Event editor — card multi-select */
.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ev-card-opt {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); font-size: 0.9rem; background: var(--vln-bg);
}
.ev-card-opt.on { border-color: var(--vln-purple); background: var(--accent-tint); }
.ev-card-opt input { width: 16px; height: 16px; accent-color: var(--vln-purple); flex: none; }
.ev-card-opt span { font-weight: 600; color: var(--vln-charcoal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-card-opt small { color: var(--vln-muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

/* Event editor — rich link blocks */
.ev-link-block { border: 1px solid var(--vln-line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; background: var(--vln-bg); }
.elb-top { display: flex; gap: 12px; align-items: flex-start; }
.elb-thumb {
  width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--accent-tint) center/cover no-repeat; border: 1px solid var(--vln-line);
  display: flex; align-items: center; justify-content: center; color: var(--accent-darker); font-weight: 700; font-size: 0.68rem;
}
.elb-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.elb-main input {
  width: 100%; font: inherit; font-size: 0.9rem; padding: 9px 12px; color: var(--vln-charcoal);
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white);
}
.elb-main input:focus, .elb-img-row input:focus { outline: none; border-color: var(--vln-purple); box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); }
.elb-img-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; padding-left: 76px; }
.elb-img-row input { flex: 1; font: inherit; font-size: 0.85rem; padding: 8px 11px; border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white); color: var(--vln-charcoal); }
.elb-img-row .btn { flex: none; }
@media (max-width: 560px) { .elb-img-row { padding-left: 0; flex-wrap: wrap; } }

/* Event editor — section (layout) order */
.section-order { display: flex; flex-direction: column; gap: 8px; }
.section-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white);
}
.section-grip { color: var(--vln-muted); letter-spacing: -2px; font-size: 1rem; }
.section-label { flex: 1; font-weight: 600; color: var(--vln-charcoal); font-size: 0.9rem; }
.section-move { display: flex; gap: 6px; flex: none; }
.section-move .btn { padding: 5px 11px; }
.section-move .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Link-block actions (move + delete) */
.elb-actions { display: flex; flex-direction: column; gap: 5px; flex: none; align-items: stretch; }
.elb-actions .btn { padding: 3px 9px; }
.elb-actions .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Generic reorder list (featured-card display order) */
.reorder-list { display: flex; flex-direction: column; gap: 8px; }
.reorder-list:not(:empty) { margin-bottom: 12px; }
.reorder-cap { margin: 0 0 2px; font-size: 0.8rem; color: var(--vln-muted); }
.reorder-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white);
}
.reorder-del, .ff-del {
  flex: none; width: 26px; height: 26px; border: none; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--vln-muted); font-size: 1.15rem; line-height: 1;
}
.reorder-del:hover, .ff-del:hover { color: #c0392b; background: #fbeaea; }

/* Form builder (event sign-up fields) */
.form-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ff-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 11px;
  border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white);
}
.ff-grip { color: var(--vln-muted); letter-spacing: -2px; font-size: 1rem; flex: none; }
.ff-label { flex: 1 1 130px; min-width: 96px; font: inherit; font-size: 0.88rem; padding: 8px 11px; border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white); color: var(--vln-charcoal); }
.ff-type { flex: none; font: inherit; font-size: 0.85rem; padding: 8px 9px; border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-white); color: var(--vln-charcoal); }
.ff-req { flex: none; display: flex; align-items: center; gap: 5px; font-size: 0.82rem; color: var(--vln-charcoal-soft); white-space: nowrap; cursor: pointer; }
.ff-req input { width: 15px; height: 15px; accent-color: var(--vln-purple); }
.ff-opts { flex: 1 1 100%; font: inherit; font-size: 0.83rem; padding: 7px 11px; border: 1px solid var(--vln-line); border-radius: var(--radius-sm); background: var(--vln-bg); color: var(--vln-charcoal); }
.ff-label:focus, .ff-type:focus, .ff-opts:focus { outline: none; border-color: var(--vln-purple); box-shadow: 0 0 0 3px rgba(124, 100, 175, 0.15); }
@media (max-width: 560px) { .ff-label { flex-basis: 100%; } }
.type-badge {
  display: inline-block; vertical-align: middle;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--vln-purple-dark); background: var(--accent-tint);
  border-radius: var(--radius-pill); padding: 2px 8px; margin-left: 6px;
}

/* =========================================================
   Directory
   ========================================================= */
.dir-wrap { max-width: 1040px; margin: 0 auto; padding: 26px 24px 70px; }
.dir-intro { margin: 0 0 22px; color: var(--vln-muted); font-size: 0.95rem; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.dir-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin: 0 auto 26px; padding: 4px; max-width: max-content;
  background: var(--vln-white); border: 1px solid var(--vln-line); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
}
.dir-tab {
  border: none; background: transparent; cursor: pointer; font: inherit;
  font-size: 0.86rem; font-weight: 600; color: var(--vln-charcoal-soft);
  padding: 9px 18px; border-radius: var(--radius-pill); transition: all 0.12s ease;
}
.dir-tab:hover { color: var(--vln-purple-dark); }
.dir-tab[aria-selected="true"] { background: var(--vln-purple); color: #fff; }
.dir-card {
  background: var(--vln-white); border: 1px solid var(--vln-line); border-radius: var(--radius);
  padding: 22px; text-align: center; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-soft); transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.dir-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-card); }
.dir-card .av {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover;
  background: var(--accent-tint); display: flex; align-items: center; justify-content: center;
  color: var(--accent-darker); font-weight: 700; font-size: 1.5rem; border: 3px solid #fff; box-shadow: var(--shadow-soft);
}
.dir-card h2 { margin: 0; font-size: 1.05rem; }
.dir-card .role { margin: 4px 0 0; color: var(--accent-darker); font-size: 0.85rem; font-weight: 600; }

/* =========================================================
   Team hub (installed PWA home — /app)
   ========================================================= */
.hub {
  max-width: 560px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  padding: 20px 20px calc(40px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.hub-top { display: flex; align-items: center; gap: 12px; }
.hub-logo { height: 30px; width: auto; margin-right: auto; }
.hub-hero { text-align: center; padding: 30px 0 24px; }
.hub-hero h1 { margin: 0; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; color: var(--vln-charcoal); }
.hub-hero p { margin: 6px 0 0; color: var(--vln-muted); font-size: 1rem; }
.hub-tiles { display: grid; gap: 12px; }
.hub-tile {
  display: flex; align-items: center; gap: 16px; padding: 18px;
  border-radius: var(--radius); background: var(--vln-white); border: 1px solid var(--vln-line);
  box-shadow: var(--shadow-soft); text-decoration: none; color: var(--vln-charcoal);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.hub-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--accent); }
.hub-tile:active { transform: scale(0.99); }
.hub-ic {
  width: 52px; height: 52px; flex: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent-darker);
}
.hub-ic svg { width: 26px; height: 26px; }
.hub-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hub-tx strong { font-size: 1.08rem; font-weight: 700; }
.hub-tx small { color: var(--vln-muted); font-size: 0.85rem; }
.hub-go { color: var(--vln-muted); flex: none; display: flex; }
.hub-go svg { width: 20px; height: 20px; }
@media (min-width: 620px) { .hub-tiles { grid-template-columns: 1fr 1fr; } }
