/* ==========================================================================
   GruAPP — sistema de diseño   (port de lib/core/theme/app_theme.dart)
   ========================================================================== */

:root {
  --primary: #1E3A8A;
  --accent: #F5A623;
  --accent-deep: #E8901A;
  --danger: #E24B4A;
  --success: #3ABF7A;

  /* Tema claro (default) */
  --bg: #F0EDE8;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --on-surface: #1A1A1A;
  --on-surface-muted: rgba(26, 26, 26, 0.55);
  --on-surface-faint: rgba(26, 26, 26, 0.30);
  --divider: rgba(0, 0, 0, 0.10);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --nav-bg: #FFFFFF;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Menú inferior flotante — tema claro */
  --tab-active: #E08600;
  --tab-hover: #1C1A17;
  --tab-inactive: #6B6760;
  --tab-glass: #FFFFFF;                       /* opaco: nada se transparenta detrás */
  --tab-edge: rgba(0, 0, 0, 0.07);
  --tab-sheen: rgba(255, 255, 255, 0.75);
  --tab-badge-ring: rgba(255, 255, 255, 0.95);
  --tab-rule: rgba(224, 134, 0, 0.60);
  --tab-water-a: rgba(245, 166, 35, 0.16);
  --tab-water-b: rgba(245, 166, 35, 0.10);
  --tab-water-c: rgba(120, 190, 230, 0.10);
  --tab-shadow: 0 10px 28px rgba(60, 50, 35, 0.14);
}

:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --surface: #1A1A1A;
  --card: #252525;
  --on-surface: #FFFFFF;
  --on-surface-muted: rgba(255, 255, 255, 0.55);
  --on-surface-faint: rgba(255, 255, 255, 0.25);
  --divider: rgba(255, 255, 255, 0.12);
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  --nav-bg: #000000;

  --tab-active: #F5A623;
  --tab-hover: #C9C4BA;
  --tab-inactive: #8C877E;
  --tab-glass: #1E1E1E;                       /* opaco */
  --tab-edge: rgba(255, 255, 255, 0.10);
  --tab-sheen: rgba(255, 255, 255, 0.07);
  --tab-badge-ring: rgba(26, 26, 26, 0.9);
  --tab-rule: rgba(245, 166, 35, 0.70);
  --tab-water-a: rgba(245, 166, 35, 0.20);
  --tab-water-b: rgba(245, 166, 35, 0.13);
  --tab-water-c: rgba(120, 190, 230, 0.11);
  --tab-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

/* Sin preferencia explícita → seguir el SO */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A;
    --surface: #1A1A1A;
    --card: #252525;
    --on-surface: #FFFFFF;
    --on-surface-muted: rgba(255, 255, 255, 0.55);
    --on-surface-faint: rgba(255, 255, 255, 0.25);
    --divider: rgba(255, 255, 255, 0.12);
    --shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
    --nav-bg: #000000;

    --tab-active: #F5A623;
    --tab-hover: #C9C4BA;
    --tab-inactive: #8C877E;
    --tab-glass: #1E1E1E;
    --tab-edge: rgba(255, 255, 255, 0.10);
    --tab-sheen: rgba(255, 255, 255, 0.07);
    --tab-badge-ring: rgba(26, 26, 26, 0.9);
    --tab-rule: rgba(245, 166, 35, 0.70);
    --tab-water-a: rgba(245, 166, 35, 0.20);
    --tab-water-b: rgba(245, 166, 35, 0.13);
    --tab-water-c: rgba(120, 190, 230, 0.11);
    --tab-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
  }
}

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* Iconos ilustrados de tipo de servicio (tamaño por pantalla) */
.svc-icon-sm { width: 34px; height: 34px; object-fit: contain; flex: none; }
.svc-icon-md { width: 52px; height: 52px; object-fit: contain; flex: none; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--on-surface);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
/* sin recuadro de foco salvo navegación por teclado */
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }

/* ── Escala tipográfica (equivale a _buildTextTheme) ────────────────────── */
.t-headline-lg { font-size: 26px; font-weight: 800; }
.t-headline-md { font-size: 22px; font-weight: 800; }
.t-headline-sm { font-size: 18px; font-weight: 800; }
.t-title-lg    { font-size: 17px; font-weight: 600; }
.t-title-md    { font-size: 15px; font-weight: 600; }
.t-title-sm    { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.t-body-lg     { font-size: 15px; }
.t-body-md     { font-size: 13px; }
.t-body-sm     { font-size: 12px; color: var(--on-surface-muted); }
.t-label-sm    { font-size: 10px; font-weight: 600; letter-spacing: 1px; }

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
.icon-sm { font-size: 18px; }
.icon-lg { font-size: 32px; }
.icon-xl { font-size: 48px; }

.text-muted  { color: var(--on-surface-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }

/* ── Layout base ───────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

.app-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex: none;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.app-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

/* Con un BottomSheet abierto (.sheet-backdrop, position:fixed dentro de .app-content),
   .bottom-nav (position:fixed también, pero HERMANO de .app-content bajo .app-shell, ambos
   sin ancestro que cree su propio stacking context) debía perder contra el z-index más alto
   del backdrop — en la práctica NO es así ni subiendo el backdrop a 2000 ni a 99999 en vivo, un
   comportamiento real del motor de render (visto tanto en Chromium como en Safari/iOS) que
   z-index no resuelve. En vez de perseguir stacking, se oculta el menú por completo mientras
   cualquier sheet está abierto — ni compite, ni se ve, ni se puede tocar por debajo del modal. */
body:has(.sheet-backdrop) .bottom-nav { visibility: hidden; pointer-events: none; }

/* ── Bottom navigation — píldora flotante opaca (diseño "Opción C") ────── */
.bottom-nav {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 492px;
  height: 64px;
  border-radius: 26px;
  display: flex;
  align-items: stretch;
  background: var(--tab-glass);
  border: 0.5px solid var(--tab-edge);
  box-shadow: var(--tab-shadow), inset 0 1px 0 var(--tab-sheen);
  overflow: hidden;
  isolation: isolate;
  z-index: 20;
}
/* línea de base cálida del contenedor */
.bottom-nav .tab-rule {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  bottom: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tab-rule), transparent);
}
/* capa "agua": manchas que derivan lentamente */
.bottom-nav::before {
  content: '';
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 60% at 22% 42%, var(--tab-water-a), transparent 68%),
    radial-gradient(32% 55% at 68% 62%, var(--tab-water-b), transparent 70%),
    radial-gradient(46% 66% at 88% 34%, var(--tab-water-c), transparent 72%);
  filter: blur(14px);
  animation: tabWater 14s ease-in-out infinite alternate;
}
/* brillo superior tipo superficie de agua */
.bottom-nav::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 52%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--tab-sheen), transparent);
}
@keyframes tabWater {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1); }
  50%  { transform: translate3d(5%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav::before { animation: none; }
}

.bottom-nav button {
  flex: 1;
  position: relative;
  z-index: 1;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--tab-inactive);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .22s ease;
}
.bottom-nav button:hover { color: var(--tab-hover); }
.bottom-nav button.active { color: var(--tab-active); }

/* barra superior del tab activo + su halo */
.bottom-nav button::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--tab-active);
  box-shadow: 0 6px 16px rgba(245, 166, 35, 0.45);
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity .26s ease, transform .4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bottom-nav button.active::before { opacity: 1; transform: scaleX(1); }
/* luz que cae desde la barra */
.bottom-nav button::after {
  content: '';
  position: absolute;
  z-index: -2;
  top: 0;
  width: 64px;
  height: 34px;
  background: radial-gradient(52% 100% at 50% 0%, rgba(245, 166, 35, 0.20), transparent 72%);
  opacity: 0;
  transition: opacity .3s ease;
}
.bottom-nav button.active::after { opacity: 1; }

/* icono */
.bottom-nav .nav-icon {
  font-size: 23px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1), font-variation-settings .25s;
}
.bottom-nav button.active .nav-icon {
  transform: translateY(-1px) scale(1.06);
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* pulso ligero: hay al menos 1 servicio en curso */
.bottom-nav button.pulse .nav-icon {
  color: var(--tab-active);
  animation: nav-pulse 2s ease-in-out infinite;
}
.bottom-nav button.pulse.active .nav-icon { animation: none; }
@keyframes nav-pulse {
  0%, 100% { transform: scale(1); opacity: .82; }
  50%      { transform: scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav button.pulse .nav-icon { animation: none; }
}

/* etiqueta */
.bottom-nav button span:not(.nav-icon):not(.tab-badge) {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: font-weight .22s ease;
}
.bottom-nav button.active span:not(.nav-icon):not(.tab-badge) { font-weight: 700; }

/* badge */
.bottom-nav .tab-badge {
  position: absolute;
  top: 9px;
  left: 50%;
  margin-left: 4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--tab-active);
  color: #FFF;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--tab-badge-ring);
}

/* ── Cards / superficies ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--on-surface-muted);
  text-transform: uppercase;
}

.divider { height: 1px; background: var(--divider); border: 0; margin: 0; }

/* ── Listas del panel de administración ───────────────────────────────── */
.alist { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 24px; }
.alist-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 16px 0; }
.alist-count { font-size: 12px; font-weight: 700; color: var(--on-surface-muted); }

