/* Paleta — TheXequeMate SaaS navy + electric blue */
:root {
  --bg-page: #091021;
  --bg-surface: #0b142d;
  --bg-surface-elevated: #0d1935;
  --bg-input: #0b142d;
  --border: #1a376d;
  --border-subtle: rgba(38, 83, 150, 0.45);
  --border-sidebar: #162747;
  --primary: #146bff;
  --primary-hover: #1e72ff;
  --primary-accent: #008cff;
  --primary-royal: #1e4dcc;
  --primary-glow: rgba(20, 107, 255, 0.28);
  --secondary: #0d1935;
  --text: #f1f5ff;
  --text-bright: #ffffff;
  --text-muted: #8d9bb8;
  --text-disabled: #566580;
  --success: #19c77a;
  --error: #ff4d67;
  --warning: #ffb020;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --grad-card: linear-gradient(135deg, #173fad 0%, #12308c 50%, #0d1935 100%);
  --grad-accent: linear-gradient(135deg, #146bff 0%, #008cff 100%);
  --sidebar-width: 260px;
  --sidebar-min: 64px;
  --sidebar-max: 360px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Inter", var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  color-scheme: dark;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 55, 109, 0.7) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(26, 55, 109, 0.75);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 107, 255, 0.45);
}

body:has(.app) {
  overflow: hidden;
}

.app {
  display: flex;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  width: 100%;
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  padding: 12px;
  z-index: 999;
  background: var(--bg-surface);
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s var(--ease-out);
}

.sidebar-toggle:hover {
  background: var(--bg-surface-elevated);
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 997;
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
  pointer-events: none;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 32px 48px;
  max-width: 100%;
  width: 100%;
}

.panel {
  width: 100%;
  max-width: 100%;
}

/* —— Sidebar —— */
body.is-resizing-sidebar {
  cursor: col-resize;
  user-select: none;
}

.sidebar {
  position: relative;
  flex-shrink: 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-min);
  max-width: var(--sidebar-max);
  height: 100%;
  min-height: 0;
  max-height: 100%;
  background: var(--bg-page);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--border-sidebar);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  overflow: hidden;
  transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar__brand {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  padding: 4px 12px 20px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar--narrow .sidebar__brand {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 8px 0 24px;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0;
}

.sidebar--narrow {
  --sidebar-width: 68px;
  padding: 16px 8px;
}

.sidebar--narrow .sidebar__link-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.sidebar--narrow .sidebar__link {
  justify-content: center;
  gap: 0;
  padding: 10px;
}

.sidebar__resizer {
  position: absolute;
  top: 0;
  right: -3px;
  z-index: 20;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.sidebar__resizer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 2px;
  width: 2px;
  height: 100%;
  background: transparent;
  transition: background 0.15s ease;
}

.sidebar__resizer:hover::after,
body.is-resizing-sidebar .sidebar__resizer::after {
  background: var(--primary);
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 4px;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.sidebar__logo-icon {
  display: none;
}

.sidebar__logo-icon svg {
  width: 28px;
  height: 28px;
}

.sidebar__logo-img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.sidebar__logo .sidebar__brand-text {
  margin-left: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  white-space: nowrap;
}

.sidebar--narrow .sidebar__brand-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin-left: 0;
  pointer-events: none;
}

.sidebar--narrow .sidebar__logo-icon {
  width: 28px;
  height: 28px;
}

.sidebar__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.sidebar__theme-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar__theme-toggle svg {
  width: 18px;
  height: 18px;
}

.sidebar__collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar__collapse-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar__collapse-btn svg {
  width: 18px;
  height: 18px;
}

.sidebar--narrow .sidebar__collapse-btn svg {
  transform: scaleX(-1);
}

.sidebar__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar--narrow .sidebar__nav {
  gap: 12px;
  padding-top: 20px;
}

.sidebar__link-text {
  transition: opacity 0.15s ease, width 0.2s ease;
  white-space: nowrap;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.sidebar__link[hidden] {
  display: none !important;
}

.sidebar__link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.sidebar__link-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar__link:hover {
  color: var(--text);
  background: rgba(20, 107, 255, 0.08);
}

.sidebar__link--active {
  color: var(--text-bright);
  background: rgba(20, 107, 255, 0.18);
}

.sidebar__link--active .sidebar__link-icon {
  color: var(--primary-accent);
}

/* —— Área principal —— */
.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: transparent;
  padding: 36px 44px 48px;
  overflow-x: hidden;
  overflow-y: auto;
  max-width: none;
  width: 100%;
}

.panel[hidden] {
  display: none;
}

.page-header {
  margin-bottom: 32px;
}

.page-header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.page-header__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.6;
}

.page-header--dash {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

.page-header--dash .page-header__subtitle {
  margin-bottom: 0;
}

.page-footer-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.link {
  color: var(--primary);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* —— Cards (SaaS / métricas) —— */
.card {
  background: var(--bg-surface);
  border: 1px solid rgba(38, 83, 150, 0.28);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: none;
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.card:hover {
  border-color: rgba(38, 83, 150, 0.5);
  background: #0c1733;
}

.card--muted {
  background: var(--bg-surface-elevated);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card__title--sm {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.card__head .card__title--sm,
.card__head .card__title--white {
  margin-bottom: 0;
}

.card__head .card__title--sm {
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 14px;
  font-weight: 600;
}

.card__title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(20, 107, 255, 0.12);
  color: var(--primary-accent);
  flex-shrink: 0;
}

.card__icon svg {
  width: 16px;
  height: 16px;
}

.card__title--danger {
  color: var(--error);
}

.card__title--white {
  color: var(--text);
}

/* —— Campos —— */
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0px;
}

.field-input {
  width: 100%;
  max-width: 320px;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

/* Space after each input inside modal to separate groups (label+input) */
.modal__body form .field-input {
  margin-bottom: 12px;
}

.field-input::placeholder {
  color: var(--text-disabled);
  opacity: 1;
}

.field-input:hover {
  border-color: rgba(38, 83, 150, 0.75);
}

.field-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-input);
}

.field-input--invalid,
.field-input--invalid:hover,
.field-input--invalid:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.18);
}

.field-input--full {
  max-width: none;
  width: 100%;
}

#profile-email,
#profile-phone,
#profile-avatar {
  padding-top: 16px;
  padding-bottom: 10px;
}

.field-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.field-hint code {
  font-size: 12px;
  color: var(--primary);
  background: rgba(20, 107, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

/* —— Botões —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  text-decoration: none;
  box-shadow: none !important;
}

.btn--primary {
  color: var(--text-bright);
  background: var(--primary);
  box-shadow: none !important;
}

.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: none !important;
}

.btn,
.btn:link,
.btn:visited,
.btn:hover,
.btn:focus {
  text-decoration: none;
}

.btn--primary:active {
  transform: translateY(0);
}

.modal__footer .btn--primary,
.modal__footer .btn--primary:hover,
.modal__footer .btn--primary:focus {
  box-shadow: none;
}

.btn--success {
  color: var(--text-bright);
  background: var(--success);
  box-shadow: none;
}

.btn--success:hover {
  background: #16b36d;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn--danger {
  color: var(--text-bright);
  background: var(--error);
  box-shadow: none;
}

.btn--danger:hover {
  background: #e8435c;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn--success:active,
.btn--danger:active {
  transform: translateY(0);
}

.btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

.btn--icon svg {
  width: 18px;
  height: 18px;
}

/* —— Bloco de código —— */
.code-block-wrap {
  position: relative;
  margin-top: 12px;
}

.code-block-wrap .code-block {
  margin: 0;
  padding: 16px 48px 16px 18px;
}

.code-block-wrap--flat {
  margin-top: 0;
}

.code-block-wrap--flat .code-block__copy {
  top: 12px;
  right: 12px;
}

.code-block-wrap--flat .code-block {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 48px 16px 18px;
  color: var(--text-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.code-block__copy {
  position: absolute;
  top: 4px;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.code-block__copy:hover {
  color: var(--text);
}

.code-block__copy.is-copied {
  color: var(--success);
}

.code-block__copy svg {
  width: 18px;
  height: 18px;
}

.code-block {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.url-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.url-list__row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13px;
}

.url-list__row dt {
  color: var(--text-muted);
  font-weight: 500;
}

.url-list__row dd code {
  display: block;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

/* —— Domínios —— */
#domain-add-open {
  padding: 11px 22px;
  font-size: 14px;
  border-radius: 6px;
}

.domain-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.domain-add-row .field-input {
  flex: 1;
  min-width: 200px;
  max-width: none;
}

.domain-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.domain-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.domain-list__item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.domain-list__host {
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 13px;
  color: var(--text);
}

.domain-list__item .btn--ghost {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.domain-list__item .btn--ghost:hover {
  color: var(--error);
  border-color: var(--error);
}

.domain-msg {
  margin-top: 12px;
  font-size: 13px;
}

.domain-msg[data-type="ok"] {
  color: var(--success);
}

.domain-msg[data-type="error"] {
  color: var(--error);
}

.btn--ghost {
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(20, 107, 255, 0.08);
  border-color: rgba(38, 83, 150, 0.75);
}

/* —— Domínios detectados —— */
.detected-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.detected-table th,
.detected-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.detected-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
}

.detected-table__host {
  font-size: 12px;
  color: var(--text);
}

.detected-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  white-space: nowrap;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}

.badge--ok {
  color: var(--success);
  background: rgba(25, 199, 122, 0.12);
}

.badge--warn {
  color: var(--warning);
  background: rgba(255, 176, 32, 0.12);
}

.badge--error {
  color: var(--error);
  background: rgba(255, 77, 103, 0.12);
}

.toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__ui {
  width: 36px;
  height: 20px;
  background: var(--secondary);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s ease;
}

.toggle__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text);
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.toggle input:checked + .toggle__ui {
  background: var(--primary);
}

.toggle input:checked + .toggle__ui::after {
  transform: translateX(16px);
  background: var(--primary-accent);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.toggle input:disabled + .toggle__ui {
  opacity: 0.45;
  cursor: not-allowed;
}

.domain-list__item {
  flex-wrap: wrap;
}

.funnel-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.funnel-tab {
  padding: 7px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.funnel-tab:hover {
  color: var(--text);
}

.funnel-tab.is-active {
  color: var(--text-bright);
  background: rgba(20, 107, 255, 0.14);
  border-color: rgba(20, 107, 255, 0.35);
}

/* —— Tempo real / Tráfego —— */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.12);
  border: 1px solid rgba(20, 107, 255, 0.28);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(20, 107, 255, 0.75);
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.live-feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.live-feed--full {
  max-height: 520px;
}

.live-feed__item {
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: feed-in 0.25s ease;
}

@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.live-feed__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.live-feed__time {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.live-feed__type {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.live-feed__body {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-word;
}

.live-feed__body code {
  color: var(--primary);
  background: rgba(20, 107, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.live-feed__detail {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.live-feed__url {
  display: block;
  color: var(--primary);
  font-size: 13px;
  word-break: break-all;
  text-decoration: none;
}

.live-feed__url:hover {
  text-decoration: underline;
}


/* —— Dashboard analytics grid —— */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.dash-line-card {
  grid-column: 1 / -1;
}

.dash-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0;
}

.dash-total {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dash-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dash-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
}

.dash-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 188px;
  flex: 0 1 220px;
}

.dash-filter__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.dash-filter__field {
  position: relative;
}

.dash-filter__control {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-bright);
  background: #10192f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 11px 36px 11px 14px;
  outline: none;
  color-scheme: dark;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.dash-filter__control:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.dash-filter__control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.dash-filter__control--date {
  padding-right: 12px;
}

.dash-filter__control--date::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
  filter: invert(1);
}

.dash-filter__chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.dash-filter__chevron svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* gráfico de barras */
.dash-line-wrap {
  position: relative;
}

.dash-bar-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 20, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  z-index: 10;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: opacity 0.1s;
}

.dash-bar-tooltip[hidden] {
  display: none;
}

.dash-bar-tooltip__date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.dash-bar-tooltip__count {
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}

.dash-bar-svg {
  display: block;
  width: 100%;
  height: 130px;
  overflow: visible;
}

.dash-bar {
  transition: opacity 0.1s;
}

.dash-bar:hover {
  opacity: 0.8;
  cursor: default;
}

.dash-line-labels {
  position: relative;
  height: 20px;
  margin-top: 4px;
}

.dash-line-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dash-line-empty {
  margin: 0;
}



.page-url-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-url-list--full {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

/* —— Tráfego: domínio → páginas —— */
.domain-group {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: visible;
  min-width: 0;
  transition: border-color 0.2s var(--ease-out);
}

.domain-group:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.domain-group__head {
  display: flex;
  align-items: center;
  gap: 4px;
}

.domain-group__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.domain-group__toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.domain-group__chevron {
  display: flex;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.domain-group__chevron svg {
  width: 16px;
  height: 16px;
}

.domain-group.is-open > .domain-group__head .domain-group__chevron {
  transform: rotate(90deg);
}

.domain-group__host {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 13px;
  color: var(--text);
}

.domain-group__count {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0;
  word-spacing: 0.15em;
}

.domain-group__gear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.domain-group__gear svg {
  width: 18px;
  height: 18px;
}

.domain-group__gear:hover,
.domain-group__gear.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.domain-group__panel {
  margin: 0 12px 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
  letter-spacing: 0;
  word-spacing: 0.16em;
}

.domain-group__panel.page-settings-panel {
  margin-top: 2px;
  padding: 14px 14px 16px;
}

.domain-group__panel[hidden] {
  display: none;
}

.domain-group__panel .funnel-domain-toggles {
  gap: 18px;
}

.domain-group__panel .funnel-page-form__row {
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
}

.domain-group__panel .funnel-page-form__label,
.domain-group__panel .funnel-page-form__row .funnel-page-form__label {
  flex: 1 1 auto;
  min-width: 0;
  letter-spacing: 0;
  word-spacing: 0.16em;
  white-space: nowrap;
  overflow-wrap: normal;
}

.domain-group__panel .toggle {
  flex-shrink: 0;
}

.funnel-utmify-script {
  display: block;
  width: 100%;
  min-height: 96px;
  resize: vertical;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  word-spacing: normal;
}

.funnel-utmify-script::placeholder {
  letter-spacing: 0;
  word-spacing: 0.16em;
}

.domain-group__pages {
  list-style: none;
  margin: 0;
  padding: 12px 14px 10px 40px;
  border-top: 1px solid var(--border);
}

.domain-group__pages[hidden] {
  display: none;
}

.domain-group__page {
  padding: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.domain-group__page:last-child {
  border-bottom: none;
}

.domain-group__page-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}

.domain-group__page-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 34px;
  margin: -2px 0 0 -4px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
  opacity: 0.55;
}

.domain-group__page-handle svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.domain-group__page-handle:hover,
.domain-group__page-handle:focus-visible {
  opacity: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.domain-group__page-handle:active {
  cursor: grabbing;
}

.domain-group__page.is-dragging {
  position: fixed;
  z-index: 1400;
  margin: 0;
  padding: 0 12px;
  pointer-events: none;
  list-style: none;
  border: 1px solid rgba(20, 107, 255, 0.45);
  border-radius: 10px;
  background: var(--bg-input);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.domain-group__page--placeholder {
  border: 1px dashed rgba(20, 107, 255, 0.4);
  border-radius: 10px;
  background: rgba(20, 107, 255, 0.08);
}

.domain-group__page-hide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.domain-group__page-hide svg {
  width: 16px;
  height: 16px;
}

.domain-group__page-hide:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.domain-group__page.is-hidden-page .domain-group__page-link {
  color: var(--text-muted);
}

.domain-group__hidden {
  margin: 2px 14px 8px 40px;
  padding-top: 2px;
  border-top: 1px dashed var(--border-subtle);
}

.domain-group__hidden.is-empty {
  opacity: 0.88;
}

.domain-group__hidden-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 0 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
}

.domain-group__hidden-toggle:hover {
  color: var(--text);
}

.domain-group__hidden-toggle .domain-group__chevron {
  width: 14px;
  height: 14px;
}

.domain-group__hidden-toggle[aria-expanded="true"] .domain-group__chevron {
  transform: rotate(90deg);
}

.domain-group__pages--hidden {
  padding: 0 0 4px;
  min-height: 8px;
  border-top: none;
}

.domain-group__pages--hidden:empty {
  min-height: 28px;
}

body.is-page-dragging {
  cursor: grabbing;
  user-select: none;
}

body.is-page-dragging * {
  cursor: grabbing !important;
}

.domain-group__page-favicon {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  margin-top: 1px;
  cursor: default;
}

.domain-group__page-favicon-img {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
}

.domain-group__page-hover-card {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1200;
  width: min(300px, calc(100vw - 48px));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transform-origin: top left;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0.16s ease;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface-elevated);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.domain-group__page-hover-card.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.domain-group__page-hover-card__media {
  aspect-ratio: 16 / 9;
  background: var(--bg-surface);
  line-height: 0;
  overflow: hidden;
}

.domain-group__page-hover-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  object-position: top center;
  background: var(--grad-card);
}

.domain-group__page-hover-card__thumb.is-fallback {
  object-fit: contain;
  padding: 16px;
  box-sizing: border-box;
}

.domain-group__page-hover-card__body {
  padding: 10px 12px 12px;
}

.domain-group__page-hover-card__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.domain-group__page-hover-card__domain {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.domain-group__page-hover-card__domain img {
  flex-shrink: 0;
  border-radius: 2px;
}

.domain-group__page-main {
  flex: 1;
  min-width: 0;
}

.domain-group__page-link {
  display: block;
  font-size: 12px;
  color: var(--primary);
  word-break: break-all;
  text-decoration: none;
  line-height: 1.5;
}

.domain-group__page-link:hover {
  text-decoration: underline;
}

.domain-group__page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.domain-group__page-hits {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.domain-group__page-time {
  font-size: 11px;
  color: var(--text-muted);
}

.domain-group__page-step {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: rgba(25, 199, 122, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

.domain-group__page-gear {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.domain-group__page-gear svg {
  width: 18px;
  height: 18px;
}

.domain-group__page-gear:hover,
.domain-group__page-gear.is-active {
  color: var(--text);
  border-color: rgba(20, 107, 255, 0.45);
  background: rgba(20, 107, 255, 0.12);
}

.domain-group__page-panel {
  padding: 10px 0 12px;
}

.domain-group__page-panel[hidden] {
  display: none;
}

.funnel-page-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.funnel-page-form__label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.funnel-page-form__input {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.7), rgba(13, 25, 53, 0.5));
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s var(--ease-out);
  backdrop-filter: blur(4px);
}

.funnel-page-form__input::placeholder {
  color: rgba(141, 155, 184, 0.5);
}

.funnel-page-form__input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.8), rgba(13, 25, 53, 0.6));
}

.funnel-page-form__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 107, 255, 0.2), inset 0 0 0 1px rgba(20, 107, 255, 0.1);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.95), rgba(13, 25, 53, 0.75));
}

.funnel-page-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.funnel-page-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.page-settings-panel {
  padding: 0;
  background: transparent;
  border: none;
}

.funnel-domain-section {
  margin-top: 2px;
}

.funnel-domain-section__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--error);
  margin-bottom: 12px;
}

