/*  ═══════════════════════════════════════════════
    Benefit Path — Universal CSS
    A single, compact stylesheet shared by every page.
    ═══════════════════════════════════════════════ */

/* ── 1. Design Tokens (CSS Variables) ────────── */
:root {
  /* Brand colours — overridable per-agency via inline style */
  --c-primary: #4f46e5;
  --c-primary-hover: #4338ca;
  --c-primary-light: #eef2ff;
  --c-accent: #06b6d4;

  /* Neutrals */
  --c-bg: #f9fafb;
  --c-surface: #ffffff;
  --c-border: #e5e7eb;
  --c-text: #111827;
  --c-text-muted: #6b7280;
  --c-text-light: #9ca3af;

  /* Status */
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;
  --c-info: #3b82f6;

  /* Sizing */
  --sidebar-w: 240px;
  --sidebar-collapsed-w: 72px;
  --topbar-h: 56px;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

  /* Scrollbars */
  --scrollbar-size: 14px;
  --scrollbar-track: rgba(17,24,39,.06);
  --scrollbar-thumb: rgba(79,70,229,.ould be gone.

GPT-5.3-Codex • 0.9x8);
  --scrollbar-thumb-hover: var(--scrollbar-thumb);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur: 200ms;
}

/* ── 2. Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
::selection { background: color-mix(in srgb, var(--c-primary) 28%, white); color: var(--c-text); }
::-moz-selection { background: color-mix(in srgb, var(--c-primary) 28%, white); color: var(--c-text); }

/* ── 2b. Scrollbars (Global) ───────────────── */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Chromium / Safari */
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ── 3. Typography ───────────────────────────── */
h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--c-text-muted); }
.text-light { color: var(--c-text-light); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

/* ── 4. Layout Utilities ─────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── 5. Dashboard Shell ──────────────────────── */
.dash {
  display: flex;
  min-height: 100dvh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform var(--dur) var(--ease);
}
.sidebar-head {
  height: var(--topbar-h);
  padding: 0 1rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-shrink: 0;
}
.sidebar-logo { height: 32px; width: auto; }
.sidebar-icon { display: none; height: 28px; width: 28px; object-fit: cover; border-radius: 6px; }
.sidebar nav { flex: 1; overflow-y: auto; min-height: 0; }
.nav-menu { padding: .5rem 0; }
.nav-link {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  margin: 2px .5rem;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-link:hover { background: var(--c-primary-light); color: var(--c-primary); }
.nav-link.active { background: var(--c-primary-light); color: var(--c-primary); font-weight: 600; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link .badge { margin-left: auto; }
.sidebar-foot {
  padding: .75rem 1rem;
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.version { font-size: .7rem; color: var(--c-text-light); padding: 0 1rem .25rem; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 35;
}

/* Main content area */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.sidebar-toggle { display: none; }

.topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  flex: 1;
}

.topbar-crumbs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .42rem;
  min-width: 0;
  font-size: .9rem;
}

.topbar-crumb {
  color: var(--c-text-muted);
  text-decoration: none;
}

.topbar-crumb:hover {
  color: var(--c-primary);
}

.topbar-crumb.current {
  color: var(--c-text);
  font-weight: 600;
}

.topbar-crumb-sep {
  color: var(--c-text-light);
}

.topbar-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}

.topbar-save-status {
  margin: 0;
  font-size: .78rem;
  color: var(--c-text-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: right;
  white-space: nowrap;
}

.topbar-user {
  position: relative;
}
.topbar-user-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: 999px;
  padding: .25rem .5rem .25rem .25rem;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.topbar-user-btn:hover {
  border-color: var(--c-primary);
  background: var(--c-bg);
}
.topbar-user-photo,
.topbar-user-initials {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  flex-shrink: 0;
}
.topbar-user-photo {
  object-fit: cover;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
}
.topbar-user-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-size: .75rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--c-primary) 28%, transparent);
}
.topbar-user-caret {
  width: 16px;
  height: 16px;
  color: var(--c-text-muted);
}
.topbar-user-menu {
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  min-width: 170px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  padding: .35rem;
}
.topbar-user-menu-version {
  font-size: .72rem;
  color: var(--c-text-muted);
  padding: .35rem .7rem .5rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: .2rem;
}
.topbar-user-menu-item {
  display: block;
  width: 100%;
  padding: .55rem .7rem;
  border-radius: calc(var(--radius) - 4px);
  color: var(--c-text);
  text-decoration: none;
  font-size: .875rem;
}
.topbar-user-menu-item:hover {
  background: var(--c-primary-light);
  color: var(--c-primary);
}