.acard {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  overflow: hidden;
}
.acard-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.acard-head .tipo { flex: 1; font-size: 12px; font-weight: 800; letter-spacing: .6px; color: var(--accent); text-transform: uppercase; }
.acard-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.acard-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--on-surface-muted); }
.acard-row .material-symbols-rounded { font-size: 15px; color: var(--on-surface-faint); flex: none; }
.acard-row b { color: var(--on-surface); font-weight: 600; }
.acard-row .ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard-foot {
  display: flex;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 7%, transparent);
  font-size: 11px;
  color: var(--on-surface-muted);
}
.acard-amount { font-size: 18px; font-weight: 900; color: var(--accent); }

/* etiqueta de formulario genérica (usada fuera de SolicitarTab) */
.form-lbl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--on-surface-muted);
}
.form-lbl .req { color: var(--danger); font-weight: 800; }
.form-lbl em { font-style: normal; font-weight: 400; font-size: 10px; opacity: .6; }
.input.error:not(:focus) {
  border: 1px solid rgba(226, 75, 74, 0.55);
  background: rgba(226, 75, 74, 0.06);
}

/* buscador y controles del panel admin */
.pv-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 16px 0;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--on-surface-muted);
}
.pv-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--on-surface);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.pv-switch { position: relative; width: 42px; height: 24px; flex: none; }
.pv-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pv-switch .pv-track { position: absolute; inset: 0; border-radius: 999px; background: var(--divider); transition: background .15s; pointer-events: none; }
.pv-switch .pv-track::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; left: 3px; top: 3px; transition: transform .15s; }
.pv-switch input:checked + .pv-track { background: var(--accent); }
.pv-switch input:checked + .pv-track::before { transform: translateX(18px); }
.pv-switch input:disabled { cursor: default; }

.pv-prio {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
  font-size: 12px;
  color: var(--on-surface-muted);
}
.pv-prio .input { width: 72px; padding: 6px 8px; text-align: center; }
.pv-prio .btn { padding: 6px 12px; font-size: 12px; }

.pv-calc {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
  font-size: 12px;
  color: var(--on-surface-muted);
}
.pv-calc > span:first-of-type { flex: 1 1 100%; }
.pv-calc select.input { width: auto; padding: 6px 8px; }
.pv-calc input.input { width: 84px; padding: 6px 8px; text-align: right; }
.pv-calc-u { min-width: 30px; }
.pv-calc .btn { padding: 6px 12px; font-size: 12px; margin-left: auto; }

