/* ============================================================
   ASPPROMAC — Layout administrativo
   ============================================================ */
:root {
    --sidebar-width:        230px;
    --topbar-height:        52px;
    --sidebar-bg:           #1a2232;
    --sidebar-hover:        rgba(255,255,255,0.07);
    --sidebar-active-bg:    rgba(13,110,253,0.18);
    --sidebar-active-border:#0d6efd;
    --sidebar-text:         rgba(255,255,255,0.68);
    --sidebar-label:        rgba(255,255,255,0.3);
}

body { overflow-x: hidden; }

/* ── Topbar ── */
#topbar {
    background: var(--sidebar-bg) !important;
    height: var(--topbar-height);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 1040;
}

/* ── Wrapper ── */
#wrapper {
    padding-top: var(--topbar-height);
    min-height: 100vh;
}

/* ── Sidebar ── */
#sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    flex-shrink: 0;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.22s ease;
    display: flex;
    flex-direction: column;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

#sidebar.collapsed { width: 0; }

.sidebar-section-label {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--sidebar-label);
    padding: 16px 18px 4px;
    white-space: nowrap;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    color: var(--sidebar-text) !important;
    border-left: 3px solid transparent;
    white-space: nowrap;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-link i {
    font-size: 1rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.sidebar-link:hover { background: var(--sidebar-hover); color: #fff !important; }

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: #fff !important;
    border-left-color: var(--sidebar-active-border);
}

.sidebar-link.text-danger-light { color: rgba(248,113,113,0.8) !important; }
.sidebar-link.text-danger-light:hover { color: #f87171 !important; }

.sidebar-footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* ── Page content ── */
#page-content { transition: none; min-width: 0; }

/* ── Avatar ── */
.avatar {
    width: 32px; height: 32px; min-width: 32px;
    background: #0d6efd;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: #fff;
    flex-shrink: 0;
    line-height: 1;
    object-fit: cover;
}

.avatar-sm { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }
.avatar-lg { width: 72px; height: 72px; min-width: 72px; font-size: 1.6rem; }

/* ── Auth layout ── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2232 0%, #2d3f5e 100%);
    padding: 24px 16px;
}

.auth-card-container { width: 100%; max-width: 420px; }
.auth-card-container .card-body { padding: 2rem !important; }

.auth-logo {
    width: 56px; height: 56px;
    background: #0d6efd;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.7rem;
}

.auth-card-container h4 { color: #fff; }
.auth-card-container .text-muted { color: rgba(255,255,255,0.55) !important; }
.auth-card-container > p.text-muted { color: rgba(255,255,255,0.4) !important; }

/* ── Page header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 8px;
}

.page-header h5 { margin: 0; font-weight: 600; color: #1e293b; }

/* ── Stat cards ── */
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: #1e293b; }
.stat-label { font-size: 0.78rem; color: #64748b; font-weight: 500; }

/* ── Foto preview ── */
.foto-preview {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        z-index: 1035;
        top: var(--topbar-height);
        left: 0;
        height: calc(100vh - var(--topbar-height));
    }
}
