/* ============================================================
   I.E.I. 385 Jose Olaya — Sistema de Asistencia
   Identidad visual "nivel inicial": cielo, sol, pasto, bloques.
   ============================================================ */

:root {
    --cielo-alto: #BEE7FB;
    --cielo-bajo: #E9F7FE;
    --sol: #FFD166;
    --pasto: #8ED17A;
    --pasto-oscuro: #5FA857;
    --coral: #FF6B6B;
    --lavanda: #B39DDB;
    --azul-escudo: #2a72b5;
    --turquesa: #3FB6A8;
    --naranja: #FF9F5A;
    --rosa: #F2789F;
    --indigo: #7B8FE0;
    --marron: #6B4A32;
    --crema: #FFFDF7;
    --texto: #4A4036;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    color: var(--texto);
    background: linear-gradient(180deg, var(--cielo-alto) 0%, var(--cielo-bajo) 55%, var(--cielo-bajo) 100%);
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, .nombre-personal, .btn-marcar, .reloj-digital {
    font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
}

/* ---------- Escena decorativa (sol, nubes, pasto, bloques) ---------- */
.escena {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    min-height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.sol {
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFE29A 0%, var(--sol) 60%, #FFC233 100%);
    box-shadow: 0 0 0 18px rgba(255, 209, 102, 0.25);
    animation: girar 40s linear infinite;
}

@keyframes girar {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.nube {
    position: absolute;
    background: #ffffff;
    border-radius: 100px;
    opacity: 0.9;
}
.nube::before, .nube::after {
    content: "";
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
}
.nube-1 { width: 120px; height: 42px; top: 12%; left: 6%; animation: flotar 14s ease-in-out infinite; }
.nube-1::before { width: 55px; height: 55px; top: -28px; left: 12px; }
.nube-1::after  { width: 40px; height: 40px; top: -20px; left: 55px; }

.nube-2 { width: 90px; height: 34px; top: 22%; right: 12%; animation: flotar 18s ease-in-out infinite 2s; }
.nube-2::before { width: 42px; height: 42px; top: -20px; left: 10px; }
.nube-2::after  { width: 32px; height: 32px; top: -14px; left: 42px; }

.nube-3 { width: 70px; height: 26px; top: 40%; left: 18%; opacity: 0.7; animation: flotar 16s ease-in-out infinite 1s; }
.nube-3::before { width: 32px; height: 32px; top: -15px; left: 8px; }
.nube-3::after  { width: 24px; height: 24px; top: -10px; left: 32px; }

@keyframes flotar {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(18px); }
}

.bloque {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    animation: mecer 6s ease-in-out infinite;
}
.bloque-1 { top: 62%; left: 8%; background: var(--coral); transform: rotate(-8deg); animation-delay: 0s; }
.bloque-2 { top: 15%; left: 42%; background: var(--lavanda); transform: rotate(10deg); animation-delay: 1.2s; }
.bloque-3 { top: 55%; right: 8%; background: var(--azul-escudo); transform: rotate(-6deg); animation-delay: 0.6s; }

@keyframes mecer {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50%      { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}

.pasto {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 160px;
}

@media (prefers-reduced-motion: reduce) {
    .sol, .nube, .bloque { animation: none; }
}

/* ---------- Login ---------- */
.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background:
        linear-gradient(var(--crema), var(--crema)) padding-box,
        linear-gradient(120deg, var(--coral), var(--sol), var(--pasto), var(--azul-escudo), var(--lavanda)) border-box;
    border-radius: 1.75rem;
    border: 6px solid transparent;
    box-shadow: 0 16px 40px rgba(107, 74, 50, 0.18);
    padding: 2.5rem 2rem 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
}

.login-logo {
    width: 130px;
    display: block;
    margin: 0 auto 1rem auto;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.12));
}

