@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ====================================
   PREMIUM ADMIN PANEL STYLES
   ==================================== */

:root {
    /* Main Theme Colors */
    --primary-color: #8b5cf6;
    /* Vibrant Purple */
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary-color: #ec4899;
    /* Vibrant Pink */
    --accent-color: #f59e0b;
    /* Vibrant Orange */

    /* Semantic Colors */
    --success-color: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    --danger-color: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.4);
    --warning-color: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.4);
    --info-color: #3b82f6;
    --info-glow: rgba(59, 130, 246, 0.4);

    /* Dark Theme Core */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Glassmorphism Variables */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-bg-hover: rgba(30, 41, 59, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --sidebar-bg: rgba(15, 23, 42, 0.85);

    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Admin sidebar logout: push to bottom */
.sidebar ul li.mt-auto {
    margin-top: auto !important;
}

/* RTL: sidebar slides from right */
[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--glass-border);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
}

[dir="rtl"] .sidebar.mobile-open {
    transform: translateX(0);
}

[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: 260px;
}

@media (max-width: 992px) {
    [dir="rtl"] .main-content {
        margin-right: 0;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ====================================
   SIDEBAR STYLES
   ==================================== */

.sidebar {
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    padding: 24px 16px;
    color: white;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar .logo h2 {
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.sidebar .logo h2 i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-glow));
    margin-right: 8px;
}

.sidebar .logo p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.sidebar ul li {
    margin-bottom: 8px;
}

.sidebar ul li a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 15px;
}

.sidebar ul li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    transition: var(--transition);
}

.sidebar ul li a:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-main);
    transform: translateX(4px);
}

.sidebar ul li a:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.sidebar ul li a.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    color: var(--text-main);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar ul li a.active i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

/* ====================================
   MAIN CONTENT AREA
   ==================================== */

.main-content {
    margin-left: 260px;
    padding: 30px;
    position: relative;
    z-index: 10;
}

.content-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 24px;
    transition: var(--transition);
}

.content-card h2 {
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card h3 {
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 18px;
}

/* ====================================
   TOP BAR
   ==================================== */

.top-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 30px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: var(--glass-shadow);
}

.top-bar h1 {
    font-weight: 800;
    margin: 0;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    word-break: break-word;
    flex: 1;
}

.top-bar h1 i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
    max-width: 240px;
}

.admin-info span {
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.admin-info i {
    font-size: 18px;
    color: var(--accent-color);
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.5));
}

/* --- Language Switcher Styles --- */
.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    padding: 0 12px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.85rem;
    outline: none;
    box-shadow: none;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.active-lang {
    font-family: 'Outfit', sans-serif;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-darker);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    list-style: none;
    margin: 0;
    min-width: 120px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 1000;
}

.lang-menu.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.lang-menu li {
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 0.85rem;
    overflow: hidden;
}

