    :root {
        --primary: #356AA0;
        --accent: #2c5580;
        --bg-main: #f4f7f6;
        --text-dark: #333;
        --white: #ffffff;
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .main-dashboard {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: var(--bg-main);
        padding: 5px 20px 20px 20px;
        /* Reducimos el padding superior al mínimo */
        margin-top: -20px;
        /* Esto elimina el espacio entre la barra azul y el contenido */
        color: var(--text-dark);
        position: relative !important;
        top: -35px !important;
        /* Ajusta este número hasta que pegue arriba */
        margin-bottom: -35px !important;
        /* Compensa el movimiento para no dejar hueco abajo */
    }

    /* Tarjeta de Perfil */
    .profile-card {
        background: var(--white);
        border-radius: 15px;
        padding: 15px 25px;
        /* Más compacto verticalmente */
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        box-shadow: var(--shadow);
        margin-bottom: 20px;
        align-items: center;
        border-left: 6px solid var(--primary);
        /* Quitamos cualquier margen superior que pueda traer por defecto */
        margin-top: 0 !important;
    }

    .photo-section {
        text-align: center;
        flex: 0 0 150px;
    }

    .photo-frame {
        width: 130px;
        height: 160px;
        border-radius: 10px;
        overflow: hidden;
        border: 4px solid #f0f0f0;
        margin-bottom: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .photo-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .info-section {
        flex: 1;
        min-width: 300px;
    }

    .info-section h2 {
        margin: 0 0 5px 0;
        /* Espacio más pequeño bajo el nombre */
        color: var(--primary);
        font-size: 1.4rem;
        /* Un poco más pequeño para ahorrar espacio vertical */
    }

    .badge {
        display: inline-block;
        padding: 6px 14px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: bold;
        margin-top: 10px;
    }

    .badge-active {
        background: #e3f2fd;
        color: #1976d2;
    }

    .badge-warning {
        background: #fffde7;
        color: #fbc02d;
        border: 1px solid #fbc02d;
    }

    .badge-danger {
        background: #ffebee;
        color: #d32f2f;
    }

    /* Grid de Módulos */
    .grid-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }

    .card-module {
        background: var(--white);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--shadow);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .card-module:hover {
        transform: translateY(-5px);
    }

    .card-header {
        background: var(--primary);
        color: white;
        padding: 15px;
        font-weight: bold;
        font-size: 1rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .card-body {
        padding: 20px;
        display: flex;
        gap: 15px;
    }

    .icon-box {
        flex: 0 0 60px;
    }

    .icon-box img {
        width: 100%;
        height: auto;
    }

    .links-list {
        list-style: none;
        padding: 0;
        margin: 0;
        flex: 1;
    }

    .links-list li {
        margin-bottom: 10px;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 5px;
    }

    .links-list li:last-child {
        border: none;
    }

    .links-list a {
        text-decoration: none;
        color: #555;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        transition: color 0.2s;
    }

    .links-list a:hover {
        color: var(--primary);
        font-weight: 500;
    }

    .links-list a i {
        margin-right: 8px;
        color: var(--primary);
        font-size: 0.8rem;
    }

    /* Botón Carnet */
    .btn-carnet {
        background: var(--primary);
        color: white !important;
        padding: 8px 12px;
        border-radius: 5px;
        text-decoration: none;
        font-size: 0.85rem;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .alert-custom {
        margin-bottom: 15px !important;
    }

    @media (max-width: 600px) {
        .profile-card {
            flex-direction: column;
            text-align: center;
        }

        .info-section {
            min-width: 100%;
        }
    }

    /* Forzamos al contenedor padre a no tener separación superior */
    body,
    .content,
    .wrapper,
    [class*="container"] {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }