:root {
  --zq-radius-sm: 12px;
  --zq-radius: 18px;
  --zq-radius-lg: 24px;
  --zq-transition: 180ms ease;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --zq-page: #0a0f1c;
  --zq-page-deep: #060a12;
  --zq-surface: #111827;
  --zq-surface-rgb: 17, 24, 39;
  --zq-surface-raised: #182235;
  --zq-surface-soft: #0e1727;
  --zq-surface-hover: #1a263a;
  --zq-shell: rgba(9, 15, 27, 0.96);
  --zq-shell-strong: #09101d;
  --zq-sidebar: #0b1220;
  --zq-sidebar-soft: #121d2f;
  --zq-line: rgba(143, 164, 199, 0.18);
  --zq-line-soft: rgba(143, 164, 199, 0.1);
  --zq-line-strong: rgba(158, 255, 40, 0.34);
  --zq-text: #edf5ff;
  --zq-text-rgb: 237, 245, 255;
  --zq-muted: #9eb0ca;
  --zq-subtle: #7f93b3;
  --zq-accent: #9eff28;
  --zq-accent-2: #3dde76;
  --zq-accent-text: #9eff28;
  --zq-accent-2-text: #3dde76;
  --zq-accent-ink: #071106;
  --zq-accent-soft: rgba(158, 255, 40, 0.075);
  --zq-accent-soft-strong: rgba(158, 255, 40, 0.14);
  --zq-danger: #ff9cb2;
  --zq-danger-soft: rgba(255, 99, 132, 0.12);
  --zq-warning: #f0c274;
  --zq-warning-soft: rgba(240, 187, 104, 0.1);
  --zq-info: #87ceff;
  --zq-info-soft: rgba(99, 197, 255, 0.1);
  --zq-success: #bff58a;
  --zq-success-soft: rgba(124, 244, 72, 0.1);
  --zq-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  --zq-shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.34);
  --zq-overlay: rgba(2, 7, 14, 0.68);
  --zq-ambient-primary: rgba(91, 124, 255, 0.11);
  --zq-ambient-secondary: rgba(58, 183, 255, 0.07);
  --zq-sidebar-glow: rgba(89, 125, 255, 0.08);
  --zq-platform-bg: var(--zq-page);
  --zq-shell-bg: var(--zq-shell);
  --zq-shell-bg-strong: var(--zq-shell-strong);
  --zq-shell-surface: var(--zq-surface);
  --zq-shell-surface-soft: var(--zq-surface-soft);
  --zq-shell-border: var(--zq-line);
  --zq-shell-border-strong: var(--zq-line-strong);
  --zq-shell-text: var(--zq-text);
  --zq-shell-muted: var(--zq-muted);
  --zq-shell-accent: var(--zq-accent);
  --zq-shell-accent-2: var(--zq-accent-2);
  --zq-shell-shadow: var(--zq-shadow);
  --bs-body-bg: var(--zq-page);
  --bs-body-color: var(--zq-text);
  --bs-secondary-color: var(--zq-muted);
  --bs-tertiary-bg: var(--zq-surface-soft);
  --bs-border-color: var(--zq-line);
}

[data-bs-theme="light"] {
  color-scheme: light;
  --zq-page: #f3f7f4;
  --zq-page-deep: #e9f0eb;
  --zq-surface: #ffffff;
  --zq-surface-rgb: 255, 255, 255;
  --zq-surface-raised: #ffffff;
  --zq-surface-soft: #eef4f0;
  --zq-surface-hover: #edf1ef;
  --zq-shell: rgba(255, 255, 255, 0.94);
  --zq-shell-strong: #ffffff;
  --zq-sidebar: #f8fbf9;
  --zq-sidebar-soft: #e8f1eb;
  --zq-line: rgba(39, 72, 58, 0.15);
  --zq-line-soft: rgba(39, 72, 58, 0.08);
  --zq-line-strong: rgba(67, 159, 39, 0.45);
  --zq-text: #17251f;
  --zq-text-rgb: 23, 37, 31;
  --zq-muted: #52655c;
  --zq-subtle: #52655c;
  --zq-accent: #6ee52f;
  --zq-accent-2: #2bcf78;
  --zq-accent-text: #2f7126;
  --zq-accent-2-text: #187445;
  --zq-accent-ink: #0b2516;
  --zq-accent-soft: rgba(92, 203, 49, 0.1);
  --zq-accent-soft-strong: rgba(92, 203, 49, 0.17);
  --zq-danger: #c83255;
  --zq-danger-soft: rgba(200, 50, 85, 0.08);
  --zq-warning: #946315;
  --zq-warning-soft: rgba(184, 123, 25, 0.1);
  --zq-info: #176b9c;
  --zq-info-soft: rgba(23, 107, 156, 0.08);
  --zq-success: #287b35;
  --zq-success-soft: rgba(40, 123, 53, 0.09);
  --zq-shadow: 0 14px 34px rgba(25, 53, 41, 0.08);
  --zq-shadow-lg: 0 24px 64px rgba(25, 53, 41, 0.14);
  --zq-overlay: rgba(20, 39, 30, 0.34);
  --zq-ambient-primary: rgba(92, 203, 49, 0.08);
  --zq-ambient-secondary: rgba(43, 207, 120, 0.06);
  --zq-sidebar-glow: rgba(92, 203, 49, 0.08);
  --zq-platform-bg: var(--zq-page);
  --zq-shell-bg: var(--zq-shell);
  --zq-shell-bg-strong: var(--zq-shell-strong);
  --zq-shell-surface: var(--zq-surface);
  --zq-shell-surface-soft: var(--zq-surface-soft);
  --zq-shell-border: var(--zq-line);
  --zq-shell-border-strong: var(--zq-line-strong);
  --zq-shell-text: var(--zq-text);
  --zq-shell-muted: var(--zq-muted);
  --zq-shell-accent: var(--zq-accent);
  --zq-shell-accent-2: var(--zq-accent-2);
  --zq-shell-shadow: var(--zq-shadow);
  --bs-body-bg: var(--zq-page);
  --bs-body-color: var(--zq-text);
  --bs-secondary-color: var(--zq-muted);
  --bs-tertiary-bg: var(--zq-surface-soft);
  --bs-border-color: var(--zq-line);
  --bs-emphasis-color: var(--zq-text);
  --bs-link-color: #347c29;
  --bs-link-hover-color: #245c1c;
}

.main-wrapper .main-content {
  background:
    radial-gradient(920px 420px at 12% 0%, rgba(158, 255, 40, 0.035), transparent 58%),
    radial-gradient(760px 360px at 100% 18%, rgba(61, 222, 118, 0.035), transparent 60%),
    var(--zq-page);
}

.main-wrapper .main-content .card,
.zq-surface {
  border: 1px solid var(--zq-line) !important;
  border-radius: var(--zq-radius) !important;
  background: var(--zq-surface) !important;
  color: var(--zq-text);
  box-shadow: var(--zq-shadow);
}

.zq-surface-soft {
  border: 1px solid var(--zq-line);
  border-radius: var(--zq-radius-sm);
  background: var(--zq-surface-soft);
}

.zq-section {
  padding: 1.25rem;
}

.zq-section + .zq-section {
  margin-top: 1rem;
}

