/* EuroSoccer Admin - Modern Design System */
/* Color Palette from Logo: Blue, Gold, Green, White */

:root {
    /* Primary Blues */
    --primary-blue: #1565C0;
    --primary-blue-light: #1E88E5;
    --primary-blue-dark: #0D47A1;
    --primary-gradient: linear-gradient(135deg, #1E88E5 0%, #1565C0 50%, #0D47A1 100%);

    /* Gold Accents */
    --gold: #FFD700;
    --gold-light: #FFEB3B;
    --gold-dark: #FFC107;
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);

    /* Green Accents */
    --success-green: #43A047;
    --success-light: #66BB6A;
    --field-green: #2E7D32;

    /* Neutrals */
    --white: #FFFFFF;
    --off-white: #F8FAFC;
    --light-gray: #E3F2FD;
    --text-primary: #1A237E;
    --text-secondary: #5C6BC0;
    --text-muted: #9FA8DA;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 10px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(21, 101, 192, 0.08);
    --shadow-md: 0 4px 20px rgba(21, 101, 192, 0.12);
    --shadow-lg: 0 8px 40px rgba(21, 101, 192, 0.16);
    --shadow-gold: 0 4px 20px rgba(255, 215, 0, 0.3);
}

/* Global Reset & Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #E3F2FD 0%, #F8FAFC 50%, #E8F5E9 100%);
    min-height: 100vh;
}

/* Body adjustment for sidebar */
body.has-sidebar {
    padding-left: var(--sidebar-width);
    transition: padding-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.has-sidebar.sidebar-collapsed {
    padding-left: var(--sidebar-collapsed-width);
}

/* ==============================
   SIDEBAR - Premium Design
   ============================== */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-gradient);
    z-index: 1040;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 4px 0 30px rgba(13, 71, 161, 0.3);
}

.admin-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.sidebar-collapsed .admin-sidebar {
    width: var(--sidebar-collapsed-width);
}

/* Sidebar Header */
.sidebar-header {
    height: 90px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    overflow: hidden;
}

.sidebar-logo img {
    height: 55px;
    width: 55px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: var(--shadow-gold);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-logo:hover img {
    transform: scale(1.05);
}

.sidebar-logo-text {
    margin-left: 15px;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-logo-text span {
    color: var(--gold);
}

.sidebar-collapsed .sidebar-logo-text {
    opacity: 0;
    width: 0;
}

/* Sidebar Toggle */
.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: -16px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--gold-gradient);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue-dark);
    font-size: 14px;
    z-index: 1050;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-gold);
}

.sidebar-toggle:hover {
    transform: translateY(-50%) scale(1.1);
}

.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
    height: calc(100vh - 90px - 80px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 4px;
}

/* Navigation Menu */
.sidebar-menu {
    list-style: none;
    padding: 0 12px;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 4px;
}

/* Main Menu Link */
.sidebar-menu-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 10px 16px !important;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 12px;
    position: relative;
    height: auto !important; /* Reset height to auto */
    min-height: 48px;
    overflow: hidden;
}

.sidebar-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-menu-link:hover,
.sidebar-menu-link:focus {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    transform: translateX(5px);
}

.sidebar-menu-link.active {
    background: rgba(255, 215, 0, 0.2);
    color: var(--gold);
    box-shadow: inset 4px 0 0 var(--gold);
}

.sidebar-menu-link.active::before {
    opacity: 0.1;
}

.sidebar-menu-icon {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-right: 12px !important; /* Ensure space between icon and text */
}

/* Font Awesome icons in sidebar */
.sidebar-menu-icon .fa,
.sidebar-menu-icon .fas,
.sidebar-menu-icon .far,
.sidebar-menu-icon .fab {
    font-size: 14px;
    line-height: 1;
}

.sidebar-menu-link:hover .sidebar-menu-icon,
.sidebar-menu-link.active .sidebar-menu-icon {
    background: var(--gold);
    color: var(--primary-blue-dark);
    box-shadow: var(--shadow-gold);
}

.sidebar-menu-text {
    margin-left: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
    font-size: 14px;
}

.sidebar-collapsed .sidebar-menu-text {
    opacity: 0;
    width: 0;
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 54px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-menu-item.open .sidebar-submenu {
    max-height: 500px;
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 4px;
}

.sidebar-submenu-link:hover,
.sidebar-submenu-link:focus {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--gold);
    text-decoration: none;
}

.sidebar-submenu-link.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
}

/* Arrow */
.sidebar-menu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.sidebar-menu-item.open .sidebar-menu-arrow {
    transform: rotate(90deg);
    color: var(--gold);
}

