/* =========================================
   GENERAL
   ========================================= */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f7f3ee;
    color: #4a4a4a;
    display: flex;
}

/* Marca de agua */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("/images/logocrema.png") no-repeat bottom right;
    background-size: 180px;
    opacity: 0.05;
    pointer-events: none;
}

/* =========================================
   LAYOUT
   ========================================= */
.lg-portal-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* =========================================
   SIDEBAR
   ========================================= */
.lg-sidebar {
    width: 260px;
    background: #7a1f2b; /* rojo vino elegante */
    color: white;
    padding: 35px 25px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.lg-sidebar-logo {
    width: 150px;
    margin: 0 auto 10px auto;
    display: block;
}

.lg-sidebar h3 {
    font-size: 13px;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255,255,255,0.15);
    padding-bottom: 4px;
}

.lg-sidebar a {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 0;
    border-radius: 6px;
    transition: 0.25s;
}

.lg-sidebar a:hover {
    background: rgba(255,255,255,0.15);
    padding-left: 10px;
}

.lg-sidebar a.active {
    background: rgba(255,255,255,0.25);
    font-weight: bold;
}

/* =========================================
   CONTENIDO
   ========================================= */
.lg-content {
    flex: 1;
    padding: 50px;
}

.welcome-box {
    background: white;
    padding: 40px;
    border-radius: 14px;
    box-shadow: 0 0 25px rgba(0,0,0,0.08);
    max-width: 750px;
    border-left: 6px solid #2f5d46; /* verde corporativo */
}

.welcome-box h1 {
    margin-top: 0;
    color: #2f5d46;
    font-size: 30px;
}

.welcome-box p {
    font-size: 17px;
    line-height: 1.6;
}

/* ACCESOS RÁPIDOS */
.quick-access {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.qa-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    text-decoration: none;
    color: #2f5d46;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: 0.25s;
}

.qa-item:hover {
    transform: translateY(-4px);
    background: #f7f3ee;
}

/* AVISO IMPORTANTE */
.notice-box {
    background: #fff7e6;
    border-left: 6px solid #7a1f2b;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
}

/* ÚLTIMOS DOCUMENTOS */
.last-docs {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.last-docs ul {
    margin: 0;
    padding-left: 20px;
}

/* PRÓXIMAS CITAS */
.next-appointments {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* ESTADO GENERAL */
.status-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border-left: 6px solid #2f5d46;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* DASHBOARD SECUNDARIO */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.dash-item {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* MENSAJE EXTRA */
.welcome-extra {
    margin-top: 20px;
    font-size: 16px;
    color: #2f5d46;
}


/* =========================================
   MÓVIL
   ========================================= */
@media (max-width: 768px) {

    .lg-portal-wrapper {
        flex-direction: column;
    }

    /* Sidebar horizontal tipo menú superior */
    .lg-sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        gap: 20px;
        padding: 20px;
        box-shadow: none;
        border-bottom: 4px solid rgba(0,0,0,0.1);
    }

    .lg-sidebar-logo {
        display: none; /* quita el logo para que no moleste en móvil */
    }

    .lg-sidebar h3 {
        display: none; /* oculta títulos en móvil */
    }

    .lg-sidebar a {
        white-space: nowrap;
        padding: 10px 15px;
        background: rgba(255,255,255,0.15);
        border-radius: 8px;
    }

    .lg-sidebar a.active {
        background: rgba(255,255,255,0.35);
    }

    /* Contenido */
    .lg-content {
        padding: 20px;
    }

    .welcome-box {
        padding: 25px;
        border-left-width: 4px;
    }

    .welcome-box h1 {
        font-size: 24px;
    }

    .welcome-box p {
        font-size: 15px;
    }
}
