/* PetLink · estilos de la app. Los valores salen de tokens.css. */

/* ---------- Fuentes (alojadas en el servidor, licencia SIL OFL) ---------- */
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-800.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-500.woff2') format('woff2'); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; background: var(--cloud); color: var(--ink);
  font: 400 15px/1.45 var(--font-sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--cobalt); transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--cobalt-hover); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.icon { flex-shrink: 0; display: block; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sky-border); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Transiciones entre páginas (5.1) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out var(--dur-page) var(--ease) both; }
::view-transition-new(root) { animation: vt-in var(--dur-page) var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(calc(var(--shift) * -0.5)); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(var(--shift)); } }
/* Navegadores sin View Transitions: el contenido entra con un fundido al cargar */
.no-vt .page-enter { animation: vt-in var(--dur-page) var(--ease) both; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(var(--shift)); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Filas de listas y tablas aparecen en fundido */
.fade-rows > * { animation: fade-in var(--dur) var(--ease) both; }

/* Carga suave: skeleton para imágenes y spinner para botones */
.skeleton {
  background: linear-gradient(90deg, var(--line) 25%, var(--cloud) 50%, var(--line) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.img-fade { opacity: 0; transition: opacity var(--dur-page) var(--ease); }
.img-fade.is-loaded { opacity: 1; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor;
  border-right-color: transparent; animation: spin 0.8s linear infinite; display: inline-block;
}
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading .icon { display: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: var(--r-pill);
  font: 700 15px/1.2 var(--font-sans); text-decoration: none; text-align: center; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--cobalt); color: var(--white); box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--cobalt-hover); color: var(--white); }
.btn-soft { background: var(--sky); color: var(--cobalt-hover); font-weight: 600; }
.btn-soft:hover { background: var(--sky-hover); color: var(--cobalt-hover); }
.btn-outline { background: var(--white); color: var(--ink); border: 1px solid var(--border); font-weight: 600; }
.btn-outline:hover { background: var(--cloud); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); font-weight: 600; }
.btn-dark:hover { background: #1B2150; color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-white:hover { background: var(--sky); color: var(--ink); }
.btn-danger { background: var(--alert); color: var(--white); }
.btn-danger:hover { background: var(--alert-text); color: var(--white); }
.btn-danger-soft { background: var(--alert-bg); color: var(--alert-text); }
.btn-danger-soft:hover { background: #FFDCDF; color: var(--alert-text); }
.btn-danger-outline { background: var(--white); color: var(--alert-text); border: 1px solid var(--alert-border); font-weight: 600; }
.btn-danger-outline:hover { background: var(--alert-bg); color: var(--alert-text); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: var(--success-text); color: var(--white); }
.btn-ghost { background: transparent; color: var(--muted); font-weight: 600; }
.btn-ghost:hover { color: var(--ink); }
.btn-link { min-height: 44px; padding: 0; background: none; border: 0; color: var(--cobalt); font: 700 14px var(--font-sans); display: inline-flex; align-items: center; text-decoration: none; }
.btn-link:hover { color: var(--cobalt-hover); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 24px; font-size: 16px; }
.btn-xl { min-height: 60px; padding: 0 18px; font-size: 17px; }
@media (max-width: 400px) { .btn-xl { font-size: 16px; gap: 8px; } }
.btn-block { width: 100%; white-space: normal; padding-top: 8px; padding-bottom: 8px; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Chips y etiquetas ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.chip-sm { height: 24px; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.chip-success { background: var(--success-bg); color: var(--success-text); }
.chip-success .dot { background: var(--success); }
.chip-alert { background: var(--alert-bg); color: var(--alert-text); }
.chip-sky { background: var(--sky); color: var(--cobalt-hover); }
.chip-premium { background: var(--premium-bg); color: var(--premium-text); }
.chip-muted { background: var(--line); color: var(--text-soft); }
.chip-off { background: var(--cloud); color: #8A93A3; }
.chip-off .dot { background: var(--faint); }
.chip-white { background: var(--white); color: var(--success-text); }
.chip-white .dot { background: var(--success); }
.lock { height: 26px; padding: 0 10px; gap: 5px; }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--alert);
  color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.code-pill {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--cloud); font: 400 12px var(--font-mono); color: var(--muted);
}
.num {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--sky); color: var(--cobalt-hover);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}
.avatar {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--sky); color: var(--cobalt-hover);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; text-decoration: none;
}

/* ---------- Tarjetas ---------- */
.card { background: var(--white); border-radius: var(--r-card); padding: 20px; }
.card-title { font-size: 17px; font-weight: 700; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g10 { gap: 10px; } .g12 { gap: 12px; }
.g14 { gap: 14px; } .g16 { gap: 16px; } .g18 { gap: 18px; } .g20 { gap: 20px; } .g24 { gap: 24px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; align-items: center; }
.divider { height: 1px; background: var(--line); }
.steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text-soft); }
.notice { padding: 14px 16px; border-radius: 18px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.notice-sky { background: var(--sky); color: var(--cobalt-hover); }
.notice-success { background: var(--success-bg); color: var(--success-text); font-weight: 600; align-items: center; }
.notice-alert { background: var(--alert-bg); color: var(--alert-text); align-items: center; }
.notice-warning { background: var(--warning-bg); color: var(--warning-text); font-size: 13px; }
.notice-premium { background: var(--peach-soft); border: 1px solid var(--peach); color: var(--text-soft); font-size: 13px; align-items: center; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .label { font-size: 14px; font-weight: 600; }
.label-note { font-weight: 500; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--r-field);
  background: var(--white); font: 400 16px var(--font-sans); color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.select { padding: 0 12px; }
.textarea { padding: 12px 16px; line-height: 1.5; resize: vertical; min-height: 96px; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--sky); }
.input-mono { font: 500 15px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.input-mono::placeholder { text-transform: none; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.field-error { font-size: 13px; color: var(--alert-text); font-weight: 600; }
.is-invalid { border-color: var(--alert) !important; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.search { position: relative; display: inline-flex; align-items: center; }
.search .icon { position: absolute; left: 12px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 36px; }

/* Interruptor: checkbox con apariencia de switch */
.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0; position: relative;
  width: 46px; height: 26px; border-radius: var(--r-pill); background: var(--switch-off); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
.switch::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform var(--dur-fast) var(--ease);
}
.switch:checked { background: var(--cobalt); }
.switch:checked::before { transform: translateX(20px); }
.switch:disabled { cursor: default; }
.switch-row {
  min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); cursor: pointer;
}
.switch-row:first-child { border-top: 0; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-text b { font-size: 15px; font-weight: 600; }
.switch-text small { font-size: 13px; color: var(--muted); }

/* Selector segmentado (radios) */
.seg { display: flex; flex-wrap: wrap; padding: 3px; border-radius: 12px; background: var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 9px; color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.seg input:checked + span { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(11, 16, 38, 0.10); }
.seg input:focus-visible + span { outline: 3px solid var(--sky-border); }

/* ---------- Diálogos, hojas inferiores y toasts (ui.js) ---------- */
dialog { padding: 0; border: 0; color: var(--ink); background: transparent; max-width: calc(100vw - 32px); }
dialog::backdrop { background: rgba(11, 16, 38, 0.45); }
dialog[open] { animation: dlg-in var(--dur) var(--ease) both; }
dialog[open]::backdrop { animation: fade-in var(--dur) var(--ease) both; }
dialog.is-closing { animation: dlg-out var(--dur) var(--ease) both; }
dialog.is-closing::backdrop { animation: fade-out var(--dur) var(--ease) both; }
@keyframes dlg-in { from { opacity: 0; transform: scale(var(--scale-from)); } }
@keyframes dlg-out { to { opacity: 0; transform: scale(var(--scale-from)); } }
.modal { width: 440px; }
.modal-body {
  background: var(--white); border-radius: var(--r-card-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-pop);
}
.modal-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
/* Fichas del admin (placa, cliente, aviso): modal más ancho que se desplaza por dentro */
/* Un solo scroll: el del contenido. El <dialog> no se desplaza ni recorta la sombra */
.modal-detail { width: 600px; max-height: none; overflow: visible; }
.modal-detail > .modal-body { max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.modal-x {
  width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--cloud); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.modal-x:hover { background: var(--line); }
.danger-row { padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.danger-row b { font-size: 14px; }

/* Hoja inferior: se desliza desde abajo */
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 480px; }
dialog.sheet[open] { animation: sheet-in var(--dur-slide) var(--ease) both; }
dialog.sheet.is-closing { animation: sheet-out var(--dur-slide) var(--ease) both; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.sheet-body {
  background: var(--white); border-radius: 28px 28px 0 0; padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}
.sheet-handle { align-self: center; width: 40px; height: 5px; border-radius: var(--r-pill); background: var(--border); }
@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open] { animation-name: fade-in; }
  dialog.sheet.is-closing { animation-name: fade-out; }
}

.toasts {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.has-bottom-nav .toasts { bottom: 96px; }
.toast {
  pointer-events: auto; padding: 14px 16px; border-radius: 18px; background: var(--ink); color: var(--white);
  display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 600; line-height: 1.45;
  box-shadow: var(--shadow-pop); animation: toast-in var(--dur-slide) var(--ease) both;
}
.toast.is-leaving { animation: fade-out var(--dur) var(--ease) both; }
.toast-success { background: var(--success-text); }
.toast-error { background: var(--alert-text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Acordeón y paneles que se expanden ---------- */
.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.collapse > * { overflow: hidden; }
.is-open > .collapse, .collapse.is-open { grid-template-rows: 1fr; opacity: 1; }

/* Paso visible de un asistente o pestaña */
.pane { animation: rise-in var(--dur) var(--ease) both; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 12px; white-space: nowrap; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table .right { text-align: right; }
.table tr.is-selected td { background: var(--sky-row); }
.table-empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; background: var(--cobalt); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.brand-chip {
  align-self: flex-start; height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: var(--white);
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--ink); text-decoration: none;
}
.brand-chip .icon { color: var(--cobalt); }

/* ---------- Páginas públicas (mobile-first, máximo 480 px) ---------- */
.pub { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--cloud); display: flex; flex-direction: column; }
.pub-pad { padding: 20px 16px 28px; gap: 20px; }

/* ---------- Ingreso y registro ---------- */
.auth-card {
  padding: 28px 22px 24px; border-radius: 30px; background: var(--white); box-shadow: var(--shadow-float);
  display: flex; flex-direction: column; gap: 18px;
}
.auth-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.auth-foot { text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot a { font-weight: 700; }

/* ---------- Panel del dueño ---------- */
.panel-shell { min-height: 100dvh; display: flex; }
.side {
  width: 248px; flex-shrink: 0; padding: 24px 16px; background: var(--white); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
}
.side .brand { padding: 0 8px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: 600; }
.side-nav button { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; }
.side-nav a, .side-nav button {
  min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text-soft); display: flex; align-items: center;
  gap: 12px; text-decoration: none; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.side-nav a:hover, .side-nav button:hover { background: var(--cloud); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--sky); color: var(--cobalt-hover); }
.side-nav .badge { margin-left: auto; }
.side-plan { margin-top: auto; padding: 16px; border-radius: 18px; background: var(--cloud); display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.panel-main { flex: 1; min-width: 0; padding: 32px 40px 56px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.page-title { font-size: 32px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.page-sub { font-size: 15px; color: var(--muted); }
.section-title { font-size: 19px; font-weight: 700; }

.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(78px + env(safe-area-inset-bottom));
  padding: 8px 8px calc(14px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--border);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bottom-nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none;
}
.bottom-nav a[aria-current="page"] { color: var(--cobalt); font-weight: 700; }
.bottom-nav .nav-dot {
  position: absolute; top: 4px; left: calc(50% + 6px); width: 9px; height: 9px; border-radius: 50%;
  background: var(--alert); border: 2px solid var(--white);
}
.only-mobile { display: none !important; }

@media (max-width: 899px) {
  .side { display: none; }
  .bottom-nav { display: grid; }
  .panel-main { padding: 20px 16px 110px; gap: 18px; }
  .page-title { font-size: 28px; }
  .only-desktop { display: none !important; }
  .only-mobile { display: flex !important; }
}

/* Barra superior de pantallas móviles con botón «volver» */
.topbar {
  min-height: 60px; padding: 0 12px; display: flex; align-items: center; gap: 6px; background: var(--white);
  border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 700;
}
.topbar .back { width: 44px; height: 44px; border-radius: 50%; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.topbar .back:hover { background: var(--cloud); }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs span:last-child { color: var(--ink); font-weight: 600; }

/* ---------- Panel admin (menú lateral oscuro) ---------- */
.admin-shell { min-height: 100dvh; display: flex; }
.aside {
  width: 232px; flex-shrink: 0; padding: 20px 14px; background: var(--ink); color: var(--white);
  display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
}
.aside-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--white); text-decoration: none; }
.aside-brand:hover { color: var(--white); }
.aside-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
.aside-brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.aside-brand small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--admin-muted); }
.aside-nav { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 600; }
.aside-nav a {
  min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--admin-text); display: flex; align-items: center;
  gap: 12px; text-decoration: none; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.aside-nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--white); }
.aside-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.10); color: var(--white); }
.aside-nav .badge { margin-left: auto; height: 20px; font-size: 11px; }
.aside-user { margin-top: auto; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); display: flex; align-items: center; gap: 10px; }
.aside-user .avatar { width: 34px; height: 34px; background: var(--cobalt); color: var(--white); font-size: 14px; font-weight: 800; }
.aside-user b { display: block; font-size: 13px; }
.aside-user small { display: block; font-size: 12px; color: var(--admin-muted); }
.aside-user button { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--admin-text); display: flex; align-items: center; justify-content: center; }
.aside-user button:hover { background: rgba(255, 255, 255, 0.10); color: var(--white); }
.admin-main { flex: 1; min-width: 0; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 24px; }
.admin-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.admin-sub { font-size: 14px; color: var(--muted); }
.admin-bar { display: none; }
.admin-login-page { background: var(--ink); }
.admin-login { max-width: 440px; min-height: 100dvh; margin: 0 auto; padding: 28px 16px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.admin-login .aside-brand { padding: 0 4px; }
.admin-login .btn { border-radius: var(--r-pill); min-height: 56px; font-size: 16px; }
.admin-login .input { min-height: 50px; font-size: 16px; }
.admin .btn { border-radius: var(--r-admin); min-height: 42px; padding: 0 16px; font-size: 14px; box-shadow: none; }
.admin .btn-xs { min-height: 36px; }
.admin .input, .admin .select { min-height: 42px; font-size: 14px; padding: 0 14px; border-radius: var(--r-field); }
.admin .select { font-weight: 600; padding: 0 12px; border-radius: var(--r-admin); width: auto; }
.admin .field .select { width: 100%; }
.admin .search .input, .search .input { padding-left: 36px; }
.acard { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 22px; }
.acard-flush { padding: 6px 0; }
.acard h2 { font-size: 16px; font-weight: 700; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--white); border: 1px solid var(--border); }
.tabs a {
  min-height: 36px; padding: 0 14px; border-radius: 10px; color: var(--text-soft); display: inline-flex; align-items: center;
  gap: 8px; font-size: 13px; font-weight: 600; text-decoration: none; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.tabs a:hover { background: var(--cloud); color: var(--ink); }
.tabs a small { font-size: 12px; color: var(--faint); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--white); }
.tabs a[aria-current="page"] small { color: var(--admin-text); }
.drawer-overlay { display: none; }

