:root {
  color-scheme: dark;
  --ui-body: #030712;
  --ui-surface: rgba(15, 19, 35, 0.78);
  --ui-surface-soft: rgba(20, 24, 46, 0.55);
  --ui-surface-strong: rgba(21, 28, 58, 0.9);
  --ui-border: rgba(100, 116, 139, 0.28);
  --ui-border-strong: rgba(124, 92, 255, 0.6);
  --ui-border-glow: rgba(56, 189, 248, 0.45);
  --ui-primary: #7c5cff;
  --ui-primary-strong: #5b45f0;
  --ui-primary-soft: rgba(124, 92, 255, 0.2);
  --ui-accent: #38e3ff;
  --ui-success: #34d399;
  --ui-danger: #f87171;
  --ui-danger-border: rgba(248, 113, 113, 0.4);
  --ui-text: #f8fafc;
  --ui-text-muted: rgba(203, 213, 225, 0.78);
  --ui-text-subtle: rgba(148, 163, 184, 0.68);
  --ui-shadow-soft: 0 24px 70px rgba(88, 28, 135, 0.24);
  --ui-shadow-medium: 0 20px 65px rgba(76, 29, 149, 0.2);
  --ui-shadow-strong: 0 36px 95px rgba(45, 70, 185, 0.22);
  --ui-blur: 28px;
  --ui-radius-lg: 22px;
  --ui-radius-xl: 32px;
  --ui-font: 'Plus Jakarta Sans', 'Inter', 'system-ui', sans-serif;
  --nui-bg: var(--ui-body);
  --nui-fg: var(--ui-text);
  --nui-muted: var(--ui-text-subtle);
  --nui-border: var(--ui-border);
  --nui-ring: rgba(124, 92, 255, 0.45);
  --nui-radius: var(--ui-radius-lg);
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 12% 18%, rgba(88, 28, 135, 0.35), transparent 52%),
    radial-gradient(circle at 82% 8%, rgba(56, 189, 248, 0.18), transparent 58%),
    linear-gradient(160deg, #020510 10%, #030712 45%, #0f172a 100%);
  font-family: var(--ui-font);
  color: var(--ui-text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.65), rgba(76, 29, 149, 0.18));
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

main h1 {
  font-size: clamp(2.25rem, 3vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ui-text);
  margin-bottom: 1.5rem;
}

main h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ui-text);
  margin: 1.75rem 0 0.85rem;
}

main h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 600;
  color: var(--ui-text);
  margin: 1.35rem 0 0.55rem;
}

main p {
  color: var(--ui-text-muted);
}

main .prose :where(p, li) {
  color: var(--ui-text-muted);
}

/* Nuxt UI + HorizonUI inspired primitives */
.nui-container {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.75rem);
}

.nui-section {
  padding-block: clamp(3rem, 7vw, 5rem);
  display: block;
}

.nui-section + .nui-section {
  padding-top: 0;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.nui-section__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 48rem;
}

@media (min-width: 768px) {
  .nui-section__header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
  }
}

.nui-section__header .nui-heading {
  margin-bottom: 0;
}

.nui-panel {
  position: relative;
  background: var(--ui-surface);
  border: 1px solid var(--nui-border);
  border-radius: var(--nui-radius);
  padding: clamp(1.05rem, 2.6vw, 1.6rem);
  box-shadow: var(--ui-shadow-soft);
  color: var(--nui-fg);
  backdrop-filter: blur(var(--ui-blur));
}

.nui-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 85% 15%, rgba(124, 92, 255, 0.15), transparent 60%);
  pointer-events: none;
}

.nui-panel--floating {
  background: rgba(10, 15, 32, 0.72);
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: var(--ui-shadow-strong);
}

.nui-panel--muted {
  background: rgba(14, 20, 35, 0.65);
  border-color: rgba(94, 114, 228, 0.2);
}

.nui-card,
.card {
  position: relative;
  background: var(--ui-surface);
  border: 1px solid var(--nui-border);
  border-radius: var(--nui-radius);
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  box-shadow: var(--ui-shadow-soft);
  color: var(--nui-fg);
  overflow: hidden;
  backdrop-filter: blur(var(--ui-blur));
}

.nui-card::before,
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top right, rgba(124, 92, 255, 0.16), transparent 55%);
  opacity: 0.75;
  pointer-events: none;
}

.nui-card > *,
.card > * {
  position: relative;
  z-index: 1;
}

.nui-card--muted {
  background: rgba(15, 19, 35, 0.75);
  border-color: rgba(94, 114, 228, 0.22);
}

.nui-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--nui-border);
  background: rgba(17, 24, 39, 0.6);
  color: var(--nui-muted);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(calc(var(--ui-blur) / 2));
}

.nui-pill:hover,
.nui-pill:focus-visible {
  border-color: rgba(124, 92, 255, 0.65);
  background: rgba(124, 92, 255, 0.18);
  color: var(--nui-fg);
  box-shadow: 0 18px 45px rgba(124, 92, 255, 0.25);
  transform: translateY(-2px);
}

.nui-button--primary {
  border-color: rgba(124, 92, 255, 0.75);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.92), rgba(34, 211, 238, 0.65));
  color: #f8fafc;
  box-shadow: 0 24px 60px rgba(99, 102, 241, 0.35);
}

.nui-button--primary:hover,
.nui-button--primary:focus-visible {
  border-color: rgba(165, 180, 252, 0.8);
  box-shadow: 0 32px 70px rgba(99, 102, 241, 0.45);
}

.nui-pill.is-active {
  border-color: rgba(124, 92, 255, 0.85);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.92), rgba(56, 189, 248, 0.78));
  color: #050a1a;
  box-shadow: 0 22px 55px rgba(56, 189, 248, 0.25);
}

.nui-pill.is-active .admin-nav__icon {
  background: rgba(5, 10, 26, 0.88);
  color: var(--ui-primary-strong);
}

.nui-grid {
  display: grid;
  gap: 1.25rem;
}

.nui-heading {
  font-size: clamp(1.8rem, 2.8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.nui-muted {
  color: var(--nui-muted);
}

.nui-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, rgba(148, 163, 184, 0.25), transparent);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(var(--ui-blur));
  background: linear-gradient(135deg, rgba(15, 20, 35, 0.8), rgba(32, 19, 51, 0.82));
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  margin: 0 auto;
  max-width: 1120px;
  width: 100%;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
}

.app-brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(127, 90, 240, 0.7), rgba(34, 211, 238, 0.6));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #0b1220;
  box-shadow: 0 18px 40px rgba(127, 90, 240, 0.35);
  border: 1px solid rgba(127, 90, 240, 0.55);
  overflow: hidden;
}

.app-brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.app-brand__title {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  color: var(--ui-text);
}

.app-brand__subtitle {
  display: block;
  font-size: 0.85rem;
  color: var(--ui-text-subtle);
}

.app-menu-status {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .app-menu-status {
    display: flex;
  }
}

.app-menu-status__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.65);
}

.app-menu-status__title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-text);
}

.app-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(5, 8, 19, 0.85);
  padding: 0.5rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--ui-text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.app-menu-trigger svg {
  width: 20px;
  height: 20px;
}

.app-menu-trigger:hover,
.app-menu-trigger:focus-visible {
  border-color: rgba(96, 165, 250, 0.65);
  transform: translateY(-1px);
}

.app-menu-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(circle at 70% 10%, rgba(124, 92, 255, 0.18), transparent 65%),
    rgba(2, 6, 23, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 60;
}

[data-menu-overlay].is-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-menu-overlay__backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px);
}

.app-menu-overlay__panel {
  position: relative;
  width: min(460px, 100%);
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3rem);
  background: rgba(4, 8, 20, 0.95);
  border-radius: 32px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 35px 90px rgba(2, 6, 23, 0.8);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  backdrop-filter: blur(12px);
  z-index: 1;
  outline: none;
}

.app-menu-overlay__heading {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.app-menu-overlay__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.72rem;
  color: rgba(203, 213, 225, 0.65);
}

.app-menu-overlay__heading h2 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  margin: 0;
  letter-spacing: 0.02em;
}

.app-menu-overlay__subline {
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.95rem;
}

.app-menu-overlay__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
}

.app-menu-overlay__link {
  position: relative;
  display: block;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.8);
  text-decoration: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.app-menu-overlay__link:last-child {
  border-bottom: none;
}

.app-menu-overlay__link:hover,
.app-menu-overlay__link:focus-visible {
  color: #fff;
  letter-spacing: 0.45em;
}

.app-menu-overlay__link.is-active {
  color: var(--ui-accent);
}

.app-menu-overlay__group {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 0.75rem;
}

.app-menu-overlay__group .app-menu-overlay__link {
  border-bottom: none;
}

.app-menu-overlay__group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.app-menu-overlay__subnav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.app-menu-overlay__subnav a {
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.app-menu-overlay__subnav a.is-active {
  color: var(--ui-accent);
}

.app-menu-overlay__subnav a:hover,
.app-menu-overlay__subnav a:focus-visible {
  color: #fff;
}

.app-menu-overlay__ctas {
  display: grid;
  gap: 0.9rem;
  text-align: center;
}

.app-menu-overlay__cta {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.95rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 600;
  text-decoration: none;
  color: rgba(248, 250, 252, 0.8);
  background: rgba(10, 15, 32, 0.65);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.app-menu-overlay__cta.is-active {
  border-color: rgba(56, 189, 248, 0.65);
  color: #fff;
}

.app-menu-overlay__cta--primary {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(124, 92, 255, 0.9));
  color: #030712;
  box-shadow: 0 22px 45px rgba(56, 189, 248, 0.35);
}

.app-menu-overlay__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.55);
  color: var(--ui-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.app-menu-overlay__close svg {
  width: 20px;
  height: 20px;
}

.app-menu-overlay__close:hover,
.app-menu-overlay__close:focus-visible {
  border-color: rgba(56, 189, 248, 0.65);
  transform: rotate(4deg);
}

body.menu-open {
  overflow: hidden;
}
.app-main {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

.app-footer {
  border-top: 1px solid rgba(127, 90, 240, 0.28);
  background: rgba(9, 12, 24, 0.88);
  backdrop-filter: blur(var(--ui-blur));
}

.app-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem);
  max-width: 1120px;
  margin: 0 auto;
  color: var(--ui-text-muted);
}

.app-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ui-text-subtle);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stack {
  display: grid;
  gap: 1.4rem;
}

.admin-two-column {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 1024px) {
  .admin-two-column {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  }
}

