/* ========================================
   TatkalHub - Custom CSS Styles
   Laravel Bootstrap Template
   ======================================== */

/* ========== CSS Variables ========== */
:root {
    /* Primary Colors - Modern Blue to Purple Gradient */
    --primary-blue: #3b82f6;
    --primary-purple: #8b5cf6;
    --primary-cyan: #06b6d4;
    --accent-pink: #ec4899;

    /* Background Colors */
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-hover: #334155;

    /* Border Colors */
    --border-color: rgba(148, 163, 184, 0.15);
    --border-hover: rgba(148, 163, 184, 0.3);
    --border-active: rgba(59, 130, 246, 0.5);

    /* Text Colors - BRIGHTER FOR VISIBILITY */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-hover: #ffffff;

    /* Glass Effect */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-bg-hover: rgba(51, 65, 85, 0.7);
    --glass-border: rgba(148, 163, 184, 0.2);

    /* Shadows */
    --shadow-primary: 0 10px 25px -5px rgba(59, 130, 246, 0.3), 0 4px 10px -2px rgba(59, 130, 246, 0.2);
    --shadow-purple: 0 10px 25px -5px rgba(139, 92, 246, 0.3), 0 4px 10px -2px rgba(139, 92, 246, 0.15);
    --shadow-cyan: 0 10px 30px -5px rgba(6, 182, 212, 0.4), 0 4px 12px -2px rgba(6, 182, 212, 0.2);
    --shadow-hover: 0 20px 40px -10px rgba(59, 130, 246, 0.5), 0 8px 16px -4px rgba(139, 92, 246, 0.4);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

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

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/*
   TatkalHub Minimal Theme
   Maps custom class references to Standard Bootstrap 5 Styles
   As requested: "just simple modern and professional way no need extra design"
*/

/* ========== Premium Gradients ========== */
.bg-gradient-premium-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.bg-gradient-premium-orange {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.3);
}

.bg-gradient-premium-green {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.3);
}

.bg-gradient-premium-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.3);
}

/* ========== Glassmorphism Effects ========== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* ========== Sidebar Styles ========== */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    z-index: 1040;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar hidden/collapsed state */
body.sidebar-hidden #sidebar {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: var(--shadow-primary);
}

.sidebar-logo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-purple);
}

.sidebar-nav {
    padding: 1.5rem 1rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    margin: 1.5rem 0 0.75rem 0.5rem;
}

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

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link-custom:hover {
    color: var(--text-hover);
    background: var(--glass-bg-hover);
    transform: translateX(4px);
}

.nav-link-custom.active {
    background: var(--gradient-primary);
    color: var(--text-hover);
    box-shadow: var(--shadow-primary);
    border: 1px solid var(--border-active);
    font-weight: 600;
}

/* Main Content Area */
#main-content {
    margin-left: 0;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    padding-bottom: 80px;
    /* Space for mobile nav */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    #main-content {
        margin-left: 260px;
        padding-bottom: 2rem;
    }

    /* Adjust main content when sidebar is hidden on desktop */
    body.sidebar-hidden #main-content {
        margin-left: 0;
        width: 100%;
    }
}

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

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

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

/* ========== Header Styles ========== */
#main-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.wallet-badge {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wallet-balance {
    font-size: 1.125rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.add-funds-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-primary);
    cursor: pointer;
}

.add-funds-btn:hover {
    background: var(--gradient-accent);
    transform: scale(1.15) rotate(90deg);
    box-shadow: var(--shadow-purple);
}

/* ========== Mobile Bottom Navigation ========== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    padding: 1rem;
}

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

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

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--primary-blue);
}

.mobile-nav-item.active {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 0.5rem;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* ========== Cards and Components ========== */
.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}