.pv-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pv-table th { text-align: left; font-weight: 700; color: var(--on-surface-muted); padding: 6px 8px; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.pv-table td { padding: 6px 8px; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.pv-table tr:last-child td { border-bottom: none; }

.pv-pw { position: relative; }
.pv-pw .input { padding-right: 44px; width: 100%; }
.pv-pw-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--on-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* chip de estatus (usa --c inyectado inline) */
.achip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  color: var(--c, var(--on-surface-muted));
  background: color-mix(in srgb, var(--c, var(--on-surface-muted)) 14%, transparent);
}

/* ── Filas de detalle (Mis Servicios · detalle / pago) — port de _detalleRow ── */
.detcard {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.detrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
}
.detrow + .detrow { border-top: 1px solid color-mix(in srgb, var(--on-surface) 7%, transparent); }
.detrow-ic { color: var(--accent) !important; font-size: 18px !important; flex: none; }
.detrow-lbl { flex: 1; font-size: 12px; color: var(--on-surface-muted); }
.detrow.no-lbl .detrow-val { flex: 1; text-align: left; white-space: normal; font-weight: 700; }
.detrow.wrap .detrow-val { white-space: normal; overflow: visible; text-overflow: clip; }
.detrow-val {
  min-width: 0;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Botones ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 14px 18px;
  border: 0;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
  cursor: pointer;
  transition: filter .15s, opacity .15s;
  /* Sin esto, algunos navegadores (Safari/iOS sobre todo) dibujan el botón con su chroma
     nativo de control en vez del CSS del autor en estado disabled -> se ve "apagado" pese
     a que background/border/color siguen puestos. */
  appearance: none;
  -webkit-appearance: none;
}
.btn:disabled { cursor: default; }
/* Variante compacta — p.ej. "Cancelar solicitud" cuando no debe competir visualmente con el
   contenido principal de la tarjeta (ver ActivoCard "COTIZACIONES RECIBIDAS"). */
.btn.sm { min-height: 38px; padding: 9px 14px; font-size: 12.5px; }

.btn-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #1A1000;
  box-shadow: 0 4px 15px rgba(245, 166, 35, .25);
}
.btn-gradient:hover:not(:disabled) { filter: brightness(1.05); }
.btn-gradient:disabled { background: #282114; color: #5D4E31; box-shadow: none; }
.btn-gradient.is-loading { background: #8A5D15; color: var(--accent); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--divider);
  color: var(--on-surface);
}
/* Variante roja-suave para acciones destructivas secundarias (p.ej. "Cancelar solicitud") —
   ver CancelarSolicitudButton.razor. Deshabilitado NO se ve gris: se ve la misma familia de
   rojo, solo más tenue (sigue leyéndose como "esto cancela algo", nomás que todavía no puedes). */
.btn-danger-outline {
  background: transparent;
  border: 1.5px solid var(--danger);
  color: var(--danger);
}
.btn-danger-outline:disabled {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  color: color-mix(in srgb, var(--danger) 60%, transparent);
}
.btn-ghost { background: transparent; color: var(--accent); box-shadow: none; min-height: 0; width: auto; padding: 6px 8px; }

/* ── Campos de texto ──────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-muted);
  margin-bottom: 6px;
}
.input,
.select,
.textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.input:focus,
.select:focus,
.textarea:focus { border-color: var(--accent); border-width: 2px; }
.input::placeholder, .textarea::placeholder { color: var(--on-surface-faint); }
.field-error { color: #FF6B6B; font-size: 12px; font-weight: 600; margin-top: 4px; }

/* ── Glassmorphism (login / splash / toasts) ─────────────────────────── */
.glass-scene {
  min-height: 100vh;
  background: linear-gradient(160deg, #1A1A1A 0%, #2D2D2D 60%, #1A1A1A 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}

/* .login-form / .reg-form van sobre el <form> de <EditForm> (componente),
   así que su CSS no puede ser scoped -> vive aquí. */
.login-form, .reg-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-form > label, .login-form .lbl,
.reg-form > label, .reg-form .lbl { align-self: stretch; text-align: left; }
.login-form .forgot { align-self: flex-end; }
.glass-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.glass-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.glass-input::placeholder { color: rgba(255, 255, 255, 0.20); }
.glass-input:focus { border-color: var(--accent); }

/* ── Toasts ───────────────────────────────────────────────────────────── */
.toast-host {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 460px;
  width: calc(100% - 48px);
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  animation: toast-in .35s cubic-bezier(.16, 1, .3, 1);
}
.toast.ok  { background: rgba(58, 191, 122, 0.16); border: 1px solid rgba(58, 191, 122, 0.4); }
.toast.err { background: rgba(226, 75, 74, 0.16);  border: 1px solid rgba(226, 75, 74, 0.4); }
@keyframes toast-in { from { transform: translateY(-120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── AdminPageHeader (título + refresco, todas las vistas del panel admin) ── */
.apg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.apg-refresh {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--on-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.apg-refresh:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.apg-refresh:disabled { opacity: .6; cursor: default; }
.apg-spin { animation: apg-spin .8s linear infinite; }
@keyframes apg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .apg-spin { animation: none; } }

/* ── Utilidades ───────────────────────────────────────────────────────── */
.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.p-16 { padding: 16px; } .p-20 { padding: 20px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.grow { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }
.full { width: 100%; }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(245, 166, 35, .25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 166, 35, .14);
  color: var(--accent);
}

.map-container {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}

/* ── Infra Blazor (error UI / validación) ─────────────────────────────── */
#blazor-error-ui {
  color-scheme: light only;
  background: #fff3cd;
  color: #664d03;
  bottom: 0;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  font-size: 13px;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.9rem; top: 0.6rem; }
#blazor-error-ui .reload { color: inherit; font-weight: 700; }

.blazor-error-boundary { background: var(--danger); color: #fff; padding: 1rem; }
.blazor-error-boundary::after { content: "Ha ocurrido un error."; }

.validation-message { color: #FF6B6B; font-size: 12px; font-weight: 600; }
.invalid { outline: 1px solid #FF6B6B; }
