:root {
    --verde-itssat: #008000;
    --verde-oscuro: #004d00;
    --slate-900: #0f172a;
    --slate-950: #020617;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --red-600:  #dc2626;
    --red-800:  #991b1b;
}

/* ESTRUCTURA GENERAL */
body {
    background-color: var(--gray-100);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    color: var(--slate-800);
    margin: 0;
}

/* MENÚ LATERAL (SIDEBAR PC) */
.sidebar {
    width: 16rem;
    background-color: var(--slate-900);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-logo {
    padding: 1.25rem;
    background-color: var(--slate-950);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--slate-800);
}
.sidebar-logo .verde { color: #22c55e; }
.sidebar-nav {
    margin-top: 1.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}
.sidebar-link.inactivo {
    color: var(--slate-400);
}
.sidebar-link.inactivo:hover {
    background-color: var(--slate-800);
    color: white;
}
.sidebar-link.activo {
    background-color: var(--verde-itssat);
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--slate-800);
    font-size: 0.75rem;
    text-align: center;
    color: var(--slate-500);
}

/* CONTENEDOR PRINCIPAL */
.main-wrapper {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* BARRA SUPERIOR (HEADER) */
.header-top {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.breadcrumbs a {
    color: var(--slate-400);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumbs .actual {
    font-weight: 700;
    color: var(--slate-700);
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}
.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #dcfce7;
    color: #166534;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    overflow: hidden;
}

/* AREA DE CONTENIDO */
.content-area {
    flex: 1 1 0%;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.card-form {
    width: 100%;
    max-width: 100%;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    box-sizing: border-box;
}

/* REJILLA DE VACANTES */
.vacantes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.tarjeta-vacante {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-container {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.filter-select {
    width: auto;
    min-width: 240px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: white;
}

/* PIE DE PÁGINA */
.footer-bottom {
    background-color: var(--verde-oscuro);
    color: white;
    text-align: center;
    padding: 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* ==========================================================
   BOTÓN MENÚ MÓVIL (OCULTO EN PC POR DEFECTO)
   ========================================================== */
.btn-menu-movil {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--slate-700);
    padding: 0.25rem 0.5rem;
}

/* ==========================================================
   REGLAS PARA DISPOSITIVOS PEQUEÑOS (MÓVILES <= 768px)
   ========================================================== */
@media (max-width: 768px) {
    body {
        height: auto;
        overflow: auto;
        flex-direction: column;
    }
    
    /* Menú desplegable vertical en celulares */
    .sidebar {
        display: none;
        width: 100%;
        height: auto;
        flex-direction: column;
        position: absolute;
        top: 4rem;
        left: 0;
        z-index: 1000;
        background-color: var(--slate-900);
    }
    
    .sidebar.activo-movil {
        display: flex;
    }

    .btn-menu-movil {
        display: block !important;
    }

    .main-wrapper {
        width: 100%;
        overflow: visible;
    }

    .content-area {
        padding: 0.75rem !important;
        overflow-y: visible;
    }

    .card-form {
        padding: 1rem !important;
    }

    .header-top {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .vacantes-grid {
        grid-template-columns: 1fr !important;
    }

    .filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .filter-select {
        width: 100%;
        min-width: 0;
    }
}