/* ═══════════════════════════════════════════════════════════════
   site.css  —  AsissCAD Cloud v4
   Stack: Bootstrap 5.3 + Sora + DM Sans
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts (importar aquí para tenerlo centralizado) ────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ─────────────────────────────────────────────────────────────────
   1. VARIABLES GLOBALES
───────────────────────────────────────────────────────────────── */
:root {
    /* Paleta principal */
    --c-navy:          #1a3a5c;
    --c-navy-dark:     #1a2e44;
    --c-navy-deeper:   #0f2236;
    --c-blue:          #1a73e8;
    --c-blue-light:    #e8f0fe;
    --c-green:         #00c9a7;
    --c-green-dark:    #00a88c;
    --c-green-bg:      rgba(0,201,167,.15);

    /* Neutros */
    --c-white:         #ffffff;
    --c-bg-page:       #f0f4f8;
    --c-bg-input:      #f8fafd;
    --c-border:        #d8e2ef;
    --c-border-light:  rgba(255,255,255,.08);
    --c-placeholder:   #aab4c4;
    --c-muted:         #6b7c93;

    /* Texto */
    --c-text-dark:     #1a2e44;
    --c-text-body:     #2d3e50;
    --c-text-muted:    #6b7c93;

    /* Semánticos */
    --c-danger:        #ef4444;
    --c-danger-bg:     #fef2f2;
    --c-warning:       #f59e0b;
    --c-warning-bg:    #fffbeb;
    --c-success:       #00c9a7;
    --c-success-bg:    #f0fdf9;
    --c-info:          #1a73e8;
    --c-info-bg:       #e8f0fe;

    /* Sombras */
    --shadow-card:     0 4px 24px rgba(26,58,92,.10), 0 1px 4px rgba(26,58,92,.06);
    --shadow-dropdown: 0 8px 32px rgba(26,58,92,.14);

    /* Tipografía */
    --font-display:    'Sora', sans-serif;
    --font-body:       'DM Sans', sans-serif;

    /* Radios */
    --radius-sm:       6px;
    --radius-md:       8px;
    --radius-lg:       12px;
    --radius-xl:       16px;
    --radius-2xl:      20px;

    /* Inputs */
    --input-height:    46px;
    --input-height-sm: 38px;
}

/* ─────────────────────────────────────────────────────────────────
   2. RESET Y BASE
───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--c-text-body);
    background: var(--c-bg-page);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--c-text-dark);
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────
   3. LAYOUT BASE (páginas internas — con navbar lateral)
───────────────────────────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-main {
    flex: 1;
    padding: 1.5rem;
}

/* ─────────────────────────────────────────────────────────────────
   4. NAVBAR SUPERIOR (páginas internas)
───────────────────────────────────────────────────────────────── */
.top-bar {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar .page-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text-dark);
    margin: 0;
}

.top-bar .user-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: var(--c-text-muted);
}

.top-bar .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-blue-light);
    color: var(--c-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    font-family: var(--font-display);
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────
   5. SIDEBAR (páginas internas)
───────────────────────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    background: var(--c-navy);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-bottom: 1px solid var(--c-border-light);
    text-decoration: none;
}

.sidebar-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: var(--c-green);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon i { color: var(--c-white); font-size: 1rem; }

.sidebar-brand .brand-name {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 600;
    color: var(--c-white);
    line-height: 1.2;
}

.sidebar-nav {
    padding: .75rem .6rem;
    flex: 1;
}

.sidebar-nav .nav-section-label {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    padding: .75rem .6rem .3rem;
    margin: 0;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,.6);
    font-size: .82rem;
    text-decoration: none;
    transition: background .15s, color .15s;
    margin-bottom: 2px;
}

.sidebar-nav .nav-item i { font-size: 1rem; flex-shrink: 0; }

.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,.08);
    color: var(--c-white);
}

.sidebar-nav .nav-item.active {
    background: rgba(0,201,167,.15);
    color: var(--c-green);
    font-weight: 500;
}

.sidebar-footer {
    padding: .75rem .6rem;
    border-top: 1px solid var(--c-border-light);
}