.card > h2,
.card > h3 {
  margin-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  background: rgba(127, 90, 240, 0.15);
  color: var(--ui-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-pattern {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(203, 213, 225, 0.45));
  color: #111827;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.btn,
.card a.btn,
.card a.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.65rem 1.45rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--ui-border-strong);
  background: rgba(127, 90, 240, 0.18);
  color: var(--ui-primary);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-secondary {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
  color: var(--ui-text);
}

.btn:hover,
.btn:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible,
.card a.btn:hover,
.card a.btn-secondary:hover {
  border-color: var(--ui-primary);
  background: rgba(127, 90, 240, 0.28);
  color: var(--ui-text);
  box-shadow: 0 22px 45px rgba(127, 90, 240, 0.35);
  transform: translateY(-1px);
}

.alert {
  border-radius: 18px;
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.alert-success {
  background: rgba(59, 255, 185, 0.12);
  border-color: rgba(59, 255, 185, 0.45);
  color: #d1ffe9;
}

.alert-danger,
.alert-error {
  background: rgba(248, 113, 113, 0.16);
  border-color: var(--ui-danger-border);
  color: #fee2e2;
}

/* Genetics calculator */
.genetics-page {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.genetics-app-root {
  margin-top: clamp(1.8rem, 4vw, 2.4rem);
}

.genetics-calculator {
  display: flex;
  flex-direction: column;
  gap: clamp(1.8rem, 4vw, 2.4rem);
}

.genetics-calculator__species {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.genetics-calculator__species header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.genetics-calculator__species header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ui-text-subtle);
}

.species-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.species-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(94, 114, 228, 0.28);
  padding: 0.95rem 1.15rem;
  background: rgba(15, 23, 42, 0.65);
  color: var(--ui-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.species-chip__label {
  font-weight: 600;
  font-size: 1.05rem;
}

.species-chip__subtitle {
  font-size: 0.8rem;
  color: var(--ui-text-subtle);
}

.species-chip:hover,
.species-chip:focus-visible {
  border-color: var(--ui-primary);
  background: rgba(76, 29, 149, 0.38);
  transform: translateY(-1px);
}

.species-chip.is-active {
  border-color: var(--ui-primary);
  background: rgba(124, 92, 255, 0.22);
  box-shadow: 0 20px 45px rgba(124, 92, 255, 0.28);
}

.genetics-calculator__grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.1rem);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.genotype-panel {
  background: rgba(10, 15, 32, 0.7);
  border: 1px solid rgba(94, 114, 228, 0.32);
  border-radius: var(--ui-radius-lg);
  padding: clamp(1.4rem, 2.8vw, 1.9rem);
  box-shadow: var(--ui-shadow-soft);
  backdrop-filter: blur(26px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.genotype-panel header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.genotype-search {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.genotype-search__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(94, 114, 228, 0.3);
  background: rgba(13, 18, 38, 0.82);
  padding: 0.45rem 0.45rem 0.45rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.genotype-search__field[data-focused] {
  border-color: var(--ui-primary);
  background: rgba(17, 24, 54, 0.92);
  box-shadow: 0 18px 48px rgba(124, 92, 255, 0.24);
}

.genotype-search__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ui-text-subtle);
}

.genotype-search__icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.genotype-search__field input {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  color: var(--ui-text);
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
}

.genotype-search__field input::placeholder {
  color: rgba(226, 232, 240, 0.4);
}

.genotype-search__field input:focus {
  outline: none;
}

.genotype-search__clear {
  border: none;
  background: transparent;
  border-radius: var(--ui-radius-full);
  padding: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ui-text-subtle);
  transition: color 0.2s ease, background 0.2s ease;
}

.genotype-search__clear svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.genotype-search__clear:hover,
.genotype-search__clear:focus-visible {
  color: var(--ui-text);
  background: rgba(124, 92, 255, 0.18);
}

.genotype-search__suggestions {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(94, 114, 228, 0.32);
  background: rgba(9, 13, 28, 0.95);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.45);
  padding: 0.9rem;
  max-height: 320px;
  overflow-y: auto;
  z-index: 12;
  backdrop-filter: blur(26px);
}

.genotype-search__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.genotype-search__group-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ui-text-subtle);
}

.genotype-search__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.genotype-search__option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: none;
  border-radius: var(--ui-radius-md);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.65);
  color: var(--ui-text);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.genotype-search__option:hover,
.genotype-search__option:focus-visible {
  background: rgba(124, 92, 255, 0.25);
  color: var(--ui-text);
  transform: translateY(-1px);
}

.genotype-search__option.is-active {
  background: rgba(124, 92, 255, 0.28);
  box-shadow: 0 18px 42px rgba(124, 92, 255, 0.25);
}

.genotype-search__option.is-disabled {
  cursor: not-allowed;
  color: rgba(226, 232, 240, 0.45);
  background: rgba(15, 23, 42, 0.45);
}

.genotype-search__option.is-disabled:hover,
.genotype-search__option.is-disabled:focus-visible {
  transform: none;
  background: rgba(15, 23, 42, 0.45);
}

.genotype-search__option-label {
  flex: 1 1 auto;
  text-align: left;
}

.genotype-search__badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.2);
  color: var(--ui-primary);
}

.genotype-search__no-results {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--ui-text-subtle);
}

.genotype-search__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.genotype-search__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 114, 228, 0.32);
  background: rgba(15, 23, 42, 0.6);
  color: var(--ui-text);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.genotype-search__chip button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.genotype-search__chip button:hover,
.genotype-search__chip button:focus-visible {
  color: var(--ui-primary);
}

@media (max-width: 640px) {
  .genotype-search__suggestions {
    max-height: 260px;
  }
}

.genetics-actionbar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(94, 114, 228, 0.3);
  background: rgba(10, 15, 32, 0.86);
  backdrop-filter: blur(28px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.45);
}

