/* assets/css/gestion.css */

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top, rgba(255,255,255,.18), transparent 30%),
        linear-gradient(135deg, #006B35, #004524);
}

.login-page {
    width: 100%;
    padding: 18px;
}

.login-card {
    width: min(100%, 420px);
    margin: auto;
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(0,0,0,.22);
}

.login-logo {
    text-align: center;
    margin-bottom: 18px;
}

.login-logo img {
    width: 130px;
    max-width: 70%;
}

.login-card h1,
.login-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: clamp(22px, 5vw, 30px);
    line-height: 1.1;
}

.login-card p {
    text-align: center;
    color: #6b7280;
}

.form-label {
    display: block;
    margin-top: 16px;
    margin-bottom: 7px;
    font-weight: 700;
    color: #374151;
}

.form-control {
    width: 100%;
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
}

.form-control:focus {
    border-color: #006B35;
    box-shadow: 0 0 0 4px rgba(0,107,53,.12);
}

.primary-button {
    width: 100%;
    height: 48px;
    margin-top: 20px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #006B35, #004524);
}

.alert {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
}

.alert-error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.gestion-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gestion-header .header-title strong {
    font-size: clamp(13px, 3.4vw, 18px);
}

.gestion-header .header-title span {
    font-size: clamp(12px, 3vw, 15px);
}

.gestion-main {
    flex: 1;
    background: #fff;
    padding: clamp(14px, 3vw, 26px);
}

.gestion-card {
    padding: clamp(20px, 5vw, 34px);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.55), transparent 32%),
        linear-gradient(135deg, rgba(0,107,53,.12), rgba(215,181,109,.18));
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 18px 45px rgba(0,0,0,.08);
}

.intro-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.privilege-grid,
.element-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.privilege-button,
.element-button,
.empty-card {
    min-height: 145px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #1f2937;
    box-shadow: 0 14px 30px rgba(0,0,0,.07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.privilege-button:hover,
.element-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0,0,0,.11);
}

.privilege-button .material-symbols-rounded,
.element-button .material-symbols-rounded,
.section-icon,
.empty-card .material-symbols-rounded {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #006B35, #004524);
    font-size: 28px;
}

.privilege-button strong,
.element-button strong {
    display: block;
    margin-top: 12px;
    font-size: 18px;
}

.element-button small {
    display: block;
    margin-top: 7px;
    color: #6b7280;
}

.empty-card p {
    margin-top: 12px;
}

.side-menu-separator {
    height: 1px;
    margin: 12px 0;
    background: #e5e7eb;
}

@media (max-width: 980px) {
    .privilege-grid,
    .element-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .privilege-grid,
    .element-grid {
        grid-template-columns: 1fr;
    }

    .intro-card {
        align-items: flex-start;
        flex-direction: column;
    }
}
