:root {
    --azul-oscuro: #1A365D;
    --lila: #9F7AEA;
    --lila-hover: #805AD5;
    --azul-claro: #EBF8FF;
    --texto: #2D3748;
    --blanco: #FFFFFF;
    --gris-borde: #E2E8F0;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body { color: var(--texto); background: var(--blanco); }

a { text-decoration: none; }

/* ==========================================
   HEADER PÚBLICO
   ========================================== */
.header-publico {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: var(--blanco);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-publico nav { display: flex; align-items: center; gap: 25px; }
.header-publico nav a {
    color: var(--azul-oscuro);
    font-weight: 500;
    transition: color 0.3s;
}
.header-publico nav a:hover { color: var(--lila); }
.header-publico nav a i { margin-right: 5px; }

/* ==========================================
   BOTONES
   ========================================== */
.btn-lila {
    background: var(--lila);
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}
.btn-lila:hover { background: var(--lila-hover); transform: translateY(-2px); }
.btn-lila i { margin-right: 8px; }

/* ==========================================
   FOOTER PÚBLICO
   ========================================== */
.footer-publico {
    background: var(--azul-oscuro);
    color: white;
    padding: 60px 50px 20px;
}
.footer-contenido {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-columna h4 {
    color: var(--lila);
    margin-bottom: 20px;
    font-size: 18px;
}
.footer-columna p, .footer-columna a {
    color: #CBD5E0;
    display: block;
    margin-bottom: 12px;
    line-height: 1.6;
    transition: color 0.3s;
}
.footer-columna a:hover { color: var(--lila); }
.footer-columna i { color: var(--lila); margin-right: 10px; width: 20px; }
.footer-copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #A0AEC0;
    font-size: 14px;
}

/* ==========================================
   SISTEMA - LAYOUT
   ========================================== */
.sistema-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background: var(--azul-oscuro);
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}
.sidebar img { display: block; margin: 0 auto 40px; }
.sidebar a {
    display: flex;
    align-items: center;
    color: #CBD5E0;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: 0.3s;
    font-size: 15px;
}
.sidebar a i { margin-right: 12px; width: 20px; text-align: center; }
.sidebar a:hover, .sidebar a.activo {
    background: var(--lila);
    color: white;
}
.contenido-principal {
    margin-left: 260px;
    flex: 1;
    padding: 40px;
    background: var(--azul-claro);
    min-height: 100vh;
}

/* ==========================================
   TARJETAS Y TABLAS
   ========================================== */
.tarjeta {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.tarjeta h3 { margin-bottom: 15px; }

.tabla { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.tabla th { background: var(--azul-oscuro); color: white; padding: 15px; text-align: left; font-weight: 500; }
.tabla td { padding: 15px; border-bottom: 1px solid var(--gris-borde); }
.tabla tr:hover { background: var(--azul-claro); }
.tabla tr:last-child td { border-bottom: none; }

/* ==========================================
   BARRA DE PROGRESO
   ========================================== */
.progreso { background: #E2E8F0; border-radius: 10px; height: 10px; overflow: hidden; margin-top: 10px; }
.progreso-bar { background: var(--lila); height: 100%; border-radius: 10px; transition: width 0.5s ease; }

/* ==========================================
   FORMULARIO LOGIN
   ========================================== */
.login-container { display: flex; height: 100vh; }
.login-imagen {
    flex: 1;
    background: var(--azul-claro);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.login-imagen img { max-width: 70%; height: auto; }
.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px;
    background: white;
}
.login-form h1 { color: var(--azul-oscuro); margin-bottom: 10px; font-size: 32px; }
.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}
.login-form input:focus { outline: none; border-color: var(--lila); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .header-publico { flex-direction: column; padding: 15px; gap: 15px; }
    .header-publico nav { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .footer-contenido { grid-template-columns: 1fr; }
    .sidebar { width: 100%; position: relative; height: auto; }
    .contenido-principal { margin-left: 0; }
    .login-container { flex-direction: column; }
    .login-form { padding: 40px 20px; }
}