/* SIGECON — Estilos principais */

:root {
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --primary: #2563eb;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #3b82f6;
}

/* Layout principal */
.app-body {
    background: var(--bs-body-bg);
    overflow-x: hidden;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    width: auto;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: var(--topbar-height);
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.app-main {
    flex: 1;
    background: var(--bs-tertiary-bg);
}

/* Sidebar */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--sidebar-active);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--sidebar-active);
}

.sidebar-nav .nav-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 1rem 1rem 0.5rem;
    font-weight: 600;
}

/* Topbar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Stat cards */
.stat-card {
    background: var(--bs-body-bg);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--bs-border-color);
    height: 100%;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card-success .stat-icon { background: rgba(34,197,94,0.15); color: #22c55e; }
.stat-card-danger .stat-icon  { background: rgba(239,68,68,0.15); color: #ef4444; }
.stat-card-warning .stat-icon { background: rgba(245,158,11,0.15); color: #f59e0b; }
.stat-card-primary .stat-icon { background: rgba(37,99,235,0.15); color: #2563eb; }
.stat-card-info .stat-icon    { background: rgba(6,182,212,0.15); color: #06b6d4; }

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0.15rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-body-color);
}

/* Auth pages */
.auth-body {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    min-height: 100vh;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1rem !important;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: rgba(37,99,235,0.1);
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

/* Dark theme sidebar */
[data-bs-theme="dark"] .app-sidebar {
    --sidebar-bg: #0f172a;
}

[data-bs-theme="dark"] .app-main {
    background: #111827;
}

/* Responsive */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }

    .app-content {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .app-main {
        padding: 1rem !important;
    }

    .topbar-title {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
    }
}

.report-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.report-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: rgba(37,99,235,0.1);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