/* ─────────────────────────────────────────────────────────────────
   6. CARDS
───────────────────────────────────────────────────────────────── */
.card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.card-header-custom {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-header-custom .card-title {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 600;
    color: var(--c-text-dark);
    margin: 0;
}

.card-body-custom { padding: 1.25rem; }

/* Stat cards (métricas rápidas) */
.stat-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.stat-card .stat-icon.navy  { background: rgba(26,58,92,.1);  color: var(--c-navy); }
.stat-card .stat-icon.blue  { background: var(--c-blue-light); color: var(--c-blue); }
.stat-card .stat-icon.green { background: var(--c-green-bg);   color: var(--c-green); }
.stat-card .stat-icon.warn  { background: var(--c-warning-bg); color: var(--c-warning); }

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--c-text-dark);
    line-height: 1;
    margin-bottom: .15rem;
}

.stat-card .stat-label {
    font-size: .75rem;
    color: var(--c-text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   7. FORMULARIOS
───────────────────────────────────────────────────────────────── */
.form-label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--c-text-dark);
    margin-bottom: .3rem;
}

/* Input con icono a la izquierda */
.input-wrap {
    position: relative;
}

.input-wrap .input-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-muted);
    font-size: .95rem;
    pointer-events: none;
    z-index: 5;
}

.input-wrap .form-control {
    padding-left: 2.4rem;
}

.input-wrap .input-action {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--c-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    z-index: 5;
    transition: color .15s;
}

.input-wrap .input-action:hover { color: var(--c-blue); }

/* Override Bootstrap form-control */
.form-control {
    height: var(--input-height);
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-md);
    font-size: .875rem;
    color: var(--c-text-body);
    background: var(--c-bg-input);
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.form-control::placeholder { color: var(--c-placeholder); }

.form-control:focus {
    border-color: var(--c-blue);
    background: var(--c-white);
    box-shadow: 0 0 0 3px rgba(26,115,232,.12);
    outline: none;
}

.form-control.is-invalid {
    border-color: var(--c-danger);
    background: var(--c-danger-bg);
}

.form-control-sm { height: var(--input-height-sm); font-size: .82rem; }

/* Mensaje de error bajo el campo */
.field-error {
    font-size: .73rem;
    color: var(--c-danger);
    margin-top: .25rem;
    display: none;
}
.field-error.visible { display: block; }

/* ─────────────────────────────────────────────────────────────────
   8. BOTONES
───────────────────────────────────────────────────────────────── */
/* Botón primario — gradiente navy→blue */
.btn-primary-app {
    background: linear-gradient(90deg, var(--c-navy), var(--c-blue));
    border: none;
    border-radius: var(--radius-md);
    color: var(--c-white);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .875rem;
    letter-spacing: .4px;
    height: 46px;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(26,115,232,.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    text-decoration: none;
}

.btn-primary-app:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,115,232,.35);
    color: var(--c-white);
}

.btn-primary-app:active { transform: translateY(0); }

.btn-primary-app.w-100 { width: 100%; }

/* Estado loading */
.btn-primary-app .btn-spinner { display: none; width: 1rem; height: 1rem; border-width: 2px; }
.btn-primary-app.loading .btn-spinner { display: inline-block; }
.btn-primary-app.loading .btn-label  { display: none; }

/* Botón secundario */
.btn-secondary-app {
    background: var(--c-white);
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-md);
    color: var(--c-text-dark);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: .875rem;
    height: 46px;
    padding: 0 1.25rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    text-decoration: none;
}

.btn-secondary-app:hover {
    border-color: var(--c-blue);
    background: var(--c-blue-light);
    color: var(--c-blue);
}