.funnel-page-hint {
  margin: 0 0 12px;
}

.funnel-page-split {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  max-height: min(320px, 42vh);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  background: rgba(20, 107, 255, 0.08);
  border: 1px solid rgba(20, 107, 255, 0.22);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.funnel-page-split::-webkit-scrollbar {
  width: 6px;
}

.funnel-page-split::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.funnel-page-split::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.funnel-page-split.is-hidden {
  display: none;
}

.funnel-split__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.funnel-split__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.funnel-split__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.14);
  border-radius: 10px;
}

.funnel-anchor-link {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.funnel-anchor-link__src {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 0 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.12);
  border-radius: 6px;
}

.funnel-anchor-link__flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
}

.funnel-anchor-link__field {
  display: block;
  min-width: 0;
}

.funnel-anchor-link__input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s var(--ease-out);
  backdrop-filter: blur(4px);
}

.funnel-anchor-link__input::placeholder {
  color: rgba(141, 155, 184, 0.5);
}

.funnel-anchor-link__input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.8), rgba(13, 25, 53, 0.6));
}

.funnel-anchor-link__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 107, 255, 0.2), inset 0 0 0 1px rgba(20, 107, 255, 0.1);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.95), rgba(13, 25, 53, 0.75));
}

.funnel-anchor-link__input:disabled {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.funnel-anchor-link__input:disabled::placeholder {
  color: rgba(141, 155, 184, 0.25);
}

.funnel-btn-links .funnel-anchor-link__flow {
  gap: 6px;
}

.funnel-btn-links .funnel-anchor-link__input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
  text-decoration: none;
  box-shadow: none;
  transition: all 0.2s var(--ease-out);
  backdrop-filter: blur(4px);
}