.lang-menu li a {
    display: block;
    padding: 8px 12px;
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.lang-menu li:hover {
    background: rgba(139, 92, 246, 0.1);
}

.lang-menu li:hover a {
    color: var(--primary-color);
}

/* Hide Google Translate Bar */
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-gadget-icon,
iframe.goog-te-menu-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   STATS GRID
   ==================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card,
.stat-box {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 30px 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before,
.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0.8;
}

.stat-card:hover,
.stat-box:hover {
    transform: translateY(-5px);
    background: var(--glass-bg-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.3);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text-main);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Stat Icons */
.stat-icon {
    font-size: 28px;
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.stat-icon.users {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-icon.spins {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(168, 85, 247, 0.05) 100%);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.stat-icon.rewards {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.coupons {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-icon.claims {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ====================================
   FORM STYLES
   ==================================== */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-control,
.form-select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text-main);
    transition: var(--transition);
    width: 100%;
    backdrop-filter: blur(5px);
}

.form-control:focus,
.form-select:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
    outline: none;
    color: var(--text-main);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-select {
    appearance: none;
    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='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
}

.form-select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ====================================
   BUTTON STYLES
   ==================================== */

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
    color: white;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.btn-action {
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    font-size: 13px;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-view {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-view:hover {
    background: rgba(59, 130, 246, 0.3);
    color: white;
    transform: translateY(-2px);
}

.btn-edit {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-edit:hover {
    background: rgba(245, 158, 11, 0.3);
    color: white;
    transform: translateY(-2px);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    color: white;
    transform: translateY(-2px);
}

.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    margin-right: 12px;
    margin-bottom: 12px;
    transition: var(--transition);
    font-weight: 600;
}

.action-btn i {
    color: var(--primary-color);
}

.action-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--text-main);
}

/* ====================================
   TABLE STYLES
   ==================================== */

.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
}

.users-table,
.coupons-table,
.spins-table,
.claims-table,
.rewards-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-main);
}

.users-table thead,
.coupons-table thead,
.spins-table thead,
.claims-table thead,
.rewards-table thead {
    background: rgba(0, 0, 0, 0.4);
}

.users-table th,
.coupons-table th,
.spins-table th,
.claims-table th,
.rewards-table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

.users-table td,
.coupons-table td,
.spins-table td,
.claims-table td,
.rewards-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
    font-size: 14px;
}

.users-table tbody tr:last-child td,
.coupons-table tbody tr:last-child td,
.spins-table tbody tr:last-child td,
.claims-table tbody tr:last-child td,
.rewards-table tbody tr:last-child td {
    border-bottom: none;
}

.users-table tbody tr:hover td,
.coupons-table tbody tr:hover td,
.spins-table tbody tr:hover td,
.claims-table tbody tr:hover td,
.rewards-table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ====================================
   STATUS BADGES
   ==================================== */

