:root {
  --cream: #fbf6f2;
  --surface: #fffdfb;
  --surface-soft: #fdf7f4;
  --ink: #37222c;
  --ink-soft: #5c4650;
  --muted: #8d7480;
  --line: #eedfdd;
  --line-strong: #e3cdcd;
  --rose: #c5718e;
  --rose-strong: #a84768;
  --rose-deep: #7e3351;
  --blush: #f9e8ec;
  --blush-strong: #f3d7de;
  --peach: #f8e7d8;
  --gold: #c7a165;
  --gold-soft: #f8eeda;
  --sage: #64836c;
  --sage-soft: #eaf2eb;
  --amber: #a9772a;
  --amber-soft: #fbf0d9;
  --danger: #b44856;
  --danger-soft: #fbe6e8;
  --lilac: #8a75a8;
  --lilac-soft: #f1ecf8;
  --shadow-sm: 0 2px 10px rgba(80, 44, 57, 0.05);
  --shadow: 0 24px 60px -32px rgba(92, 46, 63, 0.32);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 560px at 6% -8%, #fdeff2 0%, rgba(253, 239, 242, 0) 58%),
    radial-gradient(900px 520px at 102% -2%, #f8ecd9 0%, rgba(248, 236, 217, 0) 52%),
    radial-gradient(700px 600px at 50% 118%, #f6e7ee 0%, rgba(246, 231, 238, 0) 62%),
    var(--cream);
  background-attachment: fixed;
}

img,
svg {
  display: block;
}

a {
  color: var(--rose-deep);
  text-decoration: none;
}

a:hover {
  color: var(--rose-strong);
}

p {
  margin: 0;
}

::selection {
  background: var(--blush-strong);
  color: var(--rose-deep);
}

:focus-visible {
  outline: 3px solid rgba(197, 113, 142, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 100;
  background: var(--rose-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.skip-link:focus {
  left: 16px;
  color: #fff;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ── Barra superior ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 251, 248, 0.82);
  border-bottom: 1px solid rgba(227, 205, 205, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff9f7;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 10px 22px -12px rgba(126, 51, 81, 0.8);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.72);
  border: 1px solid var(--line);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link:hover {
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

.nav-link.active {
  background: var(--blush);
  color: var(--rose-deep);
}

main.container {
  padding-top: 34px;
  padding-bottom: 70px;
}

/* ── Mensajes flash ─────────────────────────────────────────────── */

.flashes {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.flash {
  position: relative;
  padding: 13px 18px 13px 46px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.flash::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--muted);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.65);
}

.flash.success {
  background: var(--sage-soft);
  border-color: #cfe3d4;
  color: #3d6146;
}

.flash.success::before {
  background: var(--sage);
}

.flash.error {
  background: var(--danger-soft);
  border-color: #f0c6cb;
  color: var(--danger);
}

.flash.error::before {
  background: var(--danger);
}

.flash.warning {
  background: var(--amber-soft);
  border-color: #edd9b8;
  color: #7a5c2e;
}

.flash.warning::before {
  background: var(--amber);
}

.flash.info {
  background: var(--lilac-soft);
  border-color: #ddd3ec;
  color: #5f4d80;
}

.flash.info::before {
  background: var(--lilac);
}

/* ── Hero del panel ─────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(210px, 0.6fr);
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(30px, 5vw, 56px);
  border-radius: var(--radius-xl);
  border: 1px solid #f0dcd8;
  background:
    linear-gradient(135deg, #fffaf7 0%, #fbeef0 55%, #f7e6dc 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -110px;
  top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 113, 142, 0.22), rgba(197, 113, 142, 0) 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  left: -120px;
  bottom: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 161, 101, 0.22), rgba(199, 161, 101, 0) 70%);
  pointer-events: none;
}

.hero--found {
  background: linear-gradient(135deg, #fffaf2 0%, #f9ece9 48%, #f4dfd6 100%);
  border-color: #ecd3c9;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--rose-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero h1 em {
  color: var(--rose-strong);
  font-style: italic;
  font-weight: 400;
}

.hero-text {
  max-width: 48ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-actions form {
  margin: 0;
}

.hero-aside {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.status-disc {
  position: relative;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  padding: 20px;
  background: rgba(255, 253, 251, 0.78);
  border: 1px solid #eed7da;
  box-shadow:
    inset 0 0 0 11px rgba(255, 255, 255, 0.62),
    0 26px 55px -30px rgba(126, 51, 81, 0.45);
  backdrop-filter: blur(6px);
}

.status-disc::before {
  content: "";
  position: absolute;
  inset: -13px;
  border-radius: 50%;
  border: 1px dashed rgba(168, 71, 104, 0.28);
}

.status-disc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 8px;
  background: var(--sage);
  box-shadow: 0 0 0 0 rgba(100, 131, 108, 0.5);
  animation: pulse 2.4s infinite;
}

.status-disc-label {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
}

.status-disc-sub {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-disc--paused .status-disc-dot {
  background: var(--muted);
  animation: none;
}

.status-disc--found {
  background: linear-gradient(160deg, rgba(255, 250, 242, 0.95), rgba(249, 232, 236, 0.95));
  border-color: #e8cdc2;
}

.status-disc--found .status-disc-dot {
  background: var(--gold);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(100, 131, 108, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(100, 131, 108, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(100, 131, 108, 0);
  }
}

.live-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.82);
  box-shadow: var(--shadow-sm);
}

.live-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 0 rgba(100, 131, 108, 0.5);
  animation: pulse 2.4s infinite;
}

.live-status strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
}

.live-status span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.live-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.76rem;
}

.live-meta b {
  color: var(--ink-soft);
  font-weight: 800;
}

.live-strip--paused .live-dot {
  background: var(--muted);
  animation: none;
}

/* ── Botones ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-strong) 100%);
  box-shadow: 0 14px 26px -14px rgba(168, 71, 104, 0.75);
}

.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #bb6483 0%, #963d5d 100%);
  box-shadow: 0 18px 30px -14px rgba(168, 71, 104, 0.8);
}

.btn-secondary {
  background: rgba(255, 253, 251, 0.9);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn-secondary:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
  background: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: rgba(255, 253, 251, 0.8);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: #f0c6cb;
  color: var(--danger);
}

.btn-danger:hover {
  background: #f9dade;
  color: #9a3542;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.82rem;
}

/* ── Métricas ───────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.stat {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.stat::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(197, 113, 142, 0.35), transparent);
}

.stat:nth-child(2) {
  animation-delay: 0.04s;
}

.stat:nth-child(3) {
  animation-delay: 0.08s;
}

.stat:nth-child(4) {
  animation-delay: 0.12s;
}

.stat-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--blush);
  color: var(--rose-strong);
}

.stat-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-icon--sage {
  background: var(--sage-soft);
  color: var(--sage);
}

.stat-icon--gold {
  background: var(--gold-soft);
  color: var(--amber);
}

.stat-icon--lilac {
  background: var(--lilac-soft);
  color: var(--lilac);
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-sub {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.stat .chip {
  margin-top: 6px;
}

/* ── Chips ──────────────────────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.chip--ok {
  background: var(--sage-soft);
  color: var(--sage);
}

.chip--warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.chip--bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip--rose {
  background: var(--blush);
  color: var(--rose-strong);
}

.chip--lilac {
  background: var(--lilac-soft);
  color: var(--lilac);
}

/* ── Secciones ──────────────────────────────────────────────────── */

.section {
  margin-top: 42px;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: 0.08s;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.section-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-link {
  flex: none;
  color: var(--rose-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

.section-link:hover {
  color: var(--rose-deep);
}

/* ── Tarjetas de URL ────────────────────────────────────────────── */

.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.target-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.target-card:hover {
  transform: translateY(-2px);
  border-color: #e8cfd4;
  box-shadow: var(--shadow);
}

.target-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.target-label {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
}

.target-url {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-all;
}

.target-url:hover {
  color: var(--rose-strong);
}

.target-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

.target-error {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* ── Timeline de hallazgos ──────────────────────────────────────── */

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, var(--blush-strong), rgba(243, 215, 222, 0));
}

.timeline-item {
  position: relative;
  padding: 0 0 18px 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid var(--rose);
  background: var(--surface);
  box-shadow: inset 0 0 0 4px var(--blush);
}

.timeline-body {
  padding: 15px 17px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-term {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.timeline-link {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.83rem;
  word-break: break-all;
}

.timeline-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

/* ── Lista de revisiones ────────────────────────────────────────── */

.check-list {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.check-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto 46px;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

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

.check-row:hover {
  background: #fffaf9;
}

.check-time {
  color: var(--muted);
  font-size: 0.78rem;
}

.check-url {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-url:hover {
  color: var(--rose-strong);
}

.check-term {
  margin-top: 2px;
  color: var(--rose-strong);
  font-size: 0.74rem;
}

.check-http {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
}

/* ── Estados vacíos ─────────────────────────────────────────────── */

.empty-state {
  padding: 46px 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  background: linear-gradient(180deg, #fffdfb 0%, #fdf7f4 100%);
  text-align: center;
}

.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blush);
  color: var(--rose-strong);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.empty-text {
  max-width: 46ch;
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Cabecera de páginas internas ───────────────────────────────── */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 6px 0 26px;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--rose-strong);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.page-eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.page-sub {
  max-width: 62ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-actions form {
  margin: 0;
}

/* ── Configuración ──────────────────────────────────────────────── */

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-section {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.settings-section:nth-child(2) {
  animation-delay: 0.04s;
}

.settings-section:nth-child(3) {
  animation-delay: 0.08s;
}

.settings-section:nth-child(4) {
  animation-delay: 0.12s;
}

.settings-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.settings-section-num {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blush);
  color: var(--rose-strong);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
}

.settings-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.settings-section-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.87rem;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fffbfa;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field textarea {
  min-height: 122px;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(197, 113, 142, 0.14);
}

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

.help {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.help code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--rose-deep);
  font-size: 0.9em;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.channel-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fffbfa;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.channel-option:hover {
  border-color: #e2c3cc;
  transform: translateY(-1px);
}

.channel-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.channel-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.channel-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.channel-copy strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}

.channel-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.channel-check {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: auto;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.channel-check::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.16s ease;
}

.channel-option:has(input:checked) {
  border-color: var(--rose);
  background: linear-gradient(180deg, #fffafb, #fdf1f4);
  box-shadow: 0 0 0 3px rgba(197, 113, 142, 0.1);
}

.channel-option:has(input:checked) .channel-icon {
  background: var(--blush);
  border-color: var(--blush-strong);
  color: var(--rose-strong);
}

.channel-option:has(input:checked) .channel-check {
  background: var(--rose-strong);
  border-color: var(--rose-strong);
}

.channel-option:has(input:checked) .channel-check::after {
  transform: scale(1);
}

.channel-option:has(input:focus-visible) {
  outline: 3px solid rgba(197, 113, 142, 0.3);
  outline-offset: 2px;
}

.env-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #edd9b8;
  border-radius: var(--radius-md);
  background: var(--gold-soft);
  color: #7a5c2e;
  font-size: 0.82rem;
  line-height: 1.5;
}

.env-note svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.env-note strong {
  display: block;
  margin-bottom: 2px;
  color: #65491f;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 2px 0;
}

.form-footer-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.test-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 22px 26px;
  border: 1px solid #e8d6cf;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fffaf7, #fdf1f1);
  box-shadow: var(--shadow-sm);
}

.test-card-copy {
  max-width: 64ch;
}

.test-card-copy .page-eyebrow {
  margin-bottom: 4px;
}

.test-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.test-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.test-card-actions form {
  margin: 0;
}

/* ── Tienda incrustada ──────────────────────────────────────────── */

.store-frame {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.store-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fdf8f6, #fbf3f0);
}

.store-dots {
  display: flex;
  gap: 5px;
  flex: none;
}

.store-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blush-strong);
}

.store-dots span:first-child {
  background: #e7b6c2;
}

.store-dots span:nth-child(2) {
  background: #e9cfa6;
}

.store-dots span:nth-child(3) {
  background: #bfd6c4;
}

.store-domain {
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-open {
  flex: none;
  color: var(--rose-strong);
  font-size: 0.76rem;
  font-weight: 800;
}

.store-preview {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fdf1f4, #f7e6dc);
}

.store-preview img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.store-preview:hover img {
  transform: scale(1.015);
}

.store-preview-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(55, 34, 44, 0) 52%, rgba(55, 34, 44, 0.62) 100%);
}

.store-preview-cta {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.94);
  color: var(--rose-deep);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 10px 24px -12px rgba(40, 20, 28, 0.5);
  backdrop-filter: blur(6px);
}

.store-preview:hover .store-preview-cta {
  background: #ffffff;
  color: var(--rose-strong);
}

.store-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

/* ── Resumen de historial ───────────────────────────────────────── */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.summary-card {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.summary-card:nth-child(2) {
  animation-delay: 0.04s;
}

.summary-card:nth-child(3) {
  animation-delay: 0.08s;
}

.summary-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.summary-label {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Tablas ─────────────────────────────────────────────────────── */

.table-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 0.87rem;
}

th {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: #fdf8f6;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: #fffaf9;
}

.url-cell {
  max-width: 360px;
  word-break: break-all;
}

.cell-title {
  color: var(--ink);
  font-weight: 800;
}

.cell-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

/* ── Paginación ─────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.page-link:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
  text-decoration: none;
}

.page-status {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Pie ────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid rgba(227, 205, 205, 0.8);
  padding: 24px 0 30px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.footer-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blush);
  color: var(--rose-strong);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
}

.footer-note {
  color: #a38c96;
}

/* ── Animación ──────────────────────────────────────────────────── */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    order: -1;
    justify-items: center;
  }

  .status-disc {
    width: 148px;
    height: 148px;
    padding: 14px;
  }

  .status-disc-label {
    font-size: 1.05rem;
  }

  .status-disc-sub {
    font-size: 0.66rem;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand {
    align-self: flex-start;
  }

  .nav {
    width: 100%;
    gap: 3px;
  }

  .nav-link {
    flex: 1;
    justify-content: center;
    padding: 9px 8px;
    font-size: 0.78rem;
  }

  .nav-link svg {
    width: 15px;
    height: 15px;
  }

  .hero {
    padding: 26px 22px;
  }

  .live-strip {
    align-items: flex-start;
    border-radius: 18px;
    padding: 14px 16px;
  }

  .live-meta {
    gap: 10px 16px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions form,
  .hero-actions .btn {
    width: 100%;
  }

  .hero-actions .btn {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.84rem;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .check-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 13px 16px;
  }

  .check-time {
    grid-column: 1 / -1;
  }

  .check-url {
    white-space: normal;
    word-break: break-all;
  }

  .check-http {
    display: none;
  }

  .store-domain {
    text-align: left;
  }

  .store-preview-cta {
    left: 12px;
    bottom: 12px;
    padding: 8px 14px;
    font-size: 0.76rem;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-value {
    font-size: 1.5rem;
  }

  .settings-section {
    padding: 20px;
  }
}

@media (max-width: 540px) {
  .container {
    padding: 0 16px;
  }

  .nav-link {
    gap: 0;
    padding: 9px 6px;
    font-size: 0.73rem;
  }

  .nav-link svg {
    display: none;
  }

  main.container {
    padding-top: 22px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: stretch;
  }

  .page-actions,
  .page-actions form,
  .page-actions .btn,
  .test-card-actions,
  .test-card-actions form,
  .test-card-actions .btn {
    width: 100%;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .timeline-item {
    padding-left: 28px;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-dot {
    width: 17px;
    height: 17px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@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;
  }
}
