:root {
    --brand: #6d5efc;
    --brand-2: #22d3ee;
    --sidebar-w: 264px;
    --sidebar-bg: #151321;
    --sidebar-link: #a5a3b8;
}

html, body {
    height: 100%;
}

body {
    background: radial-gradient(1200px 600px at 85% -10%, rgba(109, 94, 252, .12), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(34, 211, 238, .08), transparent 55%), var(--bs-body-bg);
}

/* ---------- esqueleto ---------- */
.app {
    min-height: 100vh;
}

.main {
    min-width: 0;
}

/* ---------- sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: linear-gradient(180deg, #1b1830 0%, var(--sidebar-bg) 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    padding: 1.25rem .9rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    padding: .35rem .65rem 1.1rem;
    letter-spacing: .3px;
}

    .sidebar-brand span {
        color: var(--brand-2);
    }

.side-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--sidebar-link);
    padding: .62rem .75rem;
    border-radius: .65rem;
    font-size: .93rem;
    text-decoration: none;
    margin-bottom: .15rem;
    transition: background .15s, color .15s;
}

    .side-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, .06);
    }

    .side-link.active {
        color: #fff;
        background: linear-gradient(90deg, var(--brand), rgba(109, 94, 252, .35));
        box-shadow: 0 6px 18px rgba(109, 94, 252, .35);
    }

    .side-link .ico {
        font-size: 1.05rem;
        width: 1.4rem;
        text-align: center;
    }

.sidebar-sep {
    color: #5c5975;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: .9rem .75rem .35rem;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, .07);
    padding-top: .9rem;
}

/* ---------- topbar mobile ---------- */
.topbar {
    background: rgba(21, 19, 33, .9);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding: .6rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(8px);
}

.offcanvas.sidebar-offcanvas {
    background: linear-gradient(180deg, #1b1830, var(--sidebar-bg));
    width: 280px;
}

/* ---------- conteúdo ---------- */
.page-title {
    font-weight: 700;
}

.page-sub {
    color: var(--bs-secondary-color);
    font-size: .92rem;
}

/* ---------- cards ---------- */
.card {
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.card-body {
    padding: 1.1rem 1.25rem;
}

/* ---------- formulários ---------- */
.form-label {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--bs-secondary-color);
}

.form-control, .form-select {
    border-radius: .6rem;
    background-color: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .12);
}

    .form-control:focus, .form-select:focus {
        border-color: var(--brand);
        box-shadow: 0 0 0 .22rem rgba(109, 94, 252, .22);
        background-color: rgba(255, 255, 255, .06);
    }

/* ---------- botões ---------- */
.btn {
    border-radius: .6rem;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    border: 0;
    box-shadow: 0 6px 16px rgba(109, 94, 252, .35);
}

    .btn-primary:hover {
        filter: brightness(1.08);
    }

/* ---------- tabelas ---------- */
.table {
    --bs-table-hover-bg: rgba(109, 94, 252, .08);
}

    .table thead th {
        font-size: .74rem;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--bs-secondary-color);
        border-bottom-color: rgba(255, 255, 255, .12) !important;
    }

/* ---------- badges / progresso ---------- */
.badge {
    border-radius: .5rem;
    font-weight: 600;
    padding: .35em .65em;
}

.progress {
    border-radius: 1rem;
    background: rgba(255, 255, 255, .08);
}

/* ---------- scrollbar ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .14);
    border-radius: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}


/* ==================== tema claro ==================== */
[data-bs-theme="light"] body {
    background: radial-gradient(1100px 500px at 88% -12%, rgba(109, 94, 252, .10), transparent 60%), radial-gradient(800px 420px at -8% 108%, rgba(34, 211, 238, .10), transparent 55%), #f5f6fb;
}

[data-bs-theme="light"] .card {
    border-color: rgba(15, 15, 40, .08);
    box-shadow: 0 10px 28px rgba(30, 30, 70, .08);
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    background-color: #fff;
    border-color: rgba(15, 15, 40, .16);
}

    [data-bs-theme="light"] .form-control:focus,
    [data-bs-theme="light"] .form-select:focus {
        background-color: #fff;
    }

[data-bs-theme="light"] .table {
    --bs-table-hover-bg: rgba(109, 94, 252, .07);
}

    [data-bs-theme="light"] .table thead th {
        border-bottom-color: rgba(15, 15, 40, .14) !important;
    }

[data-bs-theme="light"] .topbar {
    background: rgba(255, 255, 255, .92);
    border-bottom-color: rgba(15, 15, 40, .08);
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(20, 20, 50, .22);
}
