/* Registro de tokens tipados para animaciones nativas aceleradas */
@property --shimmer-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 100deg;
}

:root {
  /* 
  ==========================================================================
  TOKENS GLOBALES DE COLOR (OKLCH) — MODO OSCURO POR DEFECTO
  ========================================================================== 
  */

  /* Superficies y estructura (Grafito cálido) */
  --bg-color: oklch(15.5% 0.008 50);
  --surface-color: oklch(18.5% 0.012 50);
  --surface-2: oklch(22.5% 0.016 50);
  --border-color: oklch(34% 0.018 50 / 0.45);
  --border-subtle: oklch(27% 0.012 50 / 0.4);

  /* Acento PRIMARIO — Cobre Cálido */
  --accent: oklch(68% 0.19 45);
  --accent-contrast: oklch(14% 0.02 45);
  --accent-dim: oklch(68% 0.19 45 / 0.2);
  --accent-glow: oklch(68% 0.19 45 / 0.35);
  --accent-subtle: oklch(68% 0.19 45 / 0.1);

  /* Acento SECUNDARIO — Ámbar Solar */
  --accent-secondary: oklch(77% 0.16 75);
  --accent-secondary-contrast: oklch(16% 0.02 75);
  --accent-secondary-subtle: oklch(77% 0.16 75 / 0.12);

  /* Acento TERCIARIO — Coral profundo */
  --accent-tertiary: oklch(70% 0.17 15);
  --accent-tertiary-subtle: oklch(70% 0.17 15 / 0.12);

  /* Acento CUATERNARIO — Cian Técnico */
  --accent-quaternary: oklch(75% 0.12 205);
  --accent-quaternary-subtle: oklch(75% 0.12 205 / 0.12);

  /* Semáforos / Estados */
  --status-ok: oklch(73% 0.17 145);
  --status-ok-dim: oklch(73% 0.17 145 / 0.22);
  --mac-dot-red: oklch(63% 0.21 28);
  --mac-dot-red-glow: oklch(63% 0.21 28 / 0.35);
  --mac-dot-yellow: oklch(79% 0.17 85);
  --mac-dot-yellow-glow: oklch(79% 0.17 85 / 0.35);
  --mac-dot-green: oklch(74% 0.18 145);
  --mac-dot-green-glow: oklch(74% 0.18 145 / 0.35);

  /* Tipografías */
  --text-main: oklch(95% 0.008 50);
  --text-muted: oklch(72% 0.015 50);

  /* Chrome, barras y sombras */
  --header-footer-bg: oklch(18% 0.01 50 / 0.7);
  --nav-bg: var(--header-footer-bg);
  --footer-bg: var(--header-footer-bg);
  --backdrop-color: oklch(10% 0.01 50 / 0.7);
  --shadow-color: oklch(8% 0.01 50 / 0.5);

  /* Red de fondo animada */
  --star-color-1: oklch(85% 0.02 50);
  --star-color-2: oklch(75% 0.12 205);
  --star-color-3: oklch(77% 0.16 75);
  --star-color-4: oklch(70% 0.17 15);
  --star-color-5: oklch(68% 0.19 45);

  /* Fuentes */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

:root {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;

  /* Superficies y estructura */
  --bg-color: oklch(98.2% 0.004 50);
  --surface-color: oklch(100% 0 0);
  --surface-2: oklch(95.5% 0.006 50);
  --border-color: oklch(35% 0.015 50 / 0.12);
  --border-subtle: oklch(35% 0.015 50 / 0.06);

  /* Acento PRIMARIO — Cobre Intenso */
  --accent: oklch(69.822% 0.15359 21.798);
  --accent-contrast: oklch(99% 0 0);
  --accent-dim: oklch(52% 0.17 42 / 0.12);
  --accent-glow: oklch(52% 0.17 42 / 0.2);
  --accent-subtle: oklch(52% 0.17 42 / 0.07);

  /* Acento SECUNDARIO — Ocre Dorado */
  --accent-secondary: oklch(56% 0.15 72);
  --accent-secondary-contrast: oklch(99% 0 0);
  --accent-secondary-subtle: oklch(56% 0.15 72 / 0.1);

  /* Acento TERCIARIO — Carmín Suave */
  --accent-tertiary: oklch(54% 0.17 15);
  --accent-tertiary-subtle: oklch(54% 0.17 15 / 0.1);

  /* Acento CUATERNARIO — Azul Petróleo */
  --accent-quaternary: oklch(50% 0.13 210);
  --accent-quaternary-subtle: oklch(50% 0.13 210 / 0.1);

  /* Semáforos / Estados */
  --status-ok: oklch(48% 0.15 145);
  --status-ok-dim: oklch(48% 0.15 145 / 0.14);
  --mac-dot-red: oklch(56% 0.2 28);
  --mac-dot-red-glow: oklch(56% 0.2 28 / 0.2);
  --mac-dot-yellow: oklch(56.175% 0.2605 326.673);
  --mac-dot-yellow-glow: oklch(68% 0.15 85 / 0.2);
  --mac-dot-green: oklch(52% 0.16 145);
  --mac-dot-green-glow: oklch(52% 0.16 145 / 0.2);

  /* Tipografías */
  --text-main: oklch(22% 0.015 50);
  --text-muted: oklch(48% 0.018 50);

  /* Header y Footer en Rojo Semi Transparente */
  --header-footer-bg: oklch(50% 0.22 25 / 0.58);
  --nav-bg: var(--header-footer-bg);
  --footer-bg: var(--header-footer-bg);
  --backdrop-color: oklch(20% 0.01 50 / 0.35);
  --shadow-color: oklch(25% 0.015 50 / 0.08);

  /* Constelación / Estrellas en BLANCO */
  --star-color-1: oklch(100% 0 0);
  --star-color-2: oklch(98% 0.005 50);
  --star-color-3: oklch(100% 0 0);
  --star-color-4: oklch(96% 0.01 25);
  --star-color-5: oklch(100% 0 0);

  /* Fuentes heredadas */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

/* Transición fluida al alternar entre temas */
body,
header,
footer,
.status-panel,
.feature-card,
.pipeline-step,
.login-card {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

section[id],
main[id] {
  scroll-margin-top: 5.5rem;
}

#hero {
  scroll-margin-top: 2rem;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Canvas de fondo */
#netCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Barra de navegación */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem clamp(1.5rem, 4vw, 4rem);
  background: var(--nav-bg);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-main);

  & .logo-accent {
    color: var(--accent);
  }
}

.menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;

  & span {
    width: 26px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
  }

  &:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
}