/* Desktop collapsed sidebar (icon-only) */
.dash.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
}
.dash.sidebar-collapsed .main {
  margin-left: var(--sidebar-collapsed-w);
}
.dash.sidebar-collapsed .sidebar-head {
  height: var(--topbar-h);
  padding: 0 .5rem;
}
.dash.sidebar-collapsed .sidebar-logo {
  display: none;
}
.dash.sidebar-collapsed .sidebar-icon {
  display: block;
  margin: 0 auto;
}
.dash.sidebar-collapsed .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}
.dash.sidebar-collapsed .nav-link {
  justify-content: center;
  padding: .55rem;
  margin: 2px .45rem;
  position: relative;
}
.dash.sidebar-collapsed .nav-label,
.dash.sidebar-collapsed .version {
  display: none;
}
.dash.sidebar-collapsed .sidebar-foot {
  padding: .5rem;
}
.dash.sidebar-collapsed .nav-link .badge {
  position: absolute;
  top: .2rem;
  right: .2rem;
  margin-left: 0;
}
.page-content { padding: 1.5rem; flex: 1; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ── 6. Cards ────────────────────────────────── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  font-weight: 600;
}
.card-body { padding: 1.25rem; }
.card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--c-border);
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  max-width: 980px;
}

.integration-card {
  height: 100%;
}

.integration-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.integration-card-title {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.integration-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
}

.integration-card-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 260px;
}

/* ── 7. Buttons ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--c-primary-hover); }
.btn-call-agent {
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  white-space: normal;
  text-align: center;
}
.btn-call-agent-title {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}
.btn-call-agent-phone {
  display: block;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.2;
}
.btn-outline {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
}
.btn-outline:hover:not(:disabled) { background: var(--c-bg); }
.btn-danger {
  background: var(--c-danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-lg { padding: .9rem 1.35rem; font-size: 1rem; }
.btn-sm { padding: .25rem .625rem; font-size: .8rem; }
.btn-icon {
  padding: .375rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease);
}
.btn-icon:hover { background: var(--c-bg); }
.btn-icon svg { width: 20px; height: 20px; }

/* Keep mobile sidebar trigger hidden on desktop; shown in mobile media query below. */
.btn-icon.sidebar-toggle { display: none; }

/* ── 8. Forms & Inputs ───────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text);
}

/* ── Tooltips ───────────────────────────────── */
.tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--c-text-muted);
  cursor: help;
  flex-shrink: 0;
  line-height: 1;
}
.tip svg { width: 13px; height: 13px; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,.92);
  color: #fff;
  font-size: .7rem;
  font-weight: 400;
  padding: .35rem .6rem;
  border-radius: 4px;
  white-space: normal;
  min-width: 200px;
  max-width: 440px;
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 200;
}
.tip:hover::after { opacity: 1; }
.form-input, .form-select, .form-textarea {
  padding: .5rem .75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: .875rem;
  background: var(--c-surface);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  background-size: 14px 14px;
}
.form-select:hover {
  border-color: color-mix(in srgb, var(--c-primary) 32%, var(--c-border));
  background-color: color-mix(in srgb, var(--c-surface) 92%, var(--c-primary) 8%);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
}
.form-input.error { border-color: var(--c-danger); }
.form-error { font-size: .75rem; color: var(--c-danger); }
.form-hint { font-size: .75rem; color: var(--c-text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c-primary) 28%, var(--c-border));
  border-radius: 4px;
  background: var(--c-surface);
  display: inline-grid;
  place-content: center;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input[type="checkbox"]::before {
  content: "";
  width: .62rem;
  height: .62rem;
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
  background: #fff;
  clip-path: polygon(14% 44%, 0 59%, 41% 100%, 100% 23%, 84% 8%, 39% 62%);
}
input[type="checkbox"]:checked {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
input[type="checkbox"]:checked::before {
  transform: scale(1);
}
input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--c-primary-light);
  border-radius: 4px;
}
input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--c-primary);
}
input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .65;
}

/* ── Toggle Switch ───────────────────────────── */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  cursor: pointer;
  user-select: none;
}
.toggle-switch input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--c-border);
  transition: background var(--dur) var(--ease);
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform var(--dur) var(--ease);
}
.toggle-switch input:checked + .toggle-track {
  background: var(--c-primary);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}