@media (max-width: 959px) {
  .aside {
    position: fixed; left: 0; top: 0; z-index: 40; height: 100dvh; transform: translateX(-100%);
    transition: transform var(--dur-slide) var(--ease), visibility var(--dur-slide);
    visibility: hidden;
  }
  .menu-open .aside { transform: none; visibility: visible; box-shadow: var(--shadow-pop); }
  .drawer-overlay {
    display: block; position: fixed; inset: 0; z-index: 30; background: rgba(11, 16, 38, 0.45);
    opacity: 0; pointer-events: none; transition: opacity var(--dur-slide) var(--ease);
  }
  .menu-open .drawer-overlay { opacity: 1; pointer-events: auto; }
  .admin-shell { flex-direction: column; }
  .admin-bar {
    position: sticky; top: 0; z-index: 20; height: 60px; padding: 0 12px 0 16px; background: var(--ink); color: var(--white);
    display: flex; align-items: center; justify-content: space-between;
  }
  .admin-bar button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: var(--white); display: flex; align-items: center; justify-content: center; }
  .admin-main { padding: 20px 16px 40px; }
  .admin-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 959px) {
  /* Sin desplazamiento: el menú aparece con un fundido corto */
  .aside { transform: none; opacity: 0; transition: opacity var(--dur-slide) var(--ease), visibility var(--dur-slide); }
  .menu-open .aside { opacity: 1; }
}

/* ---------- Ayudas de tamaño usadas en varias pantallas ---------- */
.btn-44 { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn-46 { min-height: 46px; padding: 0 18px; font-size: 14px; }
.btn-50 { min-height: 50px; }
.btn-52 { min-height: 52px; }
.btn-58 { min-height: 58px; font-size: 17px; }
.btn-17 { font-size: 17px; }
.t15 { font-size: 15px; font-weight: 700; }
.t15-600 { font-size: 15px; font-weight: 600; }
.push-bottom { margin-top: auto; }
.tag-code { font: 400 11px var(--font-mono); color: var(--faint); }

/* ---------- Perfil público ---------- */
.photo {
  position: relative; flex-shrink: 0; overflow: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
}
.photo-peach { background: var(--peach); color: var(--peach-ink); }
.photo-slate { background: var(--slate-pet); color: var(--slate-ink); }
.photo-track {
  position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; scroll-behavior: smooth;
}
.photo-track::-webkit-scrollbar { display: none; }
.photo-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.photo-dots { position: absolute; bottom: 54px; display: flex; gap: 6px; z-index: 1; }
.photo-dots span {
  width: 6px; height: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.6);
  transition: width var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.photo-dots span.is-on { width: 18px; background: var(--white); }
.photo-top { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.photo-badge { position: absolute; top: 14px; right: 14px; z-index: 1; }
.glass-chip {
  height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.9);
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--ink); text-decoration: none;
}
.glass-chip:hover { color: var(--ink); }
.glass-chip .icon { color: var(--cobalt); }
.glass-chip-sm { height: 32px; font-size: 12px; font-weight: 600; }
.profile-card {
  margin: -36px 14px 0; position: relative; z-index: 2; padding: 24px 20px 20px; border-radius: var(--r-card-lg);
  background: var(--white); box-shadow: var(--shadow-float); display: flex; flex-direction: column; gap: 16px;
}
.home-chip { align-self: flex-start; height: 30px; padding: 0 12px; font-size: 13px; gap: 8px; }
.hello { font-size: 36px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; overflow-wrap: anywhere; }
.sub { font-size: 15px; color: var(--muted); }
.quote { padding: 14px 16px; border-radius: 16px; background: var(--cloud); font-size: 15px; line-height: 1.55; color: var(--text-soft); overflow-wrap: anywhere; }
.pbtn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pbtn-row.is-single { grid-template-columns: 1fr; }
.psection {
  margin: 14px 14px 0; padding: 20px; border-radius: var(--r-card); background: var(--white);
  display: flex; flex-direction: column; gap: 14px;
}
.psection-row { flex-direction: row; align-items: center; padding: 18px 20px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { padding: 12px 14px; border-radius: 14px; background: var(--cloud); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact span { font-size: 12px; color: var(--muted); }
.fact b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.medical { border: 1.5px solid var(--alert-border); }
.med-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: var(--alert-bg); color: var(--alert); display: flex; align-items: center; justify-content: center; }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv > div:last-child { padding-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.round-btn {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--sky); color: var(--cobalt-hover);
  display: flex; align-items: center; justify-content: center; transition: background-color var(--dur-fast) var(--ease);
}
.round-btn:hover { background: var(--sky-hover); color: var(--cobalt-hover); }
.pfoot { margin-top: auto; padding: 24px 22px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.pfoot .hint { justify-content: center; }

/* Modo extraviada */
.lost-band { padding: 16px 18px; background: var(--alert); color: var(--white); display: flex; gap: 12px; align-items: center; }
.lost-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; }
.lost-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.lost-sub { font-size: 13px; color: var(--alert-light); }
.lost-msg { padding: 14px 16px; border-radius: 16px; background: var(--alert-bg); display: flex; flex-direction: column; gap: 6px; }
.lost-msg span { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--alert-text); }
.lost-msg p { font-size: 15px; line-height: 1.55; color: var(--text-soft); overflow-wrap: anywhere; }
.last-seen { font-size: 14px; color: var(--text-soft); }
.last-seen .icon { color: var(--alert); }