/* Menú lateral modal (<dialog>) */
.sidebar-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 100vw);
  height: 100%;
  max-height: 100dvh;
  border: none;
  border-left: 1px solid var(--border-color);
  background: var(--surface-color);
  padding: 2.5rem 1.75rem;
  box-shadow: -8px 0 32px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  translate: 100% 0;
  transition: translate 0.3s cubic-bezier(0.4, 0, 0.2, 1), display 0.3s allow-discrete, overlay 0.3s allow-discrete;

  &[open] {
    translate: 0 0;
  }

  &::backdrop {
    background: var(--backdrop-color);
    backdrop-filter: blur(4px);
  }

  & .close-btn {
    align-self: flex-end;
    background: transparent;
    border: none;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;

    &:hover {
      color: var(--text-main);
    }
  }

  & .sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

    & a {
      color: var(--text-main);
      text-decoration: none;
      font-weight: 500;
      font-size: 1.15rem;
      transition: color 0.2s;

      &:hover {
        color: var(--accent);
      }
    }

    & .login-highlight {
      margin-top: 1rem;
      padding: 0.85rem;
      background: var(--accent);
      border-radius: 6px;
      text-align: center;
      color: var(--accent-contrast);
      font-weight: 600;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
  }
}

/* Contenedor principal */
.container {
  max-width: 1480px;
  width: 100%;
  margin-inline: auto;
  padding: 2rem clamp(1.5rem, 4vw, 4rem) 6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

/* HERO SECTION */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(3rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(82dvh - 5.5rem);
  padding-block: clamp(2rem, 3.5vw, 4rem);
}

.hero-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 72ch;
}

.eyebrow-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--status-ok);
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-ok);
  box-shadow: 0 0 0 0 var(--status-ok-dim);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--status-ok-dim); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.title-app {
  width: 100%;
  text-align: left;
  margin-bottom: 1.75rem;
}

/* Título interactivo con reflejo y pulsación */
.animated-title {
  display: inline-block;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7.5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  background: linear-gradient(
    var(--shimmer-angle),
    var(--text-main) 30%,
    var(--accent) 50%,
    var(--text-main) 70%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    title-reveal 0.9s cubic-bezier(0.65, 0, 0.35, 1) both,
    title-shimmer 6s linear infinite;
  transition: transform 0.15s ease;

  &:active {
    transform: scale(0.97);
  }

  &.is-pulsing {
    animation:
      title-shimmer 6s linear infinite,
      title-pulse 0.65s cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
  }
}

@keyframes title-reveal {
  0% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0% 0 0); }
}