.genetics-actionbar .btn,
.genetics-actionbar .btn-secondary {
  flex: 1 1 0;
  justify-content: center;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.result-list__header {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.result-list__header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.result-list__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-chip {
  border-radius: 999px;
  border: 1px solid rgba(94, 114, 228, 0.32);
  background: rgba(15, 23, 42, 0.6);
  color: var(--ui-text-subtle);
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip.is-active {
  background: rgba(124, 92, 255, 0.25);
  border-color: var(--ui-primary);
  color: var(--ui-text);
  box-shadow: 0 16px 40px rgba(124, 92, 255, 0.25);
}

.result-list__hint {
  font-size: 0.95rem;
  color: var(--ui-text-subtle);
}

.result-list__items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-card {
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(94, 114, 228, 0.26);
  background: rgba(15, 19, 39, 0.78);
  padding: 1rem 1.2rem;
  display: grid;
  gap: 0.8rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}

.result-card__bar {
  position: relative;
  height: 0.65rem;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.result-card__bar-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.85), rgba(56, 189, 248, 0.85));
}

.result-card__bar-value {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ui-text);
}

.result-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.result-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ui-text);
}

.result-card__genotype {
  font-size: 0.8rem;
  color: var(--ui-text-subtle);
}

.result-card--remainder {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ui-text-subtle);
  background: rgba(17, 24, 39, 0.65);
}

@media (max-width: 768px) {
  .genetics-actionbar {
    position: sticky;
    bottom: 0.5rem;
    margin-inline: -0.5rem;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--ui-text);
}

.table thead {
  background: rgba(12, 18, 30, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--ui-text-subtle);
}

.table th,
.table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: top;
}

.table tbody tr:hover {
  background: rgba(127, 90, 240, 0.08);
}

form label {
  display: block;
  font-weight: 600;
  color: var(--ui-text);
  margin-top: 1.1rem;
}

.form-field,
form label:first-of-type {
  margin-top: 0;
}

.form-hint {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--ui-text-subtle);
}

form input[type="text"],
form input[type="email"],
form input[type="number"],
form input[type="password"],
form input[type="file"],
form select,
form textarea {
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.7rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-soft);
  color: var(--ui-text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form textarea {
  min-height: 140px;
  resize: vertical;
}

form select {
  appearance: none;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.25);
}

form button[type="submit"],
form button[type="button"] {
  margin-top: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.55rem;
  border-radius: 999px;
  border: 1px solid var(--ui-border-strong);
  background: rgba(127, 90, 240, 0.18);
  color: var(--ui-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

form button[type="submit"]:hover,
form button[type="button"]:hover {
  border-color: var(--ui-primary);
  background: rgba(127, 90, 240, 0.28);
  color: var(--ui-text);
  box-shadow: 0 22px 45px rgba(127, 90, 240, 0.28);
  transform: translateY(-1px);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.4rem;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-soft);
  accent-color: var(--ui-primary);
}

.age-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.55rem;
}

.age-picker label {
  flex: 1 1 120px;
  min-width: 120px;
}

.age-picker select {
  width: 100%;
}

.gene-selector {
  display: grid;
  gap: 1.5rem;
}

.gene-selector__intro {
  padding: 1.2rem 1.4rem;
  border-radius: 18px;
  border: 1px dashed rgba(127, 90, 240, 0.35);
  background: rgba(127, 90, 240, 0.08);
}

.gene-selector__parents {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .gene-selector__parents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gene-parent {
  display: grid;
  gap: 0.85rem;
}

.gene-parent__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(127, 90, 240, 0.28);
  background: rgba(19, 24, 42, 0.7);
}

.gene-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 14px;
  background: rgba(127, 90, 240, 0.18);
  color: var(--ui-primary);
  font-weight: 600;
  border: 1px solid rgba(127, 90, 240, 0.32);
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
}

.gene-tag--combo {
  background: rgba(56, 189, 248, 0.18);
  color: #67e8f9;
  border-color: rgba(56, 189, 248, 0.35);
}

.gene-tag__remove {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.15rem;
  border-radius: 50%;
  cursor: pointer;
}

.gene-tag__remove:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ui-text);
}

.gene-parent__input {
  position: relative;
}

.gene-parent__input input {
  width: 100%;
  padding-right: 2.5rem;
}

.gene-parent__input svg {
  position: absolute;
  inset-inline-end: 0.85rem;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ui-text-subtle);
}

.gene-parent__suggestions {
  margin-top: 0.55rem;
  border-radius: 16px;
  border: 1px solid rgba(127, 90, 240, 0.25);
  background: rgba(12, 18, 30, 0.92);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.45);
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
}

