:root {
    --cor-primaria: #e67e22;
    --cor-primaria-escura: #c96512;
    --molaia-superficie: #fff;
    --molaia-fundo: #f4f6f9;
    --molaia-texto: #28313b;
    --molaia-borda: rgba(34, 43, 53, .08);
}

body.bg-body-tertiary,
body.layout-fixed {
    color: var(--molaia-texto);
    background:
        radial-gradient(ellipse at 12% 8%, rgba(230, 126, 34, .10), transparent 34%),
        radial-gradient(ellipse at 92% 90%, rgba(245, 177, 91, .12), transparent 32%),
        var(--molaia-fundo) !important;
}

.app-wrapper { background: transparent; }
.app-main { background: transparent; }
.app-main > .container-fluid > .row { row-gap: 8px; }

.app-main .card[class*="text-bg-"] {
    border-left: 4px solid var(--cor-primaria);
    background: #fff !important;
    color: #35404c !important;
}
.app-main .card.text-bg-success { border-left-color: #52a67a; }
.app-main .card.text-bg-warning { border-left-color: #e5a638; }
.app-main .card.text-bg-info { border-left-color: #5c9fbd; }
.app-main .card[class*="text-bg-"] h5 { margin-bottom: 10px; color: #6c7783; font-size: .9rem; }
.app-main .card[class*="text-bg-"] h3 { margin-bottom: 0; color: #303b47; font-size: 1.75rem; }

.app-header {
    min-height: 62px;
    margin: 12px 16px 0;
    padding: 0 12px;
    border: 1px solid var(--molaia-borda);
    border-radius: 14px;
    background: var(--molaia-superficie) !important;
    box-shadow: 0 8px 26px rgba(37, 48, 59, .07);
}

.app-header .nav-link { color: #586575; }
.app-header .nav-link:hover,
.app-header .nav-link:focus { color: var(--cor-primaria-escura); }
.app-header .header-greeting { color: #66717d; font-size: .9rem; }
.app-header .user-avatar {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: rgba(230, 126, 34, .13);
    color: var(--cor-primaria-escura);
    font-weight: 700;
}
.app-header .dropdown-menu {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--molaia-borda);
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(37, 48, 59, .12);
}
.app-header .dropdown-item { border-radius: 8px; }
.app-header .dropdown-item:hover { color: var(--cor-primaria-escura); background: rgba(230, 126, 34, .1); }

.app-sidebar {
    --lte-sidebar-hover-bg: rgba(230, 126, 34, .09);
    --lte-sidebar-color: #536170;
    --lte-sidebar-hover-color: #a9500a;
    --lte-sidebar-active-color: #a9500a;
    --lte-sidebar-menu-active-bg: rgba(230, 126, 34, .13);
    --lte-sidebar-menu-active-color: #a9500a;
    --lte-sidebar-submenu-bg: transparent;
    --lte-sidebar-submenu-color: #66717d;
    --lte-sidebar-submenu-hover-color: #a9500a;
    --lte-sidebar-submenu-hover-bg: rgba(230, 126, 34, .08);
    --lte-sidebar-submenu-active-color: #a9500a;
    --lte-sidebar-submenu-active-bg: rgba(230, 126, 34, .12);
    background-color: #fff !important;
    box-shadow: 5px 0 24px rgba(37, 48, 59, .06) !important;
}

.sidebar-brand {
    height: 72px;
    justify-content: flex-start;
    gap: 11px;
    padding: 0 21px;
    border-bottom-color: #edf0f3;
}
.sidebar-brand .brand-link { display: flex; align-items: center; gap: 11px; color: var(--molaia-texto) !important; }
.sidebar-brand .brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #f2a14f, #df741d);
    box-shadow: 0 5px 12px rgba(214, 109, 24, .22);
    color: #fff;
    font-size: 1.2rem;
}
.sidebar-brand .brand-mark-image {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}
.sidebar-brand .brand-text { color: #303b47 !important; font-size: 1.13rem; font-weight: 700 !important; letter-spacing: -.03em; }
.sidebar-wrapper { padding: 12px 10px; }
.sidebar-wrapper .nav-link {
    min-height: 42px;
    margin: 3px 0;
    padding: 9px 12px;
    border-radius: 9px;
    transition: color .15s ease, background-color .15s ease;
}
.sidebar-wrapper .nav-link,
.sidebar-wrapper .nav-link p { color: #374151 !important; }
.sidebar-wrapper .nav-link:hover,
.sidebar-wrapper .nav-link:focus,
.sidebar-wrapper .menu-open > .nav-link,
.sidebar-wrapper .nav-link.active,
.sidebar-wrapper .nav-link:hover p,
.sidebar-wrapper .nav-link:focus p { color: #b85c13 !important; }
.sidebar-wrapper .nav-link.nav-category { margin-top: 8px; font-weight: 700; }
.sidebar-wrapper .nav-link.nav-category .nav-icon { color: #c96512; }
.sidebar-wrapper .nav-treeview { padding-left: 9px; }
.sidebar-wrapper .nav-treeview .nav-link { min-height: 38px; font-size: .92rem; }
.sidebar-wrapper .nav-icon { color: var(--cor-primaria); }

.btn-primary {
    border-color: var(--cor-primaria) !important;
    background: linear-gradient(135deg, #ed8c32, #d66d18) !important;
    box-shadow: 0 4px 10px rgba(214, 109, 24, .15);
}
.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--cor-primaria-escura) !important;
    background: linear-gradient(135deg, #e47d22, #c65e0e) !important;
}
.btn, .form-control, .form-select { border-radius: 8px; }
.form-control:focus, .form-select:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 .2rem rgba(230, 126, 34, .16);
}

.card {
    overflow: hidden;
    border: 1px solid var(--molaia-borda);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(37, 48, 59, .06);
}
.card-header {
    min-height: 48px;
    border-left: 4px solid var(--cor-primaria);
    border-bottom-color: #edf0f3;
    background: #fff;
    color: #34404d;
    font-weight: 650;
}
h3, h4, h5 { color: #303b47; font-weight: 650; }
.table-header-custom th {
    border-color: #d77925 !important;
    background: linear-gradient(135deg, #ed8c32, #d66d18) !important;
    color: #fff !important;
    font-weight: 600;
}
.table { --bs-table-hover-bg: rgba(230, 126, 34, .055); }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.app-footer { border-top: 1px solid var(--molaia-borda); background: rgba(255,255,255,.78); color: #77818c; font-size: .85rem; }

.molaia-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(37, 48, 59, .05);
}
.molaia-alert > .bi { margin-top: 1px; font-size: 1.05rem; }
.molaia-alert-success { color: #28633f; border-color: #f3c28f; border-left-color: #ed8125; background: #fffaf5; }
.molaia-alert-error { color: #8f2d24; border-color: #efc1a2; border-left-color: #d65b50; background: #fff7f2; }
.molaia-alert-warning { color: #775516; border-color: #f2ce9f; border-left-color: #ed8125; background: #fffaf4; }
.molaia-alert .btn-close { margin-left: auto; }

.btn.btn-molaia-light {
    border: 1px solid #f3c58f;
    color: #bd6417;
    background: #fff8ef;
}
.btn.btn-molaia-light:hover,
.btn.btn-molaia-light:focus-visible {
    border-color: #ed8125;
    color: #984b0b;
    background: #ffedd9;
    box-shadow: 0 3px 10px rgba(237, 129, 37, .14);
}

.delete-confirm-modal { overflow: hidden; border: 1px solid var(--molaia-borda); border-radius: 16px; box-shadow: 0 20px 55px rgba(37, 48, 59, .18); }
.delete-confirm-icon { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #f2c18e; border-radius: 14px; color: #d96b13; background: linear-gradient(145deg, #fff8ee, #ffead3); font-size: 1.2rem; }
.delete-confirm-modal .modal-title { color: #303b47; font-weight: 700; }
.delete-confirm-warning,
.delete-confirm-blocked { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid #f2ce9f; border-radius: 9px; color: #775516; background: #fff8ef; font-size: .9rem; line-height: 1.4; }
.delete-confirm-warning .bi,
.delete-confirm-blocked .bi { margin-top: 1px; }
.delete-confirm-blocked { margin-top: 10px; border-color: #f0c9c5; color: #8f2d24; background: #fff5f4; }
.delete-confirm-modal .modal-footer { gap: 8px; }

@media (max-width: 575.98px) {
    .app-header { margin: 8px 8px 0; padding: 0 6px; }
    .app-main { padding: 14px !important; }
}