@keyframes title-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes title-pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 transparent);
  }
  40% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 20px var(--accent-glow));
  }
  75% {
    transform: scale(0.985);
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 transparent);
  }
}

.subtitle {
  color: var(--text-muted);
  font-size: clamp(1.15rem, 1.35vw, 1.3rem);
  line-height: 1.7;
  max-width: 62ch;
  margin-bottom: 2.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 1.85rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;

  &:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid var(--accent);

  &:hover {
    transform: translateY(-2px);
    background-color: color-mix(in oklch, var(--accent) 85%, white);
  }
}

.btn-ghost {
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background: var(--surface-color);

  &:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

/* STATUS PANEL */
.status-panel {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px var(--shadow-color);
}

.status-panel-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.4rem;
  background-color: var(--surface-2);
  border-bottom: 1px solid var(--border-color);

  & .dot-group {
    display: flex;
    align-items: center;
    gap: 7px;

    & span {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      display: inline-block;

      &:nth-child(1) {
        background-color: var(--mac-dot-red);
        box-shadow: 0 0 8px var(--mac-dot-red-glow);
      }

      &:nth-child(2) {
        background-color: var(--mac-dot-yellow);
        box-shadow: 0 0 8px var(--mac-dot-yellow-glow);
      }

      &:nth-child(3) {
        background-color: var(--mac-dot-green);
        box-shadow: 0 0 8px var(--mac-dot-green-glow);
      }
    }
  }

  & .panel-title {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
  }
}

.scan-frame {
  position: relative;
  margin: 1.5rem 1.6rem 0;
  height: 160px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 50%, var(--accent-subtle), transparent 75%);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.scan-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--accent);

  &.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
  &.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
  &.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
  &.br { bottom: 0; right: 0; border-left: none; border-top: none; }
}

.scan-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan-sweep 2.6s ease-in-out infinite;
}

@keyframes scan-sweep {
  0%, 100% { top: 6%; opacity: 0.9; }
  50% { top: 92%; opacity: 0.4; }
}

.status-metrics {
  list-style: none;
  padding: 1.5rem 1.6rem;
  display: flex;
  gap: 1.5rem;

  &.status-metrics-compact {
    flex-direction: row;
    justify-content: space-between;
    padding-bottom: 1rem;

    & li {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.35rem;
    }
  }

  & li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
  }
}

.metric-label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-quaternary);
  white-space: nowrap;
}

/* Feed en vivo */
.access-feed {
  list-style: none;
  border-top: 1px solid var(--border-color);
  padding: 1.1rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 225px;
  contain: layout;

  & li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.92rem;
    color: var(--text-muted);
    min-height: 32px;
  }

  & .feed-tag {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--accent-quaternary);
    border: 1px solid var(--accent-quaternary-subtle);
    background: var(--accent-quaternary-subtle);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    white-space: nowrap;
    line-height: 1;
  }

  & .feed-detail {
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  & .feed-score {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--status-ok);
    white-space: nowrap;
    text-align: right;
  }
}

/* SECCIONES: PILARES Y PIPELINE */
.pillars-section,
.pipeline-section {
  display: flex;
  flex-direction: column;
  gap: 3rem;

  & .section-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    & .eyebrow-status {
      margin-bottom: 0.25rem;
    }

    & .section-heading {
      font-family: var(--font-display);
      font-size: clamp(2rem, 3.6vw, 2.75rem);
      font-weight: 700;
      letter-spacing: -0.025em;
    }

    & .section-lead {
      color: var(--text-muted);
      font-size: clamp(1.1rem, 1.25vw, 1.25rem);
      max-width: 70ch;
      line-height: 1.65;
    }
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  position: relative;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, var(--accent-secondary-subtle), transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  &:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    box-shadow: 0 16px 36px var(--shadow-color);

    &::before {
      opacity: 1;
    }

    & .feature-icon-wrapper {
      background-color: var(--accent-secondary);
      color: var(--accent-secondary-contrast);
      border-color: var(--accent-secondary);
      transform: scale(1.06);
    }
  }

  & .feature-icon-wrapper {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background-color: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--accent-secondary);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;

    & .material-symbols-outlined {
      font-size: 30px;
      user-select: none;
    }
  }

  & .feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;

    & h3 {
      font-family: var(--font-display);
      font-size: 1.3rem;
      font-weight: 600;
      color: var(--text-main);
      letter-spacing: -0.015em;
    }

    & p {
      color: var(--text-muted);
      font-size: 1.02rem;
      line-height: 1.65;
    }
  }

  & .feature-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);

    & code {
      font-family: var(--font-mono);
      font-size: 0.78rem;
      font-weight: 500;
      color: var(--status-ok);
      letter-spacing: 0.05em;
    }
  }
}