.zq-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.zq-section-header h2,
.zq-section-header h3,
.zq-section-header h4,
.zq-section-header h5,
.zq-section-header h6 {
  margin: 0;
}

.zq-section-header p {
  margin: 0.3rem 0 0;
  color: var(--zq-muted);
}

.zq-step-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.zq-step-index {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--zq-accent-soft);
  color: var(--zq-accent-text);
  font-weight: 700;
}

.zq-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.zq-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--zq-line);
  border-radius: var(--zq-radius-sm);
  background: var(--zq-surface-soft);
  color: var(--zq-text);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.zq-choice:hover {
  border-color: rgba(158, 255, 40, 0.2);
  transform: translateY(-1px);
}

.zq-choice:has(input:checked) {
  border-color: var(--zq-line-strong);
  background: var(--zq-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(158, 255, 40, 0.12);
}

.zq-choice:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.zq-choice input {
  margin-top: 0.2rem;
  accent-color: var(--zq-accent);
}

.zq-choice-title {
  display: block;
  color: var(--zq-text);
  font-weight: 700;
}

.zq-choice-description {
  display: block;
  margin-top: 0.3rem;
  color: var(--zq-muted);
  font-size: 0.82rem;
}

.zq-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--zq-line);
  border-radius: 999px;
  background: var(--zq-surface-soft);
  color: var(--zq-text);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.zq-status.is-success {
  border-color: rgba(158, 255, 40, 0.18);
  background: var(--zq-accent-soft);
  color: var(--zq-success);
}

.zq-status.is-warning {
  border-color: rgba(240, 187, 104, 0.2);
  background: rgba(240, 187, 104, 0.07);
  color: var(--zq-warning);
}

.zq-status.is-danger {
  border-color: rgba(255, 140, 166, 0.2);
  background: rgba(255, 140, 166, 0.07);
  color: var(--zq-danger);
}

.zq-address-panel {
  margin-top: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--zq-line);
  border-radius: var(--zq-radius-sm);
  background: var(--zq-surface-soft);
}

.zq-address-panel[hidden] {
  display: none !important;
}

.zq-url-preview {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--zq-line);
  border-radius: var(--zq-radius-sm);
  background: var(--zq-page-deep);
}

.zq-url-preview code {
  color: var(--zq-success);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.zq-advanced {
  overflow: hidden;
}

.zq-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.zq-advanced > summary::-webkit-details-marker {
  display: none;
}

.zq-advanced > summary::after {
  content: "expand_more";
  color: var(--zq-muted);
  font-family: "Material Icons Outlined";
  font-size: 1.3rem;
  transition: transform 0.18s ease;
}

.zq-advanced[open] > summary::after {
  transform: rotate(180deg);
}

.zq-advanced-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--zq-line);
}

.zq-advanced-body > .card {
  box-shadow: none !important;
}

.main-wrapper .main-content .form-control,
.main-wrapper .main-content .form-select,
.main-wrapper .main-content .input-group-text {
  min-height: 44px;
  border-radius: var(--zq-radius-sm);
}

.main-wrapper .main-content .input-group > :not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.main-wrapper .main-content .input-group > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.main-wrapper .main-content .btn {
  min-height: 42px;
  border-radius: var(--zq-radius-sm);
  font-weight: 650;
}

.main-wrapper .main-content .btn-sm {
  min-height: 34px;
  border-radius: 10px;
}

.main-wrapper .main-content .form-label {
  margin-bottom: 0.45rem;
  font-weight: 650;
}

.main-wrapper .main-content .form-text {
  margin-top: 0.45rem;
  line-height: 1.45;
}

.zq-form-actions {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--zq-line);
  border-radius: var(--zq-radius);
  background: color-mix(in srgb, var(--zq-page) 92%, transparent);
  box-shadow: var(--zq-shadow);
  backdrop-filter: blur(16px);
}

@media (max-width: 767px) {
  .zq-choice-grid {
    grid-template-columns: 1fr;
  }

  .zq-section,
  .zq-advanced > summary,
  .zq-advanced-body {
    padding-inline: 1rem;
  }

  .zq-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .zq-form-actions .zq-form-actions-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .zq-subdomain-reservation-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
  }

  .zq-subdomain-reservation-input > .input-group-text:first-child {
    border-radius: var(--zq-radius-sm) 0 0 var(--zq-radius-sm) !important;
  }

  .zq-subdomain-reservation-input > .input-group-text:nth-of-type(2) {
    border-radius: 0 var(--zq-radius-sm) var(--zq-radius-sm) 0 !important;
  }

  .zq-subdomain-reservation-input > .zq-subdomain-check {
    grid-column: 1 / 3;
    margin-top: 0.6rem;
    border-radius: var(--zq-radius-sm) 0 0 var(--zq-radius-sm) !important;
  }

  .zq-subdomain-reservation-input > .zq-subdomain-reserve {
    grid-column: 3;
    margin-top: 0.6rem;
    border-radius: 0 var(--zq-radius-sm) var(--zq-radius-sm) 0 !important;
  }
}

/* Authentication experience --------------------------------------------- */

[data-bs-theme="dark"] .zq-auth-body {
  --zq-auth-visual-a: #151d35;
  --zq-auth-visual-b: #0d1428;
  --zq-auth-visual-text: #f3f6ff;
  --zq-auth-visual-muted: #aab8d7;
  --zq-auth-panel: rgba(8, 14, 27, 0.62);
  background:
    radial-gradient(900px 600px at -8% -10%, rgba(72, 94, 210, 0.24), transparent 62%),
    radial-gradient(760px 520px at 108% 92%, rgba(38, 125, 190, 0.14), transparent 64%),
    linear-gradient(145deg, #070b14 0%, #0b1020 52%, #080d18 100%) !important;
}

[data-bs-theme="light"] .zq-auth-body {
  --zq-auth-visual-a: #edf2ff;
  --zq-auth-visual-b: #dfe8fb;
  --zq-auth-visual-text: #18233a;
  --zq-auth-visual-muted: #5d6d8a;
  --zq-auth-panel: rgba(255, 255, 255, 0.58);
  background:
    radial-gradient(900px 600px at -8% -10%, rgba(103, 126, 220, 0.15), transparent 62%),
    radial-gradient(760px 520px at 108% 92%, rgba(60, 167, 205, 0.12), transparent 64%),
    linear-gradient(145deg, #f8fafc 0%, #eef2f7 54%, #f5f7fa 100%) !important;
}

.zq-auth-body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

.zq-auth-body::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(var(--zq-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--zq-line-soft) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.24;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  pointer-events: none;
}

.zq-auth-body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: min(46vw, 680px);
  aspect-ratio: 1;
  top: 50%;
  left: 74%;
  border: 1px solid var(--zq-line-soft);
  border-radius: 50%;
  box-shadow:
    0 0 0 90px color-mix(in srgb, var(--zq-line-soft) 42%, transparent),
    0 0 0 180px color-mix(in srgb, var(--zq-line-soft) 22%, transparent);
  opacity: 0.5;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.zq-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: 4rem 2rem;
}

.zq-auth-body .zq-auth-card {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--zq-line) !important;
  border-radius: 30px !important;
  background: color-mix(in srgb, var(--zq-surface) 94%, transparent) !important;
  box-shadow: var(--zq-shadow-lg) !important;
  backdrop-filter: blur(22px);
}

