/* ============================================
   PILUXE GYM - PREMIUM WOODEN THEME
   Luxurious wooden aesthetic with golden accents
   ============================================ */

/* Import Premium Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Montserrat:wght@300;400;500;600;700;800&family=Roboto+Mono:wght@400;500;600&display=swap');

:root {
    /* Wood Colors */
    --wood-dark: #2d1f15;
    --wood-medium: #5c4033;
    --wood-light: #8b6f47;
    --wood-grain: #a0826d;
    --wood-highlight: #c9a882;

    /* Gold Accents */
    --gold-primary: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b8941f;
    --bronze: #cd7f32;

    /* Neutrals */
    --cream: #f5f5dc;
    --ivory: #fffff0;
    --charcoal: #1a1a1a;
    --smoke: #2a2a2a;

    /* Typography */
    --font-primary: 'Playfair Display', Georgia, serif;
    --font-secondary: 'Montserrat', Arial, sans-serif;
    --font-mono: 'Roboto Mono', 'Courier New', monospace;
}

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

body {
    background: linear-gradient(145deg, var(--wood-dark) 0%, var(--charcoal) 100%);
    background-image: url('/images/wood-texture.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-blend-mode: multiply;
    font-family: var(--font-secondary);
    color: var(--cream);
    font-size: 16px;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(45, 31, 21, 0.95) 0%,
            rgba(45, 31, 21, 0.85) 100%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    color: var(--gold-light);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    color: var(--cream);
    font-size: 1rem;
    line-height: 1.7;
}

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

.text-white {
    color: var(--ivory) !important;
}

.text-muted {
    color: var(--wood-grain) !important;
}

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

.card {
    background: rgba(139, 111, 71, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-header {
    background: rgba(139, 111, 71, 0.25);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold-light);
    font-family: var(--font-primary);
    font-weight: 700;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
    color: var(--ivory);
    background: rgba(45, 31, 21, 0.2);
    backdrop-filter: blur(15px);
}

.card.bg-dark {
    background: rgba(26, 26, 26, 0.3);
    backdrop-filter: blur(20px);
}

/* Card Text - Maximum Visibility */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
    color: #fffff0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700;
}

.card p {
    color: #f5f5dc !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    font-size: 1rem;
    line-height: 1.7;
}

.card .text-muted {
    color: #e8dcc4 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.card small,
.card .small {
    color: #c9a882 !important;
}

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

.btn {
    font-family: var(--font-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 28px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.875rem;
}

.btn-gold,
.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: var(--wood-dark) !important;
    border: 2px solid var(--gold-dark);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-gold:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--wood-medium), var(--wood-light));
    color: var(--cream) !important;
    border: 2px solid var(--gold-primary);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
    box-shadow: 0 4px 15px rgba(139, 111, 71, 0.4);
}

.btn-outline-gold,
.btn-outline-info {
    background: transparent;
    color: var(--gold-primary) !important;
    border: 2px solid var(--gold-primary);
}

.btn-outline-gold:hover,
.btn-outline-info:hover {
    background: var(--gold-primary);
    color: var(--wood-dark) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #8b0000, #cd5c5c);
    color: var(--ivory) !important;
    border: 2px solid #8b0000;
}

.btn-success {
    background: linear-gradient(135deg, #2d5016, #4a7c2c);
    color: var(--ivory) !important;
    border: 2px solid #2d5016;
}

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

.form-label {
    color: var(--gold-light);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background: rgba(42, 42, 42, 0.7);
    border: 2px solid var(--wood-light);
    color: var(--cream);
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--wood-grain);
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    background: rgba(42, 42, 42, 0.9);
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    color: var(--ivory);
    outline: none;
}

.form-control.bg-dark {
    background: rgba(26, 26, 26, 0.8);
}

.form-control.text-white {
    color: var(--ivory) !important;
}

/* ============================================
   TABLES - LIGHT GLASS EFFECT
   ============================================ */

.table {
    color: var(--ivory);
    background: rgba(255, 255, 255, 0.03);
}

.table thead {
    background: rgba(139, 111, 71, 0.25);
    backdrop-filter: blur(10px);
    color: var(--gold-light);
}

.table thead th {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    border: none;
    padding: 1rem;
    color: var(--gold-light);
}

.table tbody tr {
    background: rgba(45, 31, 21, 0.15);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(139, 111, 71, 0.2);
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--ivory);
}

.table-dark {
    background: rgba(26, 26, 26, 0.2);
    backdrop-filter: blur(15px);
}

/* ============================================
   NAVIGATION SIDEBAR
   ============================================ */

.sidebar,
#sidebar-wrapper {
    background: linear-gradient(180deg, var(--wood-dark), var(--charcoal));
    background-image: url('/images/wood-texture.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    border-right: 3px solid var(--gold-primary);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.sidebar::before,
#sidebar-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(45, 31, 21, 0.85) 0%,
            rgba(26, 26, 26, 0.9) 100%);
    pointer-events: none;
}

.sidebar>*,
#sidebar-wrapper>* {
    position: relative;
    z-index: 1;
}

/* Top Navigation Bar */
.navbar.navbar-dark.bg-dark {
    background: linear-gradient(90deg, var(--wood-dark), var(--wood-medium)) !important;
    background-image: url('/images/wood-texture.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-blend-mode: multiply !important;
    border-bottom: 3px solid var(--gold-primary) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    position: relative;
}

.navbar.navbar-dark.bg-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(45, 31, 21, 0.85) 0%,
            rgba(92, 64, 51, 0.8) 100%);
    pointer-events: none;
    z-index: 0;
}

.navbar.navbar-dark.bg-dark>* {
    position: relative;
    z-index: 1;
}