.login-card h1 {
    font-size: 1.2rem;
    color: var(--azul-escudo);
    text-align: center;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.login-card .subtitulo {
    text-align: center;
    color: #8a7c6c;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-card label {
    font-weight: 700;
    color: var(--marron);
}

.login-card .form-control {
    border-radius: 1rem;
    border: 2px solid #EADFCF;
    padding: 0.6rem 1rem;
}

.login-card .form-control:focus {
    border-color: var(--sol);
    box-shadow: 0 0 0 0.2rem rgba(255, 209, 102, 0.35);
}

.btn-ingresar {
    background: var(--pasto-oscuro);
    border: none;
    border-radius: 2rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 16px rgba(95, 168, 87, 0.4);
    transition: transform 0.15s ease;
}
.btn-ingresar:hover { transform: translateY(-2px); background: #4f9548; }

/* ---------- Dashboard de personal ---------- */
.dashboard-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.dashboard-card {
    background: var(--crema);
    border-radius: 1.75rem;
    border: 6px solid #fff;
    box-shadow: 0 16px 40px rgba(107, 74, 50, 0.18);
    padding: 2.5rem 2rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.dashboard-card img.logo-mini {
    width: 70px;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}

.nombre-personal {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--marron);
    margin-bottom: 0.15rem;
}

.rol-personal {
    display: inline-block;
    background: var(--azul-escudo);
    color: #fff;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.78rem;
    padding: 0.25rem 0.8rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.horario-asignado {
    font-size: 0.85rem;
    color: #8a7c6c;
    background: #F3EEE3;
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.reloj-digital {
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--azul-escudo);
    font-variant-numeric: tabular-nums;
}

.fecha-hoy {
    color: #8a7c6c;
    font-size: 1rem;
    text-transform: capitalize;
    margin-bottom: 2rem;
}

.btn-marcar {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.9rem 2.5rem;
    border-radius: 3rem;
    border: none;
    color: #fff;
    background: var(--pasto-oscuro);
    box-shadow: 0 6px 18px rgba(95, 168, 87, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-marcar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(95, 168, 87, 0.45);
}

.btn-marcar:disabled {
    background: #cbbfae;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-marcar.salida {
    background: var(--coral);
    box-shadow: 0 6px 18px rgba(255, 107, 107, 0.4);
}

.estado-marcaciones {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.estado-marcaciones .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
    border-radius: 0.8rem;
}

.mensaje-resultado {
    margin-top: 1rem;
    min-height: 1.5rem;
}

.aviso-gps {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: #8a7c6c;
}

/* ---------- Ventana emergente de confirmación de marcación ---------- */
.overlay-modal {
    position: fixed;
    inset: 0;
    background: rgba(74, 64, 54, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    padding: 1.5rem;
}

.overlay-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-marcacion-card {
    background: var(--crema);
    border-radius: 1.5rem;
    border: 6px solid #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    padding: 2rem 2rem 1.5rem;
    max-width: 320px;
    width: 100%;
    text-align: center;
}

.modal-icono {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.modal-mensaje {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--marron);
    margin-bottom: 1.4rem;
}

.barra-progreso-wrap {
    background: #EADFCF;
    border-radius: 1rem;
    height: 10px;
    overflow: hidden;
}

.barra-progreso {
    height: 100%;
    width: 0%;
    border-radius: 1rem;
    background: var(--pasto-oscuro);
}

.barra-progreso.salida {
    background: var(--coral);
}

/* ---------- Panel de directora (reporte / usuarios / importar) ---------- */
.top-bar {
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, #ffffff 0%, #F3FAFF 100%);
    border-bottom: 4px solid var(--sol);
}

.top-bar img {
    width: 42px;
}

.top-bar span.fw-bold {
    font-family: 'Fredoka', sans-serif;
    color: var(--azul-escudo);
}

.container {
    position: relative;
    z-index: 1;
}

table.tabla-reporte thead {
    background: var(--azul-escudo);
    color: #fff;
}

.badge-falta {
    background: #f1f1f1;
    color: #6c757d;
}

.card {
    border-radius: 1.25rem;
    border: none;
    box-shadow: 0 10px 25px rgba(107, 74, 50, 0.1);
}

.btn-primary {
    background: var(--azul-escudo);
    border-color: var(--azul-escudo);
    border-radius: 2rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
}
.btn-primary:hover {
    background: #235f97;
    border-color: #235f97;
}

.btn-outline-success, .btn-outline-danger, .btn-outline-secondary, .btn-outline-primary {
    border-radius: 2rem;
}

/* ---------- Campo de contraseña con botón de mostrar/ocultar ---------- */
.campo-password {
    position: relative;
}

.campo-password input {
    padding-right: 2.6rem;
}

.toggle-password {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.2rem;
    margin: 0;
    line-height: 0;
    color: #a3937f;
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--azul-escudo);
}

.toggle-password svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* ---------- Pastillas de navegación (enlaces internos como botones) ---------- */
.nav-pills-propias {
    flex-wrap: wrap;
}

.nav-pill {
    display: inline-block;
    padding: 0.42rem 1.05rem;
    border-radius: 2rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none !important;
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.nav-pill:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    color: #fff !important;
}

.nav-pill.activo {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8), 0 3px 8px rgba(0, 0, 0, 0.2);
    filter: brightness(0.92);
}

.nav-pill-azul     { background: var(--azul-escudo); }
.nav-pill-verde    { background: var(--pasto-oscuro); }
.nav-pill-sol      { background: var(--sol); color: #6B4A05 !important; }
.nav-pill-lavanda  { background: var(--lavanda); }
.nav-pill-turquesa { background: var(--turquesa); }
.nav-pill-coral    { background: var(--coral); }
.nav-pill-naranja  { background: var(--naranja); }
.nav-pill-rosa      { background: var(--rosa); }
.nav-pill-indigo    { background: var(--indigo); }

.nav-pill-sm {
    padding: 0.28rem 0.75rem;
    font-size: 0.75rem;
}

.nav-pill-outline {
    background: #fff !important;
    color: var(--marron) !important;
    box-shadow: inset 0 0 0 2px #EADFCF;
}
.nav-pill-outline:hover {
    color: var(--marron) !important;
    box-shadow: inset 0 0 0 2px var(--sol);
}