.zq-auth-form-column {
  background: color-mix(in srgb, var(--zq-surface) 96%, transparent);
}

.zq-auth-form-body {
  width: min(100%, 500px);
  margin: auto;
  padding: clamp(2rem, 4vw, 4rem) !important;
}

.zq-auth-form-body h1 {
  color: var(--zq-text);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.zq-auth-form-body .form-label {
  color: var(--zq-text);
  font-weight: 700;
}

.zq-auth-form-body .form-control,
.zq-auth-form-body .input-group-text {
  min-height: 48px;
}

.zq-auth-form-body .btn-primary {
  min-height: 48px;
}

.zq-auth-visual {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 680px;
  display: flex;
  overflow: hidden;
  border-left: 1px solid var(--zq-line);
  background:
    radial-gradient(520px 320px at 92% 8%, rgba(88, 123, 255, 0.24), transparent 62%),
    linear-gradient(145deg, var(--zq-auth-visual-a), var(--zq-auth-visual-b));
  color: var(--zq-auth-visual-text);
}

.zq-auth-visual::before,
.zq-auth-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.zq-auth-visual::before {
  width: 360px;
  height: 360px;
  right: -150px;
  bottom: -120px;
  border: 1px solid rgba(121, 151, 255, 0.22);
  box-shadow: 0 0 0 70px rgba(87, 119, 226, 0.06);
}

.zq-auth-visual::after {
  width: 180px;
  height: 180px;
  top: 72px;
  left: -90px;
  background: rgba(82, 111, 220, 0.12);
  filter: blur(2px);
}

.zq-auth-visual-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(139, 157, 205, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 157, 205, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(135deg, black, transparent 78%);
}

.zq-auth-visual-content {
  width: 100%;
  max-width: 570px;
  margin: auto;
  padding: clamp(2.4rem, 4.5vw, 4.75rem);
}

.zq-auth-visual-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(132, 154, 210, 0.2);
  border-radius: 999px;
  background: rgba(93, 117, 184, 0.1);
  color: var(--zq-auth-visual-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zq-auth-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zq-accent-2);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--zq-accent-2) 15%, transparent);
}

.zq-auth-visual h2 {
  max-width: 500px;
  margin: 1.4rem 0 0;
  color: var(--zq-auth-visual-text);
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.zq-auth-visual-content > p {
  max-width: 490px;
  margin: 1rem 0 1.8rem;
  color: var(--zq-auth-visual-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.zq-auth-product-card {
  padding: 1rem;
  border: 1px solid rgba(139, 157, 205, 0.2);
  border-radius: 22px;
  background: var(--zq-auth-panel);
  box-shadow: 0 24px 60px rgba(3, 9, 22, 0.2);
  backdrop-filter: blur(18px);
}

.zq-auth-product-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.zq-auth-product-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(116, 142, 231, 0.24);
  border-radius: 13px;
  background: rgba(85, 112, 212, 0.14);
  color: #86a7ff;
}

.zq-auth-product-card-top span,
.zq-auth-route small,
.zq-auth-metrics span {
  display: block;
  color: var(--zq-auth-visual-muted);
  font-size: 0.72rem;
}

.zq-auth-product-card-top strong,
.zq-auth-route strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--zq-auth-visual-text);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.zq-auth-product-card-top .zq-auth-status {
  padding: 0.3rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--zq-accent-2) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--zq-accent-2) 10%, transparent);
  color: var(--zq-success);
  font-size: 0.7rem;
  font-weight: 800;
}

.zq-auth-route {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(139, 157, 205, 0.14);
  border-radius: 15px;
  background: rgba(90, 111, 176, 0.08);
}

.zq-auth-route > .material-icons-outlined {
  color: #86a7ff;
}

.zq-auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.zq-auth-metrics > div {
  padding: 0.7rem;
  border: 1px solid rgba(139, 157, 205, 0.12);
  border-radius: 14px;
  background: rgba(90, 111, 176, 0.06);
}

.zq-auth-metrics strong {
  display: block;
  color: var(--zq-auth-visual-text);
  font-size: 0.9rem;
}

.zq-auth-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
  color: var(--zq-auth-visual-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.zq-auth-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.zq-auth-trust-row .material-icons-outlined {
  color: #86a7ff;
  font-size: 1rem;
}

@media (max-width: 991px) {
  .zq-auth-shell {
    align-items: flex-start;
    padding-block: 4.75rem 1.25rem;
  }

  .zq-auth-body .zq-auth-card {
    max-width: 620px;
    border-radius: 24px !important;
  }

  .zq-auth-form-body {
    padding: 2rem 1.25rem !important;
  }
}

@media (max-width: 575px) {
  .zq-auth-body::after {
    display: none;
  }

  .zq-auth-shell {
    padding-inline: 0 !important;
  }

  .zq-auth-body .zq-auth-card {
    border-radius: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zq-choice,
  .zq-advanced > summary::after {
    transition: none;
  }
}

.zq-auth-body {
  min-height: 100vh;
  background:
    radial-gradient(880px 420px at 10% 0%, rgba(158, 255, 40, 0.055), transparent 58%),
    radial-gradient(720px 360px at 100% 20%, rgba(61, 222, 118, 0.05), transparent 60%),
    var(--zq-page);
  color: var(--zq-text);
}

.zq-auth-body .card {
  border: 1px solid var(--zq-line) !important;
  border-radius: var(--zq-radius-lg) !important;
  background: var(--zq-surface);
  color: var(--zq-text);
  box-shadow: var(--zq-shadow);
}

.zq-auth-body .form-control,
.zq-auth-body .input-group-text {
  min-height: 44px;
  border-color: var(--zq-line);
  border-radius: var(--zq-radius-sm);
  background: var(--zq-surface-soft);
  color: var(--zq-text);
}

.zq-auth-body .form-control:focus {
  border-color: var(--zq-line-strong);
  background: var(--zq-surface-soft);
  color: var(--zq-text);
  box-shadow: 0 0 0 0.18rem rgba(158, 255, 40, 0.07);
}

.zq-auth-body .btn {
  min-height: 42px;
  border-radius: var(--zq-radius-sm);
  font-weight: 650;
}

.zq-auth-body .btn-primary {
  border-color: rgba(158, 255, 40, 0.18);
  background: linear-gradient(135deg, var(--zq-accent), var(--zq-accent-2));
  color: var(--zq-accent-ink);
}

/* Shared application shell ------------------------------------------------ */

html,
body {
  background: var(--zq-page);
  color: var(--zq-text);
}

body.layout-with-footer,
[data-bs-theme] .main-wrapper .main-content {
  background:
    radial-gradient(920px 420px at 12% 0%, var(--zq-ambient-primary), transparent 58%),
    radial-gradient(760px 360px at 100% 18%, var(--zq-ambient-secondary), transparent 60%),
    var(--zq-page) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .top-header {
  border-bottom: 1px solid var(--zq-line) !important;
  background: color-mix(in srgb, var(--zq-shell) 92%, transparent) !important;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--zq-page-deep) 18%, transparent) !important;
  backdrop-filter: blur(18px);
}

[data-bs-theme] .top-header .navbar {
  background: transparent !important;
}

[data-bs-theme] .sidebar-wrapper {
  border-right: 1px solid var(--zq-line) !important;
  background:
    radial-gradient(420px 220px at 0 0, var(--zq-sidebar-glow), transparent 66%),
    var(--zq-sidebar) !important;
  box-shadow: 18px 0 44px color-mix(in srgb, var(--zq-page-deep) 14%, transparent) !important;
}

[data-bs-theme] .sidebar-wrapper .sidebar-header,
[data-bs-theme] .sidebar-wrapper .sidebar-bottom {
  border-color: var(--zq-line-soft) !important;
  background: color-mix(in srgb, var(--zq-sidebar) 92%, transparent) !important;
}

[data-bs-theme] .sidebar-wrapper .metismenu .zq-nav-section {
  color: var(--zq-subtle) !important;
}

[data-bs-theme] .sidebar-wrapper .metismenu a {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--zq-muted) !important;
}