/* ========== Buttons ========== */
.btn-primary-custom {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:hover {
    background: var(--gradient-accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px) scale(1.02);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-outline-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline-custom:hover::after {
    width: 100%;
}

.btn-outline-custom:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* ========== Badges ========== */
.badge-custom {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success-custom {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning-custom {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-danger-custom {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideInLeft 0.3s ease-out;
}

/* ========== Utility Classes ========== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.glow-effect {
    box-shadow: var(--shadow-primary);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(var(--dark-bg), var(--dark-bg)) padding-box,
        var(--gradient-primary) border-box;
    border-radius: 8px;
}

.fw-extrabold {
    font-weight: 800 !important;
}

/* ========== Responsive Utilities ========== */
@media (max-width: 576px) {
    #main-content {
        padding: 1rem;
    }

    .glass-card {
        padding: 1rem !important;
    }
}

/* ========== Hero Slider ========== */
.hero-slider {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-slide {
    min-height: 300px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-20px, -20px);
    }
}

/* ========== Dashboard Stats Cards - Modern & Simple Redesign ========== */
.stats-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.stats-card:hover {
    transform: translateY(-8px);
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.stats-card:hover::after {
    opacity: 1;
}

.stats-card.border-start-primary::after {
    background: var(--primary-blue);
}

.stats-card.border-start-warning::after {
    background: var(--primary-yellow);
}

.stats-card.border-start-success::after {
    background: var(--primary-green);
}

.stats-card.border-start-info::after {
    background: #06b6d4;
}

.stats-card.border-start-danger::after {
    background: #ef4444;
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.stats-card:hover .stats-icon {
    transform: scale(1.1) rotate(5deg);
}

.stats-icon.bg-primary {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
}

.stats-icon.bg-warning {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
}

.stats-icon.bg-success {
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
}

.stats-icon.bg-info {
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.15);
}

.stats-icon.bg-danger {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
}

.trend-badge {
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Obsolete shadows replaced by new glows */

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.cmd-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.cmd-link:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.cmd-icon {
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.widget-icon.primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    color: var(--primary-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.widget-icon.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.widget-icon.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* ========== Modern & Professional DataTables ========== */
.dataTables_wrapper {
    padding: 1rem 0;
    color: var(--text-secondary) !important;
}

/* Control Layout */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Inputs & Selects */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 0.5rem 0.75rem !important;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
    outline: none;
}

/* Main Table Styling */
.table-custom {
    color: var(--text-primary) !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    width: 100% !important;
    min-width: 600px;
}

@media (max-width: 576px) {
    .table-custom {
        min-width: 500px;
    }
}

/* Base Table Styling */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    margin-top: 0 !important;
    width: 100% !important;
}

table.dataTable thead th {
    background: transparent !important;
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 1.2px !important;
    padding: 1rem 1.25rem !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05) !important;
}

table.dataTable tbody tr {
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
}

table.dataTable tbody td {
    padding: 1.25rem !important;
    vertical-align: middle !important;
    color: var(--text-secondary) !important;
    border: none !important;
}

table.dataTable tbody tr:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -10px rgba(0, 0, 0, 0.5);
}

table.dataTable tbody tr:hover td {
    color: #fff !important;
}

/* Modernized Pagination Styling (Bootstrap 5 Compatible) */
.dataTables_wrapper .dataTables_paginate {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    margin-top: 1rem;
    gap: 0.25rem;
}

/* Support for both Bootstrap .pagination structure and generic DataTables buttons */
.dataTables_wrapper .dataTables_paginate .pagination,
.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 0;
}

.dataTables_wrapper .dataTables_paginate .page-item .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem !important;
    margin: 0 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    background: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    border-radius: 8px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    outline: none !important;
    cursor: pointer !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
    z-index: 2;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: rgba(15, 23, 42, 0.2) !important;
    border-color: rgba(148, 163, 184, 0.05) !important;
    color: var(--text-tertiary) !important;
    box-shadow: none !important;
    transform: none !important;
}

.dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):not(.disabled):hover {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #f8fafc !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Hide default icons if SVG is used or text is used, prevent double spacing */
.dataTables_wrapper .dataTables_paginate .page-link svg {
    width: 16px;
    height: 16px;
}

/* Buttons Styling */
.dt-buttons {
    margin-bottom: 1.5rem;
    gap: 0.5rem;
    display: flex;
}

.dt-button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.dt-button:hover {
    background: var(--glass-bg-hover) !important;
    border-color: var(--primary-blue) !important;
    transform: translateY(-2px);
}

/* ========== Tables ========== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Utility */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal Backdrops */
.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(4px);
}

/* Avatar Circle */
.avatar-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
}