.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-active,
.status-claimed {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-inactive {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ====================================
   QUICK ACTIONS
   ==================================== */

.quick-actions {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

.quick-actions h3 {
    color: var(--text-main);
    margin-bottom: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-actions h3 i {
    color: var(--accent-color);
}

/* ====================================
   ALERTS
   ==================================== */

.alert {
    border-radius: var(--border-radius);
    border: none;
    margin-bottom: 24px;
    padding: 16px 20px;
    border-left: 4px solid;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert i {
    font-size: 20px;
}

.alert-danger {
    border-left-color: var(--danger-color);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.alert-danger i {
    color: var(--danger-color);
}

.alert-success {
    border-left-color: var(--success-color);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.alert-success i {
    color: var(--success-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.alert-warning i {
    color: var(--warning-color);
}

/* ====================================
   CARDS & GRIDS
   ==================================== */

.reward-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.3);
}

.reward-card h3 {
    margin-bottom: 12px;
    font-weight: 700;
    padding-left: 10px;
}

.reward-value {
    font-size: 24px;
    font-weight: 800;
    margin: 15px 0 15px 10px;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.reward-status {
    margin-left: 10px;
}

.reward-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-left: 10px;
}

.reward-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    font-weight: 600;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* ====================================
   BACK LINK
   ==================================== */

.back-link {
    display: inline-block;
    margin-bottom: 24px;
}

.back-link a {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-4px);
    color: white;
}

/* ====================================
   LOGIN SPECIFIC FOR ADMIN
   ==================================== */

.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.admin-badge {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* ── Sidebar responsive (tablet/mobile) ── */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    /* NOTE: Use .mobile-open (toggled by JS in header.php) — NOT .active */
    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .content-card {
        padding: 20px;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .table-responsive {
        border: 0;
    }

    .users-table th,
    .coupons-table th,
    .spins-table th,
    .claims-table th,
    .users-table td,
    .coupons-table td,
    .spins-table td,
    .claims-table td {
        padding: 12px 10px;
    }

    .btn-action {
        padding: 6px 10px;
        font-size: 12px;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
}

/* ─── Rewards Table ──────────────────────────────────────── */
.rewards-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.rewards-table thead tr {
    background: rgba(139, 92, 246, 0.15);
}

.rewards-table th {
    padding: 12px 16px;
    text-align: left;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--glass-border);
}

.rewards-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    vertical-align: middle;
}

.rewards-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Row action buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s ease;
    text-decoration: none;
    margin-right: 6px;
}

.btn-edit {
    background: rgba(99, 102, 241, 0.18);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-edit:hover {
    background: rgba(99, 102, 241, 0.35);
    color: #fff;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
}

/* Palette dot hover */
.palette-dot {
    flex-shrink: 0;
}



/* WhatsApp Widget - Premium UI/UX */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 15px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    outline: none !important;
}

.wa-icon-container {
    position: relative;
    width: 64px;
    height: 64px;
    z-index: 2;
}

.wa-icon {
    width: 100%;
    height: 100%;
    background: #25D366;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 3;
}

.wa-icon-container::before,
.wa-icon-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #25D366;
    border-radius: 50%;
    opacity: 0.6;
    z-index: 1;
}

.wa-icon-container::before {
    animation: wa-pulse-large 2.5s infinite;
}

.wa-icon-container::after {
    animation: wa-pulse-large 2.5s infinite 1.2s;
}

@keyframes wa-pulse-large {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.wa-status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wa-text-bubble {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 20px 20px 0 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.wa-welcome {
    font-size: 11px;
    color: #8b5cf6;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
}

.wa-action {
    font-size: 14px;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.whatsapp-widget:hover .wa-icon {
    transform: scale(1.1) rotate(8deg);
    background: #128C7E;
}

.whatsapp-widget:hover .wa-text-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 20px;
        right: 20px;
    }

    .wa-icon-container {
        width: 56px;
        height: 56px;
    }

    .wa-text-bubble {
        display: none;
    }
}

/* ====================================
   ADMIN MOBILE RESPONSIVE IMPROVEMENTS
   ==================================== */

/* ── Sidebar: Slide out on mobile ── */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1100;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.4);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Overlay behind the sidebar on mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.7);
        backdrop-filter: blur(4px);
        z-index: 1090;
    }

    .sidebar-overlay.show {
        display: block;
    }

    /* Content area: no left margin on mobile */
    .main-content {
        margin-left: 0 !important;
        padding: 16px !important;
    }

    /* Mobile hamburger toggle button */
    .sidebar-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 10px;
        color: var(--text-main);
        cursor: pointer;
        font-size: 18px;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1050;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    /* Shift page header down to not overlap the toggle button */
    .main-content>*:first-child {
        margin-top: 56px;
    }
}

/* Hide the toggle button on desktop */
.sidebar-toggle-btn {
    display: none;
}

/* ── Stat cards: 2 columns on tablet ── */
@media (max-width: 991px) {

    .stats-grid,
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    .stat-card {
        padding: 20px !important;
    }
}

/* ── Stat cards: single column on phones ── */
@media (max-width: 480px) {

    .stats-grid,
    .dashboard-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
}

/* ── Tables: Scrollable on mobile ── */
@media (max-width: 768px) {

    .table-container,
    .table-responsive-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .content-card {
        padding: 16px !important;
        border-radius: var(--border-radius) !important;
    }

    table {
        min-width: 560px;
    }

    th,
    td {
        padding: 10px 10px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }
}

/* ── Forms on mobile ── */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 16px !important;
    }

    .form-control,
    .form-select {
        font-size: 16px !important;
        /* Prevents iOS zoom on focus */
    }

    /* Button groups stack */
    .d-flex.gap-2 {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-admin,
    .btn-primary-admin,
    .btn-danger-admin {
        width: 100%;
        justify-content: center;
    }
}

/* ── Page headers ── */
@media (max-width: 768px) {

    .page-header h1,
    .main-content h1 {
        font-size: 1.4rem !important;
    }

    .main-content h2 {
        font-size: 1.2rem !important;
    }
}

/* ── Prevent horizontal scroll globally ── */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
}