[data-bs-theme] .sidebar-wrapper .metismenu a:hover,
[data-bs-theme] .sidebar-wrapper .metismenu a:focus-visible {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-hover) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .sidebar-wrapper .metismenu a.active,
[data-bs-theme] .sidebar-wrapper .metismenu .mm-active > a {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-accent-soft-strong) !important;
  color: var(--zq-text) !important;
  box-shadow: inset 3px 0 0 var(--zq-accent) !important;
}

[data-bs-theme] .sidebar-wrapper .metismenu .parent-icon {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-muted) !important;
}

[data-bs-theme] .sidebar-wrapper .metismenu a:hover .parent-icon,
[data-bs-theme] .sidebar-wrapper .metismenu a.active .parent-icon,
[data-bs-theme] .sidebar-wrapper .metismenu .mm-active > a .parent-icon {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-accent-soft) !important;
  color: var(--zq-accent-text) !important;
}

[data-bs-theme] .zq-sidebar-action,
[data-bs-theme] .zq-plan-pill,
[data-bs-theme] .zq-icon-action,
[data-bs-theme] .zq-theme-toggle,
[data-bs-theme] .top-header .btn-toggle button {
  border: 1px solid var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .zq-sidebar-action:hover,
[data-bs-theme] .zq-icon-action:hover,
[data-bs-theme] .zq-theme-toggle:hover,
[data-bs-theme] .top-header .btn-toggle button:hover {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-accent-soft-strong) !important;
  color: var(--zq-text) !important;
}

.zq-theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0;
  border-radius: 13px;
  transition: color var(--zq-transition), border-color var(--zq-transition), background var(--zq-transition), transform var(--zq-transition);
}

.zq-theme-toggle:hover {
  transform: translateY(-1px);
}

.zq-theme-toggle-labelled {
  width: auto;
  min-width: 132px;
  padding: 0 0.9rem;
  font-weight: 700;
}

.zq-theme-icon,
.zq-password-icon {
  position: relative;
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  overflow: hidden;
  color: currentColor;
  font-size: 0;
  line-height: 0;
  text-indent: -999px;
}

.zq-theme-icon::before,
.zq-theme-icon::after,
.zq-password-icon::before,
.zq-password-icon::after {
  content: "";
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.zq-theme-icon[data-icon="light"]::before {
  inset: 0.24rem;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.zq-theme-icon[data-icon="light"]::after {
  inset: 0;
  border-radius: 999px;
  box-shadow:
    0 -0.48rem 0 -0.34rem currentColor,
    0 0.48rem 0 -0.34rem currentColor,
    -0.48rem 0 0 -0.34rem currentColor,
    0.48rem 0 0 -0.34rem currentColor;
}

.zq-theme-icon[data-icon="dark"]::before {
  inset: 0.16rem;
  border-radius: 999px;
  background: currentColor;
}

.zq-theme-icon[data-icon="dark"]::after {
  width: 0.82rem;
  height: 0.82rem;
  top: 0.02rem;
  right: -0.02rem;
  border-radius: 999px;
  background: var(--zq-surface);
}

/* Use the established Material icon set for a crisp, familiar theme control. */
.zq-theme-toggle .zq-theme-icon.material-icons-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  overflow: visible;
  color: currentColor;
  font-size: 1.25rem;
  line-height: 1;
  text-indent: 0;
}

.zq-theme-toggle .zq-theme-icon.material-icons-outlined::before,
.zq-theme-toggle .zq-theme-icon.material-icons-outlined::after {
  display: none;
}

.zq-password-icon::before {
  width: 1rem;
  height: 0.62rem;
  left: 0.07rem;
  top: 0.27rem;
  border: 2px solid currentColor;
  border-radius: 999px 999px 0 999px;
  transform: rotate(45deg);
}

.zq-password-icon[data-icon="visible"]::after {
  width: 0.32rem;
  height: 0.32rem;
  left: 0.42rem;
  top: 0.42rem;
  border-radius: 999px;
  background: currentColor;
}

.zq-password-icon[data-icon="hidden"]::after {
  width: 1.22rem;
  height: 2px;
  left: -0.03rem;
  top: 0.56rem;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-42deg);
}

.zq-auth-theme-switcher {
  position: fixed;
  z-index: 20;
  top: 1rem;
  right: 1rem;
}

[data-bs-theme] .top-header .search-control,
[data-bs-theme] .top-header .dropdown-menu,
[data-bs-theme] .main-content .dropdown-menu,
[data-bs-theme] .domains-actions-menu {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-raised) !important;
  color: var(--zq-text) !important;
  box-shadow: var(--zq-shadow) !important;
}

[data-bs-theme] .dropdown-item {
  color: var(--zq-text) !important;
}

[data-bs-theme] .dropdown-item:hover,
[data-bs-theme] .dropdown-item:focus,
[data-bs-theme] .dropdown-item.active {
  background: var(--zq-accent-soft-strong) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .dropdown-divider,
[data-bs-theme] .page-footer {
  border-color: var(--zq-line) !important;
}

[data-bs-theme] .page-footer {
  background: var(--zq-shell) !important;
  color: var(--zq-muted) !important;
}

[data-bs-theme] .page-footer a {
  color: var(--bs-link-color) !important;
  font-weight: 650;
}

[data-bs-theme] .page-footer a:hover,
[data-bs-theme] .page-footer a:focus-visible {
  color: var(--bs-link-hover-color) !important;
}

/* The legacy footer stylesheet uses a pale brand green. Keep it readable on
   the light canvas without changing the intended dark-theme treatment. */
[data-bs-theme="light"] .page-footer .zq-footer-content a {
  color: #347c29 !important;
}

[data-bs-theme="light"] .page-footer .zq-footer-content a:hover,
[data-bs-theme="light"] .page-footer .zq-footer-content a:focus-visible {
  color: #245c1c !important;
}

[data-bs-theme] .zq-content-frame,
[data-bs-theme] .zq-page-heading,
[data-bs-theme] .zq-page-context {
  color: var(--zq-text) !important;
}

[data-bs-theme] .zq-page-heading {
  border-bottom-color: var(--zq-line) !important;
}

[data-bs-theme] .zq-page-context {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
}

/* Bootstrap and common interactive components ---------------------------- */

[data-bs-theme] .main-content .card,
[data-bs-theme] .main-content .modal-content,
[data-bs-theme] .main-content .offcanvas,
[data-bs-theme] .main-content .accordion-item,
[data-bs-theme] .zq-auth-body .card {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface) !important;
  color: var(--zq-text) !important;
  box-shadow: var(--zq-shadow) !important;
}

