/*
 * ============================================
 *  DUSTO ADMIN PANEL - BRAND THEME
 * ============================================
 *  Primary:  #F99A00  (Amber/Orange - CTAs, buttons)
 *  Neutral:  #1A1204  (Deep Dark Brown - sidebar, headlines)
 *  Muted:    #675231  (Brown - secondary text)
 *  Surface:  #FFFEFC  (Warm White - backgrounds)
 * ============================================
 */

:root,
[data-bs-theme="light"] {
    --bs-primary:       #F99A00;
    --bs-primary-rgb:   249, 154, 0;

    --dusto-primary:        #F99A00;
    --dusto-primary-hover:  #E08A00;
    --dusto-primary-light:  #FFF3E0;
    --dusto-primary-subtle: rgba(249, 154, 0, 0.12);

    --dusto-neutral:        #1A1204;
    --dusto-neutral-rgb:    26, 18, 4;
    --dusto-muted:          #675231;
    --dusto-surface:        #FFFEFC;

    --bs-body-bg:           #FFFEFC;
    --bs-body-color:        #1A1204;
    --bs-link-color:        #F99A00;
    --bs-link-hover-color:  #E08A00;
}

/* ============================================
 *  GLOBAL
 * ============================================ */

body {
    background-color: var(--dusto-surface) !important;
    color: var(--dusto-neutral) !important;
}

a { color: var(--dusto-primary); }
a:hover { color: var(--dusto-primary-hover); }

/* ============================================
 *  BUTTONS
 * ============================================ */

.btn-primary {
    background-color: var(--dusto-primary) !important;
    border-color: var(--dusto-primary) !important;
    color: #1A1204 !important;
    font-weight: 600 !important;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--dusto-primary-hover) !important;
    border-color: var(--dusto-primary-hover) !important;
    color: #1A1204 !important;
    box-shadow: 0 0 0 0.2rem rgba(249, 154, 0, 0.35) !important;
}
.btn-primary:active,
.btn-primary.active {
    background-color: #CC7F00 !important;
    border-color: #CC7F00 !important;
}

.btn-outline-primary {
    color: var(--dusto-primary) !important;
    border-color: var(--dusto-primary) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--dusto-primary) !important;
    border-color: var(--dusto-primary) !important;
    color: #1A1204 !important;
}

.btn-link { color: var(--dusto-primary) !important; }
.btn-link:hover { color: var(--dusto-primary-hover) !important; }

/* ============================================
 *  SIDEBAR
 *  Background: #1A1204 (deep dark brown)
 *  Contrast with #F99A00 amber accents
 * ============================================ */

.sidebar,
.sidebar-content {
    background: #1A1204 !important;
}

.sidebar .sidebar-brand {
    border-bottom: 1px solid rgba(249, 154, 0, 0.15) !important;
    padding: 16px 20px !important;
}

.sidebar .sidebar-brand span {
    color: #F99A00 !important;
    letter-spacing: 0.02em;
}

.sidebar .sidebar-brand .text-primary,
.sidebar .sidebar-brand i,
.sidebar .sidebar-brand svg {
    color: #F99A00 !important;
}

/* Section headers - amber accent */
.sidebar .sidebar-header {
    color: rgba(249, 154, 0, 0.6) !important;
    opacity: 1 !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    padding-top: 14px !important;
    padding-bottom: 4px !important;
    border-top: 1px solid rgba(249, 154, 0, 0.06);
}

.sidebar .sidebar-header:first-child {
    border-top: none;
}

/* Default link - override AdminKit #222e3c */
.sidebar .sidebar-link,
.sidebar-link,
a.sidebar-link {
    background: transparent !important;
    color: rgba(255, 254, 252, 0.65) !important;
    font-size: 0.85rem;
    padding: 8px 12px !important;
    border-left-color: transparent !important;
}

.sidebar .sidebar-link i,
.sidebar .sidebar-link svg {
    color: rgba(255, 254, 252, 0.35) !important;
    width: 17px;
    height: 17px;
}

/* Hover - override AdminKit #222e3c hover */
.sidebar .sidebar-link:hover,
.sidebar-link:hover,
a.sidebar-link:hover {
    background-color: rgba(249, 154, 0, 0.08) !important;
    color: #FFFEFC !important;
    border-radius: 8px;
    border-left-color: transparent !important;
}

.sidebar .sidebar-link:hover i,
.sidebar .sidebar-link:hover svg {
    color: #F99A00 !important;
}

/* Active item - override AdminKit blue gradient */
.sidebar .sidebar-item.active > .sidebar-link,
.sidebar .sidebar-item.active .sidebar-link:hover,
.sidebar-item.active > .sidebar-link,
.sidebar-item.active > a.sidebar-link {
    background: rgba(249, 154, 0, 0.12) !important;
    color: #F99A00 !important;
    font-weight: 600;
    border-radius: 8px;
    border-left: 3px solid #F99A00 !important;
    padding-left: 9px !important;
}

.sidebar .sidebar-item.active > .sidebar-link i,
.sidebar .sidebar-item.active > .sidebar-link svg,
.sidebar .sidebar-item.active .feather,
.sidebar-item.active > .sidebar-link i,
.sidebar-item.active > .sidebar-link svg {
    color: #F99A00 !important;
}

/* Scrollbar */
.sidebar .js-simplebar::-webkit-scrollbar { width: 3px; }
.sidebar .js-simplebar::-webkit-scrollbar-track { background: transparent; }
.sidebar .js-simplebar::-webkit-scrollbar-thumb { background: rgba(249, 154, 0, 0.15); border-radius: 2px; }
.sidebar .js-simplebar::-webkit-scrollbar-thumb:hover { background: rgba(249, 154, 0, 0.3); }

.sidebar-toggle { color: var(--dusto-muted) !important; }

/* ============================================
 *  TOP NAVBAR
 * ============================================ */

.navbar-bg {
    background-color: #fff !important;
    border-bottom: 1px solid rgba(26, 18, 4, 0.06);
}

.navbar .indicator { background: var(--dusto-primary) !important; }

.navbar .nav-icon:hover i,
.navbar .nav-icon:hover svg { color: var(--dusto-primary) !important; }

/* ============================================
 *  CARDS
 * ============================================ */

.card {
    border: 1px solid rgba(26, 18, 4, 0.06);
    box-shadow: 0 1px 6px rgba(26, 18, 4, 0.04);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(26, 18, 4, 0.06);
}

/* ============================================
 *  TABLES
 * ============================================ */

.table thead th {
    color: var(--dusto-muted) !important;
    font-weight: 600;
    border-bottom-color: rgba(26, 18, 4, 0.1) !important;
}

.table td {
    color: var(--dusto-neutral) !important;
    border-bottom-color: rgba(26, 18, 4, 0.05) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(249, 154, 0, 0.02) !important;
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--dusto-primary-light) !important;
}

/* ============================================
 *  FORMS
 * ============================================ */

.form-control:focus,
.form-select:focus {
    border-color: var(--dusto-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(249, 154, 0, 0.15) !important;
}

.form-check-input:checked {
    background-color: var(--dusto-primary) !important;
    border-color: var(--dusto-primary) !important;
}

.form-check-input:focus { box-shadow: 0 0 0 0.2rem rgba(249, 154, 0, 0.15) !important; }
.form-switch .form-check-input:checked { background-color: var(--dusto-primary) !important; }

/* ============================================
 *  BADGES & UTILITIES
 * ============================================ */

.badge.bg-primary { background-color: var(--dusto-primary) !important; }
.text-primary { color: var(--dusto-primary) !important; }
.bg-primary { background-color: var(--dusto-primary) !important; }
.border-primary { border-color: var(--dusto-primary) !important; }

/* ============================================
 *  DROPDOWNS
 * ============================================ */

.dropdown-item:hover,
.dropdown-item:focus { background-color: var(--dusto-primary-light) !important; color: var(--dusto-neutral) !important; }

.dropdown-item.active,
.dropdown-item:active { background-color: var(--dusto-primary) !important; color: #1A1204 !important; }

/* ============================================
 *  ALERTS
 * ============================================ */

.alert-primary {
    background-color: var(--dusto-primary-light) !important;
    border-color: rgba(249, 154, 0, 0.25) !important;
    color: #1A1204 !important;
}

/* ============================================
 *  PROGRESS / SPINNER
 * ============================================ */

.progress-bar { background-color: var(--dusto-primary) !important; }
.spinner-border.text-primary { color: var(--dusto-primary) !important; }

/* ============================================
 *  PAGINATION
 * ============================================ */

#pagi .pagination .page-item.active .page-link {
    background: var(--dusto-primary) !important;
    border-color: var(--dusto-primary) !important;
    color: #1A1204 !important;
    box-shadow: 0 2px 6px rgba(249, 154, 0, 0.3) !important;
}

#pagi .pagination .page-link:hover {
    color: var(--dusto-primary) !important;
    border-color: rgba(249, 154, 0, 0.25) !important;
}

/* ============================================
 *  BREADCRUMB
 * ============================================ */

.breadcrumb-custom li a { color: var(--dusto-primary) !important; }
.breadcrumb-custom li a:hover { color: var(--dusto-primary-hover) !important; }
.breadcrumb-custom li.active { color: var(--dusto-neutral) !important; }

/* ============================================
 *  TOAST
 * ============================================ */

.toast-info { background: var(--dusto-primary) !important; }

/* ============================================
 *  LOGIN PAGE
 * ============================================ */

.login-page-bg {
    background: linear-gradient(135deg, #FFFEFC 0%, #FFF3E0 100%);
    min-height: 100vh;
}

/* ============================================
 *  MODAL
 * ============================================ */

.custom-modal-header { border-bottom-color: rgba(26, 18, 4, 0.08) !important; }
.custom-modal-footer { border-top-color: rgba(26, 18, 4, 0.08) !important; }

/* ============================================
 *  SCROLLBAR
 * ============================================ */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dusto-surface); }
::-webkit-scrollbar-thumb { background: rgba(26, 18, 4, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(26, 18, 4, 0.25); }

/* ============================================
 *  CONTENT / FOOTER
 * ============================================ */

.main { background-color: var(--dusto-surface) !important; }
.content { background-color: var(--dusto-surface) !important; }

.footer {
    background-color: transparent !important;
    border-top: 1px solid rgba(26, 18, 4, 0.06);
}
.footer a.text-muted:hover { color: var(--dusto-primary) !important; }