/* ========== DataTables Dark Theme Overrides ========== */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.dataTables_wrapper .dataTables_length select {
    background-color: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.dataTables_wrapper .dataTables_filter input {
    background-color: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

/* Consolidated into main pagination block above */

/* Table Container Utility */
.table-container-fixed {
    min-height: 400px;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 3rem;
}

.table-custom {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    /* overflow: hidden; Removed to allow dropdowns to overflow if needed, though viewports helps */
    color: var(--text-primary);
    margin-bottom: 0;
}

.table-custom thead {
    background: rgba(59, 130, 246, 0.15);
}

.table-custom th {
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid var(--border-active);
    white-space: nowrap;
}

.table-custom td {
    color: var(--text-secondary);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: all 0.2s ease;
}

.table-custom tbody tr:hover {
    background: var(--glass-bg-hover);
    border-left: 3px solid var(--primary-blue);
}

.table-custom tbody tr:hover td {
    color: var(--text-hover);
}

/* Fix Dropdown Visibility in Tables */
.table-responsive .dropdown-menu {
    position: fixed !important;
    /* Force fixed positioning relative to viewport via popper */
}

/* Bootstrap Table Overrides for Better Visibility */
.table {
    color: var(--text-primary) !important;
}

.table thead th {
    color: var(--primary-blue) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.table tbody td {
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

.table-dark {
    color: var(--text-primary) !important;
    background-color: rgba(30, 41, 59, 0.5) !important;
}

.table-dark thead th {
    color: var(--primary-blue) !important;
}

.table-dark tbody td {
    color: var(--text-secondary) !important;
}

.table-hover tbody tr:hover {
    background-color: var(--glass-bg-hover) !important;
}

.table-hover tbody tr:hover td {
    color: var(--text-hover) !important;
}


/* ========== Forms ========== */
.form-control-custom {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

/* Ensure select dropdown options are visible in dark mode */
select.form-control-custom,
select.form-select.form-control-custom {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

select.form-control-custom option {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.form-control-custom:focus {
    background-color: #1e293b !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.4) !important;
    color: #ffffff !important;
    outline: none;
}

.form-control-custom::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ========== Loading States ========== */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========== Notification Badge ========== */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
}

/* ========== Avatar ========== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.avatar:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-primary);
    transform: scale(1.05);
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-hover);
    padding: 2.5rem;
    border-radius: 20px;
}

.auth-title {
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
}

.auth-label {
    color: var(--text-tertiary);
}

/* ========== Custom Buttons & UI Elements ========== */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-success-custom {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-success-custom:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-warning-custom {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-warning-custom:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.btn-outline-custom {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline-custom:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Glass Alerts */
.alert-glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}


/* ========== Back to Top Button ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.6);
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 1050;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    font-size: 1.25rem;
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.8), 0 0 15px rgba(139, 92, 246, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    color: white !important;
}

.back-to-top:active {
    transform: scale(0.9);
}

@media (max-width: 767.98px) {
    .back-to-top {
        bottom: 5.5rem;
        /* Positioned above the mobile bottom nav */
        right: 1.25rem;
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.show {
        transform: translateX(0);
    }

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

/* ========== Premium Toast Notifications ========== */
.toast-container {
    padding: 1.5rem !important;
    z-index: 9999 !important;
}

.toast {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 1rem;
}

.toast.bg-success {
    border-left: 4px solid #10b981 !important;
}

.toast.bg-danger {
    border-left: 4px solid #ef4444 !important;
}

.toast.bg-info {
    border-left: 4px solid #3b82f6 !important;
}

.toast.bg-warning {
    border-left: 4px solid #f59e0b !important;
}

.toast-body {
    padding: 1rem 1.25rem;
    font-weight: 500;
    color: #e2e8f0;
}

.toast .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toast .btn-close:hover {
    opacity: 1;
}

/* ========================================
   GLOBAL TABLE DROPDOWN FIX
   Ensures dropdowns are never clipped by tables
   ======================================== */

/* Force parents to allow overflow so dropdowns can escape */
.animate-fade-in,
#main-content,
.glass-card,
.table-responsive,
.dataTables_wrapper {
    overflow: visible !important;
}

@media (max-width: 991.98px) {
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 120px !important;
        /* Buffer for dropdowns */
    }
}

/* Dropdown Menu - Maximum Stacking Priority */
.dropdown-menu.glass-dropdown {
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important;
    /* Maximum possible z-index */
    position: absolute !important;
}

/* Ensure the button group doesn't create a clipping context */
.btn-group,
.dropdown {
    position: static !important;
}

/* Allow Popper to position correctly */
.dropdown-menu[data-popper-placement] {
    margin: 0 !important;
}

/* Fix row stacking to prevent dropdowns from being hidden by next rows */
table.dataTable tbody tr {
    position: relative;
    z-index: 1;
}

table.dataTable tbody tr:hover {
    z-index: 50 !important;
}