[data-bs-theme] .card-header,
[data-bs-theme] .card-footer,
[data-bs-theme] .modal-header,
[data-bs-theme] .modal-footer,
[data-bs-theme] .accordion-button {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .form-control,
[data-bs-theme] .form-select,
[data-bs-theme] .input-group-text,
[data-bs-theme] .form-check-input {
  border-color: var(--zq-line) !important;
  background-color: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .form-control::placeholder,
[data-bs-theme] textarea::placeholder {
  color: var(--zq-subtle) !important;
  opacity: 1;
}

[data-bs-theme] .form-control:focus,
[data-bs-theme] .form-select:focus,
[data-bs-theme] .form-check-input:focus {
  border-color: var(--zq-line-strong) !important;
  background-color: var(--zq-surface) !important;
  color: var(--zq-text) !important;
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--zq-accent) 12%, transparent) !important;
}

[data-bs-theme] .form-control:disabled,
[data-bs-theme] .form-select:disabled {
  background-color: var(--zq-page-deep) !important;
  color: var(--zq-subtle) !important;
  opacity: 0.8;
}

[data-bs-theme] .form-check-input:checked {
  border-color: var(--zq-accent) !important;
  background-color: var(--zq-accent) !important;
}

[data-bs-theme] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--zq-text);
  --bs-table-border-color: var(--zq-line-soft);
  --bs-table-hover-bg: var(--zq-surface-hover);
  --bs-table-hover-color: var(--zq-text);
  color: var(--zq-text) !important;
}

[data-bs-theme] .table thead th {
  background: var(--zq-surface-soft) !important;
  color: var(--zq-muted) !important;
}

[data-bs-theme] .table-responsive {
  border-color: var(--zq-line) !important;
  scrollbar-color: var(--zq-subtle) transparent;
}

[data-bs-theme] .nav-tabs,
[data-bs-theme] .nav-pills {
  border-color: var(--zq-line) !important;
}

[data-bs-theme] .nav-link {
  color: var(--zq-muted);
}