.funnel-btn-links .funnel-anchor-link__input::placeholder {
  color: rgba(141, 155, 184, 0.6);
  text-decoration: none;
}

.funnel-btn-links .funnel-anchor-link__input:disabled {
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.funnel-btn-links .funnel-anchor-link__input:hover,
.funnel-btn-links .funnel-anchor-link__input:focus {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.9);
  outline: none;
  box-shadow: none;
}

.funnel-anchor-link__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.funnel-anchor-link__arrow svg {
  width: 20px;
  height: 20px;
}

.funnel-anchor-link__action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 107, 255, 0.3);
  transition: all 0.2s ease;
}

.funnel-anchor-link__action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 107, 255, 0.4);
  background: var(--grad-accent);
}

.funnel-anchor-link__action:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(20, 107, 255, 0.2);
}

.funnel-anchor-link__action svg {
  width: 18px;
  height: 18px;
}

.funnel-anchor-link .btn--icon {
  color: var(--text-muted);
  background: transparent;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.funnel-anchor-link .btn--icon:hover {
  color: var(--primary);
}

.funnel-anchor-link .btn--icon--danger {
  color: var(--text-muted);
}

.funnel-anchor-link .btn--icon--danger:hover {
  color: var(--error);
}

.funnel-anchor-link__save {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 107, 255, 0.3);
  transition: all 0.2s ease;
}

.funnel-anchor-link__save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 107, 255, 0.4);
  background: var(--grad-accent);
}

.funnel-anchor-link__save:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(20, 107, 255, 0.2);
}

@media (max-width: 720px) {
  .funnel-anchor-link__flow {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .funnel-anchor-link__arrow {
    margin: 0 auto;
    transform: rotate(90deg);
  }
}

.funnel-btn-links__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.funnel-split__scan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.1);
  border: 1px solid rgba(20, 107, 255, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.funnel-split__scan:hover:not(:disabled) {
  color: var(--text-bright);
  background: rgba(20, 107, 255, 0.18);
  border-color: rgba(20, 107, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(20, 107, 255, 0.12);
}

.funnel-split__scan:active:not(:disabled) {
  transform: translateY(1px);
}

.funnel-split__scan:disabled {
  opacity: 0.65;
  cursor: wait;
}

.funnel-split__scan-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.2);
  border-radius: 8px;
}

.funnel-split__scan-icon svg {
  width: 16px;
  height: 16px;
}

.funnel-btn-links__empty {
  margin: 0;
}

.funnel-btn-links__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.funnel-media-links {
  margin-top: 0;
}

.funnel-media-link--view {
  padding: 0;
  background: transparent;
  border: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.funnel-media-link__open {
  display: block;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--success);
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.funnel-media-link__open:hover {
  color: var(--success);
}

.funnel-media-link__pending {
  font-size: 12px;
  color: var(--text-muted);
}

.funnel-media-link__actions {
  display: none;
  flex-shrink: 0;
  gap: 6px;
}

.funnel-media-link--view:hover .funnel-media-link__actions {
  display: flex;
}

.funnel-media-link__action {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 107, 255, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.funnel-media-link__action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 107, 255, 0.4);
  background: var(--grad-accent);
}

.funnel-media-link__action:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(20, 107, 255, 0.2);
}

.funnel-media-link__action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.funnel-media-link__action svg {
  width: 14px;
  height: 14px;
}

.funnel-split__url {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.funnel-split__url:focus {
  border-color: rgba(20, 107, 255, 0.35);
  background: rgba(20, 107, 255, 0.05);
}

.funnel-split__remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.funnel-split__remove:hover {
  color: var(--error);
  background: rgba(255, 77, 103, 0.08);
}

.funnel-split__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 2px;
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.08);
  border: 1px dashed rgba(20, 107, 255, 0.45);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.funnel-split__add:hover {
  color: var(--text);
  background: rgba(20, 107, 255, 0.16);
  border-color: rgba(20, 107, 255, 0.65);
  transform: translateY(-1px);
}

.funnel-split__add:active {
  transform: translateY(0);
}

.funnel-split__add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.2);
  border-radius: 6px;
}

.funnel-domain-toggles {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.funnel-settings-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.funnel-settings-group > .funnel-page-split {
  margin-top: 10px;
}

.funnel-settings-group[data-text-section] {
  gap: 14px;
}

.domain-group__page-panel .funnel-site-download {
  margin-top: 4px;
  gap: 0;
}

.funnel-site-download__top {
  margin: 0;
}

.funnel-site-download__btn {
  flex-shrink: 0;
}

.funnel-site-download__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.funnel-site-download__active {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.funnel-site-download__active[hidden] {
  display: none !important;
}

.funnel-site-download--busy .funnel-site-download__status {
  margin-top: 6px;
}

.funnel-site-download--done .funnel-site-download__status,
.funnel-site-download--done.funnel-site-download--busy .funnel-site-download__status {
  margin-top: 6px;
}

.funnel-site-download__meter {
  display: block;
  width: 100%;
  height: 6px;
  margin: 0;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
}

.funnel-site-download__meter::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.funnel-site-download__meter::-webkit-progress-value {
  background: var(--grad-accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.funnel-site-download__meter::-moz-progress-bar {
  background: var(--grad-accent);
  border-radius: 999px;
}

.funnel-site-download__meter.is-done::-webkit-progress-value {
  background: linear-gradient(90deg, var(--success), #3dd68f);
}

.funnel-site-download__meter.is-done::-moz-progress-bar {
  background: linear-gradient(90deg, var(--success), #3dd68f);
}

.funnel-site-download__meter.is-error::-webkit-progress-value {
  background: linear-gradient(90deg, var(--error), #ff7a8c);
}

.funnel-site-download__meter.is-error::-moz-progress-bar {
  background: linear-gradient(90deg, var(--error), #ff7a8c);
}

.funnel-site-download__status {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.funnel-site-download__status[data-state='error'] {
  color: var(--error);
}

.funnel-site-download__status[data-state='done'] {
  color: var(--success);
}

.funnel-text-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.funnel-text-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
}

.funnel-text-row__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.12);
  border-radius: 999px;
}

.funnel-text-row__original {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  word-break: break-word;
}

.funnel-text-row__input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.7), rgba(13, 25, 53, 0.5));
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s var(--ease-out);
  backdrop-filter: blur(4px);
}

.funnel-text-row__input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.funnel-text-row__input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.8), rgba(13, 25, 53, 0.6));
}