/* SECCIÓN PIPELINE */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.pipeline-step {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;

  & .step-num {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-tertiary);
    opacity: 0.9;
  }

  & h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-main);
  }

  & p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* ---------- SECCIÓN LOGIN ---------- */
.login-section {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;

  & .section-header {
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    & .section-heading {
      font-family: var(--font-display);
      font-size: clamp(2rem, 3.6vw, 2.75rem);
      font-weight: 700;
      letter-spacing: -0.025em;
    }

    & .section-lead {
      color: var(--text-muted);
      font-size: clamp(1.1rem, 1.25vw, 1.25rem);
      max-width: 60ch;
      line-height: 1.65;
    }
  }
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface-color);
  border: 1px solid color-mix(in oklch, var(--accent) 45%, var(--border-color));
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 20px 50px var(--shadow-color),
    0 0 20px var(--accent-subtle),
    0 0 40px oklch(from var(--accent) l c h / 0.15);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;

  &:hover {
    border-color: var(--accent);
    box-shadow:
      0 25px 60px var(--shadow-color),
      0 0 25px var(--accent-glow),
      0 0 50px var(--accent-dim);
  }
}

.login-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.4rem;
  background-color: var(--surface-2);
  border-bottom: 1px solid var(--border-color);

  & .login-card-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
  }
}

.login-form {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;

  & .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 20px;
    pointer-events: none;
    transition: color 0.2s ease;
  }

  &:focus-within .input-icon {
    color: var(--accent);
  }
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;

  &::placeholder {
    color: color-mix(in oklch, var(--text-muted) 55%, transparent);
  }

  &:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
  }
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;

  & .btn-submit {
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    cursor: pointer;
    border: none;
    font-size: 1rem;
  }

  & .auth-footnote {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
  }
}

/* PIE DE PÁGINA */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--footer-bg);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem clamp(1.5rem, 4vw, 4rem);
  margin-top: auto;
}

.footer-content {
  max-width: 1480px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;

  & p {
    color: var(--text-muted);
    font-size: 0.95rem;
  }
}

.footer-links {
  display: flex;
  gap: 1.75rem;

  & a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;

    &:hover {
      color: var(--text-main);
    }
  }
}

/* Ajustes de contraste para header y footer en modo claro */
html[data-theme="light"] .navbar .logo,
html[data-theme="light"] .navbar .menu-btn span,
html[data-theme="light"] .footer-content p,
html[data-theme="light"] .footer-links a {
  color: oklch(99% 0 0);
}

html[data-theme="light"] .navbar .logo-accent {
  color: oklch(90% 0.12 85);
}

html[data-theme="light"] .footer-links a:hover {
  color: oklch(90% 0.12 85);
}

/* RESPONSIVIDAD */
@media (width <= 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    min-height: auto;
  }
}

@media (width >= 1600px) {
  .container {
    max-width: 1600px;
  }

  .features-grid {
    gap: 2.25rem;
  }
}

/* Color de acento e icono para la vista de registros */
.nav-item[data-view="records"] {
  --item-accent: var(--accent-secondary);
}

#view-records {
  --view-accent: var(--accent-secondary);
}

/* Controles de cabecera de la tabla */
.records-header {
  flex-wrap: wrap;
  gap: 1rem;
}

.records-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.records-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;

  & .material-symbols-outlined {
    font-size: 18px;
    color: var(--text-muted);
  }

  & input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.85rem;
    width: 200px;
  }
}

.records-body {
  padding: 0;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

/* Tabla semántica con estilos limpios */
.records-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;

  & th {
    padding: 0.9rem 1.25rem;
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
  }

  & td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    vertical-align: middle;
  }

  & tbody tr {
    transition: background-color 0.15s ease;

    &:hover {
      background: color-mix(in oklch, var(--surface-2) 65%, transparent);
    }

    &:last-child td {
      border-bottom: none;
    }
  }
}

.record-user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  font-weight: 500;
}

.record-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--view-accent) 15%, transparent);
  color: var(--view-accent);
  display: grid;
  place-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.record-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.th-actions {
  text-align: right;
}

.records-table td:last-child {
  text-align: right;
}

.btn-icon-danger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: color 0.18s ease, background-color 0.18s ease;

  &:hover {
    color: var(--mac-dot-red);
    background: color-mix(in oklch, var(--mac-dot-red) 12%, transparent);
  }
}

.records-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}