/* =====================================================================
   FULLEXTREMO — Sistema visual "Bahía de calibración"
   La estética de un banco de pruebas de precisión: negro azulado de
   monitor apagado, un solo neón cian como instrumento de medida y
   magenta reservado para lo que exige atención. Archivo (ancha,
   industrial) titula; Instrument Sans conversa; IBM Plex Mono muestra
   todo dato que se lee en voz alta: código, placa, importe, hora.
   ===================================================================== */

:root {
  /* Superficies */
  --n0: #04060B;                       /* fondo profundo */
  --n1: #090D15;                       /* panel base */
  --n2: #0E141F;                       /* panel elevado */
  --n3: #141C2A;                       /* controles */
  --hueco: #060910;                    /* campos de entrada */

  /* Líneas */
  --linea:        rgba(120, 200, 255, .10);
  --linea-fuerte: rgba(120, 200, 255, .26);

  /* Neón (tema.css.php lo reescribe con el color elegido en el panel) */
  --ambar:       #00E5FF;
  --ambar-hondo: #00A8C0;
  --halo:        rgba(0, 229, 255, .15);
  --halo-fuerte: rgba(0, 229, 255, .42);
  --acento-rgb:  0, 229, 255;
  --magenta:     #FF2E7E;

  /* Señales de estado */
  --menta: #29F2A9;
  --rojo:  #FF4D6D;
  --hielo: #7FB2FF;

  /* Texto */
  --texto:   #E9F4FF;
  --texto-2: #9AAEC4;
  --gris:    #5F7288;

  /* Tipografía */
  --display: 'Archivo', 'Arial Narrow', sans-serif;
  --body:    'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  /* Geometría: radios suaves + una sola esquina cortada como firma */
  --corte: 18px;
  --corte-sm: 10px;
  --radio: 16px;
  --radio-sm: 10px;
  --sombra: 0 24px 60px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--texto);
  background-color: var(--n0);
  background-image:
    radial-gradient(80% 55% at 18% -10%, var(--halo) 0%, transparent 55%),
    radial-gradient(55% 45% at 92% 8%, rgba(255, 46, 126, .08) 0%, transparent 58%),
    radial-gradient(70% 50% at 50% 115%, rgba(var(--acento-rgb), .07) 0%, transparent 60%),
    linear-gradient(rgba(120, 200, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 200, 255, .028) 1px, transparent 1px);
  background-size: auto, auto, auto, 64px 64px, 64px 64px;
  background-attachment: fixed;
}

main { flex: 1 0 auto; padding-bottom: 72px; }

::selection { background: var(--halo-fuerte); color: var(--texto); }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -.015em;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1rem; font-stretch: 105%; }
p  { margin: 0 0 1em; }
a  { color: var(--ambar); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
hr, .rule { border: 0; border-top: 1px solid var(--linea); margin: 20px 0; }

.h-lg { font-size: clamp(1.45rem, 4vw, 1.9rem); }
.h-xl { font-size: clamp(1.7rem, 5vw, 2.3rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: .68rem; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--ambar);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--ambar), transparent);
  box-shadow: 0 0 8px var(--halo-fuerte);
}
.hint  { font-size: .84rem; color: var(--gris); line-height: 1.55; }
.muted { color: var(--texto-2); }
.lead, .hero p.lead { font-size: 1.1rem; color: var(--texto-2); max-width: 52ch; }

/* ---------- Estructura ---------- */
.wrap    { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { width: 100%; max-width: 740px;  margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--ambar); color: var(--n0);
  padding: 10px 18px; font-weight: 700;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Cabecera: consola fija ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(4, 6, 11, .82);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--linea);
  transition: background .25s ease;
}
.site-header::after {
  content: ''; display: block; height: 1px;
  background: linear-gradient(90deg, transparent 8%, var(--ambar) 42%, var(--magenta) 58%, transparent 92%);
  opacity: .55;
}
.site-header.compacta { background: rgba(4, 6, 11, .96); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; flex-wrap: wrap;
  transition: min-height .25s ease;
}
.site-header.compacta .wrap { min-height: 56px; }