/* Botón success (verde) */
.btn-success-app {
    background: linear-gradient(90deg, var(--c-green-dark), var(--c-green));
    border: none;
    border-radius: var(--radius-md);
    color: var(--c-white);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .875rem;
    height: 46px;
    padding: 0 1.5rem;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 4px 14px rgba(0,201,167,.25);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.btn-success-app:hover { opacity: .9; transform: translateY(-1px); }

/* Botón ghost (solo texto + icono) */
.btn-ghost {
    background: none;
    border: none;
    color: var(--c-blue);
    font-size: .8rem;
    padding: .3rem .5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: var(--radius-sm);
    transition: background .15s;
    text-decoration: none;
}

.btn-ghost:hover { background: var(--c-blue-light); color: var(--c-blue); }

/* ─────────────────────────────────────────────────────────────────
   9. BADGES Y PILLS
───────────────────────────────────────────────────────────────── */
.badge-app {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .6rem;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 500;
    font-family: var(--font-display);
}

.badge-success { background: var(--c-success-bg); color: var(--c-green-dark); }
.badge-danger  { background: var(--c-danger-bg);  color: #b91c1c; }
.badge-warning { background: var(--c-warning-bg); color: #92400e; }
.badge-info    { background: var(--c-info-bg);    color: #1558b0; }
.badge-neutral { background: #f1f5f9;             color: #475569; }

/* ─────────────────────────────────────────────────────────────────
   10. MODALES
───────────────────────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-dropdown);
}

.modal-header {
    padding: 1.1rem 1.4rem .9rem;
    border-bottom: 1px solid var(--c-border);
}

.modal-title {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 600;
    color: var(--c-text-dark);
}

.modal-body    { padding: 1.25rem 1.4rem; }

.modal-footer {
    padding: .8rem 1.4rem;
    border-top: 1px solid var(--c-border);
}

.modal-footer-brand {
    font-size: .75rem;
    color: var(--c-text-muted);
    font-style: italic;
}

/* Modal de alerta centrado */
.modal-alert .modal-dialog  { max-width: 360px; }
.modal-alert .modal-body    { text-align: center; padding: 1.75rem 1.4rem 1rem; }
.modal-alert .alert-icon    { font-size: 2.2rem; margin-bottom: .6rem; }
.modal-alert .alert-icon.warning { color: var(--c-warning); }
.modal-alert .alert-icon.danger  { color: var(--c-danger); }
.modal-alert .alert-icon.success { color: var(--c-green); }
.modal-alert .alert-msg     { font-size: .875rem; color: var(--c-text-dark); font-weight: 500; }

/* ─────────────────────────────────────────────────────────────────
   11. TABLAS
───────────────────────────────────────────────────────────────── */
.table-app {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.table-app thead th {
    font-family: var(--font-display);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--c-text-muted);
    padding: .6rem 1rem;
    border-bottom: 1.5px solid var(--c-border);
    white-space: nowrap;
    background: #fafbfc;
}

.table-app tbody td {
    padding: .75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--c-text-body);
    vertical-align: middle;
}

.table-app tbody tr:hover { background: #f8fafd; }
.table-app tbody tr:last-child td { border-bottom: none; }

/* ─────────────────────────────────────────────────────────────────
   12. MAPA (Leaflet)
───────────────────────────────────────────────────────────────── */
.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--c-border);
}

/* ─────────────────────────────────────────────────────────────────
   13. ALERTAS / TOAST
───────────────────────────────────────────────────────────────── */
.alert-app {
    border-radius: var(--radius-md);
    padding: .75rem 1rem;
    font-size: .825rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    border: none;
}

.alert-app i { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.alert-app.success { background: var(--c-success-bg); color: #065f46; }
.alert-app.danger  { background: var(--c-danger-bg);  color: #991b1b; }
.alert-app.warning { background: var(--c-warning-bg); color: #92400e; }
.alert-app.info    { background: var(--c-info-bg);    color: #1558b0; }

/* ─────────────────────────────────────────────────────────────────
   14. LOGIN (pantalla de acceso — layout especial)
───────────────────────────────────────────────────────────────── */
body.login-page {
    background: var(--c-bg-page);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-box {
    display: flex;
    width: 100%;
    max-width: 860px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(26,58,92,.16), 0 2px 8px rgba(26,58,92,.08);
    animation: loginIn .45s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes loginIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Panel izquierdo — branding */
.login-brand {
    width: 42%;
    background: var(--c-navy);
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.login-brand::before,
.login-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--c-border-light);
    pointer-events: none;
}

.login-brand::before { width: 280px; height: 280px; top: -80px; right: -80px; }
.login-brand::after  { width: 200px; height: 200px; bottom: -50px; left: -50px; }

.login-brand .brand-logo {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 2rem;
    text-decoration: none;
}

.login-brand .brand-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--c-green);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-brand .brand-logo .logo-icon i { color: var(--c-white); font-size: 1.1rem; }

.login-brand .brand-logo .logo-text {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 600;
    color: var(--c-white);
    letter-spacing: .3px;
}

.login-brand .brand-tagline {
    font-size: .65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    margin: 0 0 .4rem;
}

.login-brand .brand-headline {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--c-white);
    line-height: 1.3;
    margin: 0 0 .75rem;
}

.login-brand .brand-desc {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    line-height: 1.6;
    margin: 0;
}

.login-brand .brand-features {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    position: relative;
    z-index: 1;
}

.login-brand .brand-feature {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.login-brand .feature-icon {
    width: 30px;
    height: 30px;
    background: var(--c-green-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-brand .feature-icon i { color: var(--c-green); font-size: .9rem; }

.login-brand .feature-label {
    font-size: .78rem;
    color: rgba(255,255,255,.65);
}

/* Panel derecho — formulario */
.login-form-panel {
    flex: 1;
    background: var(--c-white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-form-body {
    padding: 2.25rem 2rem 1.5rem;
    flex: 1;
}

.login-eyebrow {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--c-blue);
    margin: 0 0 .3rem;
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--c-navy-dark);
    margin: 0 0 .25rem;
    line-height: 1.2;
}

.login-subtitle {
    font-size: .8rem;
    color: var(--c-text-muted);
    margin: 0 0 1.75rem;
}

.login-footer {
    padding: .7rem 2rem;
    border-top: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ── Requisitos de contraseña ── */
.pass-requirements {
    background: #f0f4f9;
    border-radius: var(--radius-md);
    padding: .7rem .9rem;
    font-size: .73rem;
    color: var(--c-text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.pass-requirements strong { color: var(--c-text-dark); }

/* ─────────────────────────────────────────────────────────────────
   15. RESPONSIVE
───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Login: ocultar panel izquierdo, mostrar header compacto */
    .login-box {
        flex-direction: column;
        max-width: 420px;
        border-radius: var(--radius-xl);
    }

    .login-brand {
        width: 100%;
        padding: 1.25rem 1.4rem 1.1rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .login-brand .brand-features,
    .login-brand .brand-desc { display: none; }

    .login-brand .brand-content-top { flex: 1; }

    .login-brand .brand-tagline  { font-size: .6rem; margin-bottom: .15rem; }
    .login-brand .brand-headline { font-size: 1rem; margin: 0; }

    .login-brand::before { width: 140px; height: 140px; top: -40px; right: -40px; }
    .login-brand::after  { display: none; }

    .login-form-body { padding: 1.5rem 1.4rem 1.1rem; }
    .login-footer    { padding: .65rem 1.4rem; }
    .login-title     { font-size: 1.3rem; }

    /* Sidebar en móvil: oculto por defecto */
    .sidebar { display: none; }
    .sidebar.open { display: flex; position: fixed; z-index: 999; height: 100%; }

    /* App main */
    .app-main { padding: 1rem; }
}

@media (max-width: 480px) {
    .login-wrapper { padding: 1rem .75rem; align-items: flex-start; padding-top: 1.5rem; }
    .form-control  { height: 44px; }
    .btn-primary-app { height: 46px; }
}

/* ─────────────────────────────────────────────────────────────────
   16. GEO — Pantalla de marcación
───────────────────────────────────────────────────────────────── */

/* Navbar geo */
.geo-navbar {
    background: var(--c-navy);
    padding: .65rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.geo-navbar .nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.geo-navbar .nav-brand .logo-icon {
    width: 28px;
    height: 28px;
    background: var(--c-green);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.geo-navbar .nav-brand .logo-icon i { color: #fff; font-size: .9rem; }

.geo-navbar .nav-brand .logo-text {
    font-family: var(--font-display);
    font-size: .88rem;
    font-weight: 600;
    color: #fff;
}

.geo-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: .2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.geo-navbar .nav-links a {
    color: rgba(255,255,255,.6);
    font-size: .78rem;
    padding: .35rem .65rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.geo-navbar .nav-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
.geo-navbar .nav-links a.active { background: rgba(255,255,255,.12); color: #fff; }

.geo-navbar .nav-toggle {
    display: none;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-md);
    color: rgba(255,255,255,.8);
    padding: .4rem .55rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

/* Footer geo */
.geo-footer {
    background: var(--c-navy);
    border-top: 1px solid rgba(255,255,255,.07);
    padding: .6rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.geo-footer .user-name { font-size: .8rem; font-weight: 500; color: #fff; margin: 0; }
.geo-footer .user-ip   { font-size: .65rem; color: rgba(255,255,255,.4); margin: 0; }

.btn-salir {
    height: 32px;
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.25);
    border-radius: var(--radius-md);
    color: #ef4444;
    font-size: .75rem;
    font-weight: 500;
    padding: 0 .75rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

.btn-salir:hover { background: rgba(239,68,68,.2); color: #ef4444; }

/* Pantalla de carga GPS */
.geo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 1rem;
    padding: 3rem 2rem;
    min-height: calc(100vh - 112px);
}

.geo-loading .spin {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(26,115,232,.15);
    border-top-color: var(--c-blue);
    border-radius: 50%;
    animation: geo-spin .75s linear infinite;
}

@keyframes geo-spin { to { transform: rotate(360deg); } }

.geo-loading .loading-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text-dark);
    margin: 0;
}

.geo-loading .loading-sub {
    font-size: .78rem;
    color: var(--c-text-muted);
    margin: 0;
    text-align: center;
}

/* Layout principal geo */
.geo-main {
    display: none;
    flex: 1;
}

/* Mapa */
#geo-map {
    width: 100%;
    height: 240px;
    z-index: 1;
}

/* Panel acciones */
.geo-panel {
    background: var(--c-white);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.geo-panel .panel-eyebrow {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--c-blue);
    margin: 0 0 .15rem;
}

.geo-panel .panel-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-navy-dark);
    margin: 0 0 .15rem;
}

.geo-panel .panel-sub {
    font-size: .75rem;
    color: var(--c-text-muted);
    margin: 0;
}

.coord-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}

.coord-card {
    background: var(--c-bg-input);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: .7rem .85rem;
}

.coord-card .coord-label {
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin: 0 0 .2rem;
}

.coord-card .coord-value {
    font-family: monospace;
    font-size: .88rem;
    font-weight: 600;
    color: var(--c-text-dark);
    margin: 0;
}

.geo-hint {
    font-size: .72rem;
    color: var(--c-text-muted);
    text-align: center;
    background: #f0f4f9;
    border-radius: var(--radius-md);
    padding: .45rem .75rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
}

/* Botón marcar */
.btn-marcar {
    background: linear-gradient(90deg, var(--c-green-dark), var(--c-green));
    border: none;
    border-radius: var(--radius-lg);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .3px;
    height: 52px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(0,201,167,.28);
}

.btn-marcar:hover  { opacity: .92; transform: translateY(-1px); }
.btn-marcar:active { transform: translateY(0); }
.btn-marcar .btn-spinner { display: none; width: 1.1rem; height: 1.1rem; border-width: 2px; }
.btn-marcar.loading .btn-spinner { display: inline-block; }
.btn-marcar.loading .btn-label   { display: none; }

/* Modal fuera de rango */
.out-range-table { width: 100%; font-size: .82rem; border-collapse: collapse; }
.out-range-table td { padding: .5rem .5rem; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.out-range-table td:first-child { color: var(--c-text-muted); width: 90px; }
.out-range-table tr:last-child td { border-bottom: none; }

/* ── Responsive geo ── */
@media (min-width: 769px) {
    .geo-main          { display: flex !important; flex-direction: row; min-height: calc(100vh - 112px); }
    .geo-loading       { min-height: calc(100vh - 112px); }
    #geo-map           { height: auto; width: 55%; flex-shrink: 0; }
    .geo-panel         { flex: 1; justify-content: center; max-width: 420px; padding: 2rem 1.75rem; }
    .geo-panel .panel-title { font-size: 1.2rem; }
    .btn-marcar        { height: 50px; }
}

@media (max-width: 768px) {
    .geo-navbar .nav-links { display: none; }
    .geo-navbar .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: var(--c-navy-deeper);
        padding: .5rem .75rem;
        z-index: 200;
        border-bottom: 1px solid rgba(255,255,255,.08);
        gap: .1rem;
    }
    .geo-navbar .nav-toggle { display: flex; align-items: center; }
    .geo-main { flex-direction: column; }
    #geo-map  { height: 230px; }
}

/* ─────────────────────────────────────────────────────────────────
   17. MARCACIÓN — Pantalla de marcación de asistencia
───────────────────────────────────────────────────────────────── */

/* Layout principal */
.marc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--c-bg-page);
}

/* Panel izquierdo — reloj + info */
.marc-left {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

/* Reloj */
.marc-clock-card {
    width: 100%;
    background: var(--c-bg-input);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.marc-clock-label {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--c-blue);
    margin: 0 0 .4rem;
}

.marc-clock-time {
    font-family: monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-navy-dark);
    margin: 0;
    letter-spacing: 3px;
}

.marc-clock-date {
    font-size: .8rem;
    color: var(--c-text-muted);
    margin: .2rem 0 0;
}

/* Info usuario */
.marc-user-card {
    width: 100%;
    background: #f0f4f9;
    border-radius: var(--radius-lg);
    padding: .75rem 1rem;
}

.marc-user-label {
    font-size: .65rem;
    color: var(--c-text-muted);
    margin: 0 0 .15rem;
}

.marc-user-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--c-navy-dark);
    margin: 0;
}

.marc-user-meta {
    font-size: .72rem;
    color: var(--c-text-muted);
    margin: .1rem 0 0;
}

.marc-hint {
    font-size: .72rem;
    color: var(--c-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Panel derecho — botones */
.marc-right {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.marc-section-label {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin: 0 0 .1rem;
}

/* Botones de marcación */
.btn-marc {
    border: none;
    border-radius: var(--radius-lg);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .3px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: opacity .2s, transform .15s;
}

.btn-marc:hover  { opacity: .92; transform: translateY(-1px); }
.btn-marc:active { transform: translateY(0); }
.btn-marc:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-marc .btn-spinner { display: none; width: 1rem; height: 1rem; border-width: 2px; }
.btn-marc.loading .btn-spinner { display: inline-block; }
.btn-marc.loading .btn-label   { display: none; }

/* Colores por tipo */
.btn-marc-entrada {
    height: 56px;
    background: linear-gradient(90deg, #1558b0, #1a73e8);
    box-shadow: 0 4px 14px rgba(26,115,232,.28);
}

.btn-marc-col-sal {
    height: 48px;
    background: linear-gradient(90deg, #0891b2, #06b6d4);
    box-shadow: 0 3px 10px rgba(6,182,212,.2);
}

.btn-marc-col-ent {
    height: 48px;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    box-shadow: 0 3px 10px rgba(245,158,11,.2);
}

.btn-marc-salida {
    height: 56px;
    background: linear-gradient(90deg, #b91c1c, #ef4444);
    box-shadow: 0 4px 14px rgba(239,68,68,.28);
}

/* ── Responsive marcación ── */
@media (min-width: 769px) {
    .marc-main  { flex-direction: row; min-height: calc(100vh - 112px); }
    .marc-left  {
        width: 40%;
        border-bottom: none;
        border-right: 1px solid var(--c-border);
        justify-content: center;
        flex-shrink: 0;
        padding: 2rem 1.75rem;
    }
    .marc-clock-time { font-size: 2.6rem; }
    .marc-right { justify-content: center; padding: 2rem 1.75rem; max-width: 480px; }
    .btn-marc-entrada,
    .btn-marc-salida  { height: 54px; }
    .btn-marc-col-sal,
    .btn-marc-col-ent { height: 46px; }
}

@media (max-width: 768px) {
    .marc-clock-time { font-size: 1.8rem; }
}

/* ─────────────────────────────────────────────────────────────────
   18. TICKET — Comprobante de marcación
───────────────────────────────────────────────────────────────── */

/* Countdown pill en navbar */
.ticket-countdown-pill {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    padding: .3rem .85rem;
    font-size: .72rem;
    color: rgba(255,255,255,.7);
}

.ticket-countdown-pill strong { color: #fff; }

.ticket-countdown-spinner {
    width: 9px;
    height: 9px;
    border: 1.5px solid rgba(255,255,255,.3);
    border-top-color: var(--c-green);
    border-radius: 50%;
    animation: geo-spin .75s linear infinite;
    flex-shrink: 0;
}

/* Layout principal */
.ticket-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--c-bg-page);
    padding: 1rem;
    gap: .85rem;
}

/* Panel izquierdo */
.ticket-left {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* Badge card */
.ticket-badge-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.ticket-badge-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.ticket-badge-status {
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--c-green-dark);
    margin: 0;
}

.ticket-badge-type {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 600;
    color: var(--c-navy-dark);
    margin: .1rem 0 0;
}

.ticket-badge-datetime {
    font-size: .68rem;
    color: var(--c-text-muted);
    margin: 0;
}

/* Hash card */
.ticket-hash-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: .7rem 1rem;
}

.ticket-hash-label {
    font-size: .62rem;
    color: var(--c-text-muted);
    margin: 0 0 .2rem;
}

.ticket-hash-value {
    font-family: monospace;
    font-size: .78rem;
    color: var(--c-navy-dark);
    word-break: break-all;
    margin: 0;
    background: #f0f4f9;
    padding: .25rem .5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: 100%;
}

/* Redirect info */
.ticket-redirect-info {
    font-size: .72rem;
    color: var(--c-text-muted);
    text-align: center;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: .6rem 1rem;
}

.ticket-redirect-info strong { color: var(--c-text-dark); }

/* Panel derecho */
.ticket-right {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* Tablas de datos */
.ticket-table-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ticket-table-header {
    background: var(--c-navy);
    color: rgba(255,255,255,.7);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: .45rem 1rem;
}

.ticket-table-body { padding: .1rem 0; }

.ticket-row {
    display: flex;
    align-items: baseline;
    padding: .42rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    gap: .5rem;
}

.ticket-row.last { border-bottom: none; }

.ticket-row-label {
    font-size: .72rem;
    color: var(--c-text-muted);
    width: 110px;
    flex-shrink: 0;
}

.ticket-row-value {
    font-size: .75rem;
    color: var(--c-text-dark);
    flex: 1;
}

.ticket-row-value.fw-500 { font-weight: 500; }
.ticket-row-value.mono   { font-family: monospace; font-size: .72rem; }

.ticket-row-value.small {
    font-family: monospace;
    font-size: .65rem;
    background: #f0f4f9;
    padding: .15rem .4rem;
    border-radius: var(--radius-sm);
    word-break: break-all;
}

/* ── Responsive ticket ── */
@media (min-width: 769px) {
    .ticket-main {
        flex-direction: row;
        padding: 1.5rem;
        align-items: flex-start;
        min-height: calc(100vh - 112px);
    }

    .ticket-left {
        width: 34%;
        flex-shrink: 0;
        position: sticky;
        top: 1.5rem;
    }

    .ticket-badge-card  { flex-direction: column; text-align: center; padding: 1.5rem 1.25rem; }
    .ticket-badge-icon  { width: 52px; height: 52px; font-size: 1.4rem; margin: 0 auto; }
    .ticket-badge-type  { font-size: 1.1rem; }

    .ticket-right { flex: 1; }

    .ticket-row-label { width: 130px; }
}

@media (max-width: 768px) {
    .ticket-main { padding: .85rem .75rem; gap: .7rem; }
}

/* ─────────────────────────────────────────────────────────────────
   19. PASS — Cambio de contraseña
───────────────────────────────────────────────────────────────── */

.pass-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--c-bg-page);
    padding: 1rem;
    gap: .85rem;
}

/* Panel izquierdo */
.pass-left { display: none; } /* oculto en móvil */

.pass-info-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.pass-info-icon {
    width: 52px;
    height: 52px;
    background: rgba(26,115,232,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .75rem;
    font-size: 1.4rem;
    color: var(--c-blue);
}

.pass-info-eyebrow {
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--c-blue);
    margin: 0 0 .2rem;
}

.pass-info-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-navy-dark);
    margin: 0 0 .5rem;
}

.pass-info-desc {
    font-size: .72rem;
    color: var(--c-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Requisitos desktop */
.pass-req-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: .85rem 1rem;
}

.pass-req-title {
    font-size: .65rem;
    font-weight: 600;
    color: var(--c-text-dark);
    margin: 0 0 .5rem;
    letter-spacing: .3px;
}

.pass-req-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.pass-req-item {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .72rem;
    color: var(--c-text-muted);
    transition: color .2s;
}

.pass-req-item.ok { color: var(--c-text-dark); }

.req-icon {
    font-size: .8rem;
    flex-shrink: 0;
    color: var(--c-border);
    transition: color .2s;
}

.req-icon.req-ok { color: var(--c-green); }

/* Panel derecho */
.pass-right { flex: 1; }

.pass-form-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

/* Requisitos móvil — grilla 2 col */
.pass-req-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .2rem .5rem;
    background: #f0f4f9;
    border-radius: var(--radius-md);
    padding: .55rem .7rem;
    margin-bottom: 1rem;
}

.pass-req-item-sm {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .62rem;
    color: var(--c-text-muted);
    transition: color .2s;
}

.pass-req-item-sm.ok { color: var(--c-text-dark); }
.pass-req-item-sm .req-icon { font-size: .7rem; }

/* ── Responsive pass ── */
@media (min-width: 769px) {
    .pass-main     { flex-direction: row; padding: 1.5rem; min-height: calc(100vh - 112px); align-items: flex-start; }
    .pass-left     { display: flex; flex-direction: column; gap: .85rem; width: 34%; flex-shrink: 0; }
    .pass-right    { flex: 1; }
    .pass-req-mobile { display: none; } /* oculto en desktop */
    .pass-form-card { padding: 1.5rem; }
}

@media (max-width: 768px) {
    .pass-main { padding: .85rem .75rem; }
}

/* ─────────────────────────────────────────────────────────────────
   20. RECU PASS — Recuperación de contraseña
───────────────────────────────────────────────────────────────── */

.recu-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--c-bg-page);
}

/* Panel izquierdo branding */
.recu-brand {
    background: var(--c-navy);
    padding: 1.5rem 1.25rem;
    display: none; /* oculto en móvil */
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.recu-brand::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.07);
    top: -60px;
    right: -60px;
    pointer-events: none;
}

.recu-brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(26,115,232,.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--c-blue);
    margin-bottom: .85rem;
}

.recu-brand-eyebrow {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin: 0 0 .3rem;
}

.recu-brand-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 .6rem;
}

.recu-brand-desc {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    line-height: 1.6;
    margin: 0;
}

.recu-brand-hint {
    background: rgba(0,201,167,.12);
    border-radius: var(--radius-md);
    padding: .5rem .75rem;
    font-size: .7rem;
    color: rgba(255,255,255,.65);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Panel derecho */
.recu-panel {
    flex: 1;
    background: var(--c-white);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header móvil (visible solo en móvil) */
.recu-mobile-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.recu-mobile-icon {
    width: 38px;
    height: 38px;
    background: rgba(26,115,232,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--c-blue);
}

/* Footer */
.recu-footer {
    background: var(--c-navy);
    border-top: 1px solid rgba(255,255,255,.07);
    padding: .5rem 1rem;
    text-align: center;
}

.recu-footer p {
    color: rgba(255,255,255,.3);
    font-size: .62rem;
    margin: 0;
}

/* ── Responsive ── */
@media (min-width: 769px) {
    .recu-main         { flex-direction: row; min-height: calc(100vh - 100px); }
    .recu-brand        { display: flex; width: 38%; flex-shrink: 0; }
    .recu-panel        { padding: 2.5rem 2.25rem; max-width: 480px; }
    .recu-mobile-header { display: none; }
}

@media (max-width: 768px) {
    .recu-panel { padding: 1.25rem 1rem; }
}
