:root {
    --verde: #008005;
    --verde-oscuro: #005A03;
    --verde-claro: #17A32A;
    --verde-suave: #E7F3E8;
    --naranja: #FF7300;
    --texto: #3B4256;
    --texto-tenue: #8A93A8;
    --borde: #EDF0F5;
    --fondo: #F4F7FA;
    --sombra: 0 2px 14px rgba(70, 90, 120, .07);
}

body {
    background: var(--fondo);
    color: var(--texto);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-size: 14px;
}

a { text-decoration: none; }

.contenedor-app { display: flex; min-height: 100vh; }

.barra-lateral {
    width: 250px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-right: 1px solid var(--borde);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.marca {
    background: linear-gradient(135deg, #17A32A, #005A03);
    color: #FFFFFF;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.marca .logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #FFFFFF;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.marca .nombre { font-weight: 600; font-size: 19px; letter-spacing: .5px; }
.marca .lema { font-size: 10px; opacity: .85; letter-spacing: 1.2px; text-transform: uppercase; }

.menu { padding: 14px 0; overflow-y: auto; flex-grow: 1; }
.menu .titulo-grupo {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    color: var(--texto-tenue);
    padding: 16px 22px 8px;
    font-weight: 600;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 22px;
    color: var(--texto-tenue);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .18s;
}

.menu a i { font-size: 16px; width: 18px; }
.menu a:hover { color: var(--verde); background: var(--verde-suave); }
.menu a.activo { color: var(--verde); background: var(--verde-suave); border-left-color: var(--verde); font-weight: 600; }

.area-principal { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }

.barra-superior {
    background: #FFFFFF;
    border-bottom: 1px solid var(--borde);
    padding: 14px 26px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.barra-superior .titulo-pagina { font-size: 17px; font-weight: 600; margin: 0; }
.barra-superior .subtitulo { font-size: 12px; color: var(--texto-tenue); }

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--verde-claro), var(--verde-oscuro));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.contenido { padding: 26px; flex-grow: 1; }

.tarjeta {
    background: #FFFFFF;
    border: none;
    border-radius: 12px;
    box-shadow: var(--sombra);
    margin-bottom: 22px;
}

.tarjeta .cabecera {
    padding: 18px 22px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.tarjeta .cabecera h6 { font-weight: 600; margin: 0; font-size: 15px; }
.tarjeta .cabecera small { color: var(--texto-tenue); }
.tarjeta .cuerpo { padding: 18px 22px 22px; }

.tile {
    border-radius: 12px;
    padding: 20px;
    color: #FFFFFF;
    box-shadow: var(--sombra);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.tile .rotulo { font-size: 12px; opacity: .9; font-weight: 500; }
.tile .cifra { font-size: 30px; font-weight: 600; line-height: 1.3; }
.tile .detalle { font-size: 11px; opacity: .85; }
.tile i.marca-agua { position: absolute; right: 14px; bottom: 10px; font-size: 52px; opacity: .16; }

.tile-verde { background: linear-gradient(135deg, #17A32A, #005A03); }
.tile-azul { background: linear-gradient(135deg, #4FC3F7, #1565C0); }
.tile-ambar { background: linear-gradient(135deg, #FFA94D, #FF7300); }
.tile-morado { background: linear-gradient(135deg, #9575CD, #512DA8); }

.pildora {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.pildora-success { background: #E3F5E1; color: var(--verde-oscuro); }
.pildora-info { background: #E1F0FB; color: #1565C0; }
.pildora-warning { background: #FFF0E0; color: #C25A00; }
.pildora-danger { background: #FBE3E3; color: #C62828; }
.pildora-secondary { background: #ECEEF2; color: #6B7385; }
.pildora-dark { background: #E2E4E9; color: #3B4256; }

.tabla-sipsu { margin: 0; }
.tabla-sipsu thead th {
    background: #3B4256;
    color: #FFFFFF;
    font-size: 11px;
    letter-spacing: .7px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 13px 16px;
    border: none;
    white-space: nowrap;
}

.tabla-sipsu thead th:first-child { border-radius: 8px 0 0 8px; }
.tabla-sipsu thead th:last-child { border-radius: 0 8px 8px 0; }
.tabla-sipsu tbody td { padding: 14px 16px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla-sipsu tbody tr:last-child td { border-bottom: none; }
.tabla-sipsu tbody tr:hover { background: #FAFBFD; }

.linea-tiempo { position: relative; padding-left: 6px; }
.linea-tiempo .punto {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
}

.linea-tiempo .fila { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.linea-tiempo .fila:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 38px;
    bottom: 0;
    width: 2px;
    background: var(--borde);
}

.linea-tiempo .titulo { font-weight: 600; font-size: 13px; }
.linea-tiempo .nota { font-size: 12px; color: var(--texto-tenue); }

.btn-verde { background: var(--verde); border-color: var(--verde); color: #FFFFFF; font-weight: 500; }
.btn-verde:hover { background: var(--verde-oscuro); border-color: var(--verde-oscuro); color: #FFFFFF; }
.btn-contorno-verde { border-color: var(--verde); color: var(--verde); font-weight: 500; }
.btn-contorno-verde:hover { background: var(--verde); color: #FFFFFF; }

.form-control:focus, .form-select:focus {
    border-color: var(--verde-claro);
    box-shadow: 0 0 0 .18rem rgba(0, 128, 5, .16);
}

.progress { background: var(--borde); border-radius: 20px; }
.progress-bar { background: linear-gradient(90deg, var(--verde-claro), var(--verde-oscuro)); }

.tarjeta-actividad { transition: transform .18s, box-shadow .18s; height: 100%; }
.tarjeta-actividad:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(70, 90, 120, .13); }

.cinta-categoria {
    background: var(--verde-suave);
    color: var(--verde-oscuro);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 20px;
}

.valor-horas {
    background: linear-gradient(135deg, var(--verde-claro), var(--verde-oscuro));
    color: #FFFFFF;
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    line-height: 1.1;
}

.valor-horas .numero { font-size: 20px; font-weight: 600; }
.valor-horas .texto { font-size: 10px; opacity: .9; }

.pantalla-acceso {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #17A32A, #005A03);
    padding: 20px;
}

.caja-acceso {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .2);
    width: 100%;
    max-width: 420px;
    padding: 38px 36px;
}

.caja-acceso .escudo {
    width: 108px;
    height: 108px;
    display: block;
    margin: 0 auto 16px;
}

@media (max-width: 991px) {
    .barra-lateral { position: fixed; left: -250px; z-index: 1040; transition: left .25s; }
    .barra-lateral.abierta { left: 0; }
    .contenido { padding: 18px; }
}