.toggle-label { font-size: .875rem; color: var(--c-text); }

/* ── Branding Controls ──────────────────────── */
.branding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.media-uploader {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.media-uploader__preview-wrap {
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media-uploader__preview {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}
.media-uploader__placeholder {
  color: var(--c-text-muted);
  font-size: .8rem;
}
.media-uploader__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.color-picker-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, box-shadow .15s;
  width: fit-content;
  min-width: 220px;
}
.color-picker-card:hover {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
}
.color-picker-swatch {
  width: 40px;
  height: 40px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(0,0,0,.12);
  flex-shrink: 0;
  transition: background-color .1s;
}
.color-picker-meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.color-picker-hex {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  font-family: ui-monospace, monospace;
  color: var(--c-text);
}
.color-picker-hint {
  font-size: .75rem;
  color: var(--c-text-muted);
}

/* ── 9. Tables ───────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  font-size: .875rem;
}
.table th, .table td {
  padding: .625rem .75rem;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.table th {
  font-weight: 600;
  color: var(--c-text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--c-bg);
}
.table tr:hover td { background: var(--c-primary-light); }
.table td:first-child,
.table th:first-child { padding-left: 1rem; }

.contacts-resizable-table th {
  position: relative;
  user-select: none;
}

.contacts-resizable-table th,
.contacts-resizable-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.contacts-resizable-table th.is-resizable-col {
  padding-right: 1rem;
}

.table-col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

.table-col-resizer::after {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background .12s var(--ease);
}

.contacts-resizable-table th:hover .table-col-resizer::after,
.table-col-resizer:hover::after {
  background: color-mix(in srgb, var(--c-primary) 45%, transparent);
}

body.col-resize-active {
  cursor: col-resize;
  user-select: none;
}

/* ── 10. Badges & Tags ──────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--c-danger);
  color: #fff;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .125rem .5rem;
  font-size: .75rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--c-primary-light);
  color: var(--c-primary);
}
.tag-success { background: #d1fae5; color: #065f46; }
.tag-warning { background: #fef3c7; color: #92400e; }
.tag-danger  { background: #fee2e2; color: #991b1b; }

/* ── 11. Toast Notifications ─────────────────── */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  font-size: .875rem;
  animation: toast-in .3s var(--ease);
  max-width: 360px;
}
.toast.success {
  background: var(--c-success, #10b981);
  color: #fff;
}
.toast.error {
  background: var(--c-danger, #ef4444);
  color: #fff;
}
.toast.warning {
  background: var(--c-warning, #f59e0b);
  color: #fff;
}
.toast.info {
  background: var(--c-info, #3b82f6);
  color: #fff;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── 12. Modal ───────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 50;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90dvh;
  overflow-y: auto;
  animation: modal-in .2s var(--ease);
}
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body { padding: 1.25rem; }
.modal-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── 13. Auth Pages ──────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 40px;
}
.auth-title {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--c-text-muted);
}
.auth-footer a { color: var(--c-primary); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .25rem 0;
  color: var(--c-text-muted);
  font-size: .8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .6rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-google:hover {
  background: var(--c-bg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* ── 14. Stats / Metric Cards ────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-label { font-size: .8rem; color: var(--c-text-muted); margin-top: .25rem; }
.stat-delta { font-size: .75rem; font-weight: 600; margin-top: .25rem; }
.stat-delta.up { color: var(--c-success); }
.stat-delta.down { color: var(--c-danger); }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.analytics-tabs {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin: .35rem 0 1rem;
}
.analytics-tab {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  border-radius: 999px;
  padding: .45rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.analytics-tab.is-active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.contact-data-header {
  padding-bottom: .85rem;
}
.contact-data-tabs-strip {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
  padding-bottom: .2rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.contact-data-tabs-strip::-webkit-scrollbar {
  height: 7px;
}
.contact-data-tabs-strip::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--c-border) 84%, transparent);
  border-radius: 999px;
}
.contact-data-tabs-strip .analytics-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}
.analytics-chart-wrap {
  width: 100%;
}
.analytics-line-chart {
  width: 100%;
  height: 220px;
}
.analytics-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--c-text-muted);
  margin-top: .5rem;
}
.analytics-legend span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.analytics-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.analytics-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 2.3fr auto;
  gap: .6rem;
  align-items: center;
  margin-bottom: .55rem;
}
.analytics-row-label {
  font-size: .8rem;
  color: var(--c-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-row-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: var(--c-border);
  overflow: hidden;
}
.analytics-row-bar {
  height: 100%;
  border-radius: 999px;
}
.analytics-row-value {
  font-size: .8rem;
  font-weight: 600;
}

.analytics-pie-wrap {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: center;
}

.analytics-pie {
  width: 170px;
  height: 170px;
}

.analytics-pie-legend {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.analytics-pie-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: .45rem;
  align-items: center;
}

.analytics-pie-item i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: block;
  border: 1px solid color-mix(in srgb, var(--c-text) 12%, transparent);
}

.analytics-pie-label {
  font-size: .8rem;
  color: var(--c-text-muted);
}

.analytics-pie-value {
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-text);
}

.analytics-retention-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: .2rem;
  scrollbar-width: auto;
}

.analytics-retention-wrap::-webkit-scrollbar {
  height: 18px;
}

.analytics-retention-wrap::-webkit-scrollbar-thumb {
  border-width: 3px;
}

@media (max-width: 640px) {
  .analytics-pie-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .analytics-pie-legend {
    width: 100%;
  }
}

.analytics-retention-meta {
  margin-bottom: .75rem;
}

.analytics-vbars {
  display: flex;
  flex-wrap: nowrap;
  gap: .85rem;
  align-items: stretch;
  justify-content: flex-start;
}

.analytics-vbar-col {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 0 0 104px;
  min-width: 104px;
}

.analytics-vbar-plot {
  width: 100%;
  display: grid;
  grid-template-rows: auto 170px;
  gap: .3rem;
}

.analytics-vbar-meta {
  width: 100%;
  display: grid;
  grid-template-rows: 2.4em 1.2em 1.2em;
  gap: .3rem;
}

.analytics-vbar-top {
  font-size: .75rem;
  font-weight: 700;
  color: var(--c-text);
  text-align: center;
}

.analytics-vbar-top.is-drop-high {
  color: var(--c-danger);
}

.analytics-vbar-top.is-drop-low {
  color: var(--c-success);
}

.analytics-vbar-track {
  width: 100%;
  height: 170px;
  border-radius: 0;
  background: transparent;
  border: 0;
  display: flex;
  align-items: end;
  overflow: hidden;
}

.analytics-vbar-fill {
  width: 100%;
  background: var(--c-primary);
  transition: height .25s var(--ease);
}

.analytics-vbar-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-text);
  text-align: center;
  line-height: 1.2;
  width: 100%;
  max-height: 2.4em;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.analytics-vbar-name {
  font-size: .72rem;
  color: var(--c-text-muted);
  text-align: center;
}

.analytics-vbar-sub {
  font-size: .72rem;
  color: var(--c-text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.msg-row-actions-dock {
  position: absolute;
  right: .55rem;
  bottom: .55rem;
  display: inline-flex;
  gap: .35rem;
  padding: .2rem;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}

.msg-row-actions-dock.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.msg-row-actions-dock .btn {
  min-width: 2rem;
  min-height: 2rem;
  padding: .3rem .55rem;
}

.msg-row,
.msg-row:focus,
.msg-row:focus-visible,
.msg-row:active {
  outline: none;
  box-shadow: none;
  border: 0;
}

/* ── 14b. Agent Page Editor ──────────────────── */
.ap-editor-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100dvh - var(--topbar-h));
  overflow: hidden;
  gap: 1rem;
}

.ap-editor-split {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
  gap: 1rem;
  min-height: 0;
  overflow: hidden;
}

.ap-editor-left {
  overflow-y: auto;
  min-height: 0;
}

.ap-editor-preview-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ap-editor-preview-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .ap-editor-page {
    height: auto;
    overflow: visible;
  }
  .ap-editor-split {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .ap-editor-preview-wrap {
    height: 520px;
  }
}