.gene-parent__suggestions button {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  text-align: left;
  background: transparent;
  color: var(--ui-text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.gene-parent__suggestions button:hover {
  background: rgba(127, 90, 240, 0.14);
  color: var(--ui-text);
}

.gene-parent__suggestions .gene-suggestion--combo {
  border: 1px dashed rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.65);
}

.gene-parent__suggestions .gene-suggestion--combo strong {
  color: #67e8f9;
}

.gene-reference {
  display: grid;
  gap: 1.5rem;
}

.gene-reference__image {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  margin: 0.75rem 0 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.gene-results {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.gene-results__summary table {
  width: 100%;
}

.gene-results__per-gene {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .gene-results {
    grid-template-columns: 1.25fr 1fr;
    align-items: start;
  }

  .gene-results__per-gene {
    grid-template-columns: 1fr;
  }
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.tag-combo {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  color: #67e8f9;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.admin-gene-picker {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.65);
}

.admin-gene-picker__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-gene-picker__input {
  display: flex;
  gap: 0.5rem;
}

.admin-gene-picker__input input {
  flex: 1 1 auto;
}

.admin-gene-picker__clear {
  border: none;
  border-radius: 12px;
  padding: 0.4rem 0.75rem;
  background: rgba(148, 163, 184, 0.18);
  color: var(--ui-text-muted);
  cursor: pointer;
}

.admin-gene-picker__clear:hover {
  background: rgba(56, 189, 248, 0.22);
  color: var(--ui-text);
}

.admin-gene-picker__suggestions {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(12, 18, 30, 0.92);
  padding: 0.55rem;
  display: grid;
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
}

.admin-gene-picker__suggestions button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  color: var(--ui-text-muted);
  cursor: pointer;
}

.admin-gene-picker__suggestions button:hover {
  background: rgba(127, 90, 240, 0.18);
  color: var(--ui-text);
}

.admin-gene-picker__empty {
  padding: 0.4rem;
  color: var(--ui-text-muted);
  font-size: 0.85rem;
}

.gene-reference__card {
  background: rgba(12, 18, 30, 0.72);
  border: 1px solid rgba(127, 90, 240, 0.22);
}

.gene-reference__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.gene-reference__states {
  display: grid;
  gap: 0.9rem;
}

.gene-reference__states dt {
  font-weight: 700;
  color: var(--ui-text);
}

.gene-reference__states dd {
  margin: 0;
  color: var(--ui-text-muted);
}

.sortable-list {
  display: grid;
  gap: 0.85rem;
}

.sortable-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(12, 18, 30, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sortable-item.dragging {
  transform: scale(1.02);
  border-color: var(--ui-primary);
  background: rgba(127, 90, 240, 0.18);
  box-shadow: 0 24px 65px rgba(127, 90, 240, 0.2);
}

.sortable-handle {
  cursor: grab;
  font-size: 1.2rem;
  color: var(--ui-text-subtle);
}

.sortable-content h3 {
  margin: 0;
}

.sortable-content p {
  margin: 0.25rem 0 0;
  color: var(--ui-text-subtle);
}

.sortable-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ui-text-subtle);
}

.rich-text-wrapper {
  margin: 0;
  border: 1px solid rgba(127, 90, 240, 0.25);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(12, 18, 30, 0.75);
  box-shadow: var(--ui-shadow-strong);
}

.rich-text-shell {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.85rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
  .rich-text-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.rich-text-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rich-text-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ui-text-subtle);
}

.rich-text-components {
  background: rgba(12, 18, 30, 0.75);
  border: 1px solid rgba(127, 90, 240, 0.22);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--ui-shadow-medium);
  min-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rich-text-components__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ui-text);
}

.component-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 520px;
}

@media (max-width: 1023px) {
  .component-gallery {
    max-height: none;
  }
}

.component-gallery__search input {
  width: 100%;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 0.5rem 0.75rem;
  color: var(--ui-text);
}

.component-gallery__search input:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 2px rgba(127, 90, 240, 0.3);
}

.component-gallery__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.component-chip {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  background: rgba(12, 18, 30, 0.65);
  color: var(--ui-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.component-chip.is-active {
  border-color: var(--ui-primary);
  background: rgba(127, 90, 240, 0.25);
  color: #fff;
}

.component-gallery__list {
  flex: 1;
  overflow: auto;
  display: grid;
  gap: 0.75rem;
  padding-right: 0.25rem;
}

.component-gallery__loading,
.component-gallery__empty,
.component-gallery__error {
  font-size: 0.85rem;
  color: var(--ui-text-subtle);
}

.component-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 0.9rem;
  background: rgba(9, 14, 24, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.component-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.component-card__badge {
  align-self: flex-start;
  background: rgba(127, 90, 240, 0.22);
  color: var(--ui-primary);
  border-radius: 9999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.6rem;
}

.component-card__category {
  font-size: 0.75rem;
  color: var(--ui-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.component-card__description {
  font-size: 0.85rem;
  color: var(--ui-text-subtle);
  margin: 0;
}

.component-card__preview {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.75rem;
  max-height: 220px;
  overflow: auto;
}

.component-card__preview > * {
  margin: 0;
}

.component-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.component-card__actions .btn {
  flex: 1;
  min-width: 120px;
}

.component-card__code {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 12px;
  padding: 0.75rem;
  font-size: 0.75rem;
  color: var(--ui-text-subtle);
  overflow: auto;
}

.component-card__empty {
  font-size: 0.8rem;
  color: var(--ui-text-subtle);
  margin: 0;
}

.menu-manager {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu-manager__toolbar {
  display: flex;
  justify-content: flex-end;
}

.menu-manager__table {
  overflow-x: auto;
}

.menu-manager__section td {
  background: rgba(15, 23, 42, 0.65);
  font-weight: 600;
  color: var(--ui-text);
}

.menu-manager__handle {
  cursor: grab;
  text-align: center;
  font-size: 1.1rem;
  color: var(--ui-text-subtle);
}

.menu-manager__row.is-dragging {
  opacity: 0.6;
}

.menu-manager__path {
  font-size: 0.75rem;
  color: var(--ui-text-subtle);
  margin-top: 0.25rem;
  word-break: break-all;
}

.menu-manager__actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.menu-manager__empty {
  text-align: center;
  color: var(--ui-text-subtle);
  font-size: 0.85rem;
}

.menu-manager__empty[hidden] {
  display: none;
}

.menu-manager__modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 9, 18, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.menu-manager__modal[hidden] {
  display: none;
}

.menu-manager__dialog {
  width: min(420px, 100%);
  background: rgba(12, 18, 30, 0.95);
  border: 1px solid rgba(127, 90, 240, 0.28);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--ui-shadow-strong);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu-manager__dialog form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.menu-manager__dialog label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.menu-manager__dialog input[type="text"],
.menu-manager__dialog select {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(9, 14, 24, 0.75);
  padding: 0.45rem 0.65rem;
  color: var(--ui-text);
}

.menu-manager__dialog input[type="text"]:focus,
.menu-manager__dialog select:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 2px rgba(127, 90, 240, 0.25);
}

.menu-manager__checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.menu-manager__dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.menu-manager__dialog-actions .btn {
  min-width: 120px;
}

.menu-manager__dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.menu-manager__close {
  border: none;
  background: transparent;
  color: var(--ui-text-subtle);
  font-size: 1.5rem;
  cursor: pointer;
}

.menu-manager__close:hover {
  color: var(--ui-text);
}

.menu-manager__error {
  color: #f87171;
  font-size: 0.85rem;
  margin: 0;
}

body.menu-manager--modal-open {
  overflow: hidden;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(127, 90, 240, 0.24);
}

.rich-text-btn {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.65);
  color: var(--ui-text);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.rich-text-btn:hover,
.rich-text-btn:focus-visible {
  border-color: var(--ui-primary);
  background: rgba(127, 90, 240, 0.2);
}

.rich-text-editor {
  min-height: 220px;
  padding: 1.1rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ui-text);
}

.rich-text-editor [data-nui-component] {
  display: block;
  margin: 1.25rem 0;
}

.admin-shell__header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.admin-shell__subtitle {
  color: var(--ui-text-subtle);
  font-size: 0.95rem;
}

.admin-nav {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 1.75rem;
}

.admin-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--ui-radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(36, 20, 60, 0.85));
  border: 1px solid rgba(127, 90, 240, 0.35);
  box-shadow: 0 24px 60px rgba(8, 12, 24, 0.55);
  grid-column: 1 / -1;
}

.admin-nav__brand-logo {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, rgba(127, 90, 240, 0.3), rgba(12, 18, 30, 0.9));
  box-shadow: inset 0 0 0 1px rgba(127, 90, 240, 0.25);
}

.admin-nav__brand-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(127, 90, 240, 0.35));
}

