:root {
    --primary-color: #f59e0b;
    --primary-hover: #d97706;
    --secondary-color: #1e293b;
    --accent-color: #fbbf24;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --card-bg: #ffffff;
    --border-radius: 16px;
    --sidebar-width: 260px;
}

body {
    background: #f8fafc;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Override Bootstrap Primary Buttons & Badges to Theme Amber Gold */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: var(--primary-hover) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

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

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

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

/* ==========================================================================
   LIGHT SIDEBAR STYLING (YELLOW & WHITE THEME)
   ========================================================================== */
#app-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    background: #ffffff;
    color: #475569;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease-in-out;
    border-right: 1px solid #e2e8f0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.03);
    overflow-y: auto;
}

#app-sidebar .sidebar-brand {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    background: #fffdf5;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 1rem 1.25rem 0.4rem;
    margin: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0 0.75rem;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.05rem;
    width: 24px;
    text-align: center;
    margin-right: 0.75rem;
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    color: #d97706;
    background: #fffbe5;
}

.member-name-link,
.member-name-link:hover,
.member-name-link:focus,
.member-name-link:active,
.member-name-link:visited {
    text-decoration: none !important;
    color: var(--dark-text) !important;
    font-weight: 700;
    outline: none !important;
    box-shadow: none !important;
}

.member-name-link:hover {
    color: var(--primary-hover) !important;
}

.sidebar-nav .nav-link:hover i {
    transform: translateX(3px);
}

.sidebar-nav .nav-link.active {
    color: #ffffff !important;
    background: var(--primary-color) !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.sidebar-nav .nav-link.active i {
    color: #ffffff !important;
}

/* ==========================================================================
   TOP HEADER BAR STYLING
   ========================================================================== */
#app-topbar {
    height: 64px;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    transition: all 0.3s ease-in-out;
}

/* Page Layout Wrapper */
#page-content-wrapper {
    margin-left: var(--sidebar-width);
    padding-top: 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease-in-out;
}

/* Sidebar Toggle for Mobile */
@media (max-width: 991.98px) {
    #app-sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    body.sidebar-open #app-sidebar {
        margin-left: 0;
    }
    
    #app-topbar {
        left: 0;
    }
    
    #page-content-wrapper {
        margin-left: 0;
    }
}

/* Backdrop Overlay for Mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(3px);
    z-index: 1035;
    display: none;
}

body.sidebar-open .sidebar-backdrop {
    display: block;
}

/* ==========================================================================
   CARD & UI COMPONENTS STYLING
   ========================================================================== */
.stat-card {
    border: 1px solid #f1f5f9;
    border-radius: var(--border-radius);
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.table-custom {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.table-custom th {
    background-color: #fcfcfd;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

.badge-status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.member-name-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.member-name-link:hover {
    color: #d97706;
    text-decoration: underline;
}

/* ==========================================================================
   LOGIN PAGE STYLING (WARM AMBER & DARK SLATE THEME)
   ========================================================================== */
body.login-body {
    background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 45%),
                radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 40%),
                linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    position: relative;
    overflow-x: hidden;
}

.login-bg-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    filter: blur(50px);
}

.login-card {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--primary-color, #f59e0b);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 35px rgba(245, 158, 11, 0.12);
    background: rgba(255, 255, 255, 0.98);
    width: 100%;
    max-width: 460px;
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.4);
    transition: transform 0.3s ease;
}

.login-card:hover .brand-icon-wrapper {
    transform: scale(1.05) rotate(-3deg);
}

.form-control:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15) !important;
}

.input-group-text {
    color: #64748b;
    transition: color 0.2s ease;
}

.input-group:focus-within .input-group-text {
    color: #f59e0b;
}

.btn-theme-submit {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
    transition: all 0.25s ease;
}

.btn-theme-submit:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.45);
    transform: translateY(-2px);
}

.demo-badge-chip {
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.82rem;
    font-weight: 600;
    background: #fffbe5;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 6px 14px;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.demo-badge-chip:hover {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.3);
}

.demo-badge-chip:hover i {
    color: #ffffff !important;
}