.logo {
  font-family: var(--display);
  font-weight: 900; font-stretch: 122%;
  font-size: 1.24rem; letter-spacing: .05em;
  color: var(--texto); text-transform: uppercase;
  display: inline-flex; align-items: baseline; gap: .3em;
}
.logo:hover { text-decoration: none; }
.logo b { color: var(--ambar); text-shadow: 0 0 20px var(--halo-fuerte); }
.logo-tag {
  font-family: var(--mono); font-size: .58rem; font-weight: 500;
  letter-spacing: .22em; color: var(--gris);
  border: 1px solid var(--linea); padding: 2px 7px;
  text-transform: uppercase;
}

.header-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.header-nav a {
  position: relative;
  font-size: .88rem; font-weight: 500;
  color: var(--texto-2);
  padding: 9px 14px;
  border: 1px solid transparent;
}
.header-nav a::after {
  content: '';
  position: absolute; left: 14px; right: 14px; bottom: 5px; height: 1px;
  background: var(--ambar);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.header-nav a:hover { color: var(--texto); text-decoration: none; }
.header-nav a:hover::after { transform: scaleX(1); }
.header-nav .nav-cta {
  color: var(--ambar);
  border-color: var(--linea-fuerte);
  border-radius: var(--radio-sm);
  border-top-right-radius: 3px;
  background: var(--halo);
}
.header-nav .nav-cta::after { display: none; }
.header-nav .nav-out { color: var(--gris); }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 12vw, 130px) 0 clamp(52px, 8vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(104deg, transparent 44%, var(--halo) 50%, transparent 56%);
  opacity: .8;
}
.hero .wrap { position: relative; }
.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 8vw, 4.8rem);
  font-stretch: 124%;
  letter-spacing: -.03em;
  line-height: .96;
  text-shadow: 0 0 26px var(--halo), 0 0 80px rgba(255, 46, 126, .14);
}
.hero h1::after {
  content: '';
  display: block;
  width: 110px; height: 2px; margin-top: 24px;
  background: linear-gradient(90deg, var(--ambar), var(--magenta));
  box-shadow: 0 0 16px var(--halo-fuerte);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero .eyebrow, .hero h1, .hero .lead, .hero-actions {
  animation: sube .7s cubic-bezier(.2, .75, .25, 1) both;
}
.hero h1 { animation-delay: .07s; }
.hero .lead { animation-delay: .14s; }
.hero-actions { animation-delay: .21s; }
@keyframes sube { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Ficha técnica bajo el titular */
.specs {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--linea);
  font-family: var(--mono);
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gris);
  animation: sube .7s cubic-bezier(.2, .75, .25, 1) .28s both;
}
.specs b { color: var(--ambar); font-weight: 600; margin-left: 6px; }

/* ---------- Tarjetas: módulos con chaflán ---------- */
.card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(120, 200, 255, .06), rgba(120, 200, 255, .01) 42%),
    rgba(9, 13, 21, .72);
  backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  border-top-right-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--corte)) 0, 100% var(--corte), 100% 100%, 0 100%);
  padding: 28px;
  box-shadow: var(--sombra);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
.card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--halo-fuerte) 40%, rgba(255, 46, 126, .35) 60%, transparent);
  opacity: .75;
}
.card::after {
  /* Bisel luminoso en la esquina cortada: la firma de la marca */
  content: '';
  position: absolute; top: 0; right: 0;
  width: calc(var(--corte) * 1.42); height: 1px;
  background: linear-gradient(90deg, var(--ambar), transparent);
  transform: rotate(45deg);
  transform-origin: right top;
  box-shadow: 0 0 10px var(--halo-fuerte);
}
.card:hover { border-color: var(--linea-fuerte); box-shadow: var(--sombra), 0 0 38px -14px var(--halo-fuerte); }
.card + .card { margin-top: 18px; }
.card h2, .card h3 { margin-top: 0; }
.card-table { padding: 0; overflow-x: auto; }
.card-table::after { display: none; }