.admin-nav__brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-nav__brand-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.admin-nav__brand-subtitle {
  font-size: 0.8rem;
  color: var(--ui-text-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  width: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.admin-nav__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(127, 90, 240, 0.28), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-nav__link:hover::before,
.admin-nav__link:focus-visible::before {
  opacity: 1;
}

.admin-nav__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.16);
  color: var(--ui-primary);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.12);
}

.admin-nav__label {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.stats-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.stat-card {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--ui-radius-lg);
  background: linear-gradient(160deg, rgba(12, 18, 30, 0.85), rgba(32, 19, 51, 0.75));
  border: 1px solid rgba(127, 90, 240, 0.28);
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.4);
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.35), transparent 60%);
  opacity: 0.75;
  pointer-events: none;
}

.stat-card__icon {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(127, 90, 240, 0.22);
  display: grid;
  place-items: center;
  color: var(--ui-primary);
  margin-bottom: 1rem;
}

.stat-card__value {
  position: relative;
  z-index: 1;
  font-size: clamp(1.9rem, 2.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ui-text);
}

.stat-card__label {
  position: relative;
  z-index: 1;
  color: var(--ui-text-subtle);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.stat-card__trend {
  position: relative;
  z-index: 1;
  margin-top: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  color: var(--ui-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-card {
  margin-top: 1.5rem;
  background: rgba(12, 18, 30, 0.85);
  border-color: rgba(127, 90, 240, 0.24);
}

.data-card table a {
  color: var(--ui-accent);
  font-weight: 600;
}

.data-card table a:hover {
  color: var(--ui-text);
  text-decoration: underline;
}

.adoption-empty {
  border: 1px dashed rgba(148, 163, 184, 0.3);
  background: rgba(12, 18, 30, 0.6);
  border-radius: var(--ui-radius-xl);
  padding: 3rem;
  text-align: center;
  color: var(--ui-text-subtle);
}

.section-divider {
  margin: 3.5rem auto;
  height: 1px;
  max-width: 1120px;
  background: linear-gradient(90deg, transparent, rgba(127, 90, 240, 0.45), transparent);
}

@media (max-width: 1023px) {
  .app-nav {
    display: none;
  }

  .app-nav-mobile {
    display: block;
  }
}

@media (min-width: 1024px) {
  .app-nav__toggle {
    display: none;
  }

  .app-nav-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .app-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1280px) {
  .app-header__inner,
  .app-footer__inner {
    max-width: 1200px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rich-text-content a,
.card a {
  color: var(--ui-accent);
}

.rich-text-content a:hover {
  color: var(--ui-text);
  text-decoration: underline;
}

[data-mobile-nav-panel] details {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(12, 18, 30, 0.55);
  padding: 0.1rem 0.35rem 0.65rem;
}

[data-mobile-nav-panel] details[open] > summary {
  border-color: rgba(127, 90, 240, 0.5);
  background: rgba(127, 90, 240, 0.12);
}

[data-mobile-nav-panel] summary::-webkit-details-marker {
  display: none;
}

[data-mobile-nav-panel] .group-open\:rotate-180 {
  transition: transform 0.2s ease;
}

[data-mobile-nav-panel] details[open] .group-open\:rotate-180 {
  transform: rotate(180deg);
}

[data-desktop-nav] [data-chevron] {
  transition: transform 0.2s ease;
}

[data-desktop-nav] .app-nav__link.is-active [data-chevron] {
  transform: rotate(180deg);
}

.home-hero {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.home-hero__primary,
.home-hero__secondary {
  display: grid;
  gap: 1rem;
}

.home-hero__title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  letter-spacing: -0.03em;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(127, 90, 240, 0.35);
  background: rgba(124, 92, 255, 0.12);
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-copy {
  font-size: 1rem;
  color: var(--ui-text-muted);
}

.hero-copy--muted {
  color: rgba(203, 213, 225, 0.7);
  font-size: 0.95rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-cta__link {
  position: relative;
  overflow: hidden;
  flex: 1 1 240px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.85rem 1.35rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.95);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 16px 40px rgba(14, 21, 38, 0.4);
}

.hero-cta__link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.35), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hero-cta__link:hover,
.hero-cta__link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.65);
}

.hero-cta__link:hover::after,
.hero-cta__link:focus-visible::after {
  opacity: 1;
}

.hero-cta__link--primary {
  background: linear-gradient(135deg, rgba(127, 90, 240, 0.35), rgba(34, 211, 238, 0.35));
  border-color: rgba(127, 90, 240, 0.45);
}

.hero-cta__link--ghost {
  background: rgba(12, 18, 30, 0.6);
  border-color: rgba(148, 163, 184, 0.25);
  color: rgba(226, 232, 240, 0.85);
}

.hero-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.2);
  color: rgba(15, 23, 42, 0.9);
  font-weight: 700;
}

.hero-stats {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 0.5rem;
}

.hero-stats__item {
  border-radius: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(9, 11, 25, 0.55);
  padding: 1.1rem 1.3rem;
  display: grid;
  gap: 0.35rem;
}

.hero-stats__value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ui-text);
}