.list-group-item {
    background: transparent;
    border: none;
    color: var(--cream);
    padding: 0.875rem 1.25rem;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.list-group-item:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    border-left-color: var(--gold-primary);
    box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.1);
}

.list-group-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.3), transparent);
    border-left-color: var(--gold-light);
    color: var(--gold-light);
    font-weight: 700;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.2);
}

.list-group-item i {
    color: var(--gold-primary);
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Sidebar Logo Area */
#sidebar-wrapper .p-3.border-bottom {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
    border-bottom: 2px solid var(--gold-primary) !important;
}

#sidebar-wrapper .text-muted {
    color: var(--wood-grain) !important;
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Sidebar Section Headers */
.sidebar h6,
#sidebar-wrapper h6,
.sidebar .text-uppercase,
#sidebar-wrapper .text-uppercase {
    color: var(--gold-light) !important;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    padding: 1rem 1.25rem 0.5rem;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Navbar Search Bar */
.navbar .form-control {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid var(--wood-light);
    color: var(--cream);
}

.navbar .form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Navbar Icons */
.navbar .nav-link {
    color: var(--cream) !important;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--gold-light) !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* User Dropdown in Navbar */
.navbar .dropdown-toggle::after {
    border-top-color: var(--gold-primary);
}

/* Branch Selector */
.form-select.bg-dark {
    background: rgba(26, 26, 26, 0.8) !important;
    border: 2px solid var(--wood-light);
    color: var(--cream);
}

.form-select.bg-dark:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ============================================
   BADGES & ALERTS
   ============================================ */

.badge {
    font-family: var(--font-secondary);
    font-weight: 600;
    padding: 0.5em 0.85em;
    border-radius: 6px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #2d5016, #4a7c2c) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #b8860b, #daa520) !important;
    color: var(--wood-dark) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #8b0000, #cd5c5c) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary)) !important;
    color: var(--wood-dark) !important;
}

.alert {
    border-radius: 8px;
    border: 2px solid;
    font-weight: 500;
}

.alert-success {
    background: rgba(45, 80, 22, 0.2);
    border-color: #4a7c2c;
    color: #90ee90;
}

.alert-warning {
    background: rgba(184, 134, 11, 0.2);
    border-color: #daa520;
    color: #ffd700;
}

.alert-danger {
    background: rgba(139, 0, 0, 0.2);
    border-color: #cd5c5c;
    color: #ff6b6b;
}

.alert-info {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold-primary);
    color: var(--gold-light);
}

/* ============================================
   MODALS - PREMIUM GLASS EFFECT
   ============================================ */

.modal-content {
    background: rgba(45, 31, 21, 0.25);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(139, 111, 71, 0.2);
    backdrop-filter: blur(10px);
}

.modal-title {
    color: var(--gold-light);
    font-family: var(--font-primary);
    font-weight: 700;
}

.modal-body {
    color: var(--ivory);
    background: rgba(255, 255, 255, 0.02);
}

.modal-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(139, 111, 71, 0.15);
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

/* ============================================
   STATS CARDS - PREMIUM GLASS
   ============================================ */

.stat-card {
    background: rgba(139, 111, 71, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold-light);
    font-family: var(--font-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ivory);
    font-weight: 600;
}

/* ============================================
   DROPDOWNS - LIGHT GLASS
   ============================================ */

.dropdown-menu {
    background: rgba(45, 31, 21, 0.3);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
    color: var(--ivory);
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold-light);
}

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

.pagination .page-link {
    background: rgba(92, 64, 51, 0.6);
    border: 1px solid var(--wood-light);
    color: var(--cream);
}

.pagination .page-link:hover {
    background: var(--gold-primary);
    color: var(--wood-dark);
    border-color: var(--gold-dark);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: var(--wood-dark);
    border-color: var(--gold-dark);
}

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

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--wood-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-dark), var(--gold-primary));
    border-radius: 6px;
    border: 2px solid var(--wood-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-primary), var(--gold-light));
}

/* ============================================
   PREMIUM EFFECTS
   ============================================ */

.premium-glow {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.wood-texture {
    background-image: url('/images/wood-texture.jpg');
    background-size: cover;
    background-blend-mode: multiply;
}

.glass-effect {
    background: rgba(45, 31, 21, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.8125rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 3px solid var(--gold-primary);
    outline-offset: 2px;
}

/* High contrast for readability */
.text-high-contrast {
    color: var(--ivory);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ============================================
   NAV TABS & PILLS - BRIGHT ACTIVE TEXT
   ============================================ */

/* Nav Tabs */
.nav-tabs .nav-link {
    color: var(--gold-primary);
    font-weight: 600;
    border: none;
    background: transparent;
}

.nav-tabs .nav-link.active {
    background: rgba(45, 31, 21, 0.8);
    color: #fffff0 !important;
    font-weight: 700;
    border-bottom: 3px solid var(--gold-primary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.nav-tabs .nav-link:hover {
    color: var(--gold-light);
}

/* Nav Pills */
.nav-pills .nav-link {
    color: var(--cream);
    font-weight: 600;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    color: var(--wood-dark) !important;
    font-weight: 700;
    text-shadow: none;
}

.nav-pills .nav-link:hover {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.2);
}

/* Bootstrap Nav Tabs (default style) */
.nav.nav-tabs {
    border-bottom: 2px solid var(--wood-light);
}

.nav.nav-tabs .nav-item .nav-link {
    color: var(--gold-primary) !important;
    font-weight: 600;
}

.nav.nav-tabs .nav-item .nav-link.active {
    background: rgba(45, 31, 21, 0.9) !important;
    color: #fffff0 !important;
    font-weight: 700 !important;
    border: 2px solid var(--gold-primary) !important;
    border-bottom: none !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}