.sidebar-collapsed .sidebar-menu-arrow {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.language-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.language-btn.active {
    background: var(--gold-gradient);
    border-color: var(--gold);
    color: var(--primary-blue-dark);
    box-shadow: var(--shadow-gold);
}

.sidebar-collapsed .language-switcher {
    flex-direction: column;
    padding: 0 10px;
}

.sidebar-collapsed .language-btn {
    padding: 8px;
    font-size: 11px;
}

/* ==============================
   TOP HEADER - Glass Effect
   ============================== */
.admin-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    z-index: 1030;
    display: flex;
    align-items: center;
    padding: 0 30px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(21, 101, 192, 0.1);
}

.sidebar-collapsed .admin-header {
    left: var(--sidebar-collapsed-width);
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.header-search .form-control {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid transparent;
    border-radius: 50px;
    background: linear-gradient(var(--white), var(--white)) padding-box,
                linear-gradient(135deg, #E3F2FD, #BBDEFB) border-box;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.header-search .form-control:focus {
    outline: none;
    background: linear-gradient(var(--white), var(--white)) padding-box,
                var(--primary-gradient) border-box;
    box-shadow: var(--shadow-md);
}

.header-search .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    font-size: 16px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 16px 8px 8px;
    border-radius: 50px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.header-user:hover {
    background: linear-gradient(var(--white), var(--white)) padding-box,
                var(--gold-gradient) border-box;
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.header-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid var(--gold);
}

.header-user-info {
    text-align: left;
}

.header-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.header-user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==============================
   MAIN CONTENT AREA
   ============================== */
.admin-content {
    padding: calc(var(--header-height) + 30px) 30px 30px 30px;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--gold);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title::before {
    content: '';
    width: 8px;
    height: 35px;
    background: var(--primary-gradient);
    border-radius: 4px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* ==============================
   CARDS & PANELS - Modern Design
   ============================== */
.panel {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    background: var(--white);
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.panel-heading {
    padding: 20px 25px;
    border: none;
    position: relative;
}

.panel-default > .panel-heading {
    background: linear-gradient(135deg, #FAFAFA 0%, var(--white) 100%);
    border-bottom: 2px solid var(--light-gray);
}

.panel-primary > .panel-heading {
    background: var(--primary-gradient);
    color: var(--white);
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-body {
    padding: 25px;
}

.panel-footer {
    background: linear-gradient(135deg, #FAFAFA 0%, var(--white) 100%);
    border-top: 2px solid var(--light-gray);
    padding: 20px 25px;
}

/* Filter Panel - Special Styling */
.filter-panel,
.panel-primary {
    border-top: 4px solid var(--gold);
    border: none !important;
    border-top: 4px solid var(--gold) !important;
}

.filter-panel .panel-heading,
.panel-primary .panel-heading {
    background: var(--primary-gradient) !important;
    color: var(--white) !important;
}

.filter-panel .panel-heading .panel-title,
.panel-primary .panel-heading .panel-title,
.panel-primary .panel-heading h3 {
    color: var(--white) !important;
}

.filter-panel .panel-heading .panel-title::before {
    content: '\e137';
    font-family: 'Glyphicons Halflings';
    background: var(--gold);
    color: var(--primary-blue-dark);
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override ALL panels to have new styling */
.panel-primary,
.panel-default,
.panel-info,
.panel-success,
.panel-warning {
    border: none !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden;
}

.panel-primary > .panel-heading {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: white !important;
}

.panel-primary > .panel-heading h3,
.panel-primary > .panel-heading .panel-title {
    color: white !important;
}

.panel-default > .panel-heading {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border-bottom: 2px solid var(--light-gray) !important;
}

/* Fix filter section buttons */
.panel .btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
}

.panel .btn-default {
    background: linear-gradient(135deg, #FAFAFA 0%, #EEEEEE 100%) !important;
    border: 2px solid #E0E0E0 !important;
}

/* ==============================
   BUTTONS - Vibrant Styling
   ============================== */
.btn {
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.4);
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green) 0%, var(--field-green) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.btn-success:hover,
.btn-success:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.4);
    color: var(--white);
}

.btn-warning {
    background: var(--gold-gradient);
    color: var(--primary-blue-dark);
    box-shadow: var(--shadow-gold);
}

.btn-warning:hover,
.btn-warning:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    color: var(--primary-blue-dark);
}

.btn-danger {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
}

.btn-danger:hover,
.btn-danger:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.4);
    color: var(--white);
}

.btn-info {
    background: linear-gradient(135deg, #29B6F6 0%, #0288D1 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(2, 136, 209, 0.3);
}

.btn-info:hover,
.btn-info:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(2, 136, 209, 0.4);
    color: var(--white);
}

.btn-default {
    background: linear-gradient(135deg, #FAFAFA 0%, #EEEEEE 100%);
    color: var(--text-primary);
    border: 2px solid #E0E0E0;
}

.btn-default:hover,
.btn-default:focus {
    background: var(--white);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* ==============================
   FORM CONTROLS - Modern Inputs
   ============================== */
.form-control {
    border: 2px solid #E3F2FD;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15);
    outline: none;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 14px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231565C0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 50px;
}

/* ==============================
   TABLES - Premium Design
   ============================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 18px 15px;
    border: none;
    position: relative;
}

.table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
}

.table tbody td {
    padding: 16px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #E3F2FD;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(30, 136, 229, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%);
    transform: scale(1.005);
}

.table tbody tr:hover td {
    border-bottom-color: var(--gold);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(227, 242, 253, 0.5);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background: linear-gradient(90deg, rgba(30, 136, 229, 0.1) 0%, rgba(255, 215, 0, 0.08) 100%);
}

/* ==============================
   MODERN PANEL DESIGN
   ============================== */
.panel-modern {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background: var(--white);
}

.panel-heading-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--white);
    border-left: 5px solid var(--gold);
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.panel-title-section .panel-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-title-section .panel-title i {
    font-size: 24px;
    color: var(--primary-blue);
}

.panel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-modern {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Outline Light Button - for panel headers */
.btn-modern.btn-outline-light {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-modern.btn-outline-light:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.btn-modern.btn-outline-light:focus {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    color: var(--white);
}

/* Gold Button - Primary action */
.btn-modern.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--primary-blue-dark);
    border-color: var(--gold);
    font-weight: 700;
}

.btn-modern.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: var(--shadow-gold);
    color: var(--primary-blue-dark);
}

.btn-modern.btn-gold:focus {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: var(--shadow-gold);
    color: var(--primary-blue-dark);
}

/* Default button fallback */
.btn-modern.btn-default {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}

.btn-modern.btn-default:hover {
    background: rgba(255,255,255,0.25);
    color: var(--white);
}

/* Success button (legacy support) */
.btn-modern.btn-success {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--primary-blue-dark);
    border-color: var(--gold);
}

.btn-modern.btn-success:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: var(--shadow-gold);
}