.hero-stats__label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.85);
}

.hero-stats__hint {
  font-size: 0.85rem;
  color: rgba(203, 213, 225, 0.75);
}

@media (min-width: 1024px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
  }
}

.home-highlight-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-highlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.55);
}

.home-highlight-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.home-highlight-card__body {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1.35rem, 2.6vw, 1.75rem);
}

.adoption-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.adoption-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: calc(var(--nui-radius) - 0.35rem);
}

.adoption-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.45);
}

@media (max-width: 768px) {
  .app-header__inner {
    flex-wrap: wrap;
  }
}

/* Knowledge base layout */
.wiki-shell {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  display: grid;
  gap: clamp(1.8rem, 4vw, 2.75rem);
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 1024px) {
  .wiki-shell {
    grid-template-columns: 1fr;
  }
}

.wiki-sidebar {
  display: grid;
  gap: 1.2rem;
  align-content: start;
}

@media (min-width: 1024px) {
  .wiki-sidebar {
    position: sticky;
    top: 6.5rem;
  }
}

.wiki-search {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.wiki-search input[type='search'] {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ui-text);
  font-size: 0.95rem;
}

.wiki-search input[type='search']::placeholder {
  color: var(--ui-text-subtle);
}

.wiki-search button {
  border: 1px solid rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.15);
  color: var(--ui-primary);
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wiki-search button:hover {
  background: rgba(124, 92, 255, 0.25);
  color: var(--ui-primary-strong);
}

.wiki-topics,
.wiki-alphabet {
  display: grid;
  gap: 0.85rem;
}

.wiki-topics h2,
.wiki-alphabet h2 {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  color: var(--ui-text);
}

.wiki-topics ul,
.wiki-alphabet ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wiki-topics li {
  font-size: 0.92rem;
}

.wiki-topics li ul {
  margin-top: 0.35rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.wiki-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.8rem;
  color: var(--ui-text-subtle);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.wiki-topics a span {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--ui-surface-soft);
  color: var(--ui-text-muted);
}

.wiki-topics li.is-active > a,
.wiki-topics a:hover {
  color: var(--ui-text);
  background: var(--ui-primary-soft);
  border-color: var(--ui-border-strong);
}

.wiki-alphabet a {
  color: var(--ui-text-subtle);
  text-decoration: none;
}

.wiki-alphabet a:hover {
  color: var(--ui-text);
}

.wiki-content {
  min-width: 0;
}


.wiki-context {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.wiki-context h2 {
  margin: 0;
  font-size: 1.15rem;
}

.wiki-context p {
  margin: 0;
  color: var(--ui-text-muted);
}

.wiki-empty {
  padding: 2.1rem;
  text-align: center;
  color: var(--ui-text-subtle);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: var(--nui-radius);
}

.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: clamp(1.4rem, 3vw, 1.9rem);
}

.wiki-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-height: 100%;
}

.wiki-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.wiki-card header p {
  margin: 0.35rem 0 0;
}

.wiki-card__topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.wiki-card__topics a {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-soft);
  font-size: 0.75rem;
  color: var(--ui-text-subtle);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.wiki-card__topics a:hover {
  color: var(--ui-text);
  border-color: var(--ui-border-strong);
}

.wiki-card__meta {
  font-size: 0.78rem;
  color: var(--ui-text-subtle);
}

.wiki-card__cta {
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.4rem 0.9rem;
}

.wiki-card__cta:hover {
  box-shadow: 0 18px 45px rgba(124, 92, 255, 0.25);
}

.wiki-link {
  color: var(--ui-accent);
  border-bottom: 1px dashed rgba(56, 227, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.wiki-link:hover {
  color: var(--ui-primary);
  border-color: rgba(124, 92, 255, 0.6);
}

.wiki-link--missing {
  color: var(--ui-text-subtle);
  border-color: rgba(248, 113, 113, 0.4);
  position: relative;
}

.wiki-link--missing::after {
  content: '?';
  margin-left: 0.2rem;
  color: var(--ui-danger);
  font-size: 0.75em;
}

.wiki-article {
  margin-top: clamp(2.2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 2.75rem);
  align-items: start;
}

@media (max-width: 1024px) {
  .wiki-article {
    grid-template-columns: 1fr;
  }
}

.wiki-article__sidebar {
  display: grid;
  gap: 1.2rem;
  align-content: start;
}

@media (min-width: 1024px) {
  .wiki-article__sidebar {
    position: sticky;
    top: 6rem;
  }
}

.wiki-toc h2,
.wiki-topics-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.wiki-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wiki-toc li {
  font-size: 0.9rem;
}

.wiki-toc li.level-3 {
  margin-left: 0.75rem;
  font-size: 0.85rem;
}

.wiki-toc li.level-4 {
  margin-left: 1.2rem;
  font-size: 0.82rem;
}

.wiki-toc a {
  color: var(--ui-text-subtle);
  text-decoration: none;
}

.wiki-toc a:hover {
  color: var(--ui-text);
}

.wiki-topics-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.wiki-topics-card a {
  color: var(--ui-text-subtle);
  text-decoration: none;
}

.wiki-topics-card a:hover {
  color: var(--ui-text);
}

.wiki-article__header h1 {
  margin: 0 0 0.65rem;
}

.wiki-article__summary {
  margin: 0 0 0.75rem;
  color: var(--ui-text-muted);
}

.wiki-article__meta {
  font-size: 0.8rem;
  color: var(--ui-text-subtle);
  margin: 0;
}

.wiki-article__body {
  margin-top: 1.75rem;
}

.wiki-related {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 1.25rem;
}

.wiki-related h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.wiki-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.wiki-related li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--ui-text-subtle);
}