.kpi { padding: 18px 20px; }
.kpi .eyebrow { margin-bottom: 2px; }
.kpi .pay-amount { font-size: 2.1rem; margin: 2px 0 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid var(--linea-fuerte);
  background: var(--n3);
  color: var(--texto);
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radio-sm);
  border-top-right-radius: 3px;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:hover { background: #1B2534; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.btn-primary {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ambar), color-mix(in srgb, var(--ambar) 55%, var(--magenta)));
  border-color: transparent;
  color: var(--n0);
  font-weight: 700;
  box-shadow: 0 6px 26px -8px var(--halo-fuerte);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .45) 50%, transparent 60%);
  transform: translateX(-130%);
}
.btn-primary:hover { box-shadow: 0 8px 36px -6px var(--halo-fuerte); transform: translateY(-1px); }
.btn-primary:hover::after { transform: translateX(130%); transition: transform .65s ease; }
.btn-ghost { background: transparent; border-color: var(--linea); color: var(--texto-2); }
.btn-ghost:hover { border-color: var(--linea-fuerte); color: var(--texto); background: rgba(120, 200, 255, .05); }
.btn-ok     { background: rgba(41, 242, 169, .1);  border-color: rgba(41, 242, 169, .45); color: var(--menta); }
.btn-ok:hover { background: rgba(41, 242, 169, .18); box-shadow: 0 0 22px -10px rgba(41, 242, 169, .7); }
.btn-danger { background: rgba(255, 77, 109, .1);  border-color: rgba(255, 77, 109, .45); color: var(--rojo); }
.btn-danger:hover { background: rgba(255, 77, 109, .18); }
.btn-warn   { background: rgba(255, 46, 126, .08); border-color: rgba(255, 46, 126, .4); color: #FF7BAB; }
.btn-warn:hover { background: rgba(255, 46, 126, .16); }
.btn-dark   { background: var(--hueco); }
.btn-sm     { padding: 8px 13px; font-size: .72rem; }
.btn-block  { display: flex; width: 100%; }
.file-btn   { margin: 0; cursor: pointer; }
.summary-btn { list-style: none; cursor: pointer; display: inline-flex; }
.summary-btn::-webkit-details-marker { display: none; }

/* ---------- Formularios: consola de entrada ---------- */
label {
  display: block;
  font-family: var(--mono);
  font-size: .68rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ambar);
  opacity: .85;
  margin: 20px 0 8px;
}
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=file], input[type=color],
select, textarea {
  width: 100%;
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--texto);
  background: var(--hueco);
  border: 1px solid var(--linea);
  border-left: 2px solid var(--linea-fuerte);
  border-radius: var(--radio-sm);
  padding: 13px 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: #46586E; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ambar);
  border-left-color: var(--ambar);
  box-shadow: 0 0 0 1px var(--ambar), 0 0 20px -6px var(--halo-fuerte);
}
textarea { min-height: 100px; resize: vertical; font-family: var(--body); }
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ambar) 50%),
    linear-gradient(135deg, var(--ambar) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}
input[type=color] { padding: 4px; height: 46px; cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: var(--ambar); transform: scale(1.15); margin-right: 6px; }

.up { text-transform: uppercase; }
.form-row { gap: 12px; align-items: end; }
.item-row { gap: 8px; margin-bottom: 8px; }
.w-money { width: 140px; flex: none; }
.error-msg { color: var(--rojo); font-size: .85rem; margin-top: 8px; }