/* ── 15. Survey / Funnel Pages ───────────────── */
.survey-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--c-bg);
}
.survey-main {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.survey-header {
  padding: 1.5rem 1rem 1.1rem;
  text-align: center;
}
.survey-header-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  gap: .85rem;
}
.survey-header-logo {
  display: block;
  margin: 0;
}
.survey-header-call-wrap {
  display: flex;
  justify-content: center;
}
.survey-header h1 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  margin-bottom: .55rem;
}
.survey-header .text-muted {
  font-size: .98rem;
}
.survey-card {
  width: 100%;
  max-width: 600px;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.survey-disclaimer {
  width: 100%;
  max-width: 860px;
  padding: 1.5rem 1rem 2.5rem;
  color: #6b7280;
  font-size: 12pt;
  line-height: 1.45;
  display: inline;
}
.survey-disclaimer p {
  margin: 0 0 0.9rem;
}
.survey-disclaimer p:last-child {
  margin-bottom: 0;
}
.agent-page-shell--disclaimer-inline .survey-main {
  min-height: auto;
}
.agent-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr);
  gap: 1rem;
  align-items: start;
}
.agent-message-card {
  width: 100%;
}
.agent-message-card .card-header {
  font-weight: 700;
}
.survey-step-progress {
  height: 8px;
  background: var(--c-border);
  border-radius: 999px;
  margin: 0 0 1.4rem;
  overflow: hidden;
}
.survey-progress-bar {
  height: 100%;
  background: var(--c-primary);
  transition: width .4s var(--ease);
}
.survey-step { padding: 2rem 2rem 1.65rem; display: none; }
.survey-step.active { display: block; }
.survey-step-title {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin-bottom: 1rem;
}
.survey-step-subtitle {
  margin: -0.55rem 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--c-muted);
}