.wiki-related a {
  color: var(--ui-text);
  text-decoration: none;
}

.wiki-related span {
  font-size: 0.8rem;
  color: var(--ui-text-subtle);
}

.admin-care {
  gap: 1.75rem;
  align-items: flex-start;
}

.admin-care__column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge-list a {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  color: var(--ui-text-subtle);
  font-size: 0.75rem;
  text-decoration: none;
}

.badge-list a:hover {
  border-color: var(--ui-border-strong);
  color: var(--ui-text);
}

.care-topic-tree {
  list-style: none;
  margin: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.care-topic-tree ul {
  margin-top: 0.35rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.care-topic-tree a {
  color: var(--ui-text-subtle);
  text-decoration: none;
}

.care-topic-tree a:hover {
  color: var(--ui-text);
}

.care-topic-tree .count {
  font-size: 0.75rem;
  color: var(--ui-text-subtle);
  margin-left: 0.4rem;
}

.admin-form__actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.inline-form {
  margin-top: 0.85rem;
}

.admin-media {
  gap: 1.75rem;
  align-items: flex-start;
}

.admin-media__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-media__search {
  display: flex;
  gap: 0.5rem;
}

.admin-media__search input[type='search'] {
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  color: var(--ui-text);
}

.admin-media__search button {
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: transparent;
  color: var(--ui-text);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.admin-media__search button:hover {
  border-color: var(--ui-border-strong);
}

.media-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.media-card {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: var(--ui-shadow-soft);
}

.media-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card__placeholder {
  color: var(--ui-text-subtle);
  font-size: 0.85rem;
}

.media-card__meta {
  padding: 1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.media-card__meta h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ui-text);
}

.media-card__meta dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.media-card__meta dt {
  color: var(--ui-text-muted);
  font-weight: 600;
}

.media-card__meta dd {
  margin: 0;
  color: var(--ui-text-subtle);
}

.media-card__meta a {
  color: var(--ui-text);
  text-decoration: none;
}

.media-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-media__side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.media-picker-preview {
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.45);
    padding: 1rem;
    margin-bottom: 1rem;
    display: block;
    min-height: 5rem;
}

.media-picker-preview img {
    border-radius: 0.75rem;
    width: 100%;
    height: auto;
    display: block;
}

/* ==============================================
   Component Editor Enhancement Styles
   ============================================== */

/* Hover effect for editable components */
.component-editable-hover {
    outline: 2px dashed rgba(139, 92, 246, 0.5) !important;
    outline-offset: 4px;
    transition: outline 0.2s ease;
    cursor: pointer;
}

/* Edit button overlay */
.component-edit-button {
    position: absolute !important;
    top: -8px;
    right: -8px;
    z-index: 100;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.2s ease !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

.component-edit-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    background: linear-gradient(135deg, #9d6fff, #8b5cf6) !important;
}

.component-edit-button:active {
    transform: translateY(0) !important;
}

/* Component editor modal styling enhancement */
#component-edit-modal .nui-modal__dialog {
    animation: slideInFromTop 0.3s ease;
}

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

/* Modal backdrop */
.component-editor--modal-open #component-edit-modal {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

/* Form fields in component editor */
#component-edit-content .nui-field {
    margin-bottom: 0 !important;
}

#component-edit-content .nui-field__label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    display: block;
}

#component-edit-content .nui-input,
#component-edit-content .nui-select {
    width: 100%;
}

/* Highlight inserted components in editor */
.rich-text-editor [data-nui-component] {
    position: relative;
    transition: all 0.2s ease;
}

.rich-text-editor [data-nui-component]:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* Component badge in gallery */
.component-card__badge {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Enhance component preview cards */
.component-card__preview {
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.3);
    margin: 12px 0;
    transition: all 0.3s ease;
}

.component-card:hover .component-card__preview {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(15, 23, 42, 0.4);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

/* Editable indicator */
.component-card__header::after {
    content: '';
    display: none;
}

.component-card[data-editable="true"] .component-card__header::after {
    content: '✎';
    display: inline-block;
    margin-left: 8px;
    color: rgba(139, 92, 246, 0.6);
    font-size: 14px;
}

/* Component gallery search enhancement */
.component-gallery__search input {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.component-gallery__search input:focus {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: rgba(15, 23, 42, 0.7);
}

/* Category chips enhancement */
.component-chip {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.component-chip.is-active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.component-chip:not(.is-active):hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.1);
}

/* Note text enhancement */
.rich-text-note {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.1));
    border-left: 4px solid #8b5cf6;
    padding: 12px 16px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Component sidebar title */
.rich-text-components__title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}
