/* wooden-theme.css */
:root {
    --gold-primary: #D4AF37;
    --gold-hover: #b8941f;
    --wood-dark: #1a0f05;
    --glass-bg: rgba(20, 20, 20, 0.75);
    --glass-border: rgba(212, 175, 55, 0.25);
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --sidebar-width: 260px;
}

body {
    background: url('/public/images/textures/wood.png') !important;
    /* Fallback if public path varies */
    background: url('../images/textures/wood.png') repeat !important;
    background-color: var(--wood-dark) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* Glassmorphism Cards */
.card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    color: var(--text-main) !important;
}

.card-header {
    background: rgba(0, 0, 0, 0.4) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    color: var(--gold-primary) !important;
    font-family: 'Cinzel', serif;
    /* Elegant font for headers */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body,
.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--glass-border) !important;
}

/* Sidebar */
#sidebar-wrapper {
    background: rgba(10, 5, 0, 0.9) !important;
    border-right: 1px solid var(--gold-primary) !important;
    backdrop-filter: blur(10px);
}

.list-group-item {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: none !important;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, transparent 100%) !important;
    color: var(--gold-primary) !important;
    padding-left: 1.5rem !important;
    /* Slide effect */
}

.list-group-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.3) 0%, transparent 100%) !important;
    color: var(--gold-primary) !important;
    border-left: 3px solid var(--gold-primary) !important;
    font-weight: bold;
}

/* Navbar */
.navbar {
    background: rgba(10, 5, 0, 0.85) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(10px);
}

/* Tables */
.table {
    color: var(--text-main) !important;
}

.table thead th {
    border-bottom: 2px solid var(--gold-primary) !important;
    color: var(--gold-primary) !important;
    font-family: 'Cinzel', serif;
}

.table td,
.table th {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

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

/* Form Controls */
.form-control,
.form-select {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    color: white !important;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25) !important;
    border-color: var(--gold-primary) !important;
}

/* Buttons */
.btn-primary,
.btn-success {
    background: linear-gradient(135deg, var(--gold-primary) 0%, #b8860b 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover,
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%) !important;
}

.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ddd !important;
}

.btn-danger {
    background: linear-gradient(135deg, #8B0000 0%, #5a0000 100%) !important;
    border: 1px solid #ff4444 !important;
}

/* Modal */
.modal-content {
    background: url('../images/textures/wood.png') !important;
    border: 2px solid var(--gold-primary) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-hover);
}

/* Utility */
.text-gold {
    color: var(--gold-primary) !important;
}

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

/* --- Mobile Native App Styles --- */
@media (max-width: 991.98px) {

    /* Hide Sidebars/Margins */
    #sidebar-wrapper {
        display: none !important;
    }

    #page-content-wrapper {
        margin-left: 0 !important;
        padding-bottom: 80px !important;
        /* Space for bottom nav */
    }

    /* Mobile Header */
    .navbar {
        background: rgba(10, 5, 0, 0.95) !important;
        padding: 0.5rem 1rem !important;
    }

    .navbar-brand img {
        height: 35px !important;
    }

    /* Cards flush on mobile */
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .card {
        margin-bottom: 1rem !important;
    }

    /* Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: rgba(15, 10, 5, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid var(--gold-primary);
        z-index: 1040;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    }

    .mobile-nav-item {
        color: var(--text-muted);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.7rem;
        transition: all 0.3s ease;
        flex: 1;
    }

    .mobile-nav-item i {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }

    .mobile-nav-item.active {
        color: var(--gold-primary);
    }

    .mobile-nav-item.active i {
        filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
    }

    /* Floating Action Button (Center) */
    .mobile-fab {
        width: 55px;
        height: 55px;
        background: linear-gradient(135deg, var(--gold-primary) 0%, #b8860b 100%);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #000;
        font-size: 1.5rem;
        box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
        border: 2px solid rgba(255, 255, 255, 0.2);
        margin-top: -35px;
        /* Pull up */
    }

    .mobile-fab:hover {
        transform: scale(1.05);
        color: #000;
    }

    /* Hide top toggle since we use bottom nav */
    #sidebarToggle {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}