/* Custom styles for Happiness Perfume Shop - Gold Theme */
body,html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    background-color: #F8F5F0; /* Ivory/Off White */
    color: #1C1C1C; /* Charcoal Black for text */
}

/* Gold Theme Color Palette */
:root {
    /* Primary Gold */
    --bs-primary: #D4AF37;
    --bs-primary-rgb: 212, 175, 55;
    
    /* Charcoal Black */
    --bs-dark: #1C1C1C;
    --bs-dark-rgb: 28, 28, 28;
    
    /* Ivory/Off White */
    --bs-light: #F8F5F0;
    --bs-light-rgb: 248, 245, 240;
    
    /* Warm Gray */
    --bs-secondary: #A9A9A9;
    --bs-secondary-rgb: 169, 169, 169;
    
    /* Rich Brown */
    --bs-brown: #4B3B1F;
    --bs-brown-rgb: 75, 59, 31;
    
    /* White Gold */
    --bs-white-gold: #EDE6C9;
    --bs-white-gold-rgb: 237, 230, 201;
    
    /* Standard Bootstrap colors (keeping for alerts, etc.) */
    --bs-success: #198754;
    --bs-danger: #dc3545;
    --bs-warning: #ffc107;
    --bs-info: #0dcaf0;
}

/* Custom button styles */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #1C1C1C;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #C28840;
    border-color: #C28840;
    color: #1C1C1C;
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
}

.btn-primary:focus {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.5);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #1C1C1C;
}

/* Custom card styles */
.card {
    border: 1px solid #A9A9A9;
    box-shadow: 0 0.125rem 0.25rem rgba(28, 28, 28, 0.1);
    background-color: #F8F5F0;
}

.card-header {
    background-color: #1C1C1C;
    color: #D4AF37;
    border-bottom: 2px solid #D4AF37;
    font-weight: 600;
}