/* ---------- Fichas de selección (servicio / horario) ---------- */
.service-grid, .slots {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: 8px;
}
.slots { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
.service-grid input, .slots input { position: absolute; opacity: 0; pointer-events: none; }
.service-grid label, .slots label {
  position: relative;
  margin: 0; text-align: center; cursor: pointer;
  padding: 14px 10px;
  font-family: var(--mono);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .08em;
  color: var(--texto-2); text-transform: uppercase;
  background: var(--hueco);
  border: 1px solid var(--linea);
  border-radius: var(--radio-sm);
  border-top-right-radius: 3px;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.service-grid label:hover, .slots label:hover { border-color: var(--linea-fuerte); color: var(--texto); }
.service-grid label:has(input:checked), .slots label:has(input:checked),
.service-grid label.marcado,            .slots label.marcado {
  border-color: var(--ambar);
  color: var(--ambar);
  background: var(--halo);
  box-shadow: inset 0 0 22px -12px var(--ambar), 0 0 22px -10px var(--halo-fuerte);
  transform: translateY(-2px);
}
.service-grid label:has(input:checked)::after, .slots label:has(input:checked)::after,
.service-grid label.marcado::after,            .slots label.marcado::after {
  content: '';
  position: absolute; right: 10px; top: 10px;
  width: 5px; height: 9px;
  border: solid var(--ambar); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.service-grid label:has(input:focus-visible), .slots label:has(input:focus-visible) {
  outline: 2px solid var(--ambar); outline-offset: 2px;
}
.chip-static { cursor: default; }

/* ---------- Asistente de reserva ---------- */
.steps-bar { display: flex; gap: 8px; margin: 28px 0 32px; }
.steps-bar span {
  flex: 1; height: 3px;
  background: rgba(120, 200, 255, .12);
  border-radius: 3px;
  transition: background .3s ease, box-shadow .3s ease;
}
.steps-bar span.done { background: var(--ambar); box-shadow: 0 0 10px var(--halo-fuerte); }

.step-title { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.step-title h2 { margin: 0; }
.step-title .num {
  font-family: var(--mono); font-size: .82rem; font-weight: 600;
  color: var(--ambar);
  border: 1px solid var(--linea-fuerte);
  padding: 4px 9px;
  flex: none;
  border-radius: 7px; border-top-right-radius: 2px;
}
.step-title .opt { text-transform: none; font-size: .9rem; color: var(--gris); font-weight: 400; letter-spacing: 0; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.wizard-step { animation: sube .35s ease both; }

/* ---------- Placa del código (elemento de firma) ---------- */
.code-box {
  display: inline-block;
  font-family: var(--mono); font-weight: 600;
  font-size: 1.55rem; letter-spacing: .18em;
  color: var(--ambar);
  padding: 18px 30px;
  background: var(--hueco);
  border: 1px solid var(--ambar);
  border-radius: var(--radio-sm);
  border-top-right-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--corte)) 0, 100% var(--corte), 100% 100%, 0 100%);
  text-shadow: 0 0 18px var(--halo-fuerte);
  box-shadow: inset 0 0 30px -16px var(--ambar), 0 0 30px -12px var(--halo-fuerte);
}
.code-box-sm { font-size: .84rem; letter-spacing: .05em; padding: 10px 14px; word-break: break-all; }
.track { font-family: var(--mono); letter-spacing: .1em; }

/* ---------- Línea de tiempo: circuito de proceso ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 32px; position: relative; }
.timeline::before {
  content: '';
  position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--ambar), rgba(120, 200, 255, .1));
  box-shadow: 0 0 12px var(--halo-fuerte);
}
.timeline li { position: relative; padding: 0 0 22px; color: var(--texto-2); font-size: .95rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot {
  position: absolute; left: -32px; top: 4px;
  width: 16px; height: 16px;
  background: var(--n0);
  border: 2px solid rgba(120, 200, 255, .22);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);   /* rombo */
}
.timeline li.done { color: var(--texto); }
.timeline li.done .dot { border-color: var(--ambar); background: var(--ambar); box-shadow: 0 0 12px var(--halo-fuerte); }
.timeline li.current { color: var(--texto); font-weight: 600; }
.timeline li.current .dot {
  border-color: var(--ambar);
  background: var(--n0);
  box-shadow: 0 0 0 5px var(--halo), 0 0 24px var(--ambar);
  animation: pulso 2.2s ease-in-out infinite;
}
.timeline li.pending { color: var(--gris); }
@keyframes pulso {
  0%, 100% { box-shadow: 0 0 0 4px var(--halo), 0 0 18px var(--ambar); }
  50%      { box-shadow: 0 0 0 9px rgba(var(--acento-rgb), .05), 0 0 26px var(--ambar); }
}

/* ---------- Etiquetas de estado ---------- */
.status-chip, .badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--linea);
  background: var(--hueco);
  color: var(--texto-2);
  white-space: nowrap;
  border-radius: 999px;
}
.status-chip::before { content: ''; width: 7px; height: 7px; background: currentColor; flex: none;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.chip-espera,  .b-espera  { color: var(--hielo); border-color: rgba(127, 178, 255, .35); }
.chip-proceso, .b-proceso { color: var(--ambar); border-color: var(--linea-fuerte); }
.chip-ok,      .b-ok      { color: var(--menta); border-color: rgba(41, 242, 169, .4); }
.chip-cancel,  .b-cancel  { color: var(--rojo);  border-color: rgba(255, 77, 109, .4); }
.vivo-senal { margin-left: 8px; font-size: .62rem; }
.vivo-senal::before { animation: latido 1.7s ease-in-out infinite; }
@keyframes latido { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* ---------- Datos ---------- */
.data-list { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; margin: 0; }
.data-list dt {
  font-family: var(--mono);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gris);
  padding: 12px 0; border-bottom: 1px solid var(--linea);
}
.data-list dd {
  margin: 0; padding: 12px 0; text-align: right;
  border-bottom: 1px solid var(--linea);
  color: var(--texto);
}
.data-list dt:last-of-type, .data-list dd:last-of-type { border-bottom: 0; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; white-space: nowrap;
  font-family: var(--mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ambar);
  padding: 15px 18px;
  border-bottom: 1px solid var(--linea-fuerte);
  background: var(--hueco);
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.table tr:hover td { background: rgba(var(--acento-rgb), .045); }
.table tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }
.pad-lg { padding: 34px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 18px; }
.filters label { margin: 0 0 6px; }
.filters > div { min-width: 165px; }

/* ---------- Cotización y pago ---------- */
.quote-table { width: 100%; border-collapse: collapse; }
.quote-table td { padding: 12px 0; border-bottom: 1px solid var(--linea); }
.quote-table td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; }
.quote-table tr.total td {
  border-bottom: 0; border-top: 2px solid var(--ambar);
  padding-top: 18px;
  font-family: var(--display); font-size: 1.3rem; font-weight: 800;
  font-stretch: 112%; text-transform: uppercase;
}
.quote-table tr.total td:last-child {
  font-family: var(--mono); color: var(--ambar);
  text-shadow: 0 0 14px var(--halo-fuerte);
}
.quote-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.pay-amount {
  display: block;
  font-family: var(--mono); font-weight: 600;
  font-size: 2.1rem; letter-spacing: -.01em;
  color: var(--ambar);
  text-shadow: 0 0 20px var(--halo-fuerte);
  margin: 6px 0 4px;
}
.gateway-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Chat: canal de comunicaciones ---------- */
.chat-box { display: flex; flex-direction: column; gap: 14px; }
.chat-msgs {
  display: flex; flex-direction: column; gap: 14px;
  max-height: 430px; min-height: 190px;
  overflow-y: auto;
  padding: 6px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--linea-fuerte) transparent;
}
.chat-msgs::-webkit-scrollbar { width: 6px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--linea-fuerte); }
.msg { max-width: 80%; animation: sube .25s ease both; }
.msg .who {
  display: block;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gris);
  margin-bottom: 5px;
}
.msg .bubble {
  display: inline-block;
  background: var(--n2);
  border: 1px solid var(--linea);
  border-left: 2px solid var(--magenta);
  padding: 12px 16px;
  color: var(--texto);
  white-space: pre-wrap; word-break: break-word;
  border-radius: 14px 14px 14px 4px;
  text-align: left;
}
.msg .time { display: block; font-family: var(--mono); font-size: .64rem; color: var(--gris); margin-top: 5px; }
.msg.mine { margin-left: auto; text-align: right; }
.msg.mine .bubble {
  background: var(--halo);
  border-color: var(--linea-fuerte);
  border-left: 1px solid var(--linea-fuerte);
  border-right: 2px solid var(--ambar);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 0 22px -12px var(--halo-fuerte);
}
.msg img.chat-photo {
  display: block; margin-top: 8px;
  max-width: 230px;
  border: 1px solid var(--linea-fuerte);
}
.chat-form { display: flex; gap: 10px; align-items: center; }
.chat-form input[type=text] { flex: 1; }