.funnel-text-row__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 107, 255, 0.2), inset 0 0 0 1px rgba(20, 107, 255, 0.1);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.95), rgba(13, 25, 53, 0.75));
}

.funnel-text-list__empty {
  margin: 0;
}

.funnel-domain-toggles .funnel-page-form__row {
  margin: 0;
}

.funnel-domain-toggles .funnel-page-form__row .funnel-page-form__label {
  display: block;
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.funnel-url-params-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.funnel-url-params-modes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.funnel-url-params-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}

.funnel-url-params-mode input[type="radio"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

.funnel-url-params-custom {
  margin-top: 2px;
}

.funnel-device-audience-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.funnel-device-audience-mode {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(141, 155, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.funnel-device-audience-mode:hover {
  border-color: rgba(96, 165, 250, 0.5);
  color: var(--text);
}

.funnel-device-audience-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.funnel-device-audience-mode__text {
  min-width: 0;
}

.funnel-device-audience-mode__indicator {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(141, 155, 184, 0.5);
  border-radius: 50%;
  background: transparent;
}

.funnel-device-audience-mode:has(input:checked) .funnel-device-audience-mode__indicator {
  background: var(--success);
  border-color: rgba(25, 199, 122, 0.85);
}

.funnel-device-audience-mode:has(input:checked) {
  border-color: rgba(20, 107, 255, 0.85);
  background: rgba(20, 107, 255, 0.16);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(20, 107, 255, 0.22) inset;
}

.funnel-domain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.funnel-domain-actions .btn--icon svg {
  width: 20px;
  height: 20px;
}

.funnel-msg {
  margin-top: 12px;
  font-size: 13px;
}

.funnel-msg[data-type="ok"] {
  color: var(--success);
}

.funnel-msg[data-type="error"] {
  color: var(--error);
}

.domain-group__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.domain-group__badge--pending {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.domain-group__page-step--pending {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.14);
}

.detected-table__url-cell {
  max-width: 280px;
}

.detected-table__url {
  display: block;
  font-size: 12px;
  color: var(--primary);
  word-break: break-all;
  text-decoration: none;
}

.detected-table__url:hover {
  text-decoration: underline;
}

/* —— Chat de suporte (FAB) —— */
.support-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.support-chat__fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.support-chat__fab:hover {
  background: #1ebe57;
  transform: scale(1.06);
  box-shadow: none;
}

.support-chat__fab svg {
  width: 26px;
  height: 26px;
}

.support-chat__panel {
  width: 360px;
  max-width: calc(100vw - 48px);
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: rgba(13, 25, 53, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.support-chat__panel[hidden] {
  display: none;
}

.support-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.support-chat__title {
  font-size: 1rem;
  font-weight: 600;
}

.support-chat__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.support-chat__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.support-chat__close svg {
  width: 18px;
  height: 18px;
}

.support-chat__messages {
  flex: 1;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-chat__bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.support-chat__bubble--bot {
  align-self: flex-start;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.support-chat__bubble--user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--text);
}

.support-chat__form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.support-chat__input {
  flex: 1;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.7), rgba(13, 25, 53, 0.5));
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s var(--ease-out);
  backdrop-filter: blur(4px);
}

.support-chat__input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.support-chat__input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.8), rgba(13, 25, 53, 0.6));
}

.support-chat__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 107, 255, 0.2), inset 0 0 0 1px rgba(20, 107, 255, 0.1);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.95), rgba(13, 25, 53, 0.75));
}

.support-chat__send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--text);
  cursor: pointer;
}

.support-chat__send:hover {
  background: var(--primary-hover);
}

.support-chat__send svg {
  width: 18px;
  height: 18px;
}

/* —— Modal —— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 440px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  min-height: 0;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.25s var(--ease-out);
}

.modal__dialog--lg {
  width: min(100%, 560px);
}

.modal--crop {
  z-index: 1200;
}

.avatar-crop {
  display: grid;
  gap: 14px;
}

.avatar-crop__stage {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #091021;
  border: 1px solid var(--border);
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.avatar-crop__stage:active {
  cursor: grabbing;
}

.avatar-crop__stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
}

.avatar-crop__frame {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 0 2px rgba(0, 140, 255, 0.55);
  pointer-events: none;
}

.avatar-crop__zoom {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.avatar-crop__zoom input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.modal__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

.modal__body {
  padding: 22px;
  display: grid;
  row-gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal__body form {
  display: grid;
  gap: 2px;
}

.modal__body .field-hint {
  margin-top: 10px;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn--ghost-modal {
  padding: 10px 18px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn--ghost-modal:hover {
  color: var(--text);
  border-color: rgba(38, 83, 150, 0.75);
  background: rgba(20, 107, 255, 0.08);
}

/* —— Boot / Login —— */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-page);
  color: var(--text-muted);
}

.boot-screen[hidden],
html.inlock-authed .boot-screen {
  display: none !important;
}

.boot-screen__spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(141, 155, 184, 0.22);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: boot-spin 0.7s linear infinite;
}

.boot-screen__text {
  font-size: 14px;
}

.boot-screen__retry {
  margin-top: 4px;
}

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

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background-color: var(--bg-page);
  overflow: hidden;
}

.auth-page__bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 65% at 50% -10%, rgba(20, 107, 255, 0.28), transparent 65%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(30, 77, 204, 0.15), transparent 60%),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-surface) 100%);
}

.auth-page__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 15%, transparent 100%);
  opacity: 0.6;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 40px 32px 36px;
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-card__header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card__logo {
  display: none;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 8px;
  box-sizing: border-box;
  margin-bottom: 16px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid rgba(20, 107, 255, 0.35);
  color: var(--primary-accent);
  transition: transform 0.2s ease;
}

.auth-card__logo-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.auth-card__logo:hover {
  transform: scale(1.05);
  box-shadow: 0 16px 40px rgba(20, 107, 255, 0.3);
}

.auth-card__logo svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.auth-card__brand {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.auth-card__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field[hidden] {
  display: none !important;
}

.auth-field__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 6px;
}

.auth-field__control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-field__control:hover {
  border-color: rgba(38, 83, 150, 0.75);
  background: var(--bg-input);
}

.auth-field__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(141, 155, 184, 0.75);
}

.auth-field__action {
  border: none;
  background: transparent;
  color: rgba(141, 155, 184, 0.75);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
}

.auth-field__action:hover {
  color: rgba(255, 255, 255, 0.9);
}

.auth-field__control .auth-field__input {
  width: 100%;
  border: none;
  padding: 12px 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}

.auth-field__input::placeholder {
  color: var(--text-disabled);
}

.auth-field__input:focus {
  outline: none;
}