[data-bs-theme] .nav-link:hover,
[data-bs-theme] .nav-link:focus,
[data-bs-theme] .nav-link.active {
  border-color: var(--zq-line) !important;
  background: var(--zq-accent-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .page-link {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .page-link:hover,
[data-bs-theme] .page-item.active .page-link {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-accent-soft-strong) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .page-item.disabled .page-link {
  background: var(--zq-page-deep) !important;
  color: var(--zq-subtle) !important;
}

[data-bs-theme] .alert {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .alert-success { background: var(--zq-success-soft) !important; }
[data-bs-theme] .alert-warning { background: var(--zq-warning-soft) !important; }
[data-bs-theme] .alert-danger { background: var(--zq-danger-soft) !important; }
[data-bs-theme] .alert-info { background: var(--zq-info-soft) !important; }

[data-bs-theme] .btn-primary,
[data-bs-theme] .zq-primary-btn,
[data-bs-theme] .zq-icon-action-primary {
  border-color: color-mix(in srgb, var(--zq-accent) 55%, transparent) !important;
  background: linear-gradient(135deg, var(--zq-accent), var(--zq-accent-2)) !important;
  color: var(--zq-accent-ink) !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--zq-accent) 18%, transparent) !important;
}

[data-bs-theme] .btn-success {
  color: var(--zq-accent-ink) !important;
}

[data-bs-theme="light"] .badge.bg-secondary-subtle.text-secondary {
  color: var(--zq-muted) !important;
}

[data-bs-theme] .btn-secondary,
[data-bs-theme] .btn-outline-secondary,
[data-bs-theme] .btn-light,
[data-bs-theme] .btn-outline-light {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .btn-outline-primary,
[data-bs-theme] .btn-outline-success {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-accent-soft) !important;
  color: var(--zq-success) !important;
}

[data-bs-theme] .btn-outline-danger {
  border-color: color-mix(in srgb, var(--zq-danger) 35%, transparent) !important;
  background: var(--zq-danger-soft) !important;
  color: var(--zq-danger) !important;
}

[data-bs-theme] .btn-close {
  filter: none;
  opacity: 0.72;
}

[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

[data-bs-theme] .overlay {
  background: var(--zq-overlay) !important;
}

[data-bs-theme] hr {
  border-color: var(--zq-line);
}

[data-bs-theme] code,
[data-bs-theme] pre {
  color: var(--zq-success);
}

/* Product-specific surfaces and typography ------------------------------- */

/* Keep page-level grids inside the mobile content frame. Without an explicit
   zero minimum, wide tables and form controls can size the implicit grid track
   to their min-content width and make the entire document scroll sideways. */
[data-bs-theme] :is(.analytics-shell, .domains-shell, .links-shell, .sessions-shell) {
  grid-template-columns: minmax(0, 1fr);
}

[data-bs-theme] :is(
  .analytics-card, .analytics-panel, .analytics-kpi, .analytics-chart-card,
  .billing-panel, .billing-metric, .billing-mini-panel,
  .domains-card, .domains-hero, .domains-kpi, .domains-dns-record,
  .links-hero, .links-overview-card, .links-list-card, .link-entry, .link-stat-panel,
  .sessions-card, .sessions-kpi, .session-detail-card, .session-kpi,
  .usage-card, .usage-panel, .usage-kpi, .usage-feature,
  .support-panel, .support-side-card, .support-ticket-hero, .support-bubble, .support-composer,
  .users-card, .plan-row, .pricing-card,
  .api-card, .api-panel, .api-key-box, .api-code,
  .webhooks-card, .webhook-detail-card, .webhooks-endpoint, .webhooks-pre, .webhook-detail-pre,
  .logs-card, .log-detail-card, .log-detail-box,
  .stats-hero, .stats-kpi, .stats-panel, .stats-chart-card, .stats-list-item, .stats-session-card, .stats-session-box,
  .claim-hero, .claim-link
) {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface) !important;
  color: var(--zq-text) !important;
  box-shadow: var(--zq-shadow) !important;
}

[data-bs-theme] :is(
  .analytics-summary, .analytics-list-item, .analytics-empty,
  .billing-toolbar, .billing-tabs, .billing-empty,
  .domains-address-overview, .domains-address-example, .domains-dns-details,
  .links-overview, .links-list-header, .link-entry-block, .link-meta-line, .links-empty-state,
  .sessions-summary, .sessions-filters, .sessions-empty, .session-detail-row,
  .usage-meter, .usage-alert,
  .support-topbar, .support-tab, .support-attachment-card, .support-composer-box, .support-side-line,
  .users-filters, .users-footer, .plan-footer,
  .api-danger-zone, .api-domain-pill, .api-step-number,
  .stats-meta, .stats-session-meta-chip, .stats-source, .stats-pagination,
  .zq-role-option
) {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] :is(
  .analytics-muted, .analytics-kpi-label,
  .billing-muted, .billing-metric-label,
  .domains-muted, .domains-label,
  .links-hero-text, .links-overview-label, .links-overview-help, .links-list-text, .link-entry-label, .link-created, .link-meta-line,
  .sessions-muted, .sessions-kpi-label, .sessions-kpi-help, .session-detail-label,
  .usage-muted, .usage-label, .usage-help,
  .support-muted, .support-side-label, .support-attachment-meta,
  .users-muted, .plan-slug, .plan-muted-value, .pricing-copy,
  .api-muted, .api-eyebrow,
  .webhooks-muted, .webhook-detail-muted, .logs-muted, .logs-empty, .domains-dns-help,
  .stats-kpi-label, .stats-kpi-help, .stats-panel-text, .stats-table-muted, .stats-list-label, .stats-session-created,
  .claim-copy, .claim-meta, .zq-role-option-description
) {
  color: var(--zq-muted) !important;
}

[data-bs-theme] :is(
  .domains-dns-help strong, .domains-dns-help em,
  .webhooks-endpoint .text-white,
  .logs-card .text-white, .log-detail-card .text-white,
  .support-attachment-card:hover
) {
  color: var(--zq-text) !important;
}

[data-bs-theme] :is(
  .zq-dashboard-page .empty-insight .material-icons-outlined,
  .support-ticket-icon,
  .links-empty-state > .material-icons-outlined,
  .sessions-empty .material-icons-outlined,
  .claim-kicker, .users-eyebrow
) {
  color: var(--zq-accent-text) !important;
}

[data-bs-theme] :is(
  .analytics-kpi-value, .analytics-section-title,
  .billing-title, .billing-metric-value, .billing-panel-title, .billing-primary,
  .domains-title, .domains-value,
  .links-hero-title, .links-overview-value, .links-list-title, .link-code-anchor, .link-entry-url a, .link-meta-line strong,
  .sessions-kpi-value, .session-kpi-value, .session-detail-value,
  .usage-title, .usage-value,
  .support-title, .support-primary, .support-ticket-title, .support-author,
  .users-title, .plan-name, .plan-stat-value, .pricing-name, .pricing-amount,
  .api-title, .api-key-value,
  .webhooks-title, .webhooks-table td, .webhooks-table th, .webhook-detail-card dd,
  .log-detail-value,
  .stats-title, .stats-kpi-value, .stats-panel-title, .stats-chart-title, .stats-list-item strong, .stats-table-value,
  .claim-title, .claim-link-title, .claim-url
) {
  color: var(--zq-text) !important;
}

[data-bs-theme] :is(
  .domains-badge, .links-meta-chip, .link-tag, .link-status-chip, .sessions-chip,
  .usage-badge, .support-chip, .support-status, .users-role, .users-count,
  .plan-chip, .plan-status, .pricing-active-chip, .analytics-chip, .billing-chip,
  .webhooks-chip, .webhook-detail-chip, .logs-chip, .stats-chip, .stats-inline-badge,
  .stats-list-pill, .stats-app-badge, .claim-badge
) {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] :is(.users-role.support, .logs-chip.info) {
  color: var(--zq-info) !important;
}

[data-bs-theme] :is(
  .domains-badge.verified, .link-status-chip.live, .sessions-chip.success,
  .support-chip.success, .support-status.success, .users-role.admin,
  .plan-status.active, .pricing-active-chip, .webhooks-chip.success,
  .webhook-detail-chip.success, .stats-app-badge.yes
) {
  border-color: color-mix(in srgb, var(--zq-success) 25%, transparent) !important;
  background: var(--zq-success-soft) !important;
  color: var(--zq-success) !important;
}

[data-bs-theme] :is(
  .domains-badge.pending, .link-status-chip.pending, .usage-alert.warning,
  .support-chip.warning, .support-status.warning, .billing-chip.warning,
  .webhooks-chip.pending, .webhook-detail-chip.pending, .logs-chip.warning
) {
  background: var(--zq-warning-soft) !important;
  color: var(--zq-warning) !important;
}

[data-bs-theme] :is(
  .domains-badge.rejected, .link-status-chip.danger, .usage-alert.danger,
  .support-chip.danger, .billing-chip.danger, .webhooks-chip.failed,
  .webhook-detail-chip.failed, .logs-chip.error
) {
  background: var(--zq-danger-soft) !important;
  color: var(--zq-danger) !important;
}

[data-bs-theme] .progress,
[data-bs-theme] .usage-progress {
  background: var(--zq-page-deep) !important;
}

[data-bs-theme] .progress-bar,
[data-bs-theme] .usage-progress-bar {
  background: linear-gradient(90deg, var(--zq-accent), var(--zq-accent-2)) !important;
}

[data-bs-theme] .zq-dashboard-page .quick-btn {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .zq-dashboard-page .quick-btn.primary,
[data-bs-theme] .links-primary-cta,
[data-bs-theme] .claim-btn-primary {
  border-color: var(--zq-line-strong) !important;
  background: linear-gradient(135deg, var(--zq-accent), var(--zq-accent-2)) !important;
  color: var(--zq-accent-ink) !important;
}

[data-bs-theme] .zq-dashboard-page .table,
[data-bs-theme] .zq-dashboard-page .table th,
[data-bs-theme] .zq-dashboard-page .table td {
  border-color: var(--zq-line-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .zq-dashboard-page .table thead th {
  background: var(--zq-surface-soft) !important;
  color: var(--zq-muted) !important;
}

[data-bs-theme] .zq-dashboard-page .stat-chip {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-success-soft) !important;
  color: var(--zq-success) !important;
}

[data-bs-theme] :is(.links-secondary-cta, .links-page-btn, .link-qr-btn, .stats-back-btn, .support-icon-button, .support-action, .claim-btn-secondary) {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] :is(.link-delete-btn, .claim-btn-danger) {
  border-color: color-mix(in srgb, var(--zq-danger) 35%, transparent) !important;
  background: var(--zq-danger-soft) !important;
  color: var(--zq-danger) !important;
}

[data-bs-theme] :is(.plan-catalog-shell, .support-main-card, .pricing-shell) {
  border-color: var(--zq-line) !important;
  background:
    radial-gradient(560px 240px at 0 0, color-mix(in srgb, var(--zq-accent) 9%, transparent), transparent 62%),
    var(--zq-surface) !important;
  color: var(--zq-text) !important;
  box-shadow: var(--zq-shadow) !important;
}

[data-bs-theme] :is(.plan-catalog-header, .plan-footer) {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
}

[data-bs-theme] .plan-row {
  border-color: var(--zq-line-soft) !important;
  background: transparent !important;
}

[data-bs-theme] .plan-row:hover {
  background: var(--zq-surface-hover) !important;
}

[data-bs-theme] :is(.plan-headline, .plan-stat, .plan-stat-label, .plan-empty) {
  color: var(--zq-muted) !important;
}

[data-bs-theme] :is(.plan-section-title, .plan-price-value, .pricing-name, .pricing-feature-item .material-icons-outlined) {
  color: var(--zq-success) !important;
}

[data-bs-theme] .pricing-card.featured {
  border-color: var(--zq-line-strong) !important;
  background: color-mix(in srgb, var(--zq-surface) 92%, var(--zq-accent) 8%) !important;
  box-shadow: var(--zq-shadow-lg) !important;
}

[data-bs-theme] :is(.pricing-amount small, .pricing-feature-item, .pricing-period) {
  color: var(--zq-muted) !important;
}

[data-bs-theme] .pricing-divider {
  background: var(--zq-line) !important;
}

[data-bs-theme] .pricing-shell :is(.text-white, p[style*="color"]) {
  color: var(--zq-text) !important;
}

[data-bs-theme] .pricing-shell p[style*="color"] {
  color: var(--zq-muted) !important;
}

[data-bs-theme] .support-message-row.mine .support-bubble {
  border-color: var(--zq-line-strong) !important;
  background: color-mix(in srgb, var(--zq-surface) 88%, var(--zq-accent-2) 12%) !important;
  color: var(--zq-text) !important;
}

[data-bs-theme] .support-timeline::before {
  background: var(--zq-line) !important;
}

[data-bs-theme] .support-dot {
  border-color: var(--zq-surface) !important;
  box-shadow: 0 0 0 1px var(--zq-line) !important;
}

[data-bs-theme] .support-tab.active {
  color: var(--zq-success) !important;
}

[data-bs-theme] :is(.support-composer-title, .support-attachments-title, .support-side-title, .support-side-value, .support-time, .support-file-list) {
  color: var(--zq-text) !important;
}

[data-bs-theme] :is(.support-attachment-icon, .support-icon-button) {
  background: var(--zq-surface-soft) !important;
}

[data-bs-theme] .zq-role-option:has(input:checked) {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-accent-soft-strong) !important;
}

[data-bs-theme] :is(.avatar-cropper-wrapper, .avatar-crop-preview) {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface-soft) !important;
}

[data-bs-theme] ::selection {
  background: var(--zq-accent-soft-strong);
  color: var(--zq-text);
}

@media (max-width: 767px) {
  .zq-theme-toggle {
    width: 40px;
    height: 40px;
  }

  .zq-auth-theme-switcher {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Keep the auth composition above the generic card layer in the cascade. */
[data-bs-theme] .zq-auth-body .zq-auth-card {
  border-radius: 30px !important;
  background: color-mix(in srgb, var(--zq-surface) 94%, transparent) !important;
  box-shadow: var(--zq-shadow-lg) !important;
}

@media (max-width: 991px) {
  [data-bs-theme] .zq-auth-body .zq-auth-card {
    border-radius: 24px !important;
  }
}

@media (max-width: 575px) {
  [data-bs-theme] .zq-auth-body .zq-auth-card {
    border-radius: 20px !important;
  }
}

/* Quiet authentication: one focused surface, minimal ambient decoration. */
[data-bs-theme] .zq-auth-body {
  background: var(--zq-page) !important;
}

.zq-auth-body::before {
  display: none;
}

.zq-auth-body::after {
  display: none;
}

.zq-auth-shell {
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding-block: 4.5rem 2rem;
}

[data-bs-theme] .zq-auth-body .zq-auth-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  overflow: visible;
  border: 1px solid var(--zq-line) !important;
  border-radius: 22px !important;
  background: var(--zq-surface) !important;
  box-shadow: 0 20px 55px color-mix(in srgb, var(--zq-page-deep) 20%, transparent) !important;
  backdrop-filter: none;
}

[data-bs-theme] .zq-auth-body .zq-auth-card-register {
  max-width: 520px;
}

.zq-auth-form-column {
  background: transparent;
}

.zq-auth-form-body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2.5rem !important;
}

.zq-auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.zq-auth-brand img {
  width: 156px;
  height: auto;
}

.zq-auth-heading {
  margin-bottom: 1.75rem;
  text-align: center;
}

.zq-auth-form-body .zq-auth-heading h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.zq-auth-heading p {
  font-size: 0.92rem;
  line-height: 1.55;
}

.zq-google-signin {
  width: 100%;
  min-height: 44px;
  display: block;
}

.zq-google-button-host {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zq-google-button-host > div,
.zq-google-button-host iframe {
  max-width: 100%;
  border-radius: 999px !important;
}

.zq-google-button-host iframe {
  display: block;
  overflow: hidden;
}

.zq-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.4rem 0;
  color: var(--zq-subtle);
  font-size: 0.72rem;
  white-space: nowrap;
}

.zq-auth-divider::before,
.zq-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--zq-line-soft);
}