/* ==============================
   FILTER TOOLBAR
   ============================== */
.filter-toolbar {
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    padding: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 13px;
}

.filter-group label i {
    color: var(--primary-blue);
    margin-right: 5px;
}

.filter-group .form-control {
    border: 2px solid #e3f2fd;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-group .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.filter-group .btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
}

/* ==============================
   MODERN TABLE ENHANCEMENTS
   ============================== */
.panel-body-table {
    padding: 0;
}

.table-modern {
    margin-bottom: 0;
}

.table-modern thead th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 16px 15px;
    border: none;
    white-space: nowrap;
}

.table-modern thead th::after {
    display: none;
}

.table-modern tbody td {
    padding: 16px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* Player Avatar */
.player-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gold);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.player-avatar img,
.player-avatar .img-sm {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
}

/* Player Info */
.player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.player-name:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

.player-status {
    display: flex;
    gap: 5px;
}

.status-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-subscribed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.status-not-subscribed {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

/* Barcode Badge */
.badge-barcode {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: var(--primary-blue-dark);
    font-family: 'Consolas', monospace;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Debit Badge */
.debit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.debit-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.debit-danger:hover {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: var(--white);
    transform: translateY(-2px);
    text-decoration: none;
}

.debit-clear {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

/* ==============================
   ACTIONS DROPDOWN
   ============================== */
.actions-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.actions-dropdown.open {
    z-index: 9999;
}

/* Ensure table rows don't create stacking context issues */
.table-modern tbody tr {
    position: relative;
    z-index: 1;
}

.table-modern tbody tr:hover {
    z-index: 1;
}

/* When dropdown is open in a row, elevate the entire row */
.table-modern tbody tr:has(.actions-dropdown.open),
.table-modern tbody tr.dropdown-row-active {
    z-index: 9999 !important;
    position: relative;
}

.btn-actions {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 2px solid #e0e0e0;
    color: #616161;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-actions:hover,
.btn-actions:focus {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-color: var(--primary-blue);
    color: var(--white);
    transform: scale(1.05);
}

.btn-actions i {
    font-size: 16px;
}

.dropdown-menu-modern {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 10px 0;
    min-width: 220px;
    animation: dropdownFadeIn 0.2s ease;
    z-index: 9999;
    position: absolute;
    background: #ffffff;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu-modern .dropdown-header {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 10px 20px 5px;
    background: none;
}

.dropdown-menu-modern > li > a {
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.dropdown-menu-modern > li > a:hover {
    background: linear-gradient(90deg, rgba(21, 101, 192, 0.08) 0%, rgba(255, 215, 0, 0.08) 100%);
    color: var(--primary-blue);
    padding-left: 25px;
}

.dropdown-menu-modern > li > a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.dropdown-menu-modern .divider {
    margin: 8px 15px;
    background-color: #f0f0f0;
}

.dropdown-menu-modern > li > a.text-danger:hover {
    background: linear-gradient(90deg, rgba(198, 40, 40, 0.08) 0%, rgba(239, 83, 80, 0.08) 100%);
    color: #c62828;
}

/* Text Colors for Icons */
.text-info { color: #1976d2 !important; }
.text-warning { color: #f57c00 !important; }
.text-success { color: #388e3c !important; }
.text-primary { color: var(--primary-blue) !important; }
.text-danger { color: #d32f2f !important; }

/* ==============================
   RESPONSIVE TABLE
   ============================== */
@media (max-width: 768px) {
    .panel-heading-modern {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .panel-actions {
        justify-content: center;
    }

    .btn-modern .btn-text {
        display: none;
    }

    .filter-toolbar .row {
        margin: 0 -5px;
    }

    .filter-toolbar .col-md-3 {
        padding: 0 5px;
    }

    .table-modern thead th,
    .table-modern tbody td {
        padding: 12px 10px;
        font-size: 12px;
    }

    .player-avatar {
        width: 35px;
        height: 35px;
    }

    .badge-barcode {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* ==============================
   DATATABLES - Enhanced Styling
   ============================== */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 20px 0;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: var(--text-primary);
    font-weight: 500;
}

.dataTables_wrapper .dataTables_length select {
    border: 2px solid #E3F2FD;
    border-radius: 8px;
    padding: 8px 35px 8px 15px;
    margin: 0 8px;
    background: var(--white);
}

.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #E3F2FD;
    border-radius: 25px;
    padding: 10px 20px;
    margin-left: 10px;
    width: 250px;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15);
    outline: none;
}

.dataTables_wrapper .dataTables_info {
    padding: 20px 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.dataTables_wrapper .dataTables_paginate {
    padding: 20px 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 10px;
    margin: 0 4px;
    padding: 10px 16px;
    border: 2px solid #E3F2FD;
    background: var(--white);
    color: var(--text-primary) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-gradient) !important;
    border-color: var(--primary-blue) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--gold-gradient) !important;
    border-color: var(--gold) !important;
    color: var(--primary-blue-dark) !important;
    box-shadow: var(--shadow-gold);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==============================
   DROPDOWN MENUS
   ============================== */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    margin-top: 10px;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu > li > a {
    padding: 12px 18px;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-menu > li > a:hover {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: var(--primary-blue);
}

.dropdown-menu > li > a i {
    width: 20px;
    text-align: center;
    color: var(--primary-blue);
}

.dropdown-menu .divider {
    margin: 8px 0;
    background: #E3F2FD;
}

/* ==============================
   ALERTS - Modern Notifications
   ============================== */
.alert {
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 18px 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--field-green);
    border-left: 4px solid var(--success-green);
}

.alert-danger {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: #C62828;
    border-left: 4px solid #E53935;
}

.alert-warning {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    color: #F57F17;
    border-left: 4px solid var(--gold);
}

.alert-info {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: var(--primary-blue);
    border-left: 4px solid var(--primary-blue);
}

/* ==============================
   MODALS - Glass Effect
   ============================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 25px 30px;
    border: none;
}

.modal-header .close {
    color: var(--white);
    opacity: 0.8;
    font-size: 28px;
    text-shadow: none;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-title {
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-title i {
    background: var(--gold);
    color: var(--primary-blue-dark);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    background: linear-gradient(135deg, #FAFAFA 0%, var(--white) 100%);
    border-top: 2px solid #E3F2FD;
    padding: 20px 30px;
}

/* ==============================
   STAT CARDS - Dashboard Widgets
   ============================== */
.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card.primary {
    border-bottom-color: var(--primary-blue);
}

.stat-card.success {
    border-bottom-color: var(--success-green);
}

.stat-card.warning {
    border-bottom-color: var(--gold);
}

.stat-card.danger {
    border-bottom-color: #E53935;
}

.stat-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
}

.stat-card-icon.primary {
    background: var(--primary-gradient);
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.3);
}

.stat-card-icon.success {
    background: linear-gradient(135deg, var(--success-green) 0%, var(--field-green) 100%);
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.3);
}

.stat-card-icon.warning {
    background: var(--gold-gradient);
    color: var(--primary-blue-dark);
    box-shadow: var(--shadow-gold);
}

.stat-card-icon.danger {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.3);
}

.stat-card-content {
    flex: 1;
}

.stat-card-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* ==============================
   BADGES & LABELS
   ============================== */
.badge,
.label {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.badge-primary,
.label-primary {
    background: var(--primary-gradient);
    color: var(--white);
}

.badge-success,
.label-success {
    background: linear-gradient(135deg, var(--success-green) 0%, var(--field-green) 100%);
    color: var(--white);
}

.badge-warning,
.label-warning {
    background: var(--gold-gradient);
    color: var(--primary-blue-dark);
}

.badge-danger,
.label-danger {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
    color: var(--white);
}

/* ==============================
   PAGINATION - Enhanced Modern Design
   ============================== */

/* Pagination Wrapper */
.pagination-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 5px 0;
}

/* Page Info Text */
.pagination-info {
    display: flex;
    align-items: center;
}

.page-info-text {
    font-size: 14px;
    color: var(--text-secondary, #6c757d);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.page-info-text strong {
    color: var(--primary-blue, #1565C0);
    font-weight: 700;
}

/* Pagination Navigation */
.pagination-nav {
    display: flex;
    justify-content: center;
}

.pagination.pagination-modern {
    margin: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    list-style: none;
}

/* Page Items */
.pagination-modern .page-item {
    display: inline-block;
}

.pagination-modern .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #E3F2FD;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.pagination-modern .page-link:hover {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    border-color: #1565C0;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.35);
}

/* Active Page */
.pagination-modern .page-item.active .page-link {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    border-color: #FFC107;
    color: #1A237E;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    transform: scale(1.05);
}

.pagination-modern .page-item.active .page-link:hover {
    background: linear-gradient(135deg, #FFCA28 0%, #FFB300 100%);
    transform: scale(1.08);
}

/* Prev/Next Buttons */
.pagination-modern .page-prev .page-link,
.pagination-modern .page-next .page-link {
    padding: 8px 16px;
    gap: 6px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-color: #90CAF9;
    color: var(--primary-blue, #1565C0);
}

.pagination-modern .page-prev .page-link:hover,
.pagination-modern .page-next .page-link:hover {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    border-color: #1565C0;
    color: #fff;
}

/* First/Last Buttons */
.pagination-modern .page-first .page-link,
.pagination-modern .page-last .page-link {
    min-width: 42px;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-color: #e0e0e0;
    color: #757575;
}

.pagination-modern .page-first .page-link:hover,
.pagination-modern .page-last .page-link:hover {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    border-color: #1565C0;
    color: #fff;
}

/* Disabled State */
.pagination-modern .page-item.disabled .page-link {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #bdbdbd;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* Ellipsis */
.pagination-modern .page-ellipsis .page-link {
    background: transparent;
    border-color: transparent;
    color: #9e9e9e;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: default;
    box-shadow: none;
}

.pagination-modern .page-ellipsis .page-link:hover {
    background: transparent;
    border-color: transparent;
    color: #9e9e9e;
    transform: none;
    box-shadow: none;
}

/* Button Text */
.pagination-modern .btn-text {
    font-size: 13px;
    font-weight: 600;
}

/* Icons in pagination */
.pagination-modern .page-link i {
    font-size: 14px;
}

/* Legacy pagination support */
.pagination {
    margin: 0;
    display: flex;
    gap: 5px;
}

.pagination > li > a,
.pagination > li > span {
    border: 2px solid #E3F2FD;
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0;
}

.pagination > li > a:hover {
    background: var(--primary-gradient);
    border-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.pagination > .active > a,
.pagination > .active > span {
    background: var(--gold-gradient);
    border-color: var(--gold);
    color: var(--primary-blue-dark);
    box-shadow: var(--shadow-gold);
}

/* Panel Footer with Pagination */
.panel-footer {
    background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
    border-top: 1px solid #e8e8e8;
    padding: 15px 20px;
}

/* Mobile Responsive Pagination */
@media (max-width: 768px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-info {
        order: 2;
    }

    .pagination-nav {
        order: 1;
        width: 100%;
    }

    .pagination.pagination-modern {
        width: 100%;
        justify-content: center;
    }

    .pagination-modern .btn-text {
        display: none;
    }

    .pagination-modern .page-link {
        min-width: 38px;
        height: 38px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .page-info-text {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .pagination-modern .page-first,
    .pagination-modern .page-last {
        display: none;
    }

    .pagination.pagination-modern {
        gap: 4px;
    }

    .pagination-modern .page-link {
        min-width: 34px;
        height: 34px;
        padding: 5px 8px;
        font-size: 12px;
        border-radius: 8px;
    }
}

/* ==============================
   MOBILE RESPONSIVE
   ============================== */
@media (max-width: 991px) {
    body.has-sidebar {
        padding-left: 0;
    }

    .admin-sidebar {
        transform: translateX(-100%);
    }

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

    .admin-header {
        left: 0;
    }

    .sidebar-collapsed .admin-header {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 45px;
        height: 45px;
        border-radius: 12px;
        background: var(--primary-gradient);
        color: var(--white);
        border: none;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
        box-shadow: var(--shadow-md);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(13, 71, 161, 0.5);
        backdrop-filter: blur(5px);
        z-index: 1035;
    }

    .admin-sidebar.mobile-open + .sidebar-overlay {
        display: block;
    }

    .header-search {
        max-width: 300px;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* ==============================
   RTL SUPPORT
   ============================== */
[dir="rtl"] body.has-sidebar {
    padding-left: 0;
    padding-right: var(--sidebar-width);
}

[dir="rtl"] body.has-sidebar.sidebar-collapsed {
    padding-right: var(--sidebar-collapsed-width);
}

[dir="rtl"] .admin-sidebar {
    left: auto;
    right: 0;
    box-shadow: -4px 0 30px rgba(13, 71, 161, 0.3);
}

[dir="rtl"] .sidebar-logo-text {
    margin-left: 0;
    margin-right: 15px;
}

[dir="rtl"] .sidebar-menu-link {
    box-shadow: none;
}

[dir="rtl"] .sidebar-menu-link.active {
    box-shadow: inset -4px 0 0 var(--gold);
}

[dir="rtl"] .sidebar-menu-link:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .sidebar-menu-text {
    margin-left: 0;
    margin-right: 14px;
}

[dir="rtl"] .sidebar-submenu {
    margin-left: 0;
    margin-right: 54px;
}

[dir="rtl"] .sidebar-submenu-link {
    border-left: none;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
}

[dir="rtl"] .sidebar-submenu-link:hover,
[dir="rtl"] .sidebar-submenu-link.active {
    border-right-color: var(--gold);
}

[dir="rtl"] .sidebar-toggle {
    right: auto;
    left: -16px;
}

[dir="rtl"] .admin-header {
    left: 0;
    right: var(--sidebar-width);
}

[dir="rtl"] .sidebar-collapsed .admin-header {
    right: var(--sidebar-collapsed-width);
}

[dir="rtl"] .header-search .search-icon {
    left: auto;
    right: 20px;
}

[dir="rtl"] .header-search .form-control {
    padding: 14px 50px 14px 20px;
}

[dir="rtl"] select.form-control {
    background-position: left 15px center;
    padding-left: 50px;
    padding-right: 18px;
}

[dir="rtl"] .dataTables_wrapper .dataTables_filter input {
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .page-header {
    border-left: none;
    border-right: 5px solid var(--gold);
}

[dir="rtl"] .page-title::before {
    display: none;
}

[dir="rtl"] .page-title::after {
    content: '';
    width: 8px;
    height: 35px;
    background: var(--primary-gradient);
    border-radius: 4px;
}

/* RTL Arabic Font */
[dir="rtl"] body,
[dir="rtl"] .sidebar-menu-text,
[dir="rtl"] .sidebar-submenu-link,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] .btn,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea,
[dir="rtl"] .form-control,
[dir="rtl"] .panel-title,
[dir="rtl"] .modal-title,
[dir="rtl"] .table {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* RTL Text Alignment */
[dir="rtl"] body {
    text-align: right;
}

[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

/* RTL Admin Content */
[dir="rtl"] .admin-content {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

[dir="rtl"] .sidebar-collapsed .admin-content {
    margin-right: var(--sidebar-collapsed-width);
}

/* RTL Sidebar Arrow */
[dir="rtl"] .sidebar-menu-arrow {
    margin-right: auto;
    margin-left: 0;
    transform: rotate(180deg);
}

[dir="rtl"] .sidebar-menu-item.open .sidebar-menu-arrow {
    transform: rotate(90deg);
}

/* RTL Dashboard */
[dir="rtl"] .dashboard-welcome {
    text-align: right;
}

[dir="rtl"] .dashboard-welcome h1 i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .stat-card::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .stat-link i {
    transform: rotate(180deg);
}

[dir="rtl"] .quick-actions-panel h4 i {
    margin-right: 0;
    margin-left: 10px;
}

/* RTL Panels */
[dir="rtl"] .panel-heading-modern {
    flex-direction: row-reverse;
}

[dir="rtl"] .panel-title i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .panel-title-section {
    text-align: right;
}

/* RTL Tables */
[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

[dir="rtl"] .table-modern thead th:first-child {
    border-radius: 0 12px 0 0;
}

[dir="rtl"] .table-modern thead th:last-child {
    border-radius: 12px 0 0 0;
}

[dir="rtl"] .player-avatar {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .player-info {
    text-align: right;
}

/* RTL Forms */
[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .input-group .input-group-addon:first-child {
    border-radius: 0 6px 6px 0;
    border-left: 1px solid #ddd;
    border-right: none;
}

[dir="rtl"] .input-group .form-control:last-child {
    border-radius: 6px 0 0 6px;
}

[dir="rtl"] .input-group .input-group-addon:last-child {
    border-radius: 6px 0 0 6px;
    border-right: 1px solid #ddd;
    border-left: none;
}

[dir="rtl"] .input-group .form-control:first-child {
    border-radius: 0 6px 6px 0;
}

/* RTL Buttons */
[dir="rtl"] .btn i {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .btn i:last-child {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .btn-group > .btn:first-child {
    border-radius: 0 6px 6px 0;
}

[dir="rtl"] .btn-group > .btn:last-child {
    border-radius: 6px 0 0 6px;
}

/* RTL Dropdown */
[dir="rtl"] .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}

[dir="rtl"] .dropdown-menu-right {
    left: 0;
    right: auto;
}

[dir="rtl"] .dropdown-menu li a i {
    margin-right: 0;
    margin-left: 10px;
}

/* RTL Modals */
[dir="rtl"] .modal-header .close {
    float: left;
    margin-left: -2px;
    margin-right: auto;
}

[dir="rtl"] .modal-title i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .modal-footer {
    text-align: left;
}

/* RTL Alerts */
[dir="rtl"] .alert {
    text-align: right;
    padding-right: 35px;
    padding-left: 15px;
}

[dir="rtl"] .alert-dismissible .close {
    right: auto;
    left: 0;
}

/* RTL Pagination */
[dir="rtl"] .pagination-modern {
    direction: ltr;
}

/* RTL Today Stats */
[dir="rtl"] .today-stat {
    flex-direction: row-reverse;
}

[dir="rtl"] .today-info {
    text-align: right;
}

/* RTL Birthday List */
[dir="rtl"] .birthday-list li {
    flex-direction: row-reverse;
}

/* RTL Recent Transactions */
[dir="rtl"] .badge {
    margin-right: 0;
    margin-left: 5px;
}

/* RTL Header */
[dir="rtl"] .mobile-menu-toggle {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .header-user {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-user-info {
    margin-left: 0;
    margin-right: 12px;
    text-align: right;
}

[dir="rtl"] .header-user-avatar {
    margin-right: 0;
}

/* RTL Filter Panel */
[dir="rtl"] #filterPanel .row {
    direction: rtl;
}

/* RTL DataTables */
[dir="rtl"] .dataTables_wrapper .dataTables_length {
    float: right;
}

[dir="rtl"] .dataTables_wrapper .dataTables_filter {
    float: left;
    text-align: left;
}

[dir="rtl"] .dataTables_wrapper .dataTables_info {
    float: right;
}

[dir="rtl"] .dataTables_wrapper .dataTables_paginate {
    float: left;
}

/* RTL Actions Dropdown */
[dir="rtl"] .dropdown-menu-modern {
    text-align: right;
}

[dir="rtl"] .dropdown-menu-modern li a i {
    margin-right: 0;
    margin-left: 8px;
}

/* RTL Mobile Responsive */
@media (max-width: 991px) {
    [dir="rtl"] .admin-sidebar {
        right: auto;
        left: -280px;
    }

    [dir="rtl"] .admin-sidebar.mobile-open {
        left: 0;
        right: auto;
    }

    [dir="rtl"] .admin-header {
        right: 0;
        left: 0;
    }

    [dir="rtl"] .admin-content {
        margin-right: 0;
    }
}

/* ==============================
   ANIMATIONS
   ============================== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slideIn {
    animation: slideInUp 0.4s ease;
}

/* Panel fade in */
.panel {
    animation: slideInUp 0.4s ease;
}

/* Glowing effect for important elements */
.glow-gold {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(30, 136, 229, 0.5);
}

/* ==============================
   ADDITIONAL FIXES
   ============================== */

/* Fix table action buttons - softer colors */
.table .btn-danger {
    background: linear-gradient(135deg, #FF7043 0%, #F4511E 100%) !important;
    border: none !important;
}

.table .btn-success {
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%) !important;
    border: none !important;
}

.table .btn-warning {
    background: var(--gold-gradient) !important;
    border: none !important;
    color: var(--primary-blue-dark) !important;
}

.table .btn-info {
    background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%) !important;
    border: none !important;
}

.table .btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
}

/* Fix dropdown toggle buttons in tables */
.table .dropdown-toggle {
    border-radius: 8px !important;
}

/* Make labels/badges in tables softer */
.table .btn-xs {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Fix sidebar submenu readability */
.sidebar-submenu-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
}

.sidebar-submenu-link i {
    margin-right: 8px;
    opacity: 0.8;
}

/* Fix form inputs in panels */
.panel .form-control {
    border: 2px solid #E3F2FD !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
}

.panel .form-control:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15) !important;
}

.panel select.form-control {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231565C0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 45px !important;
}

/* Fix panel footer buttons alignment */
.panel-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.panel-footer .clearfix {
    display: none;
}

/* Settings page specific fixes */
.panel-body .form-group {
    margin-bottom: 20px;
}

.panel-body .form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

/* Login page button fix - make it gold */
.btn-login,
.login-page .btn,
#register-login-btn {
    background: var(--gold-gradient) !important;
    color: var(--primary-blue-dark) !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: var(--shadow-gold) !important;
}

.btn-login:hover,
.login-page .btn:hover,
#register-login-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5) !important;
}

/* Fix DataTables header text */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info {
    font-weight: 500;
    color: var(--text-primary);
}

/* Ensure gold stripe on ALL table headers */
.table > thead > tr > th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%) !important;
    color: white !important;
    border: none !important;
    position: relative;
}

.table > thead > tr > th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
}

/* Fix pagination in DataTables */
.dataTables_paginate .paginate_button {
    background: white !important;
    border: 2px solid #E3F2FD !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    margin: 0 3px !important;
    padding: 8px 14px !important;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: var(--gold-gradient) !important;
    border-color: var(--gold) !important;
    color: var(--primary-blue-dark) !important;
}

.dataTables_paginate .paginate_button:hover:not(.current) {
    background: var(--primary-gradient) !important;
    border-color: var(--primary-blue) !important;
    color: white !important;
}

/* Fix "Show X entries" dropdown */
.dataTables_length select {
    border: 2px solid #E3F2FD !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    background: white !important;
}

/* Fix search input in DataTables */
.dataTables_filter input {
    border: 2px solid #E3F2FD !important;
    border-radius: 25px !important;
    padding: 10px 20px !important;
    min-width: 200px !important;
}

.dataTables_filter input:focus {
    border-color: var(--primary-blue) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.15) !important;
}

/* Fix header user dropdown */
.header-user .dropdown-menu {
    margin-top: 15px;
    border-radius: 12px;
    min-width: 200px;
}

/* Page title styling fix */
.page-header h1 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1::before {
    content: '';
    width: 5px;
    height: 30px;
    background: var(--gold);
    border-radius: 3px;
}

/* Container padding fix */
#container {
    padding: 0;
}

/* Responsive table wrapper */
.table-responsive {
    border: none !important;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* ==============================
   RTL STAT CARDS - Enhanced
   ============================== */
[dir="rtl"] .stat-card {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 15px;
}

[dir="rtl"] .stat-card::before {
    left: auto;
    right: 0;
    border-radius: 0 16px 16px 0;
}

[dir="rtl"] .stat-icon {
    margin-bottom: 0;
    margin-right: 0;
}

[dir="rtl"] .stat-content {
    flex: 1;
    text-align: right;
}

[dir="rtl"] .stat-link {
    flex-direction: row-reverse;
    margin-top: 0;
    white-space: nowrap;
}

[dir="rtl"] .stat-link i.fa-arrow-right::before {
    content: "\f060"; /* fa-arrow-left */
}

/* RTL Column Order for Stats Row */
[dir="rtl"] .stats-row {
    direction: rtl;
}

[dir="rtl"] .stats-row .col-lg-3 {
    float: right;
}

/* ==============================
   RTL SIDEBAR CHEVRONS
   ============================== */
[dir="rtl"] .sidebar-menu-arrow .glyphicon-chevron-right::before {
    content: "\e079"; /* chevron-left in RTL */
}

[dir="rtl"] .sidebar-menu-item.open .sidebar-menu-arrow .glyphicon-chevron-right {
    transform: rotate(-90deg);
}

[dir="rtl"] .sidebar-toggle .glyphicon-chevron-left::before {
    content: "\e080"; /* chevron-right for toggle in RTL */
}

/* ==============================
   RTL QUICK ACTIONS
   ============================== */
[dir="rtl"] .quick-actions-grid {
    direction: rtl;
}

/* ==============================
   RTL PANEL IMPROVEMENTS
   ============================== */
[dir="rtl"] .panel-modern {
    text-align: right;
}

[dir="rtl"] .panel-heading-modern {
    flex-direction: row;
    border-left: none;
    border-right: 5px solid var(--gold);
}

[dir="rtl"] .panel-badge {
    margin-left: 0;
    margin-right: auto;
}

/* ==============================
   RTL TODAY SECTION
   ============================== */
[dir="rtl"] .today-stat {
    flex-direction: row-reverse;
}

[dir="rtl"] .today-info {
    text-align: right;
}

/* ==============================
   RTL BIRTHDAY LIST
   ============================== */
[dir="rtl"] .birthday-list li {
    flex-direction: row-reverse;
}

/* ==============================
   RTL PAGE HEADER
   ============================== */
[dir="rtl"] .page-header {
    text-align: right;
    border-right: 5px solid var(--gold);
    border-left: none;
    padding-right: 20px;
    padding-left: 0;
}

[dir="rtl"] .page-title {
    text-align: right;
}

[dir="rtl"] .page-title i {
    margin-right: 0;
    margin-left: 10px;
}

/* ==============================
   RTL HEADER USER
   ============================== */
[dir="rtl"] .header-user {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-user-info {
    text-align: right;
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

/* ==============================
   RTL MOBILE MENU
   ============================== */
[dir="rtl"] .mobile-menu-toggle {
    margin-right: 0;
    margin-left: 15px;
}