.auth-field__control:focus-within {
  border-color: rgba(20, 107, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(20, 107, 255, 0.15);
}

.auth-msg {
  margin: 0 0 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 12px;
  color: var(--error);
  background: rgba(255, 77, 103, 0.12);
  border: 1px solid rgba(255, 77, 103, 0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-msg[hidden] {
  display: none;
}

.auth-msg[data-type="success"] {
  color: var(--success);
  background: rgba(25, 199, 122, 0.12);
  border-color: rgba(25, 199, 122, 0.3);
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 15px 18px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--grad-accent);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-card__footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(141, 155, 184, 0.65);
  letter-spacing: 0.01em;
}

.auth-switch {
  border: none;
  background: transparent;
  color: var(--primary-accent);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-switch:hover {
  color: #fff;
  text-decoration: underline;
}

/* —— Admin page —— */
.admin-page {
  min-height: 100vh;
  background: var(--bg-page);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.admin-topbar__left,
.admin-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.admin-topbar__back {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.admin-topbar__back:hover {
  color: var(--text);
}

.admin-topbar__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.admin-topbar__user {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.admin-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.btn--full {
  width: 100%;
}

/* —— Sidebar account —— */
.sidebar__account {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.sidebar__account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sidebar__account-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sidebar__account-icon {
  width: 22px;
  height: 22px;
}

.sidebar__account-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar__account-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__account-role {
  font-size: 12px;
  color: rgba(141, 155, 184, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__account-actions {
  display: flex;
  gap: 8px;
}

.sidebar__action-btn,
.sidebar__logout {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar__action-btn:hover,
.sidebar__logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar__logout {
  width: 44px;
  height: 44px;
  padding: 0;
}

.sidebar__logout svg,
.sidebar__account-icon {
  width: 22px;
  height: 22px;
}

.sidebar--narrow .sidebar__account {
  flex-direction: column;
  align-items: center;
}

.sidebar--narrow .sidebar__account-info,
.sidebar--narrow .sidebar__account-actions {
  display: none;
}

.sidebar--narrow .sidebar__logout {
  width: 40px;
  height: 40px;
}

.sidebar__footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 16px 16px 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar__footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__footer-avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar__footer-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sidebar__footer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.sidebar__footer-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__footer-role {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.2;
  margin-top: 2px;
}

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

.sidebar__account,
.sidebar__account-actions,
.sidebar__account-avatar,
.sidebar__account-info,
.sidebar__account-name,
.sidebar__account-role {
  display: none !important;
}

.sidebar__logout,
.sidebar__profile {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
}

.sidebar__logout:hover,
.sidebar__profile:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar__logout svg,
.sidebar__profile svg {
  width: 18px;
  height: 18px;
}

/* —— Mobile Responsiveness —— */

@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .main {
    padding: 20px 16px 32px;
  }

  .page-header__title {
    font-size: 24px;
  }

  .page-header__subtitle {
    font-size: 12px;
  }

  .page-header--dash {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-filter {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }

  .card {
    padding: 12px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .field-input,
  .field-textarea,
  select {
    font-size: 13px;
    padding: 7px 8px;
  }

  .admin-user-form {
    grid-template-columns: 1fr;
  }

  .admin-user-form .field-input,
  .admin-user-form select {
    font-size: 16px;
    padding: 10px 12px;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 12px;
  }

  .page-header__title {
    font-size: 20px;
  }

  .page-header__subtitle {
    font-size: 11px;
  }

  .card {
    padding: 10px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .field-input,
  .field-textarea,
  select {
    font-size: 11px;
    padding: 6px 8px;
  }

  .admin-user-form {
    grid-template-columns: 1fr;
  }

  .admin-user-form .field-input,
  .admin-user-form select {
    font-size: 16px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  :root {
    --sidebar-width: 100%;
    --radius-sm: 8px;
  }

  html,
  body {
    height: 100%;
    overflow-x: hidden;
  }

  .app {
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100dvh;
    max-height: 100dvh;
    max-width: none;
    min-width: unset;
    min-height: 0;
    z-index: 998;
    transition: left 0.3s var(--ease-out);
    border-right: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar__brand {
    display: block;
  }

  .sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .sidebar__link {
    flex-shrink: unset;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .sidebar__link-text {
    display: inline;
  }

  .sidebar__account {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .main {
    flex: 1;
    min-height: 0;
    height: auto;
    padding: 56px 10px 20px 10px;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    margin-left: 0;
  }

  body {
    font-size: 12px;
  }

  .page-header {
    margin-bottom: 12px;
  }

  .page-header__title {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .page-header__subtitle {
    font-size: 10px;
    line-height: 1.3;
  }

  .card {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .card__head {
    padding: 0 0 8px 0;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .card__title--sm {
    font-size: 11px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
  }

  .btn--icon {
    width: 32px;
    height: 32px;
  }

  .btn--icon svg {
    width: 16px;
    height: 16px;
  }

  .btn--primary,
  .btn--success,
  .btn--danger {
    width: 100%;
  }

  .field-label {
    font-size: 10px;
    margin-bottom: 4px;
    font-weight: 600;
  }

  .field-input,
  .field-textarea,
  select {
    font-size: 11px;
    padding: 6px 7px;
    border-radius: 6px;
    width: 100%;
  }

  .field-hint {
    font-size: 10px;
    line-height: 1.3;
  }

  .page-url-list {
    gap: 6px;
  }

  .domain-group {
    padding: 0;
    border-radius: 6px;
  }

  .domain-group__toggle {
    padding: 10px 12px;
  }

  .domain-group__pages {
    padding: 10px 12px;
  }

  .domain-group__hidden {
    margin: 2px 12px 8px 12px;
  }

  .domain-group__pages--hidden {
    padding: 0 0 4px;
  }

  .domain-group__page {
    padding: 0;
  }

  .funnel-settings-group {
    padding: 0;
    gap: 8px;
  }

  .funnel-page-form__row {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .domain-group__badge,
  .domain-group__page-step {
    font-size: 9px;
    padding: 1px 5px;
  }

  .domain-group__settings,
  .domain-group__actions {
    width: 28px;
    height: 28px;
  }

  .funnel-anchor-link {
    padding: 8px 0;
  }

  .funnel-anchor-link__flow {
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .funnel-anchor-link__input {
    font-size: 10px;
    padding: 5px 6px;
    width: 100%;
  }

  .funnel-anchor-link__arrow {
    height: 20px;
    order: -1;
  }

  .funnel-anchor-link__arrow svg {
    width: 14px;
    height: 14px;
  }

  .funnel-split__scan {
    padding: 8px 12px;
    font-size: 11px;
    width: 100%;
  }

  .funnel-split__scan-icon {
    width: 24px;
    height: 24px;
  }

  .funnel-split__scan-icon svg {
    width: 14px;
    height: 14px;
  }

  .modal {
    padding: 10px;
    align-items: stretch;
  }

  .modal__dialog,
  .modal__dialog--lg {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
    align-self: center;
  }

  .modal__header {
    padding: 12px 14px;
  }

  .modal__body {
    padding: 12px 14px;
    gap: 8px;
  }

  .modal__footer {
    padding: 10px 14px;
    gap: 8px;
    flex-direction: column-reverse;
  }

  .modal__footer .btn,
  .modal__footer .btn--primary,
  .modal__footer .btn--ghost-modal {
    width: 100%;
  }

  .admin-user-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-user-form .field-input,
  .admin-user-form select {
    font-size: 16px;
    padding: 10px 12px;
  }

  .admin-topbar {
    padding: 8px 12px;
    flex-direction: column;
    gap: 8px;
  }

  .admin-topbar__left,
  .admin-topbar__right {
    width: 100%;
  }

  .admin-topbar__back {
    font-size: 11px;
  }

  .admin-topbar__title {
    font-size: 12px;
  }

  .admin-main {
    padding: 10px 8px 20px;
    max-width: 100%;
  }

  .admin-user-row {
    padding: 8px 0;
    gap: 8px;
  }

  .admin-user-row__name {
    font-size: 12px;
  }

  .admin-user-row__username {
    font-size: 11px;
  }

  .admin-user-row__badge {
    font-size: 9px;
    padding: 1px 4px;
  }

  .admin-user-row__dates {
    margin-top: 8px;
    gap: 6px;
  }

  .admin-user-row__date {
    padding: 4px 7px;
  }

  .admin-user-row__date-label {
    font-size: 9px;
  }

  .admin-user-row__date-value {
    font-size: 11px;
  }

  .admin-user-row__meta {
    gap: 4px;
    flex-wrap: wrap;
  }

  .admin-user-row__actions {
    width: 100%;
    gap: 8px;
  }

  .toggle {
    width: 40px;
    height: 22px;
  }

  .toggle__ui::before {
    width: 18px;
    height: 18px;
  }

  input:checked + .toggle__ui::before {
    left: 20px;
  }

  .live-badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  .live-badge__dot {
    width: 5px;
    height: 5px;
  }

  .code-block-wrap {
    margin-top: 8px;
  }

  .code-block {
    padding: 10px 40px 10px 10px;
    font-size: 10px;
  }

  .code-block__copy {
    width: 30px;
    height: 30px;
  }

  .page-url-list--full {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— Admin users —— */
.admin-users-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-user-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-user-row:last-child {
  border-bottom: none;
}

.admin-user-row__main {
  min-width: 0;
  flex: 1;
}

.admin-user-row__name {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.admin-user-row__username {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.admin-user-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.admin-user-row__badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 107, 255, 0.12);
  color: var(--primary-accent);
  font-weight: 600;
}

.admin-user-row__badge--muted {
  background: rgba(141, 155, 184, 0.12);
  color: var(--text-muted);
}

.admin-user-row__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-user-row__date {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(141, 155, 184, 0.08);
  border: 1px solid rgba(141, 155, 184, 0.12);
  line-height: 1.2;
}

.admin-user-row__date-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-user-row__date-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.admin-user-row__sites {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row__actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.admin-user-row__actions .btn--icon {
  color: var(--text-muted);
  background: transparent;
  transition: color 0.2s var(--ease-out);
}

.admin-user-row__actions .btn--icon:hover {
  color: var(--primary);
}

.admin-user-row__actions .btn--icon--danger {
  color: var(--text-muted);
}

.admin-user-row__actions .btn--icon--danger:hover {
  color: var(--error);
}

.admin-user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  align-content: start;
}

.admin-user-form__field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-user-form__field--full,
.admin-user-form__active {
  grid-column: 1 / -1;
}

.admin-user-form .field-label {
  margin-bottom: 6px;
}

.admin-user-form .field-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0;
  font-size: 16px;
}

.admin-user-form .field-hint {
  margin-top: 6px;
}

#admin-user-sites-status {
  margin-top: 8px;
}

.admin-user-form input[type="datetime-local"] {
  color-scheme: dark;
  min-height: 44px;
}

.admin-user-form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
  filter: invert(1);
}

.admin-user-form__active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  min-width: 0;
}

.config-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.config-form {
  display: grid;
  gap: 10px;
}

.config-form .btn {
  justify-self: start;
  margin-top: 6px;
}

.plan-summary {
  display: grid;
  gap: 4px 0;
  align-items: flex-start;
}

.plan-summary__row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.plan-summary__row > .plan-summary__meta {
  margin-top: -5px;
}

.plan-summary__sep {
  color: var(--text-muted);
  margin: 0 8px;
  align-self: center;
}

.plan-summary__meta--inline {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 0;
}

.plan-summary__name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  text-transform: capitalize;
}

.plan-summary__meta,
.plan-summary__alert {
  color: var(--text-muted);
  font-size: 14px;
}

.plan-summary__alert {
  color: var(--error);
  font-weight: 700;
}

.profile-preview {
  width: 72px;
  height: 72px;
  padding: 0;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out);
}

.profile-preview:hover {
  border-color: rgba(38, 83, 150, 0.75);
}

.profile-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-edit {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-avatar-edit__help {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 16rem;
}

.profile-avatar-edit__btn {
  position: relative;
  width: 84px;
  height: 84px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out);
}

.profile-avatar-edit__btn:hover {
  border-color: var(--primary);
}

.profile-avatar-edit__btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-edit__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 5px 4px;
  background: rgba(9, 16, 33, 0.78);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

/* Config Cards */
.config-card {
  padding: 0;
  overflow: hidden;
}

.config-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(38, 83, 150, 0.28);
  background: transparent;
}

.config-card__header .card__title {
  margin: 0;
  color: var(--text);
}

.config-card__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.config-card__edit:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.config-card__edit:focus-visible {
  outline: 2px solid rgba(20, 107, 255, 0.45);
  outline-offset: 2px;
}

.config-card__edit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.config-card__edit-icon svg {
  width: 18px;
  height: 18px;
}

.config-card__view {
  padding: 22px 26px;
}

.config-info-grid {
  display: grid;
  gap: 20px;
}
.config-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.config-info-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.config-info-value {
  font-size: 15px;
}
.field-input {
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(11, 20, 45, 0.8), rgba(13, 25, 53, 0.6));
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s var(--ease-out);
  backdrop-filter: blur(4px);
}
}

.upgrade-plans-list {
  display: grid;
  gap: 14px;
}

.upgrade-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s;
}

.upgrade-plan:hover {
  border-color: var(--primary);
  background: rgba(20, 107, 255, 0.08);
}

.upgrade-plan__info {
  display: grid;
  gap: 4px;
}

.upgrade-plan__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.upgrade-plan__description {
  font-size: 13px;
  color: var(--text-muted);
}

.upgrade-plan__button {
  padding: 8px 16px;
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 10px;
  white-space: nowrap;
}

.funnel-split__weight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.funnel-split__weight-input {
  width: 56px;
  padding: 6px 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.funnel-split__weight-input:focus {
  border-color: rgba(20, 107, 255, 0.45);
}

.funnel-split__pct {
  min-width: 36px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-accent);
}

.dash {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-card {
  margin-bottom: 0;
  min-height: 0;
}

.dash-status {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(20, 107, 255, 0.08);
  border: 1px solid rgba(20, 107, 255, 0.18);
  border-radius: 12px;
}

.dash-status--error {
  color: var(--error);
  background: rgba(220, 50, 50, 0.1);
  border-color: rgba(220, 50, 50, 0.28);
}

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

.dash-metric {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 140px;
}

.dash-metric .card__head {
  margin-bottom: 18px;
}

.dash-metric__value {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
}

.dash-metric__hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.dash-card--read {
  min-height: 220px;
  padding: 28px 32px 30px;
  border: 1px solid rgba(0, 140, 255, 0.18);
  background: linear-gradient(125deg, #0b142d 0%, #12308c 46%, #146bff 100%);
}

.dash-card--read:hover {
  background: linear-gradient(125deg, #0b142d 0%, #12308c 44%, #1e72ff 100%);
  border-color: rgba(0, 140, 255, 0.28);
}

.dash-read {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  justify-content: center;
}

.dash-read__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dash-read__btn {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(9, 16, 33, 0.32);
  color: #ffffff;
  border-radius: 999px;
  padding: 7px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.dash-read__btn:hover:not(:disabled) {
  background: rgba(9, 16, 33, 0.5);
  border-color: rgba(255, 255, 255, 0.45);
}

.dash-read__btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.dash-read__ai {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.dash-read__ai p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(241, 245, 255, 0.92);
}

.dash-read__notes {
  display: grid;
  gap: 6px;
}

.dash-read__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(241, 245, 255, 0.78);
}

.dash-read__mark {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: #ffffff;
}

.dash-read__mark svg {
  width: 22px;
  height: 22px;
}

.dash-read__value {
  margin: 4px 0 2px;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #ffffff;
}

.dash-read__brief {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(241, 245, 255, 0.92);
}

.dash-read__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(241, 245, 255, 0.7);
}

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

.dash-read__note.dash-insight--error,
.dash-insight--error {
  color: var(--error);
}

.dash-split__row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-split__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.14);
  border-radius: 10px;
}

.dash-split__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.dash-split__bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
}

.dash-split__n {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dash-card--hours {
  min-height: 0;
}

.dash-hours {
  margin-top: 16px;
  overflow-x: auto;
}

.dash-hours__chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(14px, 1fr));
  align-items: end;
  gap: 4px;
  min-width: 560px;
  height: 168px;
}

.dash-hours__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
  min-width: 0;
}

.dash-hours__col i {
  display: block;
  width: 100%;
  max-width: 16px;
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #008cff 0%, #146bff 100%);
}

.dash-hours__col.is-now i {
  box-shadow: 0 0 0 1px rgba(0, 140, 255, 0.5);
}

.dash-hours__col.is-future i {
  background: rgba(38, 83, 150, 0.28);
}

.dash-hours__val {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-muted);
}

.dash-hours__val--empty {
  min-height: 10px;
}

.dash-hours__lbl {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1;
  min-height: 10px;
}

.dash-countries__hint {
  margin: 0 0 12px;
}

.dash-countries {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-countries__btn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

.dash-countries__btn:hover,
.dash-countries__btn:focus-visible {
  background: rgba(20, 107, 255, 0.08);
  border-color: rgba(20, 107, 255, 0.22);
  outline: none;
}

.dash-countries li {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-countries__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-countries__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-accent);
  background: rgba(20, 107, 255, 0.14);
  border-radius: 10px;
}

.dash-countries__flag {
  display: block;
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.dash-countries__name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dash-countries__n {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: auto;
}

.dash-device-label {
  min-width: auto;
  letter-spacing: 0;
}

.dash-device-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}

.dash-device-icon--android {
  color: #3ddc84;
}

.dash-device-icon--ios {
  color: #f4f7fb;
}

.dash-device-icon--desktop {
  color: #8eb6ff;
}

.link-preview__row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.link-preview__row:last-child {
  border-bottom: 0;
}

.link-preview__rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.link-preview__rule code {
  max-width: 100%;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-bright);
  background: rgba(20, 107, 255, 0.12);
  border-radius: 8px;
  word-break: break-all;
}

.link-preview__arrow {
  color: var(--text-muted);
}

.link-preview__ok,
.link-preview__wait {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.link-preview__ok {
  color: var(--success);
}

.link-preview__wait {
  color: var(--warning);
}

.link-preview__hits {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.campaign-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(38, 83, 150, 0.2);
}

.campaign-item:last-child {
  border-bottom: 0;
}

.campaign-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.campaign-item__status {
  font-size: 12px;
  color: var(--text-muted);
}

.campaign-item__link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 6px 6px 10px;
  background: rgba(20, 107, 255, 0.12);
  border-radius: 8px;
}

.campaign-item__link code {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-bright);
  word-break: break-all;
}

.campaign-item__copy {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.campaign-item__copy:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.campaign-item__copy.is-copied {
  color: var(--success);
}

.campaign-item__copy svg {
  width: 16px;
  height: 16px;
}

.campaign-item__dns {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.campaign-toggle {
  align-items: flex-start;
  margin-top: 12px;
}

.campaign-toggle .field-hint {
  display: block;
  margin: 4px 0 0;
  max-width: 420px;
}

.campaign-toggle .toggle {
  margin-top: 2px;
  flex-shrink: 0;
}

.campaign-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-item__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(38, 83, 150, 0.32);
  border-radius: 8px;
  background: rgba(13, 25, 53, 0.55);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.campaign-item__btn:hover {
  color: var(--text);
  background: rgba(20, 107, 255, 0.12);
  border-color: rgba(20, 107, 255, 0.4);
}

.campaign-item__btn--danger {
  color: #ff8a9a;
  border-color: rgba(255, 77, 103, 0.24);
  background: rgba(255, 77, 103, 0.08);
}

.campaign-item__btn--danger:hover {
  color: #fff;
  background: rgba(255, 77, 103, 0.2);
  border-color: rgba(255, 77, 103, 0.4);
}

.campaign-item__btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.dash-map-dialog {
  width: min(980px, calc(100vw - 32px));
}

.dash-map-body {
  padding-top: 4px;
}

.dash-map {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 16px;
  min-height: 420px;
}

.dash-map__canvas {
  min-height: 420px;
  border-radius: 14px;
  overflow: hidden;
  background: #0a1226;
  border: 1px solid var(--border-subtle);
}

.dash-map__canvas .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #0a1226;
  font-family: var(--font);
}

.dash-map__canvas .leaflet-control-zoom a {
  background: #122247;
  color: var(--text);
  border-color: var(--border);
}

.dash-map__list {
  min-width: 0;
  max-height: 420px;
  overflow: auto;
}

.dash-map__swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dash-map__tooltip {
  background: #0d1935;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 860px) {
  .dash-grid,
  .dash-pair {
    grid-template-columns: 1fr;
  }

  .dash-map {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dash-map__canvas,
  .dash-map__canvas .leaflet-container {
    min-height: 280px;
  }

  .dash-map__list {
    max-height: 240px;
  }

  .dash-read__bar {
    flex-wrap: wrap;
  }
}
