:root {
    --brand-primary: #32C36C;
    --brand-primary-light: #55d488;
    --brand-primary-dark: #1a2a36;
    --brand-accent: #e6b325;
    --brand-bg: #f5f8f6;
    --brand-surface: #ffffff;
    --brand-text: #1a2a36;
    --brand-muted: #6c7a76;
    --brand-border: #e5ebe7;
    --brand-radius-sm: .5rem;
    --brand-radius: .75rem;
    --brand-shadow-sm: 0 2px 10px rgba(26, 42, 54, .06);
    --brand-shadow: 0 10px 28px rgba(26, 42, 54, .08);
    --sidebar-width: 264px;
    --font-heading: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--brand-bg);
    color: var(--brand-text);
    font-family: var(--font-body);
}
h1, h2, h3, h4, h5, h6, .navbar-brand, .btn { font-family: var(--font-heading); }

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-primary-dark); }

::selection { background: var(--brand-accent); color: #fff; }

/* =========================================================
   Botões
   ========================================================= */
.btn { border-radius: var(--brand-radius-sm); font-weight: 600; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-sm { border-radius: .45rem; }

.btn-brand {
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
    border-color: var(--brand-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(50, 195, 108, .28);
}
.btn-brand:hover {
    background: linear-gradient(135deg, var(--brand-primary), #279a56);
    border-color: #279a56;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(50, 195, 108, .34);
}
.btn-outline-brand { border: 1.5px solid var(--brand-primary); color: var(--brand-primary); background: transparent; }
.btn-outline-brand:hover { background: var(--brand-primary); color: #fff; }

/* =========================================================
   Layout — shell / sidebar / topbar
   ========================================================= */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(190deg, var(--brand-primary-dark), #0e1a22);
    color: #fff;
    flex-shrink: 0;
    transition: margin-left .25s ease;
}

.admin-sidebar .brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.35rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar .brand-mark {
    width: 36px; height: 36px; border-radius: .55rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
    box-shadow: 0 4px 12px rgba(50, 195, 108, .35);
    flex-shrink: 0;
    font-size: 1.05rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,.72);
    padding: .55rem 1.25rem;
    margin: .1rem .6rem;
    border-radius: .5rem;
    font-size: .88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .65rem;
    width: calc(100% - 1.2rem);
    transition: background .15s ease, color .15s ease;
}
.admin-sidebar .nav-link i { font-size: 1rem; width: 1.1rem; text-align: center; }

.admin-sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .nav-link.active {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(50, 195, 108, .3);
}

.admin-sidebar .nav-section-title {
    color: rgba(255,255,255,.4);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 1.1rem 1.4rem .4rem;
}

.admin-main {
    flex: 1;
    min-width: 0;
}

.admin-topbar {
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--brand-border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--brand-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 20;
}
.admin-topbar a:not(.dropdown-item) { color: var(--brand-muted); }
.admin-topbar a:hover { color: var(--brand-primary); }

.admin-content {
    padding: 1.75rem;
}

.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 15, .45);
    z-index: 1044;
}
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1045;
        margin-left: calc(-1 * var(--sidebar-width));
        overflow-y: auto;
    }
    .admin-sidebar.show {
        margin-left: 0;
        box-shadow: 0 0 32px rgba(0,0,0,.3);
    }
    .admin-sidebar-backdrop.show { display: block; }
}

/* =========================================================
   Cards
   ========================================================= */
.card-brand {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow-sm);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: var(--brand-radius);
    padding: 1.25rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--brand-shadow); }
.stat-card .stat-icon {
    flex: 0 0 auto;
    width: 48px; height: 48px; border-radius: .65rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 6px 14px rgba(50, 195, 108, .3);
}
.stat-card .stat-body { min-width: 0; }
.stat-card .stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--brand-text);
    line-height: 1.1;
}
.stat-card .stat-label { color: var(--brand-muted); font-size: .82rem; }

/* =========================================================
   Tabelas
   ========================================================= */
.table { color: var(--brand-text); }
.table > thead {
    background: var(--brand-bg);
}
.table > thead th {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--brand-muted);
    border-bottom: 1px solid var(--brand-border);
    padding-top: .75rem;
    padding-bottom: .75rem;
}
.table > tbody td { vertical-align: middle; border-color: var(--brand-border); }
.table-hover > tbody > tr:hover > * { background-color: rgba(50, 195, 108, .05); }

/* =========================================================
   Formulários
   ========================================================= */
.form-control, .form-select {
    border-radius: .5rem;
    border-color: var(--brand-border);
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 .2rem rgba(50, 195, 108, .15);
}
.form-label { font-weight: 600; font-size: .88rem; }

/* =========================================================
   Progresso
   ========================================================= */
.progress { border-radius: 1rem; background: var(--brand-border); }
.progress-bar { background-color: var(--brand-primary); }
.progress-thin { height: .5rem; border-radius: 1rem; }

/* =========================================================
   Badges
   ========================================================= */
.badge { font-weight: 600; border-radius: 50px; }
.badge-soft-success { background: #e6f4ea; color: #1e7e34; }
.badge-soft-warning { background: #fff6e0; color: #997404; }
.badge-soft-danger { background: #fbe7e9; color: #b02a37; }
.badge-soft-secondary { background: #eef0ef; color: #495057; }
.badge-soft-primary { background: #e8f9ee; color: #1a8a4d; }
.badge-soft-info { background: #e3f6fb; color: #087990; }
.badge-soft-dark { background: #e2e3e5; color: #343a40; }
.badge-soft-light { background: #f8f9fa; color: #6c757d; }

/* =========================================================
   Misc
   ========================================================= */
.alert { border-radius: var(--brand-radius-sm); border: none; }
.dropdown-menu { border-radius: var(--brand-radius-sm); border-color: var(--brand-border); box-shadow: var(--brand-shadow); }
.modal-content { border-radius: var(--brand-radius); border: none; box-shadow: var(--brand-shadow); }
.nav-pills .nav-link.active { background-color: var(--brand-primary); }