/* ---------- Fotos ---------- */
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.photo-grid img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--linea);
  background: var(--hueco);
  border-radius: var(--radio-sm);
  transition: border-color .2s ease, transform .2s ease;
}
.photo-grid img:hover { border-color: var(--ambar); transform: scale(1.02); }

/* ---------- Avisos: indicadores de consola ---------- */
.alert {
  position: relative;
  border: 1px solid var(--linea);
  border-left: 3px solid var(--gris);
  background: var(--hueco);
  padding: 15px 18px;
  margin: 16px 0;
  font-size: .92rem;
  color: var(--texto-2);
  border-radius: var(--radio-sm);
  border-top-right-radius: 3px;
}
.alert-error { border-left-color: var(--rojo);  color: #FFC2CE; }
.alert-ok    { border-left-color: var(--menta); color: #B4F5DE; }
.alert-info  { border-left-color: var(--hielo); color: #CBDFFF; }

/* Bloque recién actualizado por el tiempo real */
.destello { animation: destella 1.3s ease; }
@keyframes destella {
  0%   { box-shadow: 0 0 0 1px var(--ambar), 0 0 36px -8px var(--halo-fuerte); }
  100% { box-shadow: var(--sombra); }
}

/* ---------- Utilidades ---------- */
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ai-base { align-items: baseline; }
.f1 { flex: 1; }
.minw { min-width: 220px; }
.narrow { max-width: 460px; }
.inline-form { display: inline-block; }
.mt-0 { margin-top: 0; }   .mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.aparecer { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.aparecer.visible { opacity: 1; transform: none; }

/* ---------- Pie ---------- */
.site-footer {
  border-top: 1px solid var(--linea);
  background: rgba(4, 6, 11, .8);
  padding: 28px 0;
  font-size: .8rem;
  color: var(--gris);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.foot-mark {
  font-family: var(--display); font-weight: 900; font-stretch: 122%;
  letter-spacing: .05em; color: var(--texto-2); text-transform: uppercase;
}
.foot-mark b { color: var(--ambar); }
.foot-services { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; }
.foot-note { margin-left: auto; }

/* ---------- Panel interno: misma bahía, más densidad ---------- */
.admin-body .card { padding: 22px; }
.admin-header { background: rgba(4, 6, 11, .96); }
.admin-header .logo b { color: var(--texto-2); text-shadow: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  :root { --corte: 10px; }
  .site-header .wrap { min-height: 58px; padding: 10px 18px; }
  .header-nav a { padding: 8px 10px; font-size: .82rem; }
  .card { padding: 20px; }
  .msg { max-width: 92%; }
  .data-list { grid-template-columns: 1fr; }
  .data-list dd { text-align: left; padding-top: 0; }
  .data-list dt { border-bottom: 0; padding-bottom: 2px; }
  .foot-note { margin-left: 0; }
  .quote-table tr.total td { font-size: 1.05rem; }
  .code-box { font-size: 1.2rem; padding: 14px 20px; letter-spacing: .12em; }
  .kpi .pay-amount { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .aparecer { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .btn, .chat-form, .vivo-senal { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #bbb; box-shadow: none; clip-path: none; }
  .pay-amount, .code-box, .quote-table tr.total td:last-child { color: #000; text-shadow: none; }
}

/* ---------- Detalles finos ---------- */
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--n0); }
body::-webkit-scrollbar-thumb {
  background: var(--n3);
  border-radius: 6px;
  border: 2px solid var(--n0);
}
body::-webkit-scrollbar-thumb:hover { background: var(--linea-fuerte); }

.table a { font-family: var(--mono); font-size: .82rem; }

/* Enfoque visible también en enlaces */
a:focus-visible { outline: 2px solid var(--ambar); outline-offset: 3px; border-radius: 4px; }

/* Registro técnico (Herramientas) */
.log-box {
  margin: 0;
  max-height: 260px; overflow: auto;
  font-family: var(--mono); font-size: .74rem; line-height: 1.7;
  color: var(--texto-2);
  background: var(--hueco);
  border: 1px solid var(--linea);
  border-left: 2px solid var(--ambar);
  border-radius: var(--radio-sm);
  padding: 14px 16px;
  white-space: pre-wrap; word-break: break-all;
  scrollbar-width: thin; scrollbar-color: var(--linea-fuerte) transparent;
}