/* Placa sin activar y desactivada */
.state-card {
  padding: 32px 22px 26px; border-radius: 30px; background: var(--white); box-shadow: 0 10px 30px rgba(11, 16, 38, 0.08);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.state-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.state-text { font-size: 15px; line-height: 1.6; color: var(--muted); }
.nfc-halo { position: relative; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; }
.nfc-halo-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed #B7BDFF; }
.nfc-halo-core { width: 96px; height: 96px; border-radius: 50%; background: var(--sky); color: var(--cobalt); display: flex; align-items: center; justify-content: center; }
.state-ico { width: 96px; height: 96px; border-radius: 50%; background: var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; }

/* Aviso «La encontré» */
.mini-paw { width: 36px; height: 36px; border-radius: 50%; background: var(--peach); color: var(--peach-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.aviso { padding: 20px 14px 28px; display: flex; flex-direction: column; gap: 14px; }
.aviso-intro { padding: 0 6px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.loc-box { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); }
.mini-map { height: 120px; background: var(--map); position: relative; display: flex; align-items: center; justify-content: center; }
.road-h { position: absolute; left: 0; right: 0; top: 46px; height: 10px; background: var(--white); }
.road-v { position: absolute; top: 0; bottom: 0; left: 42%; width: 10px; background: var(--white); }
.map-pin {
  position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--cobalt); color: var(--white);
  border: 4px solid var(--white); box-shadow: 0 6px 14px rgba(79, 91, 255, 0.35); display: flex; align-items: center; justify-content: center;
}
.loc-ok { padding: 12px 14px; display: flex; align-items: center; gap: 10px; background: var(--success-bg); color: var(--success-text); font-size: 14px; font-weight: 600; }
.loc-ok .icon { color: var(--success); }
.loc-clear { min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--success-text); font-size: 13px; font-weight: 600; text-decoration: underline; }
.done { padding: 48px 20px 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.done-ring { width: 96px; height: 96px; border-radius: 50%; background: var(--success-bg); display: flex; align-items: center; justify-content: center; }
.done-ring > span { width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: var(--white); display: flex; align-items: center; justify-content: center; }
.done-title { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.done-text { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Panel del dueño · Inicio ---------- */
.thumb { flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.alert-card {
  padding: 18px 22px; border-radius: 22px; background: var(--white); border: 1.5px solid var(--sky-border);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--ink); text-decoration: none;
  transition: box-shadow var(--dur-fast) var(--ease);
}
.alert-card:hover { color: var(--ink); box-shadow: var(--shadow-card); }
.bell-ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: var(--sky); color: var(--cobalt); display: flex; align-items: center; justify-content: center; }
.home-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.home-main { flex: 2 1 520px; min-width: 0; }
.home-side { flex: 1 1 300px; min-width: 0; }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.pet-card { border-radius: var(--r-card); background: var(--white); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; }
.pet-card-photo { height: 150px; position: relative; display: flex; align-items: center; justify-content: center; }
.pet-card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.state-chip { position: absolute; top: 12px; left: 12px; }
.pet-card-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pet-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.progress { height: 6px; border-radius: var(--r-pill); background: var(--sky); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--cobalt); transition: width var(--dur-page) var(--ease); }
.progress.is-done { background: var(--success-bg); }
.progress.is-done span { background: var(--success); }
.missing { font-size: 13px; color: var(--cobalt-hover); font-weight: 600; }
.btn-card { min-height: 44px; font-size: 14px; padding: 0 12px; }
.btn-card.btn-soft, .btn-card.btn-outline { font-weight: 600; }
.add-tile {
  min-height: 300px; border-radius: var(--r-card); border: 2px dashed var(--dashed); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.add-tile:hover { background: var(--white); border-color: var(--sky-border); color: var(--ink); }
.add-tile-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--white); color: var(--cobalt); display: flex; align-items: center; justify-content: center; }
.quick { padding: 8px; border-radius: 22px; background: var(--white); display: flex; flex-direction: column; }
.quick a {
  min-height: 52px; padding: 0 12px; border-radius: 14px; display: flex; align-items: center; gap: 12px;
  color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color var(--dur-fast) var(--ease);
}
.quick a:hover { background: var(--cloud); color: var(--ink); }
.quick .icon { color: var(--cobalt); }
.locked-lines { display: flex; flex-direction: column; gap: 10px; opacity: 0.45; }
.locked-lines span { display: flex; gap: 10px; align-items: center; }
.locked-lines span::before { content: ""; width: 32px; height: 32px; border-radius: 50%; background: var(--sky); }
.locked-lines span::after { content: ""; flex: 1; height: 10px; border-radius: var(--r-pill); background: var(--border); }

/* Mobile */
.m-alert {
  padding: 16px; border-radius: 22px; background: var(--cobalt); color: var(--white); display: flex; gap: 14px;
  align-items: center; text-decoration: none; box-shadow: 0 10px 22px rgba(79, 91, 255, 0.28);
}
.m-alert:hover { color: var(--white); background: var(--cobalt-hover); }
.m-alert-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; }
.m-pet { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.m-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--success-text); }
.m-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.m-state.is-lost { color: var(--alert-text); }
.m-state.is-lost .dot { background: var(--alert); }
.m-complete {
  padding: 12px 14px; border-radius: 16px; background: var(--sky); color: var(--cobalt-hover); display: flex;
  align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.m-complete b { font-weight: 800; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile {
  min-height: 64px; border-radius: 16px; background: var(--cloud); color: var(--ink); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; text-decoration: none; text-align: center;
  transition: background-color var(--dur-fast) var(--ease);
}
.tile:hover { background: var(--sky); color: var(--ink); }
.tile .icon { color: var(--cobalt); }
.tile-danger { background: var(--alert-bg); color: var(--alert-text); font-weight: 700; }
.tile-danger:hover { background: #FFDCDF; color: var(--alert-text); }
.tile-danger .icon { color: currentColor; }
.tile-success { background: var(--success-bg); color: var(--success-text); font-weight: 700; }
.tile-success .icon { color: currentColor; }
.m-premium { padding: 18px; border-radius: 22px; background: var(--ink); color: var(--white); display: flex; gap: 14px; align-items: center; text-decoration: none; }
.m-premium:hover { color: var(--white); }
.m-premium-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; background: var(--peach); color: var(--premium-text); display: flex; align-items: center; justify-content: center; }

/* Estado vacío */
.empty-wrap { max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.empty-card { padding: 32px 22px 24px; border-radius: var(--r-card-lg); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.empty-art { position: relative; width: 150px; height: 120px; }
.empty-peach { position: absolute; left: 0; top: 18px; width: 100px; height: 100px; border-radius: 50%; background: var(--peach); }
.empty-nfc { position: absolute; right: 0; top: 0; width: 76px; height: 76px; border-radius: 50%; background: var(--sky); color: var(--cobalt); display: flex; align-items: center; justify-content: center; }
.empty-paw { position: absolute; left: 28px; top: 46px; color: var(--peach-ink); }
.empty-title { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.easy { font-size: 14px; color: var(--text-soft); }
.easy .num { width: 28px; height: 28px; font-size: 13px; }

/* ---------- Pantallas de flujo (registrar, perfil creado) ---------- */
.panel-main.is-flow { align-items: center; }
.wizard {
  width: 100%; max-width: 560px; background: var(--cloud); border-radius: var(--r-card-lg); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-card); border: 1px solid var(--border);
}
.wizard-head { padding: 12px 12px 16px; background: var(--white); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.back-btn { width: 44px; height: 44px; border-radius: 50%; color: var(--ink); display: flex; align-items: center; justify-content: center; transition: background-color var(--dur-fast) var(--ease); }
.back-btn:hover { background: var(--cloud); color: var(--ink); }
.step-label { padding-right: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.wizard-bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 4px; }
.wizard-bars span { height: 6px; border-radius: var(--r-pill); background: var(--border); transition: background-color var(--dur) var(--ease); }
.wizard-bars span.is-on { background: var(--cobalt); }
.wizard-step { padding: 24px 16px; display: flex; flex-direction: column; gap: 18px; }
.wizard-step[data-step="1"] { gap: 20px; }
.wizard-foot { margin-top: auto; padding: 16px; background: var(--white); border-top: 1px solid var(--border); }
.flow-title { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.input-54 { min-height: 54px; }
.input-15 { font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.photo-drop {
  position: relative; height: 180px; border: 2px dashed var(--dashed); border-radius: var(--r-card); background: var(--white);
  color: var(--cobalt); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer; overflow: hidden; transition: border-color var(--dur-fast) var(--ease);
}
.photo-drop:hover, .photo-drop:focus-within { border-color: var(--cobalt); }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop.has-photo span { position: relative; z-index: 1; }
.photo-drop.has-photo [data-photo-text] { padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.92); }
.photo-drop-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--sky); display: flex; align-items: center; justify-content: center; }
.species { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.species label { position: relative; }
.species input { position: absolute; opacity: 0; }
.species span {
  min-height: 54px; border-radius: 16px; border: 1px solid var(--border); background: var(--white); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.species input:checked + span { border: 2px solid var(--cobalt); background: var(--sky); color: var(--cobalt-hover); font-weight: 700; }
.species input:focus-visible + span { outline: 3px solid var(--sky-border); outline-offset: 2px; }
.switch-card { padding: 6px 16px; border-radius: 20px; }
.nfc-wait { width: 100%; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nfc-pulse { position: relative; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.nfc-pulse span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sky); }
.nfc-pulse span + span { inset: 14px; border-color: var(--sky-strong); }
.nfc-pulse span:first-child { animation: pulse 2.4s var(--ease) infinite; }
/* Botón que envuelve la animación de «Acerca la placa»: se ve igual, pero abre el escaneo */
.nfc-tap { border: 0; padding: 0; background: none; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nfc-pulse b { width: 64px; height: 64px; border-radius: 50%; background: var(--cobalt); color: var(--white); display: flex; align-items: center; justify-content: center; }
@keyframes pulse { 0% { transform: scale(0.85); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nfc-pulse span:first-child { animation: none; } }

@media (max-width: 899px) {
  .panel-main.is-flow { padding: 0; }
  .wizard { max-width: none; min-height: 100dvh; border-radius: 0; border: 0; box-shadow: none; }
  .wizard-foot { position: sticky; bottom: 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ---------- Editar mascota ---------- */
.card-24 { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.edit-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.edit-main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.photo-cell { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.photo-main, .photo-action-left button {
  position: absolute; left: 8px; bottom: 8px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: var(--white);
  border: 0; display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; color: var(--ink);
}
.photo-action-left button { opacity: 0.92; }
.photo-action-left button:hover { background: var(--sky); }
.photo-action-right button {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(11, 16, 38, 0.6); color: var(--white); display: flex; align-items: center; justify-content: center;
  transition: background-color var(--dur-fast) var(--ease);
}
.photo-action-right button:hover { background: var(--alert); }
.photo-upload {
  width: 100%; height: 100%; border-radius: 18px; border: 2px dashed var(--dashed); background: var(--cloud); color: var(--cobalt);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: border-color var(--dur-fast) var(--ease);
}
.photo-upload:hover, .photo-upload:focus-within { border-color: var(--cobalt); }
.premium-box {
  padding: 16px 18px; border-radius: 18px; background: var(--peach-soft); border: 1px solid var(--peach);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.premium-box-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--peach); color: var(--premium-text); display: flex; align-items: center; justify-content: center; }
.privacy { gap: 0; }
.privacy .switch-row:first-of-type { border-top: 1px solid var(--line); }
.contact-row { min-height: 60px; border-top: 1px solid var(--line); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding-top: 4px; }

/* Vista previa en un teléfono */
.preview { flex: 1 1 320px; min-width: 0; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.phone { padding: 8px; border-radius: 44px; background: var(--ink); }
.phone-screen { width: 300px; height: 620px; border-radius: 37px; overflow: hidden; background: var(--cloud); display: flex; flex-direction: column; }
.phone-photo { height: 190px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.phone-photo img { width: 100%; height: 100%; object-fit: cover; }
.phone-card {
  margin: -22px 10px 0; position: relative; padding: 16px 14px; border-radius: 22px; background: var(--white);
  box-shadow: 0 8px 20px rgba(11, 16, 38, 0.10); display: flex; flex-direction: column; gap: 10px;
}
.phone-hello { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.phone-sub { font-size: 12px; color: var(--muted); }
.phone-wa { height: 40px; border-radius: var(--r-pill); background: var(--cobalt); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.phone-btn { flex: 1; height: 36px; border-radius: var(--r-pill); background: var(--sky); color: var(--cobalt-hover); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.phone-note { font-size: 11px; line-height: 1.4; color: var(--muted); }
.phone-box { margin: 10px 10px 0; padding: 12px 14px; border-radius: 18px; background: var(--white); display: flex; flex-direction: column; gap: 2px; }
.phone-box b { font-size: 12px; font-weight: 700; }
.phone-box span { font-size: 11px; color: var(--muted); }
.phone-box.is-medical { border: 1px solid var(--alert-border); }
.phone-wa, .phone-btn, .phone-note, .phone-box { animation: fade-in var(--dur) var(--ease) both; }

@media (max-width: 899px) {
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-24 { padding: 20px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .btn { align-self: stretch !important; }
}

/* ---------- Marcar extraviada ---------- */
.lost-page { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 20px; }
.lost-body { display: flex; flex-direction: column; gap: 16px; }
.lost-pet { border-radius: 26px; background: var(--white); overflow: hidden; }
.lost-pet-photo { height: 200px; position: relative; }
.lost-pet-photo img { width: 100%; height: 100%; object-fit: cover; }
.lost-status { padding: 18px 16px; border-radius: 22px; background: var(--alert); color: var(--white); display: flex; flex-direction: column; gap: 4px; }
.lost-status b { font-size: 18px; font-weight: 800; }
.lost-status span { font-size: 14px; color: var(--alert-light); }

@media (max-width: 899px) {
  .lost-page { margin: -20px -16px 0; width: calc(100% + 32px); max-width: none; gap: 0; }
  .lost-body { padding: 20px 16px; }
  .lost-body.is-lost { padding: 0; }
  .lost-body.is-lost .lost-actions { padding: 16px; }
  .lost-status { border-radius: 0; }
}

/* ---------- Mis placas ---------- */
.table-card { padding: 0; overflow-x: auto; position: relative; }
.owner-table { min-width: 760px; font-size: 15px; }
.owner-table th { font-size: 13px; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.owner-table td { padding: 18px 16px; border-top: 0; border-bottom: 1px solid var(--line); }
.owner-table th:first-child, .owner-table td:first-child { padding-left: 24px; }
.owner-table th:last-child, .owner-table td:last-child { padding-right: 24px; }
.owner-table tr:last-child td { border-bottom: 0; }
.owner-table tr.is-off td { color: var(--muted); }
.owner-table tr.is-off .mono { text-decoration: line-through; }
.premium-link { font-size: 13px; font-weight: 600; color: var(--premium-text); }
.premium-link:hover { color: var(--premium-text); }
.tag-row { padding: 14px; }
.tag-row.is-off { opacity: 0.75; }

/* Activar placa: elegir mascota */
.activate { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 20px; }
.pick-list { padding: 6px; display: flex; flex-direction: column; }
.pick {
  position: relative; min-height: 72px; padding: 10px 12px; border-radius: 18px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: background-color var(--dur-fast) var(--ease);
}
.pick:hover { background: var(--cloud); }
.pick input { position: absolute; opacity: 0; }
.pick-dot { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--switch-off); transition: border var(--dur-fast) var(--ease); }
.pick:has(input:checked) { background: var(--sky); }
.pick input:checked ~ .pick-dot { border: 7px solid var(--cobalt); }
.pick input:focus-visible ~ .pick-dot { outline: 3px solid var(--sky-border); outline-offset: 2px; }

/* ---------- Avisos ---------- */
.reports { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.report-list { flex: 1 1 300px; min-width: 0; padding: 8px; border-radius: var(--r-card); background: var(--white); display: flex; flex-direction: column; gap: 4px; }
.report-item {
  padding: 14px; border-radius: 16px; display: flex; gap: 12px; color: var(--ink); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.report-item:hover { background: var(--cloud); color: var(--ink); }
.report-item[aria-current="true"] { background: var(--sky); }
.report-item b { font-size: 15px; font-weight: 600; }
.report-item b.is-new { font-weight: 700; }
.new-dot { width: 9px; height: 9px; margin-top: 6px; flex-shrink: 0; border-radius: 50%; background: var(--cobalt); }
.report-detail { flex: 2 1 480px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 16px; }
.detail-title { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.big-map { height: 220px; border-radius: 20px; background: var(--map); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.map-open {
  position: absolute; right: 14px; bottom: 14px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--white);
  color: var(--ink); display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 12px rgba(11, 16, 38, 0.12);
}
.map-open:hover { color: var(--cobalt); }
.info-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.info-tiles > div { padding: 14px 16px; border-radius: 16px; background: var(--cloud); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.info-tiles span { font-size: 12px; color: var(--muted); }
.info-tiles b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 899px) {
  .report-detail { padding: 20px; }
  .detail-title { font-size: 22px; }
}

/* ---------- Plan y beneficios ---------- */
.plan-now { flex: 1 1 320px; padding: 28px; border-radius: var(--r-card-lg); display: flex; flex-direction: column; gap: 16px; }
.plan-name { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.plan-promo {
  flex: 2 1 420px; padding: 28px; border-radius: var(--r-card-lg); background: var(--ink); color: var(--white);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center;
}
.price { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; }
.compare { min-width: 560px; font-size: 15px; }
.compare thead th { padding: 20px 16px; font-size: 15px; color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--border); }
.compare thead th:first-child { padding-left: 24px; font-size: 18px; }
.compare tbody th { padding: 16px 24px; text-align: left; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); white-space: normal; font-size: 15px; }
.compare tbody th small { font-size: 13px; font-weight: 400; color: var(--muted); }
.compare td { padding: 16px; border-top: 0; border-bottom: 1px solid var(--line); }
.compare .c-plan { width: 160px; text-align: center; }
.compare .c-premium { background: var(--peach-soft); border-bottom-color: #FFE3D6; }
.compare thead .c-premium { color: var(--premium-text); }
.compare .ok { display: inline-flex; color: var(--success); }
.compare .no { font-size: 13px; color: var(--faint); }
@media (max-width: 899px) { .compare .c-plan { width: 92px; } .compare tbody th, .compare thead th:first-child { padding-left: 16px; } }

/* ---------- Mi cuenta ---------- */
.account { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.list-card { padding: 6px 18px 12px; display: flex; flex-direction: column; }
.list-title { padding: 14px 0 6px; font-size: 16px; font-weight: 700; }
.list-row { min-height: 64px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.list-title + .list-row { border-top: 0; }
.dash-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; border: 1.5px dashed var(--dashed); display: flex; align-items: center; justify-content: center; }
.plan-link { padding: 18px; color: var(--ink); text-decoration: none; }
.plan-link:hover { color: var(--ink); }
.nav-list { padding: 6px 8px; display: flex; flex-direction: column; }
.nav-list a, .nav-list button {
  min-height: 56px; padding: 0 10px; border: 0; border-top: 1px solid var(--line); background: transparent; display: flex;
  align-items: center; justify-content: space-between; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
  border-radius: 12px; transition: background-color var(--dur-fast) var(--ease);
}
.nav-list > :first-child { border-top: 0; }
.nav-list a:hover, .nav-list button:hover { background: var(--cloud); color: var(--ink); }
.nav-list .icon { color: var(--faint); }

/* ---------- Admin · Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
@media (max-width: 599px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 14px; } .kpi b { font-size: 26px; } }
.kpi { padding: 18px; border-radius: 18px; background: var(--white); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.kpi span { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi b { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.kpi b.is-bad { color: var(--alert-text); }
.kpi small, .kpi a { font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi small.is-good { color: var(--success-text); }
.kpi a { color: var(--cobalt); }
.chart-card { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.mini-tabs { display: flex; padding: 3px; border-radius: 10px; background: var(--cloud); }
.mini-tabs a {
  min-height: 32px; padding: 0 12px; border-radius: 8px; color: var(--muted); display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 600; text-decoration: none; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.mini-tabs a[aria-current="page"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(11, 16, 38, 0.08); }
.bars { height: 220px; display: grid; gap: 14px; align-items: end; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar span { font-size: 11px; color: var(--muted); }
.bar i { display: block; width: 100%; border-radius: 8px 8px 2px 2px; background: var(--sky-strong); animation: grow-up var(--dur-page) var(--ease) both; transform-origin: bottom; }
.bar.is-now span { font-weight: 700; color: var(--ink); }
.bar.is-now i { background: var(--cobalt); }
@keyframes grow-up { from { transform: scaleY(0.2); opacity: 0; } }
.bar-labels { display: grid; gap: 14px; font-size: 11px; color: var(--muted); text-align: center; }
.bar-labels .is-now { font-weight: 700; color: var(--ink); }
.attention { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.att { padding: 12px 14px; border-radius: 14px; display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; transition: filter var(--dur-fast) var(--ease); }
.att:hover { color: var(--ink); filter: brightness(0.98); }
.att i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; }
.att b { font-size: 14px; }
.att small { font-size: 12px; color: var(--muted); }
.att-alert { background: var(--alert-bg); } .att-alert i { background: var(--alert); }
.att-warn { background: var(--peach-soft); } .att-warn i { background: #FF7A45; }
.att-info { background: var(--cloud); } .att-info i { background: var(--cobalt); }
.ev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ev-success { background: var(--success); } .ev-cobalt { background: var(--cobalt); } .ev-alert { background: var(--alert); } .ev-muted { background: var(--faint); }

/* ---------- Admin · Inventario ---------- */
.code-link {
  min-height: 40px; padding: 0 8px; border-radius: 10px; display: inline-flex; align-items: center; color: var(--cobalt);
  font: 500 13px var(--font-mono); text-decoration: underline; text-underline-offset: 3px;
}
.tag-detail { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.detail-box { padding: 14px; border-radius: 14px; background: var(--cloud); display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.detail-box > div { display: flex; justify-content: space-between; gap: 10px; }
.detail-box > div > span:first-child { color: var(--muted); flex-shrink: 0; }
.tl-step { display: flex; gap: 12px; min-height: 44px; }
.tl-mark { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--switch-off); background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--white); }
.tl-dot.is-done { background: var(--success); border: 0; }
.tl-dot.is-bad { background: var(--alert); border: 0; }
.tl-line { flex: 1; width: 2px; background: var(--border); }
.tl-step:last-child .tl-line { display: none; }
.tl-step b { font-size: 14px; font-weight: 600; }
.tl-step small { font-size: 12px; color: var(--muted); }
.pager { padding: 14px 20px 8px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.admin .btn-xs { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- Admin · Clientes y avisos ---------- */
.person { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.person:hover { color: var(--cobalt); }
.person .avatar { width: 34px; height: 34px; font-size: 14px; font-weight: 800; }
.person b { font-weight: 700; }
.person small { font-size: 12px; color: var(--muted); }
.avatar-peach { background: var(--peach); color: var(--premium-text); font-weight: 800; }
.client-card { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.plan-box { padding: 14px; border-radius: 16px; background: var(--cloud); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pet-line { padding: 12px; border-radius: 16px; border: 1px solid var(--border); display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; }
a.pet-line[href]:hover { border-color: var(--sky-border); color: var(--ink); }
.pet-line b { font-weight: 700; }
.pet-line small { font-size: 12px; color: var(--muted); }
.aviso-item {
  padding: 14px; border-radius: 16px; background: var(--white); border: 1px solid var(--border); display: flex; flex-direction: column;
  gap: 8px; color: var(--ink); text-decoration: none; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.aviso-item:hover { color: var(--ink); border-color: var(--sky-border); }
.aviso-item[aria-current="true"] { background: var(--sky-row); border-color: var(--sky-strong); }
.aviso-item small { font-size: 12px; white-space: nowrap; }
.aviso-item .chip { align-self: flex-start; }
.msg-box { flex: 1 1 300px; padding: 18px; border-radius: 18px; background: var(--cloud); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.msg-box.is-outline { flex-basis: 260px; background: transparent; border: 1px solid var(--border); }
.mini-kv { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.mini-kv > span { display: flex; justify-content: space-between; gap: 12px; }
.mini-kv > span > span { color: var(--muted); flex-shrink: 0; }
.mini-kv b { font-weight: 600; text-align: right; }

.access-box { padding: 14px; border-radius: 16px; background: var(--success-bg); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.access-box b { font-size: 14px; color: var(--success-text); }
.access-box small { font-size: 12px; color: var(--muted); }
.access-box.is-pending { background: var(--warning-bg); }
.access-box.is-pending b { color: var(--warning-text); }
.assign-box { padding: 14px; border-radius: 14px; border: 1px dashed var(--dashed); display: flex; flex-direction: column; gap: 12px; }
.assign-row { padding: 10px 12px; border-radius: 12px; background: var(--cloud); display: flex; align-items: center; gap: 10px; }
.assign-row b { font-size: 14px; }
.assign-row small { font-size: 12px; color: var(--muted); }
.admin-pet { max-width: 900px; }

/* ---------- Admin · Planes ---------- */
.feature-row { min-height: 44px; font-size: 14px; }
.feature-row:first-of-type { border-top: 1px solid var(--line); }

/* ---------- Admin · Programador NFC (maqueta) ---------- */
.step-title { display: flex; align-items: center; gap: 10px; font-size: 17px !important; font-weight: 700; }
.detail-strip { padding: 12px 14px; border-radius: 14px; background: var(--cloud); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.split-bar { height: 8px; border-radius: var(--r-pill); background: #ECEEFA; overflow: hidden; display: flex; }
.qr-box { padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--white); display: flex; flex-shrink: 0; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.checks li > span { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--success-bg); color: var(--success-text); display: flex; align-items: center; justify-content: center; }
.alt-row { padding: 14px 0; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.alt-row b { font-size: 14px; }
.alt-row small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.chip-card { padding: 18px 22px; border-radius: 20px; background: var(--ink); color: var(--white); display: flex; flex-direction: column; gap: 10px; }
.chip-grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 13px; }
.chip-grid span { color: var(--admin-text); }

.nfc-app { background: var(--cloud); }
.nfc-status { height: 32px; flex-shrink: 0; padding: 0 22px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.nfc-screen { flex: 1; padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.nfc-back { width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.nfc-batch { height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--white); font: 400 12px var(--font-mono); display: inline-flex; align-items: center; }
.nfc-queue { padding: 4px 6px; display: flex; flex-direction: column; }
.nfc-queue button {
  min-height: 60px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: flex;
  align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); text-align: left;
}
.nfc-queue button:last-child { border-bottom: 0; }
.nfc-queue small { font-size: 12px; color: var(--muted); }
.nfc-queue .icon { color: var(--faint); }
button.nfc-back { border: 0; cursor: pointer; }
.nfc-spin { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--sky); border-top-color: var(--cobalt); animation: spin 0.9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .nfc-spin { animation: none; } }
.nfc-steps { width: 100%; padding: 16px; font-size: 14px; }
.nfc-steps span { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.nfc-steps .icon { width: 20px; height: 20px; padding: 4px; border-radius: 50%; background: var(--switch-off); color: var(--white); flex-shrink: 0; }
.nfc-steps .is-done { color: var(--ink); }
.nfc-steps .is-done .icon { background: var(--success); }
.qr-svg { display: block; }
.qr-svg svg { display: block; width: 100%; height: 100%; }

/* Hoja imprimible de QR y etiquetas de un lote */
.print-page { padding: 24px; display: flex; flex-direction: column; gap: 20px; background: var(--white); min-height: 100dvh; }
.print-grid { display: grid; gap: 6mm; }
.print-grid.is-qr { grid-template-columns: repeat(auto-fill, minmax(38mm, 1fr)); }
.print-grid.is-labels { grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); }
.print-qr { padding: 3mm; border: 1px dashed var(--border); border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 2mm; break-inside: avoid; }
.print-qr .qr-svg { width: 30mm; height: 30mm; }
.print-qr span { font: 500 9pt var(--font-mono); }
.print-label { padding: 4mm; border: 1px dashed var(--border); border-radius: 8px; display: flex; gap: 4mm; align-items: center; break-inside: avoid; }
.print-label .qr-svg { width: 20mm; height: 20mm; flex-shrink: 0; }
.print-label b { font-size: 11pt; }
.print-label span { font-size: 8pt; color: var(--text-soft); }
@media print {
  .print-page { padding: 0; }
  .no-print { display: none !important; }
  @page { margin: 10mm; }
}

.err-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-top: 24px; }
.err-head h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.err-head p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.err-ico { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.err-step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.err-step .num { width: 24px; height: 24px; font-size: 12px; }
.err-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.err-kv { padding: 16px; border-radius: 20px; display: flex; flex-direction: column; gap: 12px; }
.err-kv > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.err-kv span { color: var(--muted); }
.err-kv b { font-weight: 600; font-size: 12px; }
.err-kv b:not(.mono) { font-size: 13px; }

/* ---------- Landing ---------- */
.landing { background: var(--cloud); overflow-x: clip; }
.l-wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.l-header { position: sticky; top: 0; z-index: 20; background: rgba(245, 246, 248, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.l-nav { max-width: 1200px; margin: 0 auto; padding: 16px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.l-links { display: flex; flex-wrap: wrap; gap: 28px; font-size: 15px; font-weight: 500; }
.l-links a { color: var(--text-soft); text-decoration: none; }
.l-links a:hover { color: var(--ink); }
.l-login { color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.l-buy { min-height: 42px; padding: 0 20px; font-size: 15px; }
.l-menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--white); color: var(--ink); align-items: center; justify-content: center; }
.l-menu { display: none; }
.l-menu-inner { padding: 12px 16px 20px; display: flex; flex-direction: column; }
.l-menu-inner a:not(.btn) { min-height: 52px; display: flex; align-items: center; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 17px; font-weight: 600; text-decoration: none; }

.l-hero { padding-top: 72px; padding-bottom: 88px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.l-hero-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.l-eyechip { align-self: flex-start; height: 34px; padding: 0 14px; font-size: 13px; font-weight: 600; gap: 8px; }
.l-h1 { font-size: 68px; line-height: 1.02; font-weight: 800; letter-spacing: -0.045em; }
.l-lead { max-width: 520px; font-size: 19px; line-height: 1.6; color: var(--muted); }
.l-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.l-ctas .btn { padding: 0 28px; }
.l-checks { display: flex; flex-wrap: wrap; gap: 22px; padding-top: 8px; font-size: 14px; font-weight: 500; color: var(--text-soft); }
.l-checks span { display: inline-flex; align-items: center; gap: 8px; }
.l-checks .icon { color: var(--success); }
.l-hero-art { flex: 1 1 460px; min-width: 0; height: 560px; border-radius: 36px; background: var(--peach); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ring { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.ring-1 { width: 520px; height: 520px; border: 1px solid rgba(138, 74, 42, 0.16); }
.ring-2 { width: 380px; height: 380px; border: 1px solid rgba(138, 74, 42, 0.22); }
.l-phone { position: relative; padding: 8px; border-radius: 44px; background: var(--ink); box-shadow: 0 30px 60px rgba(11, 16, 38, 0.25); transform: rotate(-4deg); }
.l-phone-screen { width: 260px; height: 500px; border-radius: 37px; overflow: hidden; background: var(--cloud); display: flex; flex-direction: column; color: var(--ink); }
.l-phone-photo { height: 200px; flex-shrink: 0; background: var(--peach-deep); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--peach-ink); }
.l-phone-photo span { font-size: 11px; font-weight: 500; }
.l-phone-card { margin: -24px 10px 0; position: relative; padding: 16px 14px; border-radius: 22px; background: var(--white); box-shadow: 0 8px 20px rgba(11, 16, 38, 0.10); display: flex; flex-direction: column; gap: 10px; }
.l-phone-hello { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.l-phone-sub { font-size: 12px; color: var(--muted); }
.l-phone-wa { height: 40px; border-radius: var(--r-pill); background: var(--cobalt); color: var(--white); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; }
.l-phone-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.l-phone-btns span { height: 36px; border-radius: var(--r-pill); background: var(--sky); color: var(--cobalt-hover); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.l-phone-box { margin: 10px 10px 0; padding: 12px 14px; border-radius: 18px; background: var(--white); display: flex; flex-direction: column; gap: 2px; }
.l-phone-box b { font-size: 12px; } .l-phone-box span { font-size: 11px; color: var(--muted); }
.l-tag { position: absolute; right: 40px; bottom: 56px; width: 128px; height: 128px; border-radius: 50%; background: var(--white); box-shadow: 0 18px 36px rgba(138, 74, 42, 0.25); display: flex; align-items: center; justify-content: center; color: var(--cobalt); }
.l-toast { position: absolute; left: 32px; top: 40px; padding: 12px 16px; border-radius: 18px; background: var(--white); box-shadow: 0 12px 28px rgba(11, 16, 38, 0.14); display: flex; gap: 12px; align-items: center; }
.l-toast-ico { width: 36px; height: 36px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; }
.l-toast b { font-size: 14px; } .l-toast small { font-size: 12px; color: var(--muted); }

.l-band { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.l-section { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 48px; }
.l-head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.l-head.center { align-items: center; text-align: center; max-width: none; }
.l-head-split { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: none; }
.l-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cobalt); }
.l-h2 { font-size: 46px; line-height: 1.08; font-weight: 800; letter-spacing: -0.04em; }
.l-h2-dark { font-size: 44px; color: var(--white); }
.l-side { max-width: 420px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.l-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.l-step { padding: 32px; border-radius: var(--r-card-lg); background: var(--cloud); display: flex; flex-direction: column; gap: 18px; }
.l-step-num { width: 48px; height: 48px; flex-shrink: 0; border-radius: 16px; background: var(--cobalt); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.l-step h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.l-step p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.l-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.l-benefit { padding: 28px; border-radius: var(--r-card); background: var(--white); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 14px; }
.l-benefit-ico { width: 48px; height: 48px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.l-benefit-ico.is-sky { background: var(--sky); color: var(--cobalt); }
.l-benefit-ico.is-alert { background: var(--alert-bg); color: var(--alert); }
.l-benefit h3 { font-size: 19px; font-weight: 700; }
.l-benefit p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.l-dark-wrap { padding-bottom: 96px; }
.l-dark { border-radius: 36px; background: var(--ink); color: var(--white); padding: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; overflow: hidden; }
.l-dark-check { align-items: flex-start !important; font-size: 17px; line-height: 1.55; color: #D5DCEA; }
.l-dark-check > span { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--cobalt); color: var(--white); display: flex; align-items: center; justify-content: center; }
.l-dark-phone { flex: 0 1 340px; display: flex; justify-content: center; }
.l-dark-phone > .l-phone-screen { outline: 8px solid var(--dark-line); }
.l-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; max-width: 920px; width: 100%; margin: 0 auto; }
.l-plan { padding: 36px; border-radius: 32px; background: var(--cloud); display: flex; flex-direction: column; gap: 24px; }
.l-plan.is-main { background: var(--white); border: 2px solid var(--cobalt); box-shadow: 0 20px 40px rgba(79, 91, 255, 0.12); }
.l-plan h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.l-price { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.l-feats { display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--text-soft); }
.l-feats span { display: flex; gap: 10px; align-items: center; }
.l-feats .icon { color: var(--cobalt); }
.l-feats b { font-weight: 600; color: var(--ink); }
.l-family { max-width: 920px; width: 100%; margin: 0 auto; padding: 22px 28px; border-radius: var(--r-card); background: var(--sky); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.l-faq-wrap { flex-direction: row; flex-wrap: wrap; gap: 56px; }
.l-faqs { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.l-faq { border-radius: 20px; background: var(--white); box-shadow: 0 1px 2px rgba(11, 16, 38, 0.04), 0 6px 18px rgba(11, 16, 38, 0.04); }
.l-faq button { width: 100%; min-height: 64px; padding: 18px 24px; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; color: var(--ink); font: 600 17px var(--font-sans); }
.l-faq-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--sky); color: var(--cobalt); display: flex; align-items: center; justify-content: center; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.l-faq.is-open .l-faq-ico, .l-faq button[aria-expanded="true"] .l-faq-ico { background: var(--cobalt); color: var(--white); transform: rotate(45deg); }
.l-faq p { padding: 0 24px 22px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.l-cta-wrap { padding-bottom: 96px; }
.l-cta { border-radius: 36px; background: var(--cobalt); color: var(--white); padding: 56px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.l-mail { min-height: 54px; padding: 0 8px; display: inline-flex; align-items: center; font-size: 16px; font-weight: 600; color: var(--white); }
.l-mail:hover { color: var(--sky); }
.l-form { flex: 1 1 380px; min-width: 0; padding: 28px; border-radius: var(--r-card-lg); background: var(--white); color: var(--ink); display: flex; flex-direction: column; gap: 16px; }
.l-footer { border-top: 1px solid var(--border); background: var(--white); }
.l-foot { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.l-foot-cols { display: flex; flex-wrap: wrap; gap: 56px; font-size: 14px; }
.l-foot-cols > div { display: flex; flex-direction: column; gap: 10px; }
.l-foot-cols a { color: var(--muted); text-decoration: none; }
.l-foot-cols a:hover { color: var(--ink); }
.legal h2 { font-size: 17px; font-weight: 700; }
.legal p { font-size: 15px; line-height: 1.6; color: var(--text-soft); }

@media (max-width: 1023px) {
  .l-links { display: none; }
  .l-h1 { font-size: 56px; }
}
@media (max-width: 719px) {
  .l-wrap { padding-left: 16px; padding-right: 16px; }
  .l-nav { height: 64px; padding: 0 16px; flex-wrap: nowrap; }
  .l-nav .brand-mark { width: 30px; height: 30px; border-radius: 10px; }
  .l-nav .brand-name { font-size: 18px !important; }
  .l-actions { gap: 8px !important; }
  .l-login { display: none; }
  .l-buy { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .l-menu-btn { display: flex; }
  .l-menu { display: grid; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: 0 16px 30px rgba(11, 16, 38, 0.10); }
  .l-menu:not(.is-open) { border-bottom: 0; box-shadow: none; }
  .desk-br, .desk-only { display: none; }
  .l-hero { padding-top: 32px; padding-bottom: 40px; gap: 20px; flex-direction: column; align-items: stretch; }
  .l-hero-text { display: contents; }
  .l-eyechip { height: 32px; padding: 0 12px; font-size: 12px; order: 1; }
  .l-h1 { font-size: 44px; line-height: 1.04; order: 2; }
  .l-lead { font-size: 17px; order: 3; }
  .l-ctas { flex-direction: column; gap: 10px; order: 4; }
  .l-ctas .btn { width: 100%; }
  .l-hero-art { flex: none; width: 100%; height: 420px; border-radius: 30px; order: 5; }
  .l-checks { flex-direction: column; gap: 10px; padding-top: 0; order: 6; }
  .ring-1 { width: 380px; height: 380px; border-color: rgba(138, 74, 42, 0.18); }
  .ring-2 { display: none; }
  .l-phone { padding: 7px; border-radius: 36px; }
  .l-phone-screen { width: 200px; height: 370px; border-radius: 30px; }
  .l-hero-art .l-phone-photo { height: 150px; }
  .l-hero-art .l-phone-photo span, .l-hero-art .l-phone-box { display: none; }
  .l-hero-art .l-phone-card { margin: -20px 8px 0; padding: 12px; border-radius: 18px; gap: 8px; }
  .l-hero-art .l-phone-hello { font-size: 19px; }
  .l-hero-art .l-phone-sub { font-size: 10px; }
  .l-hero-art .l-phone-wa { height: 32px; font-size: 11px; }
  .l-hero-art .l-phone-wa .icon { display: none; }
  .l-hero-art .l-phone-btns span { height: 28px; font-size: 10px; }
  .l-tag { right: 16px; bottom: 20px; width: 88px; height: 88px; }
  .l-tag .icon { width: 30px; height: 30px; }
  .l-toast { left: 14px; top: 18px; padding: 10px 12px; border-radius: 16px; gap: 10px; }
  .l-toast-ico { width: 30px; height: 30px; }
  .l-toast b { font-size: 12px; } .l-toast small { font-size: 11px; }
  .l-section { padding-top: 48px; padding-bottom: 48px; gap: 24px; }
  .l-eyebrow { font-size: 12px; }
  .l-h2 { font-size: 32px; line-height: 1.1; }
  .l-h2-dark, .l-cta .l-h2 { font-size: 28px !important; line-height: 1.12; letter-spacing: -0.035em; }
  .l-side { font-size: 16px; }
  .l-steps { grid-template-columns: 1fr; gap: 12px; }
  .l-step { padding: 20px; border-radius: 22px; flex-direction: row; gap: 16px; }
  .l-step-num { width: 40px; height: 40px; border-radius: 14px; font-size: 17px; }
  .l-step h3 { font-size: 18px; }
  .l-step p { font-size: 15px; line-height: 1.55; }
  .l-benefits { grid-template-columns: 1fr; gap: 0; border-radius: var(--r-card); background: var(--white); box-shadow: var(--shadow-card); overflow: hidden; }
  .l-benefit { padding: 18px 20px; border-radius: 0; box-shadow: none; flex-direction: row; gap: 14px; border-bottom: 1px solid var(--line); }
  .l-benefit:last-child { border-bottom: 0; }
  .l-benefit-ico { width: 42px; height: 42px; border-radius: 14px; }
  .l-benefit h3 { font-size: 16px; }
  .l-benefit p { font-size: 14px; line-height: 1.5; }
  .l-dark-wrap, .l-cta-wrap { padding-bottom: 48px; }
  .l-dark { border-radius: 30px; padding: 32px 22px; gap: 20px; }
  .l-dark-check { font-size: 15px; }
  .l-dark-phone { display: none; }
  .l-plans { grid-template-columns: 1fr; gap: 16px; }
  .l-plan { padding: 24px 20px; border-radius: 26px; gap: 20px; }
  .l-price { font-size: 36px; }
  .l-family { padding: 20px; }
  .l-faq-wrap { flex-direction: column; gap: 24px; }
  .l-faq-wrap > * { flex: none !important; }
  .l-faq button { padding: 16px 18px; font-size: 16px; }
  .l-faq p { padding: 0 18px 18px; font-size: 15px; }
  .l-cta { border-radius: 30px; padding: 32px 22px; gap: 24px; }
  .l-cta p { font-size: 16px !important; }
  .l-cta .btn-white { width: 100%; }
  .l-form { padding: 20px; border-radius: 24px; }
  .l-foot-cols { gap: 32px; }
}

/* ---------- Pantallas táctiles: todo control mide al menos 44 px ---------- */
@media (pointer: coarse) {
  .btn, .admin .btn, .admin .btn-xs, .tabs a, .mini-tabs a, .seg span, .code-link,
  .admin .input, .admin .select, .aside-nav a { min-height: 44px; }
  .photo-action-right button { width: 44px; height: 44px; top: 2px; right: 2px; }
  .photo-main, .photo-action-left button { height: 32px; }
}

/* @paginas */
