/* ===== ArmandoQ Diagnostic — tema oscuro pro ===== */
:root {
  --brand:   #3b82f6;   /* azul acento */
  --brand-2: #22d3ee;   /* cyan acento */
  --bg:      #0d1526;   /* fondo */
  --surface: #161f33;   /* tarjetas */
  --border:  #263351;   /* bordes sutiles */
  --text:    #e6edf7;   /* texto principal */
  --muted:   #8fa0bd;   /* texto tenue */
}

html { font-size: 15px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  margin-bottom: 60px;
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background:
    radial-gradient(1100px 500px at 85% -12%, rgba(59,130,246,.14), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(34,211,238,.07), transparent 55%),
    var(--bg);
}

/* ===== Navbar ===== */
.app-navbar {
  background: rgba(13,21,38,.82) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border) !important;
}
.navbar-brand {
  font-weight: 700;
  letter-spacing: .3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.app-navbar .nav-link { color: var(--muted) !important; font-weight: 500; }
.app-navbar .nav-link:hover, .app-navbar .nav-link.active { color: var(--text) !important; }

/* ===== Hero ===== */
.app-hero h1 {
  background: linear-gradient(90deg, #ffffff, #aebfdc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.app-hero .lead { color: var(--muted) !important; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.30);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
}
.card-footer { background: transparent; border-top: 1px solid var(--border); color: var(--muted) !important; }

/* ===== Tabla ===== */
.table { color: var(--text); margin-bottom: 0; }
.table > :not(caption) > * > * { background: transparent; border-color: var(--border); padding: .85rem 1.25rem; }
.table thead th {
  text-transform: uppercase;
  font-size: .72rem; letter-spacing: .06em;
  color: var(--muted); font-weight: 600;
}
.table-hover > tbody > tr:hover > * { background: rgba(59,130,246,.07); }

/* ===== Badges ===== */
.badge { font-weight: 600; padding: .42em .7em; border-radius: 8px; }
.badge.bg-success {
  background: rgba(34,197,94,.15) !important; color: #4ade80 !important;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,.4);
}
.badge.bg-secondary {
  background: rgba(143,160,189,.14) !important; color: var(--muted) !important;
  box-shadow: inset 0 0 0 1px rgba(143,160,189,.28);
}

/* ===== Botones ===== */
.btn-primary { background: linear-gradient(90deg, var(--brand), #2563eb); border: none; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline-primary { border-color: var(--brand); color: #7fb0ff; }
.btn-outline-primary:hover { background: var(--brand); color: #fff; }
.btn-outline-danger { border-color: #ef4444; color: #f87171; }

/* selector de idioma */
.btn-group .btn { font-weight: 600; }

/* quitar el foco blanco feo del template */
.btn:focus, .btn:active:focus, .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(59,130,246,.35) !important;
}

/* footer */
.footer { background: transparent; border-top: 1px solid var(--border) !important; color: var(--muted); }
a { color: #7fb0ff; }
a:hover { color: var(--brand-2); }

/* ===== Focos de estado (LEDs) ===== */
.status-strip { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.status-pill {
  display: flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: .65rem 1.1rem; min-width: 190px;
}
.led { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.led-on   { background: #22c55e; box-shadow: 0 0 9px 2px rgba(34,197,94,.65); }
.led-off  { background: #ef4444; box-shadow: 0 0 9px 2px rgba(239,68,68,.6); }
.led-warn { background: #f59e0b; box-shadow: 0 0 9px 2px rgba(245,158,11,.6); }
.status-pill .lbl { font-weight: 700; }
.status-pill .st  { color: var(--muted); font-size: .8rem; margin-left: auto; }

/* ===== Campo de WhatsApp (registro) ===== */
:root { --wa: #25D366; }  /* verde WhatsApp */

.wa-label {
  color: var(--wa);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.wa-logo { color: var(--wa); }

.wa-prefix {
  background: rgba(37, 211, 102, .14) !important;
  border-color: rgba(37, 211, 102, .45) !important;
  color: var(--wa) !important;
  display: flex;
  align-items: center;
}
.wa-group .form-select,
.wa-group .form-control {
  border-color: rgba(37, 211, 102, .3);
}
.wa-group .form-select:focus,
.wa-group .form-control:focus {
  border-color: var(--wa);
  box-shadow: 0 0 0 .2rem rgba(37, 211, 102, .25) !important;
}
.wa-group:focus-within .wa-prefix {
  background: rgba(37, 211, 102, .22) !important;
  border-color: var(--wa) !important;
}

/* ===== Tarjetas de auth (login / registro) ===== */
.auth-wrap {
  min-height: 78vh;
  display: flex; align-items: center; justify-content: center;
}
.auth-card {
  max-width: 470px; width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .38);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.auth-badge {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(34, 211, 238, .22));
  border: 1px solid var(--border);
  box-shadow: inset 0 0 18px rgba(59, 130, 246, .12);
}
.auth-title {
  font-weight: 700; margin-bottom: .2rem;
  background: linear-gradient(90deg, #fff, #b9c6de);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-sub { color: var(--muted); font-size: .9rem; }
.auth-card .form-label {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; margin-bottom: .3rem;
}
.auth-card .wa-label {
  text-transform: uppercase; letter-spacing: .05em; font-size: .74rem;
}
.auth-card .form-control,
.auth-card .form-select { padding: .6rem .8rem; }
.auth-card .btn-primary { padding: .65rem; font-weight: 600; }

/* --- Alertas pro de auth (login/registro/passwords) --- */
.auth-alert {
  display: flex; gap: 11px; align-items: flex-start;
  border-radius: 11px; padding: 12px 15px; font-size: 13.5px;
  margin-bottom: 14px; border: 1px solid; line-height: 1.5;
}
.auth-alert .ai { font-size: 18px; line-height: 1.2; flex-shrink: 0; }
.auth-alert b { color: #fff; font-weight: 600; }
.auth-alert.err  { background: rgba(239,68,68,.09);  border-color: rgba(239,68,68,.32);  color: #f4a7a3; }
.auth-alert.ok   { background: rgba(34,197,94,.09);  border-color: rgba(34,197,94,.32);  color: #7df0a8; }
.auth-alert.warn { background: rgba(245,158,11,.09); border-color: rgba(245,158,11,.32); color: #f0c674; }

/* --- Guía de pasos (activación y AQ Link) --- */
.aq-steps { list-style: none; padding: 0; margin: 0; }
.aq-steps li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: left;
}
.aq-steps li:last-child { border-bottom: none; }
.aq-step-n {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  background: linear-gradient(135deg, #4ea1ff, #22d3ee); color: #06101f; font-size: 15px;
}
.aq-steps li > div { display: flex; flex-direction: column; }
.aq-steps li b { color: #e8edf6; }
.aq-steps li span { color: var(--muted); font-size: 14px; }
.contact-box {
  background: rgba(37,211,102,.08); border: 1px solid rgba(37,211,102,.25);
  border-radius: 12px; padding: 20px;
}
.contact-qr { width: 168px; height: 168px; border-radius: 10px; background: #fff; padding: 8px; }
/* Tu imagen de QR con logo (respeta proporción, no la aplasta). */
.contact-qr-img { max-width: 240px; width: 100%; height: auto; border-radius: 14px; }

/* ============================================================
   ===== PRO UPGRADE — estilo global premium (v2) =====
   (No toca el /Login: usa clases propias .aql*. Las páginas Sincro
    tienen estilos scoped .svh y tampoco se ven afectadas.)
   ============================================================ */

/* Fondo global más rico + fijo */
body {
  background:
    radial-gradient(60% 70% at 12% 6%,  rgba(59,130,246,.20), transparent 60%),
    radial-gradient(55% 65% at 92% 10%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(75% 85% at 85% 100%, rgba(59,130,246,.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* Navbar con más profundidad + hover suave */
.app-navbar { box-shadow: 0 12px 34px -22px rgba(0,0,0,.95); }
.app-navbar .nav-link { transition: color .15s, background .15s; border-radius: 9px; padding-left: .75rem; padding-right: .75rem; }
.app-navbar .nav-link:hover { background: rgba(59,130,246,.10); }

/* Cards con gradiente sutil + hover elevado */
.card {
  background: linear-gradient(180deg, #182236, #121a2b);
  border-color: rgba(255,255,255,.07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 24px 54px -26px rgba(0,0,0,.65); border-color: rgba(88,166,255,.30); }

/* Inputs dark premium + foco con glow */
.form-control, .form-select {
  background: #0b1220; border: 1px solid #26344a; color: var(--text); border-radius: 11px;
}
.form-control::placeholder { color: #5a6b82; }
.form-control:focus, .form-select:focus {
  background: #0c1526; border-color: var(--brand); color: var(--text);
  box-shadow: 0 0 0 4px rgba(59,130,246,.16) !important;
}

/* Botón primario: gradiente + brillo + lift */
.btn { border-radius: 11px; }
.btn-primary {
  background: linear-gradient(180deg, #3b82f6, #1f5cbf);
  box-shadow: 0 14px 30px -14px rgba(37,99,235,.85);
  position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 18px 40px -14px rgba(37,99,235,.95); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 55%; height: 100%;
  transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); transition: left .5s;
}
.btn-primary:hover::after { left: 130%; }
.btn-outline-primary, .btn-outline-light, .btn-outline-danger { border-radius: 11px; transition: .15s; }

/* Auth card → glassmorphism premium (login queda con su propio estilo) */
.auth-wrap { min-height: calc(100vh - 140px); }
.auth-card {
  background: linear-gradient(180deg, rgba(23,31,45,.88), rgba(14,22,34,.94));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  box-shadow: 0 32px 84px -32px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.auth-card::before {
  content: ""; position: absolute; inset: 0; height: auto; border-radius: 24px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(88,166,255,.55), transparent 35%, transparent 70%, rgba(34,211,238,.42));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.auth-badge { box-shadow: 0 12px 30px -10px rgba(37,99,235,.6), inset 0 0 18px rgba(59,130,246,.15); }

/* Micro-pulido tablas/footer */
.table-hover > tbody > tr { transition: background .12s; }
.footer { backdrop-filter: blur(8px); background: rgba(13,21,38,.5); }

/* ===== Banner de cookies ===== */
.cookiebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080; padding: 12px; display: flex; justify-content: center; }
.cookiebar[hidden] { display: none; }
.ck-accepted .cookiebar { display: none; }
.cookiebar-in {
  max-width: 860px; width: 100%; display: flex; align-items: center; gap: 15px;
  background: linear-gradient(180deg, #223150, #1a2740);
  border: 1px solid rgba(88,166,255,.45); border-radius: 16px; padding: 15px 20px;
  box-shadow: 0 0 0 1px rgba(88,166,255,.10), 0 0 34px -6px rgba(59,130,246,.45), 0 28px 70px -18px rgba(0,0,0,.95);
  backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%);
  animation: ckup .35s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes ckup { from { transform: translateY(120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookiebar .ck-ico { font-size: 1.5rem; flex: none; }
.cookiebar p { margin: 0; color: #c3d2e6; font-size: .85rem; line-height: 1.45; }
.cookiebar p a { color: #58a6ff; font-weight: 700; text-decoration: none; }
.cookiebar p a:hover { text-decoration: underline; }
.cookiebar .ck-btn {
  flex: none; border: none; border-radius: 10px; padding: 10px 20px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #3b82f6, #1f5cbf); box-shadow: 0 10px 24px -12px rgba(37,99,235,.85); transition: transform .15s, box-shadow .15s;
}
.cookiebar .ck-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(37,99,235,.95); }
@media (max-width: 640px) { .cookiebar-in { flex-direction: column; text-align: center; gap: 10px; } }