.zq-auth-fields {
  display: grid;
  gap: 1.05rem;
}

.zq-auth-form-body .form-label {
  margin-bottom: 0.42rem;
  color: var(--zq-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.zq-auth-form-body .form-control,
.zq-auth-form-body .input-group-text {
  min-height: 48px;
  border-color: var(--zq-line) !important;
  border-radius: 12px;
  background: var(--zq-surface-soft) !important;
  box-shadow: none;
}

.zq-auth-form-body .form-control:focus {
  border-color: var(--zq-line-strong) !important;
  box-shadow: 0 0 0 3px var(--zq-accent-soft) !important;
}

.zq-auth-form-body .input-group .form-control {
  border-radius: 12px 0 0 12px;
}

.zq-auth-form-body .input-group .input-group-text {
  width: 48px;
  justify-content: center;
  padding: 0;
  border-radius: 0 12px 12px 0;
  color: var(--zq-muted);
}

.zq-auth-form-body .input-group-text .material-icons-outlined {
  font-size: 1.15rem;
}

.zq-auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}

.zq-auth-options .form-check,
.zq-auth-fields .form-check {
  min-height: 0;
  margin: 0;
}

.zq-auth-body .form-check-input {
  border-color: var(--zq-line-strong);
  background-color: var(--zq-surface-soft);
  box-shadow: none;
}

.zq-auth-body .form-check-input:checked {
  border-color: var(--zq-accent);
  background-color: var(--zq-accent);
}

.zq-auth-form-body .btn-primary {
  min-height: 48px;
  border: 1px solid var(--zq-accent-2) !important;
  border-radius: 12px;
  background: var(--zq-accent-2) !important;
  color: var(--zq-accent-ink) !important;
  box-shadow: none !important;
  font-weight: 750;
}

.zq-auth-form-body .btn-primary:hover,
.zq-auth-form-body .btn-primary:focus-visible {
  border-color: color-mix(in srgb, var(--zq-accent-2) 82%, black) !important;
  background: color-mix(in srgb, var(--zq-accent-2) 88%, black) !important;
  color: var(--zq-accent-ink) !important;
  box-shadow: none !important;
  transform: none;
}

.zq-auth-alternate {
  padding-top: 0.2rem;
  color: var(--zq-muted);
  font-size: 0.84rem;
  text-align: center;
}

.zq-auth-theme-switcher .zq-theme-toggle {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border-color: var(--zq-line) !important;
  background: var(--zq-surface) !important;
  color: var(--zq-muted) !important;
  box-shadow: none !important;
}

.zq-auth-theme-switcher .zq-theme-toggle:hover,
.zq-auth-theme-switcher .zq-theme-toggle:focus-visible {
  border-color: var(--zq-line-strong) !important;
  background: var(--zq-surface-soft) !important;
  color: var(--zq-text) !important;
  transform: none;
}

@media (max-width: 575px) {
  .zq-auth-shell {
    justify-content: flex-start;
    padding-inline: 0.75rem !important;
    padding-block: 4.25rem 1.25rem;
  }

  [data-bs-theme] .zq-auth-body .zq-auth-card {
    border-radius: 18px !important;
  }

  .zq-auth-form-body {
    padding: 1.75rem 1.25rem !important;
  }

  .zq-auth-brand {
    margin-bottom: 1.35rem;
  }

  .zq-auth-heading {
    margin-bottom: 1.4rem;
  }

  .zq-auth-form-body .zq-auth-heading h1 {
    font-size: 1.65rem;
  }

  .zq-auth-options {
    align-items: flex-start;
  }
}

/* Light navigation stays quiet: neutral hover, green only for selection. */
[data-bs-theme="light"] .sidebar-wrapper .metismenu a:hover,
[data-bs-theme="light"] .sidebar-wrapper .metismenu a:focus-visible {
  border-color: transparent !important;
  background: var(--zq-surface-hover) !important;
  color: var(--zq-text) !important;
  box-shadow: none !important;
  transform: none !important;
}

[data-bs-theme="light"] .sidebar-wrapper .metismenu a:hover .parent-icon,
[data-bs-theme="light"] .sidebar-wrapper .metismenu a:focus-visible .parent-icon {
  border-color: var(--zq-line-soft) !important;
  background: transparent !important;
  color: var(--zq-text) !important;
}

[data-bs-theme="light"] .sidebar-wrapper .metismenu a.active,
[data-bs-theme="light"] .sidebar-wrapper .metismenu .mm-active > a {
  border-color: var(--zq-line) !important;
  background: var(--zq-surface) !important;
  box-shadow: inset 3px 0 0 var(--zq-accent) !important;
  transform: none !important;
}

[data-bs-theme="light"] .sidebar-wrapper .metismenu a.active .parent-icon,
[data-bs-theme="light"] .sidebar-wrapper .metismenu .mm-active > a .parent-icon {
  border-color: var(--zq-line-soft) !important;
  background: var(--zq-surface-soft) !important;
  color: #347c29 !important;
}

/* Desktop compact navigation: a deliberate icon rail, without clipped content. */
@media (min-width: 1200px) {
  body.toggled .sidebar-wrapper,
  body.toggled .sidebar-wrapper .sidebar-header,
  body.toggled .sidebar-wrapper .sidebar-bottom {
    width: 70px;
  }

  body.toggled .sidebar-wrapper .sidebar-header {
    justify-content: center;
    padding-inline: 0;
  }

  body.toggled .sidebar-wrapper .sidebar-header .sidebar-close {
    display: none !important;
  }

  body.toggled .sidebar-wrapper .logo-icon {
    width: 40px;
    height: 42px;
    min-height: 42px;
    justify-content: center;
  }

  body.toggled .sidebar-wrapper .logo-img {
    display: none;
  }

  body.toggled .sidebar-wrapper .zq-logo-mark {
    display: block;
  }

  body.toggled .sidebar-wrapper .sidebar-nav {
    padding: 0.75rem 7px 0;
    overflow-x: hidden;
  }

  body.toggled .sidebar-wrapper .sidebar-nav .metismenu {
    width: 56px;
    padding: 0;
    gap: 0.35rem;
  }

  body.toggled .sidebar-wrapper .metismenu .zq-nav-section,
  body.toggled .sidebar-wrapper .metismenu .menu-title,
  body.toggled .sidebar-wrapper .zq-sidebar-action-label {
    display: none !important;
  }

  body.toggled .sidebar-wrapper .metismenu a {
    width: 52px;
    min-height: 50px;
    justify-content: center;
    gap: 0;
    margin-inline: auto;
    padding: 0;
    border-radius: 14px;
    transform: none !important;
  }

  body.toggled .sidebar-wrapper .metismenu .parent-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body.toggled .sidebar-wrapper .metismenu a::before {
    left: 2px;
    height: 22px;
  }

  body.toggled .sidebar-wrapper .sidebar-bottom {
    padding: 0 !important;
  }

  body.toggled .sidebar-wrapper .zq-sidebar-action {
    width: 44px !important;
    min-width: 44px;
    min-height: 44px;
    gap: 0;
    padding: 0;
    border-radius: 14px;
  }
}

.zq-sidebar-action {
  gap: 0.55rem;
}

.zq-logo-mark {
  display: none;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.zq-sidebar-action-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/*
 * Compact navigation is a desktop-only rail.  On tablets the panel remains
 * a full drawer so the wordmark never has to be squeezed beside its close
 * control.  Phones use the mark alone, which leaves a clear control at the
 * far end of the header.
 */
@media (min-width: 768px) and (max-width: 1199px) {
  .sidebar-wrapper,
  .sidebar-wrapper .sidebar-header,
  .sidebar-wrapper .sidebar-bottom {
    width: 300px;
  }

  .sidebar-wrapper {
    left: -300px;
  }

  body.toggled .sidebar-wrapper {
    width: 300px;
    left: 0;
  }

  body.toggled .sidebar-wrapper .sidebar-header,
  body.toggled .sidebar-wrapper .sidebar-bottom {
    width: 300px;
  }

  .sidebar-wrapper .sidebar-header {
    justify-content: space-between;
  }

  .sidebar-wrapper .logo-img {
    width: 210px;
    max-width: 210px;
    flex: 0 0 210px;
  }

  .sidebar-wrapper .sidebar-close {
    margin-left: auto;
    flex: 0 0 45px;
  }
}

@media (max-width: 1199px) {
  [data-bs-theme] .links-pagination {
    min-width: 0;
    justify-content: center;
  }

  [data-bs-theme] .links-pagination > span {
    flex: 1 0 100%;
    text-align: center;
  }

  [data-bs-theme] .links-pagination nav {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  [data-bs-theme] .links-pagination .pagination {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.25rem;
  }

  [data-bs-theme] .links-pagination .page-item {
    margin: 0;
  }

  [data-bs-theme] .links-pagination .page-boundary .page-link {
    padding-inline: 0.75rem;
  }
}

@media (max-width: 479px) {
  [data-bs-theme] .links-pagination .page-link {
    min-width: 32px;
    min-height: 34px;
    padding: 0.25rem 0.4rem;
    font-size: 0.78rem;
  }

  [data-bs-theme] .links-pagination .page-boundary .page-link {
    padding-inline: 0.5rem;
  }
}

@media (max-width: 399px) {
  [data-bs-theme] .links-pagination .page-number:not(.active) {
    display: none;
  }
}

@media (max-width: 767px) {
  [data-bs-theme] .top-header .search-bar.is-open {
    position: absolute;
    z-index: 1065;
    top: calc(100% + 0.5rem);
    right: 0.75rem;
    left: 0.75rem;
    display: block !important;
    padding: 0.65rem;
    border: 1px solid var(--zq-line);
    border-radius: 18px;
    background: var(--zq-surface-raised);
    box-shadow: var(--zq-shadow);
  }

  [data-bs-theme] .top-header .search-bar.is-open .search-control {
    display: block !important;
    width: 100%;
    height: 48px;
    padding-left: 2.75rem !important;
  }

  [data-bs-theme] .top-header .search-bar.is-open .zq-search-icon {
    display: block !important;
  }

  .sidebar-wrapper .sidebar-header {
    position: relative;
    justify-content: space-between;
  }

  .sidebar-wrapper .logo-icon {
    width: 40px;
    min-height: 42px;
    justify-content: center;
  }

  .sidebar-wrapper .logo-img {
    display: none;
  }

  .sidebar-wrapper .zq-logo-mark {
    display: block;
  }

  .sidebar-wrapper .sidebar-close {
    position: absolute;
    right: 1rem;
    margin-left: 0;
    flex: 0 0 45px;
  }
}