/* Custom sidebar styles */
.sidebar {
    background: linear-gradient(135deg, #1C1C1C, #4B3B1F);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    color: #F8F5F0;
}

.sidebar nav {
    scroll-behavior: smooth;
}

.sidebar .text-primary {
    color: #D4AF37 !important;
}

.sidebar .text-muted {
    color: #A9A9A9 !important;
}

.sidebar .border-bottom,
.sidebar .border-top {
    border-color: #A9A9A9 !important;
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    background-color: #F8F5F0;
}

.white-color{
    color: #F8F5F0 !important;
}

.view-btn-color{
    background-color: var(--bs-primary) !important;
    color: #1C1C1C !important;
}

.layout .sidebar {
    display: flex;
    flex-direction: column;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    overflow: hidden;
    width: 260px;
    transition: width 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.main-content{
    scroll-behavior: smooth;
    overflow-y: scroll;
    height: 100vh !important;
}

.layout .main-content {
    overflow-x: auto;
}

.layout.collapsed {
    grid-template-columns: none;
}

.layout.collapsed .sidebar {
    visibility: hidden;
    pointer-events: none;
    width: 0;
}

@media (max-width: 767.98px) {
    .layout {
        display: block;
    }

    .layout.collapsed {
        grid-template-columns: none;
    }

    .layout.collapsed .sidebar {
        visibility: visible;
        pointer-events: auto;
    }
}

/* Mobile sidebar */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    body.sidebar-open .main-content {
        margin-left: 0;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.desktop-sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    body.desktop-sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

/* Custom form styles */
.form-control,
.form-select {
    background-color: #F8F5F0;
    border-color: #A9A9A9;
    color: #1C1C1C;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    background-color: #F8F5F0;
    color: #1C1C1C;
}

.form-control::placeholder {
    color: #A9A9A9;
}

/* Custom table styles */
.table {
    color: #1C1C1C;
}

.table-hover tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.table thead th {
    background-color: #1C1C1C;
    color: #D4AF37;
    border-color: #A9A9A9;
    font-weight: 600;
}

.table tbody td {
    border-color: #A9A9A9;
}

/* Header/Top Bar Styles */
header.bg-white {
    background: linear-gradient(135deg, #1C1C1C, #4B3B1F) !important;
    color: #F8F5F0;
    border-bottom: 2px solid #D4AF37;
}

header .text-muted {
    color: #A9A9A9 !important;
}

header h2,
header h4 {
    color: #D4AF37 !important;
}

/* Navigation Links */
.nav-link {
    color: #A9A9A9;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #D4AF37;
    background-color: rgba(212, 175, 55, 0.1);
}

.nav-link.active,
.nav-pills .nav-link.active,
.sidebar .nav-link.active,
.sidebar .nav-pills .nav-link.active {
    color: #D4AF37 !important;
    background-color: rgba(212, 175, 55, 0.2) !important;
    border-left: 3px solid #D4AF37;
    font-weight: 600;
}

/* Override Bootstrap's default blue active state */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: rgba(212, 175, 55, 0.2) !important;
    color: #D4AF37 !important;
}

/* Alert Styles */
.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: #198754;
    color: #198754;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #dc3545;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: #0dcaf0;
    color: #055160;
}

/* Badge Styles */
.badge.bg-primary {
    background-color: var(--bs-primary) !important;
    color: #1C1C1C !important;
}

/* Link Hover Effects */
a {
    color: var(--bs-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: #EDE6C9;
}

/* Background Utilities */
.bg-light {
    background-color: #F8F5F0 !important;
}

.bg-dark {
    background-color: #1C1C1C !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

/* Text Utilities */
.text-primary {
    color: var(--bs-primary) !important;
}

.text-muted {
    color: #A9A9A9 !important;
}

.text-dark {
    color: #1C1C1C !important;
}

/* Border Utilities */
.border-primary {
    border-color: var(--bs-primary) !important;
}

.border-secondary {
    border-color: #A9A9A9 !important;
}

/* Button Outline Styles */
.btn-outline-secondary {
    color: #A9A9A9;
    border-color: #A9A9A9;
}

.btn-outline-secondary:hover {
    background-color: #A9A9A9;
    border-color: #A9A9A9;
    color: #1C1C1C;
}

/* Main Content Background */
.main-content {
    background-color: #F8F5F0;
}

/* User Avatar Circle */
.bg-primary.text-white {
    background: linear-gradient(135deg, #D4AF37, #C28840) !important;
    color: #1C1C1C !important;
    font-weight: 600;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    background-color: #F8F5F0;
    border: 1px solid #A9A9A9;
}

.dropdown-item {
    color: #1C1C1C;
}

.dropdown-item:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: #1C1C1C;
}

.dropdown-item.active {
    background-color: var(--bs-primary);
    color: #1C1C1C;
}

/* Modal Styles */
.modal-content {
    background-color: #F8F5F0;
    border: 1px solid #A9A9A9;
}

.modal-header {
    background: linear-gradient(135deg, #1C1C1C, #4B3B1F);
    color: #D4AF37;
    border-bottom: 2px solid #D4AF37;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-footer {
    border-top: 1px solid #A9A9A9;
}

/* Offcanvas (Mobile Sidebar) */
.offcanvas {
    background: linear-gradient(135deg, #1C1C1C, #4B3B1F);
    color: #F8F5F0;
}

.offcanvas-header {
    border-bottom: 1px solid #A9A9A9;
}

.offcanvas-title {
    color: #D4AF37;
}

.offcanvas-body .text-muted {
    color: #A9A9A9 !important;
}

/* Ensure mobile sidebar nav links also use gold theme */
.offcanvas .nav-link.active,
.offcanvas .nav-pills .nav-link.active {
    color: #D4AF37 !important;
    background-color: rgba(212, 175, 55, 0.2) !important;
    border-left: 3px solid #D4AF37;
}

/* Smooth scrolling for mobile sidebar navigation */
.offcanvas-body nav {
    scroll-behavior: smooth;
}

/* Login Page Styles */
.min-vh-100.d-flex {
    background: linear-gradient(135deg, #F8F5F0 0%, #EDE6C9 100%);
}

.card.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(28, 28, 28, 0.15) !important;
}

/* Form Check Styles */
.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.form-label {
    color: #1C1C1C;
    font-weight: 500;
}

/* Invalid Feedback */
.invalid-feedback {
    color: #dc3545;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Pagination Styles */
.pagination .page-link {
    color: var(--bs-primary);
    border-color: #A9A9A9;
}

.pagination .page-link:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: var(--bs-primary);
    color: #1C1C1C;
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #1C1C1C;
}

/* List Group Styles */
.list-group-item {
    background-color: #F8F5F0;
    border-color: #A9A9A9;
    color: #1C1C1C;
}

.list-group-item.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #1C1C1C;
}

/* Breadcrumb Styles */
.breadcrumb {
    background-color: transparent;
}

.breadcrumb-item a {
    color: var(--bs-primary);
}

.breadcrumb-item.active {
    color: #A9A9A9;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(28, 28, 28, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(28, 28, 28, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(28, 28, 28, 0.175) !important;
}

/* Filter Collapse - Always visible on desktop */
@media (min-width: 768px) {
    #filterCollapse.collapse,
    #expenseFilterCollapse.collapse {
        display: block !important;
        visibility: visible;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
}