@media (max-width: 768px) {
  .agent-page-grid {
    grid-template-columns: 1fr;
  }
  .survey-header-cta-row {
    width: 100%;
    gap: .45rem;
    justify-content: space-between;
  }
  .survey-header-logo,
  .survey-header-call-wrap {
    width: 48%;
  }
  .survey-header-logo {
    height: auto !important;
    max-height: 40px;
    max-width: 100% !important;
    object-fit: contain;
  }
  .survey-header-call-wrap .btn-call-agent {
    width: 100%;
    padding: .55rem .5rem;
    min-height: 40px;
    font-size: .92rem;
    gap: .12rem;
  }
  .survey-header-call-wrap .btn-call-agent-title {
    font-size: .82rem;
  }
  .survey-header-call-wrap .btn-call-agent-phone {
    font-size: .74rem;
  }
  .agent-page-card > .card-body {
    align-items: center;
  }
  .agent-page-card .agent-hero-row {
    justify-content: center !important;
    text-align: center;
  }
  .agent-page-card .agent-identity-wrap {
    justify-content: center;
    text-align: center;
  }
  .agent-page-card .agent-identity-copy,
  .agent-page-card .agent-intro {
    text-align: center;
  }
  .agent-page-card .agent-photo {
    width: 102px !important;
    height: 102px !important;
  }
  .agent-page-card .agent-primary-cta {
    align-self: center;
  }
  .agent-page-card .agent-contact-card {
    width: 100%;
  }
  .agent-page-card .agent-contact-list {
    text-align: left;
  }
  .agent-page-card .agent-licensed-states {
    align-items: center;
    text-align: center;
  }
  .agent-page-card .agent-licensed-states > div {
    justify-content: center;
  }
}
.survey-step .form-group {
  gap: .6rem;
  margin-bottom: .25rem;
}
.survey-step .form-label {
  font-size: 1.08rem;
  font-weight: 700;
}
.survey-step .survey-field-subtext {
  margin: -0.05rem 0 0.2rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--c-muted);
}
.survey-step .survey-address-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.survey-step .survey-places-host {
  width: 100%;
}
.survey-step .survey-places-host gmp-place-autocomplete {
  width: 100%;
}
.survey-places-fallback {
  position: fixed;
  inset: auto auto auto auto;
  border: 1px solid var(--c-border, #d1d5db);
  border-radius: var(--radius);
  background: var(--c-surface, #ffffff);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(15, 23, 42, 0.12));
  max-height: 220px;
  overflow: auto;
  display: none;
  z-index: 1500;
}
.survey-places-option {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--c-border, #d1d5db);
  background: transparent;
  text-align: left;
  color: var(--c-text, #0f172a);
  padding: 0.62rem 0.72rem;
  cursor: pointer;
}
.survey-places-option:first-child {
  border-top: 0;
}
.survey-places-option:hover {
  background: var(--c-bg, #f8fafc);
}
.survey-step input[data-places-hidden="1"] {
  display: none;
}
.survey-step .form-input,
.survey-step .form-select,
.survey-step .form-textarea {
  min-height: 50px;
  font-size: 1.02rem;
  text-align: left;
}
.survey-step .form-textarea {
  min-height: 118px;
}
.survey-choice-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.survey-choice {
  display: block;
}
.survey-choice-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.survey-choice-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.survey-choice-btn:hover {
  background: var(--c-bg);
  border-color: color-mix(in srgb, var(--c-primary) 30%, var(--c-border));
}
.survey-choice-input:checked + .survey-choice-btn {
  border-color: var(--c-primary);
  background: color-mix(in srgb, var(--c-primary) 14%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 18%, transparent);
}
.survey-prescription-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.survey-prescription-entries {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.survey-prescription-entry {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: .9rem;
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.survey-prescription-entry-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .75rem;
}
.survey-prescription-field {
  position: relative;
}
.survey-prescription-remove {
  align-self: flex-end;
}
.survey-prescription-empty {
  margin: 0;
}
.survey-prescription-add {
  align-self: flex-start;
}
.survey-prescription-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
  z-index: 20;
}
.survey-prescription-option {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--c-border);
  background: transparent;
  text-align: left;
  color: var(--c-text);
  padding: .58rem .7rem;
  cursor: pointer;
}
.survey-prescription-option:first-child {
  border-top: 0;
}
.survey-prescription-option:hover {
  background: var(--c-bg);
}
.survey-prescription-error {
  padding: .58rem .7rem;
  font-size: .86rem;
  line-height: 1.35;
  color: var(--c-danger);
  border-left: 2px solid var(--c-danger);
  background: color-mix(in srgb, var(--c-danger) 6%, var(--c-surface));
}
.survey-nav {
  display: flex;
  justify-content: flex-end;
  padding: 1.2rem 2rem 1.5rem;
}
.survey-nav #survey-next {
  width: 100%;
  min-height: 54px;
  font-size: 1.08rem;
  font-weight: 700;
}

/* ── 16. Loading ─────────────────────────────── */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  transition: opacity .3s var(--ease);
}
.loader-overlay.fade-out { opacity: 0; pointer-events: none; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 17. Avatar ──────────────────────────────── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .875rem;
  color: #fff;
  background: var(--c-primary);
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }

/* ── 18. Pagination ──────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .25rem;
  padding: 1rem 0;
}
.pagination button {
  padding: .375rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  cursor: pointer;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: background var(--dur) var(--ease);
}
.pagination button:hover { background: var(--c-bg); }
.pagination button.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.pagination button:disabled { opacity: .4; cursor: default; }

/* ── 19. Empty / Placeholder States ──────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--c-text-muted);
}
.empty-state svg { margin: 0 auto 1rem; width: 48px; height: 48px; opacity: .5; }

/* ── 20. Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .main {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: inline-flex;
  }
  .topbar-save-status {
    display: none;
  }
  .sidebar-collapse-toggle {
    display: none;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 1.5rem;
  }
}

/* ── Tag Input (Licensed States) ─────────────────────────────────────────── */
.tag-input {
  position: relative;
}
.tag-input-field {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  min-height: 2.5rem;
  padding: .35rem .6rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  cursor: text;
  transition: border-color .15s;
}
.tag-input-field:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 15%, transparent);
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--c-primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
}
.tag-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  font-size: .85rem;
  line-height: 1;
  opacity: 1;
  transition: opacity .1s, background .1s;
}
.tag-pill-remove:hover {
  opacity: 1;
  background: var(--c-primary-hover);
}
.tag-input-search {
  flex: 1;
  min-width: 120px;
  border: none;
  outline: none;
  background: transparent;
  font-size: .875rem;
  color: var(--c-text);
  padding: .1rem 0;
}
.tag-input-search::placeholder {
  color: var(--c-text-muted);
}
.tag-input-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  max-height: 220px;
  overflow-y: auto;
  z-index: 200;
}
.tag-input-dropdown.open {
  display: block;
}
.tag-input-option {
  padding: .5rem .75rem;
  font-size: .875rem;
  cursor: pointer;
  color: var(--c-text);
  transition: background .1s;
}
.tag-input-option:hover,
.tag-input-option.highlighted {
  background: color-mix(in srgb, var(--c-primary) 10%, transparent);
}
.tag-input-option.selected {
  color: var(--c-text-muted);
  pointer-events: none;
}
.tag-input-empty {
  padding: .5rem .75rem;
  font-size: .875rem;
  color: var(--c-text-muted);
  font-style: italic;
}
