/* css/axis_publico.css — v4
   Identidad visual AXIS para las pantallas PÚBLICAS (colaboradores y Control de Accesos).
   Una sola hoja para todas: se descarga una vez y el navegador la guarda, así las pantallas cargan más rápido.
   Sin Tailwind ni fuentes externas. Uso: <link rel="stylesheet" href="css/axis_publico.css?v=1"> y <body class="ax"> */

:root {
    --ax-azul: #103554; --ax-azul2: #0a2540; --ax-naranja: #ff7a00; --ax-rojo: #f52d00;
    --ax-verde: #16a34a; --ax-morado: #7c3aed; --ax-cian: #0891b2;
    --ax-texto: #1e293b; --ax-suave: #64748b; --ax-borde: #dbe3ec; --ax-fondo: #eef2f7; --ax-campo: #f8fafc;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ax {
    margin: 0; min-height: 100vh; color: var(--ax-texto); padding: 0 14px 44px;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(900px 420px at 100% 0%, rgba(255,122,0,.10), transparent 60%), var(--ax-fondo);
}
body.ax a { -webkit-tap-highlight-color: transparent; }

/* ---------- encabezado ---------- */
.ax-hero {
    margin: 0 -14px; padding: 26px 18px 78px; text-align: center; color: #fff;
    background: linear-gradient(160deg, var(--ax-azul) 0%, var(--ax-azul2) 100%);
    border-radius: 0 0 34px 34px; box-shadow: 0 14px 30px rgba(16,53,84,.25); position: relative; overflow: hidden;
}
.ax-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255,122,0,.35), transparent 70%); }
.ax-logo { height: 62px; max-width: 72%; object-fit: contain; position: relative; z-index: 1; }
.ax-hero h1 { margin: 10px 0 0; font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; position: relative; z-index: 1; }
.ax-hero p { margin: 4px 0 0; color: #c9d8e8; font-size: .9rem; position: relative; z-index: 1; }

.ax-shell { width: 100%; max-width: 460px; margin: -52px auto 0; position: relative; z-index: 2; }
.ax-shell.ancho { max-width: 980px; }
.ax-shell.medio { max-width: 720px; }

/* ---------- tarjeta ---------- */
.ax-card { background: #fff; border-radius: 22px; padding: 20px; border: 1px solid #e8eef5; box-shadow: 0 18px 45px rgba(16,53,84,.12); }
.ax-card + .ax-card { margin-top: 14px; }
.ax-card h2 { margin: 0 0 4px; font-size: 1.15rem; color: var(--ax-azul); font-weight: 800; }
.ax-sub { margin: 0 0 14px; color: var(--ax-suave); font-size: .92rem; line-height: 1.45; }
.ax-saludo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ax-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #ff9a1a, var(--ax-rojo)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }
.ax-saludo b { display: block; color: var(--ax-azul); } .ax-saludo small { color: var(--ax-suave); }

/* ---------- menú de botones grandes ---------- */
.ax-menu { display: grid; gap: 12px; }
.ax-tile {
    --fondo: linear-gradient(135deg, #ff9a1a, #f52d00); --sombra: #a32200;
    display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; border: none; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
    border-radius: 18px; padding: 15px 16px; font-weight: 800; font-size: 1rem; line-height: 1.2; background: var(--fondo);
    box-shadow: 0 5px 0 var(--sombra), 0 12px 22px rgba(16,53,84,.15); transition: transform .14s, box-shadow .14s;
}
.ax-tile .ico { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.ax-tile small { display: block; font-weight: 600; opacity: .92; font-size: .76rem; margin-top: 3px; }
.ax-tile:hover { transform: translateY(-3px); color: #fff; text-decoration: none; }
.ax-tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--sombra); }
.ax-tile.azul { --fondo: linear-gradient(135deg, #1d6fb8, #103554); --sombra: #08203a; }
.ax-tile.verde { --fondo: linear-gradient(135deg, #22c55e, #15803d); --sombra: #0f5a2b; }
.ax-tile.morado { --fondo: linear-gradient(135deg, #8b5cf6, #5b21b6); --sombra: #3b1478; }
.ax-tile.cian { --fondo: linear-gradient(135deg, #22b8d8, #0e7490); --sombra: #0a5468; }
.ax-tile.oscuro { --fondo: linear-gradient(135deg, #475569, #0f172a); --sombra: #020617; }
.ax-tile.rojo { --fondo: linear-gradient(135deg, #ef4444, #991b1b); --sombra: #5f1010; }
.ax-tile.gris { --fondo: linear-gradient(135deg, #94a3b8, #64748b); --sombra: #475569; }

/* ---------- botones ---------- */
.ax-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: none; border-radius: 16px; padding: 15px; font-size: 1.05rem; font-weight: 900; color: #fff; cursor: pointer; text-decoration: none; font-family: inherit;
    background: linear-gradient(135deg, #ff9a1a, var(--ax-rojo)); box-shadow: 0 5px 0 #a32200, 0 12px 22px rgba(245,45,0,.25); transition: transform .12s, box-shadow .12s; }
.ax-btn:hover { transform: translateY(-2px); color: #fff; text-decoration: none; } .ax-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #a32200; } .ax-btn:disabled { opacity: .6; cursor: wait; }
.ax-link { display: block; text-align: center; margin-top: 14px; padding: 12px; border-radius: 14px; background: #e8eef5; color: var(--ax-azul); font-weight: 800; text-decoration: none; font-size: .95rem; }
.ax-link:hover { background: var(--ax-azul); color: #fff; text-decoration: none; }

/* ---------- formularios ---------- */
.ax-campo { margin-bottom: 14px; text-align: left; }
.ax-campo label { display: block; font-weight: 800; font-size: .88rem; color: var(--ax-azul); margin-bottom: 6px; }
.ax-input { width: 100%; padding: 13px 14px; border: 2px solid var(--ax-borde); border-radius: 14px; font-size: 1rem; background: var(--ax-campo); font-family: inherit; color: var(--ax-texto); transition: border-color .15s, box-shadow .15s, background .15s; }
.ax-input:focus { outline: none; border-color: var(--ax-naranja); background: #fff; box-shadow: 0 0 0 4px rgba(255,122,0,.16); }

/* ---------- avisos ---------- */
.ax-aviso { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-weight: 600; font-size: .92rem; line-height: 1.4; }
.ax-aviso.mal { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.ax-aviso.ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.ax-aviso.info { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }
.ax-reloj { text-align: center; font-weight: 800; color: var(--ax-azul); letter-spacing: .04em; font-size: .9rem; margin-bottom: 12px; }

/* ---------- calificación y evaluaciones ---------- */
.ax-resumen { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #f8fafc, #eef4fa); border: 1px solid var(--ax-borde); margin-bottom: 14px; }
.ax-nota { min-width: 84px; text-align: center; padding: 10px 8px; border-radius: 16px; color: #fff; font-weight: 900; line-height: 1; }
.ax-nota b { display: block; font-size: 1.9rem; } .ax-nota small { display: block; margin-top: 4px; font-size: .62rem; letter-spacing: .08em; opacity: .95; font-weight: 700; }
.ax-nota.alta { background: linear-gradient(135deg, #22c55e, #15803d); } .ax-nota.media { background: linear-gradient(135deg, #facc15, #ca8a04); }
.ax-nota.baja { background: linear-gradient(135deg, #fb923c, #c2410c); } .ax-nota.critica { background: linear-gradient(135deg, #ef4444, #991b1b); } .ax-nota.sin { background: linear-gradient(135deg, #94a3b8, #64748b); }
.ax-nota.sin b { font-size: 1.05rem; }
.ax-dato { font-size: .88rem; color: var(--ax-suave); line-height: 1.5; } .ax-dato b { color: var(--ax-azul); }
.ax-eval { border: 1px solid var(--ax-borde); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.ax-eval summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.ax-eval summary::-webkit-details-marker { display: none; }
.ax-eval .cab { flex: 1; min-width: 0; } .ax-eval .cab b { display: block; color: var(--ax-azul); font-size: .95rem; line-height: 1.25; } .ax-eval .cab small { color: var(--ax-suave); font-size: .78rem; }
.ax-pill { display: inline-block; padding: 5px 11px; border-radius: 999px; font-weight: 900; font-size: .85rem; color: #fff; white-space: nowrap; }
.ax-pill.alta { background: #16a34a; } .ax-pill.media { background: #ca8a04; } .ax-pill.baja { background: #ea580c; } .ax-pill.critica { background: #dc2626; }
.ax-det { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--ax-borde); }
.ax-preg { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: .85rem; } .ax-preg span { flex: 1; color: var(--ax-texto); }
.ax-barra { width: 90px; height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; flex-shrink: 0; } .ax-barra i { display: block; height: 100%; background: linear-gradient(90deg, #ff9a1a, var(--ax-rojo)); }
.ax-preg em { font-style: normal; font-weight: 800; color: var(--ax-azul); min-width: 70px; text-align: right; font-size: .78rem; }
.ax-vacio { text-align: center; color: var(--ax-suave); padding: 22px 10px; border: 2px dashed var(--ax-borde); border-radius: 16px; background: var(--ax-campo); font-size: .92rem; line-height: 1.5; }

/* ---------- CENTRO DE AYUDA (SOLO index.php: body.ax-index): botón que late + ingeniero que se asoma ---------- */
body.ax-index #tutorial-chatbot { position: fixed; right: 16px; bottom: 16px; z-index: 50; }
body.ax-index #chatbot-toggle { position: relative; width: 66px; height: 66px; border-radius: 50%; border: 3px solid #fff; cursor: pointer; color: #fff; font-size: 1.9rem; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ff9a1a, var(--ax-rojo)); box-shadow: 0 5px 0 #a32200, 0 12px 26px rgba(245,45,0,.45); animation: ax-latido 1.8s ease-in-out infinite; }
body.ax-index #chatbot-toggle::before, body.ax-index #chatbot-toggle::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid rgba(255,122,0,.6); pointer-events: none; animation: ax-onda 1.8s ease-out infinite; }
body.ax-index #chatbot-toggle::after { animation-delay: .9s; }
body.ax-index #chatbot-toggle:active { transform: translateY(3px); box-shadow: 0 2px 0 #a32200; }
body.ax-index #tutorial-chatbot.abierto #chatbot-toggle { animation: none; }
body.ax-index #tutorial-chatbot.abierto #chatbot-toggle::before, body.ax-index #tutorial-chatbot.abierto #chatbot-toggle::after { display: none; }
@keyframes ax-latido { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.15); } 28% { transform: scale(1); } 42% { transform: scale(1.1); } 70% { transform: scale(1); } }
@keyframes ax-onda { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(1.65); opacity: 0; } }

/* el ingeniero se asoma desde el borde de abajo, saluda, y el globo aparece */
body.ax-index #ayuda-asoma { position: fixed; right: 104px; bottom: 0; width: 118px; height: 108px; overflow: hidden; z-index: 49; pointer-events: none; }
body.ax-index #ayuda-asoma svg.ing-figura { position: absolute; left: 0; bottom: -132px; width: 118px; height: 118px; cursor: pointer; pointer-events: auto; transition: bottom .65s cubic-bezier(.34,1.56,.64,1); filter: drop-shadow(0 -2px 6px rgba(16,53,84,.25)); }
body.ax-index #ayuda-asoma.ver svg.ing-figura { bottom: -12px; }
body.ax-index .ing-mano { transform-origin: 102px 92px; animation: ax-saluda .8s ease-in-out infinite; }
@keyframes ax-saluda { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(16deg); } }
body.ax-index #ayuda-burbuja { position: fixed; right: 14px; bottom: 118px; width: min(262px, calc(100vw - 28px)); z-index: 51; background: #fff; border-radius: 20px; padding: 13px 34px 13px 15px; box-shadow: 0 14px 34px rgba(16,53,84,.28); border: 2px solid #ffd9b0;
    color: var(--ax-azul); font-size: .95rem; font-weight: 800; line-height: 1.25; cursor: pointer; opacity: 0; transform: scale(.6) translateY(14px); transform-origin: 70% 100%; pointer-events: none; transition: opacity .3s, transform .45s cubic-bezier(.34,1.56,.64,1); }
body.ax-index #ayuda-burbuja.ver { opacity: 1; transform: none; pointer-events: auto; }
body.ax-index #ayuda-burbuja::after { content: ""; position: absolute; bottom: -11px; right: 140px; width: 18px; height: 18px; background: #fff; border-right: 2px solid #ffd9b0; border-bottom: 2px solid #ffd9b0; transform: rotate(45deg); border-bottom-right-radius: 4px; }
body.ax-index #ayuda-burbuja b { color: var(--ax-rojo); text-decoration: underline; text-decoration-thickness: 2px; }
body.ax-index #ayuda-burbuja small { display: block; margin-top: 4px; font-weight: 600; font-size: .78rem; color: var(--ax-suave); }
body.ax-index #ayuda-cerrar { position: absolute; top: 6px; right: 8px; border: none; background: none; font-size: 1.3rem; line-height: 1; color: var(--ax-suave); cursor: pointer; padding: 2px 6px; }

/* ventana de ayuda */
body.ax-index #chatbot-window { display: none; position: absolute; right: 0; bottom: 82px; width: min(368px, calc(100vw - 28px)); max-height: min(78vh, 640px); flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 60px rgba(16,53,84,.4); border: 1px solid #e8eef5; animation: ax-sube .28s ease-out; }
@keyframes ax-sube { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
body.ax-index #chatbot-header { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, var(--ax-azul), var(--ax-azul2)); color: #fff; }
body.ax-index .ing-mini { width: 46px; height: 46px; border-radius: 50%; background: #ffe9c9; border: 2px solid #fff; overflow: hidden; flex-shrink: 0; }
body.ax-index .ing-mini svg { width: 100%; height: 100%; display: block; }
body.ax-index #chatbot-header b { display: block; font-size: 1.02rem; } body.ax-index #chatbot-header small { display: block; opacity: .8; font-size: .78rem; margin-top: 1px; }
body.ax-index #chatbot-header .tit { flex: 1; }
body.ax-index #close-chat { background: rgba(255,255,255,.16); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; }
body.ax-index #close-chat:hover { background: rgba(255,255,255,.3); }
body.ax-index #chatbot-body { padding: 14px; overflow-y: auto; }
body.ax-index .ayuda-saludo { margin: 0 0 12px; font-weight: 700; color: var(--ax-azul); line-height: 1.35; }
body.ax-index .tutorial-options { display: grid; gap: 9px; }
body.ax-index .tutorial-options button { display: flex; align-items: center; gap: 12px; text-align: left; border: 2px solid var(--ax-borde); background: #fff; border-radius: 16px; padding: 10px 12px; cursor: pointer; font-family: inherit; font-weight: 800; color: var(--ax-azul); font-size: .9rem; line-height: 1.2; transition: border-color .15s, transform .12s, box-shadow .15s; }
body.ax-index .tutorial-options button:hover { border-color: var(--ax-naranja); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(255,122,0,.18); }
body.ax-index .tutorial-options .ico { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #ff9a1a, var(--ax-rojo)); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.05rem; }
body.ax-index .tutorial-options .ver-video { display: block; margin-top: 3px; font-size: .72rem; font-weight: 700; color: var(--ax-suave); }
body.ax-index .tutorial-options .ver-video i { color: var(--ax-rojo); margin-right: 3px; }
body.ax-index #chat-viewer > button { display: inline-flex; align-items: center; gap: 6px; border: none; background: #e8eef5; color: var(--ax-azul); font-family: inherit; font-weight: 800; font-size: .85rem; padding: 9px 14px; border-radius: 999px; cursor: pointer; margin-bottom: 10px; }
body.ax-index #chat-viewer > button:hover { background: var(--ax-azul); color: #fff; }
body.ax-index #video-container video { width: 100%; border-radius: 14px; background: #000; display: block; }
body.ax-index #video-description { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: #fff4ea; border: 1px solid #ffd9b0; font-size: .88rem; color: #4b5563; line-height: 1.45; }
/* teléfonos bajitos: el aviso es más compacto para no tapar los botones del menú */
@media (max-height: 720px) {
    body.ax-index #ayuda-burbuja { bottom: 108px; padding: 9px 30px 9px 12px; font-size: .85rem; }
    body.ax-index #ayuda-burbuja small { display: none; }
    body.ax-index #ayuda-asoma { width: 100px; height: 92px; }
    body.ax-index #ayuda-asoma svg.ing-figura { width: 100px; height: 100px; bottom: -120px; }
    body.ax-index #ayuda-asoma.ver svg.ing-figura { bottom: -10px; }
}
@media (prefers-reduced-motion: reduce) {
    body.ax-index #chatbot-toggle, body.ax-index .ing-mano { animation: none; }
    body.ax-index #chatbot-toggle::before, body.ax-index #chatbot-toggle::after { animation: none; opacity: .5; }
    body.ax-index #ayuda-asoma svg.ing-figura, body.ax-index #ayuda-burbuja { transition: none; }
}
/* ventana de edición de datos del menú (sin cambios) */
body.ax-index .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 60; align-items: center; justify-content: center; padding: 16px; }
body.ax-index .modal-content { background: #fff; border-radius: 20px; padding: 22px; width: 100%; max-width: 420px; position: relative; }
body.ax-index .close-modal { position: absolute; right: 14px; top: 8px; font-size: 1.8rem; cursor: pointer; color: var(--ax-suave); }
body.ax-index .btn-modal { display: block; text-align: center; text-decoration: none; color: #fff; font-weight: 800; padding: 13px; border-radius: 14px; margin-bottom: 10px; background: var(--ax-azul); }

/* ---------- botón VOLVER siempre visible (píldora en la parte superior del encabezado) ---------- */
.ax-hero.con-volver { padding-top: 70px; }
.ax-volver, .ax-accion {
    position: absolute; top: 14px; z-index: 5; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
    border-radius: 999px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.5); color: #fff; font-weight: 800; font-size: .9rem;
    text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1; transition: background .15s, color .15s, transform .12s;
}
.ax-volver { left: 14px; } .ax-accion { right: 14px; }
.ax-volver:hover, .ax-accion:hover, .ax-volver:focus, .ax-accion:focus { background: #fff; color: var(--ax-azul); text-decoration: none; outline: none; }
.ax-volver:active, .ax-accion:active { transform: scale(.96); }
.ax-volver i { font-size: 1rem; }

/* ---------- pantallas con Bootstrap (checadores): se les da la identidad AXIS sin tocar su estructura ---------- */
body.ax-bs { display: block !important; align-items: initial !important; justify-content: initial !important; min-height: 100vh; padding: 0 14px 44px !important; margin: 0 !important; background: radial-gradient(900px 420px at 100% 0%, rgba(255,122,0,.10), transparent 60%), var(--ax-fondo) !important; font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif; }
body.ax-bs .container.ax-shell, body.ax-bs .container-box.ax-shell { background: #fff; padding: 22px 18px 24px; border-radius: 22px; border: 1px solid #e8eef5; box-shadow: 0 18px 45px rgba(16,53,84,.12); max-width: 460px; width: 100%; margin: -52px auto 0; position: relative; }
body.ax-bs .btn { border-radius: 14px; font-weight: 800; padding: 13px 14px; border-width: 0; transition: transform .12s, box-shadow .12s; }
body.ax-bs .btn:active { transform: translateY(3px); }
body.ax-bs .btn-info, body.ax-bs .btn-primary { color: #fff; background: linear-gradient(135deg, #1d6fb8, #103554); box-shadow: 0 4px 0 #08203a; }
body.ax-bs .btn-success, body.ax-bs .btn-entrada { color: #fff; background: linear-gradient(135deg, #22c55e, #15803d) !important; box-shadow: 0 4px 0 #0f5a2b; }
body.ax-bs .btn-danger, body.ax-bs .btn-salida { color: #fff; background: linear-gradient(135deg, #ef4444, #991b1b) !important; box-shadow: 0 4px 0 #5f1010; }
body.ax-bs .btn-warning { color: #422006; background: linear-gradient(135deg, #fde047, #eab308); box-shadow: 0 4px 0 #a16207; }
body.ax-bs .btn-outline-secondary, body.ax-bs .btn-outline-primary { color: var(--ax-azul); background: #e8eef5; border: none; box-shadow: none; }
body.ax-bs .btn-outline-secondary:hover, body.ax-bs .btn-outline-primary:hover { background: var(--ax-azul); color: #fff; }
body.ax-bs .btn.disabled, body.ax-bs .btn:disabled { opacity: .55; box-shadow: none; }
body.ax-bs .form-control { border: 2px solid var(--ax-borde); border-radius: 14px; background: var(--ax-campo); min-height: 48px; }
body.ax-bs .form-control:focus { border-color: var(--ax-naranja); background: #fff; box-shadow: 0 0 0 4px rgba(255,122,0,.16); }
body.ax-bs .alert { border-radius: 14px; font-weight: 600; border-width: 1px; }
body.ax-bs label { color: var(--ax-azul); font-weight: 800; font-size: .9rem; }
body.ax-bs .user-info { color: var(--ax-azul); }
body.ax-bs .step-info { border-radius: 14px; background: #f1f5f9; }
body.ax-bs #map { border-radius: 16px; border: 2px solid var(--ax-borde); }
body.ax-bs #gps-overlay { border-radius: 16px; }
body.ax-bs .current-time { margin: 2px 0 0; font-weight: 800; letter-spacing: .04em; color: #c9d8e8; font-size: .95rem; }

/* ---------- tabla que se vuelve tarjetas en el teléfono (historial) ---------- */
.ax-tabla { width: 100%; border-collapse: collapse; }
.ax-tabla th { background: var(--ax-azul); color: #fff; text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; padding: 10px; text-align: left; }
.ax-tabla td { padding: 10px; border-bottom: 1px solid #eef2f6; font-size: .9rem; vertical-align: middle; }
.ax-tabla tr:nth-child(even) td { background: #f8fafc; }
.ax-etiq { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; color: #fff; }
.ax-etiq.entrada { background: #16a34a; } .ax-etiq.salida { background: #dc2626; } .ax-etiq.otros { background: #64748b; }
@media (max-width: 640px) {
    .ax-tabla thead { display: none; }
    .ax-tabla, .ax-tabla tbody, .ax-tabla tr, .ax-tabla td { display: block; width: 100%; }
    .ax-tabla tr { border: 1px solid var(--ax-borde); border-radius: 16px; margin-bottom: 10px; padding: 8px 12px; background: #fff; }
    .ax-tabla tr:nth-child(even) td { background: transparent; }
    .ax-tabla td { border: none; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .ax-tabla td::before { content: attr(data-label); font-weight: 800; color: var(--ax-azul); text-align: left; font-size: .78rem; text-transform: uppercase; }
}
.ax-filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; margin-bottom: 14px; }

/* ---------- elegir venue (registro, paso 1) ---------- */
.ax-buscar { position: sticky; top: 8px; z-index: 4; }
.ax-buscar .ax-input { box-shadow: 0 8px 20px rgba(16,53,84,.12); padding-left: 42px; }
.ax-buscar i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ax-suave); pointer-events: none; }
.ax-venues { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.ax-venue { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: #fff; font-weight: 800; font-size: .95rem; line-height: 1.2; text-transform: uppercase;
    background: linear-gradient(135deg, #1d6fb8, #103554); box-shadow: 0 4px 0 #08203a, 0 10px 18px rgba(16,53,84,.15); transition: transform .12s, box-shadow .12s; }
.ax-venue i { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ax-venue:hover { transform: translateY(-2px); color: #fff; text-decoration: none; } .ax-venue:active { transform: translateY(3px); box-shadow: 0 1px 0 #08203a; }
@media (min-width: 640px) { .ax-venues { grid-template-columns: 1fr 1fr; } }

/* ---------- CONTROL DE ACCESOS (capersonal.php): solo la pantalla principal; el escáner y las ventanas conservan su estilo ---------- */
body.ax-cap .hidden { display: none !important; }
body.ax-cap .ax-shell { max-width: 460px; }
.cap-etiq { display: block; font-weight: 800; color: var(--ax-azul); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 6px; }
.cap-info { margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: #f1f5f9; color: #475569; font-size: .82rem; font-weight: 700; line-height: 1.35; }
.cap-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.cap-stat { border-radius: 14px; background: #f8fafc; border: 1px solid #e8eef5; padding: 9px 4px; text-align: center; }
.cap-stat span { display: block; font-size: .68rem; font-weight: 800; color: var(--ax-suave); text-transform: uppercase; letter-spacing: .05em; }
.cap-stat b { display: block; font-size: 1.55rem; font-weight: 900; color: var(--ax-azul); line-height: 1.15; }
.cap-stat b.in { color: #16a34a; } .cap-stat b.out { color: #2563eb; }
.cap-modos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.cap-modo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px 8px; border: none; border-radius: 20px; color: #fff; font-family: inherit; font-weight: 900; font-size: .95rem; letter-spacing: .03em; cursor: pointer; transition: transform .12s, box-shadow .12s, opacity .2s; }
.cap-modo i { font-size: 1.9rem; }
.cap-modo.entrada { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 5px 0 #0f5a2b, 0 12px 22px rgba(22,163,74,.25); }
.cap-modo.salida { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 5px 0 #92400e, 0 12px 22px rgba(217,119,6,.25); }
.cap-modo:hover:not(:disabled), .cap-accion:hover:not(:disabled) { transform: translateY(-2px); color: #fff; text-decoration: none; }
.cap-modo:active:not(:disabled), .cap-accion:active:not(:disabled) { transform: translateY(4px); }
.cap-modo:disabled, .cap-accion:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; filter: grayscale(.4); }
.cap-sep { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; color: var(--ax-suave); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cap-sep::before, .cap-sep::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.cap-acciones { display: grid; gap: 10px; }
.cap-accion { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border: none; border-radius: 16px; color: #fff; font-family: inherit; font-weight: 800; font-size: .95rem; text-decoration: none; cursor: pointer; width: 100%; transition: transform .12s, box-shadow .12s, opacity .2s; }
.cap-accion.azul { background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 4px 0 #1e3a8a; }
.cap-accion.rojo { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 4px 0 #7f1d1d; }
.cap-accion.oscuro { background: linear-gradient(135deg, #475569, #1e293b); box-shadow: 0 4px 0 #0f172a; }
.cap-estado { margin: 14px 0 0; text-align: center; color: var(--ax-suave); font-size: .88rem; font-weight: 600; }
/* el script reemplaza la clase de #message (verde / rojo / azul), por eso se estiliza por ID y por esas clases */
body.ax-cap #message { margin-top: 16px; padding: 14px; border-radius: 16px; background: #f1f5f9; color: #475569; text-align: center; font-weight: 700; font-size: 1rem; }
body.ax-cap #message p { margin: 0; }
body.ax-cap #message.bg-green-500 { background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; }
body.ax-cap #message.bg-red-500 { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
body.ax-cap #message.bg-blue-500 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; }
body.ax-cap #scanner-controls { margin-top: 18px; text-align: center; }
body.ax-cap #scanner-controls button { border: none; border-radius: 14px; font-family: inherit; font-weight: 800; cursor: pointer; }
body.ax-cap #scanner-controls #back-to-mode-button { background: #e8eef5; color: var(--ax-azul); padding: 13px; }
body.ax-cap #scanner-controls input { border: 2px solid var(--ax-borde); border-radius: 14px; background: var(--ax-campo); padding: 12px 13px; font-size: 1rem; box-sizing: border-box; font-family: inherit; }

@media (min-width: 720px) { .ax-menu.dos { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }