/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background, #f8fafc);
    color: var(--text-primary, #1e293b);
    line-height: 1.6;
}

/* Dark mode variables */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-color: #f59e0b;
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --danger-color: #ef4444;
    --danger-gradient: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --background: #ffffff;
    --surface: #f8fafc;
    --sidebar-bg: #f0f1f3;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --glow-primary: 0 0 20px rgba(102, 126, 234, 0.4);
    --glow-success: 0 0 20px rgba(16, 185, 129, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
    --background: #0a0f1a;
    --surface: #111827;
    --surface-elevated: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #1e293b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --glow-primary: 0 0 30px rgba(102, 126, 234, 0.3);
    --glow-success: 0 0 30px rgba(16, 185, 129, 0.3);
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --sidebar-bg: #111827;
}

/* Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--background);
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

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

.main-content {
    flex: 1;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.admin-name-display {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .header-left {
        flex: 0 0 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        order: 1;
    }

    .header-right {
        flex: 1;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.5rem;
        margin-left: auto;
        order: 2;
    }

    .admin-name-display {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.coin-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 9999px;
    margin-right: 1rem;
    font-weight: 500;
    color: var(--success-color);
}

.coin-balance i {
    color: var(--success-color);
    font-size: 1rem;
}

.coin-balance #coin-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success-color);
}

.coin-balance .coin-label {
    font-size: 0.75rem;
    color: var(--success-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .coin-balance {
        margin-right: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    .coin-balance .coin-label {
        display: none;
    }
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

.content {
    padding: 2rem;
}

/* Sidebar styles */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.sidebar-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 0.25rem;
    display: block;
    object-fit: contain;
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.sidebar-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    transition: width 0.3s ease;
}

.nav-item:hover::before,
.nav-item.active::before {
    width: 100%;
}

.nav-item:hover,
.nav-item.active {
    color: #4338ca;
    border-left-color: #4338ca;
}

[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .nav-item.active {
    color: #818cf8;
    border-left-color: #818cf8;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, transparent 100%);
}

.nav-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-item:hover i {
    transform: scale(1.1);
}

/* Cards - Modern Glassmorphism */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(102, 126, 234, 0.05);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stats cards - Modern Premium Design */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.2) 0%, rgba(56, 239, 125, 0.2) 100%);
    color: #38ef7d;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.2) 100%);
    color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.stat-icon.danger {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.2) 0%, rgba(255, 75, 43, 0.2) 100%);
    color: #ff6b6b;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

/* Tables */
.table-container {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background-color: var(--surface);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background-color: var(--surface);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
    transform: translateY(-2px);
}

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

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background-color: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-secondary {
    background-color: rgba(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

/* Modals - Modern Dark Theme */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 4001;
    animation: modalSlideIn 0.3s ease;
}

[data-theme="dark"] .modal-content {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.25rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.modal-body {
    padding: 1.5rem;
    color: #94a3b8;
    text-align: center;
}

.modal-body h3,
.modal-body h4 {
    color: #f1f5f9;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.modal-body p {
    color: #94a3b8;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Modal icon styling */
.modal-body .fa-exclamation-triangle,
.modal-body .fa-exclamation-circle,
.modal-body .fa-question-circle {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.modal-body .fa-exclamation-triangle {
    color: #fbbf24;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.3));
}

.modal-body .fa-exclamation-circle {
    color: #f87171;
    filter: drop-shadow(0 0 10px rgba(248, 113, 113, 0.3));
}

.modal-body .fa-question-circle {
    color: #667eea;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
}

.modal-footer .btn {
    min-width: 120px;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

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

.modal-footer .btn-success:hover {
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.modal-footer .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
}

.modal-footer .btn-danger:hover {
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Compact form styles for user modal */
#user-modal .modal-body {
    padding: 1rem 1.5rem;
}

#user-modal .form-group {
    margin-bottom: 0.75rem;
}

#user-modal .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

#user-modal .form-control {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

#user-modal .modal-header {
    padding: 1rem 1.5rem;
}

#user-modal .modal-footer {
    padding: 1rem 1.5rem;
}

#user-modal .modal-title {
    font-size: 1.125rem;
}

/* Error message styling - ensure it appears in front */
.error-message {
    color: #ef4444 !important;
    font-size: 0.75rem !important;
    margin-top: 0.25rem !important;
    display: block !important;
    position: relative !important;
    z-index: 3000 !important;
}

.form-control.error {
    border-color: #ef4444 !important;
    position: relative;
    z-index: 1;
}

.form-control[readonly] {
    background-color: var(--card-background);
    cursor: not-allowed;
    opacity: 0.7;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Loading spinner */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design - Mobile First Approach */
@media (max-width: 768px) {

    /* Base improvements */
    body {
        font-size: 16px;
        /* Better readability on mobile */
    }

    /* Sidebar - Full screen overlay on mobile */
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 320px;
        z-index: 3200;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        padding-top: 0;
        background-color: var(--sidebar-bg);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

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

    .sidebar-header {
        padding-top: 2rem;
        padding-bottom: 1rem;
    }

    /* Sidebar overlay when open */
    .sidebar.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

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

    /* Header - Mobile optimized */
    .header {
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 3100;
        background: var(--background);
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 0 0 auto;
        min-width: 0;
        order: 1;
    }

    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 1;
        flex-shrink: 0;
        margin-left: auto;
        order: 2;
    }

    .header-title {
        font-size: 1.25rem;
        margin: 0;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-info {
        display: none;
        /* Hide on mobile to save space */
    }

    /* Mobile menu button - Larger */
    .mobile-menu-btn {
        font-size: 1.75rem;
        padding: 0.75rem;
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Content area */
    .content {
        padding: 1rem;
    }

    /* Stats grid - Single column */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.875rem;
    }

    /* Tables - Horizontal scroll with better styling */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0.5rem;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .table {
        min-width: 700px;
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 1rem 0.75rem;
        white-space: nowrap;
    }

    .table th {
        font-size: 0.8125rem;
        font-weight: 600;
    }

    /* Modals - Full width on mobile */
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        max-height: 90vh;
        border-radius: 0.75rem 0.75rem 0 0;
    }

    .modal-header {
        padding: 1.25rem 1rem;
        border-bottom: 2px solid var(--border);
    }

    .modal-title {
        font-size: 1.25rem;
        font-weight: 600;
    }

    .modal-close {
        font-size: 1.5rem;
        width: 44px;
        height: 44px;
    }

    .modal-body {
        padding: 1.25rem 1rem;
        max-height: calc(95vh - 140px);
        overflow-y: auto;
    }

    .modal-footer {
        padding: 1rem;
        border-top: 2px solid var(--border);
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    /* Cards */
    .card {
        margin-bottom: 1.25rem;
        border-radius: 0.75rem;
    }

    .card-header {
        padding: 1.25rem 1rem;
    }

    .card-header h3 {
        font-size: 1.125rem;
    }

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

    /* Forms - Mobile optimized */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-label {
        font-size: 0.9375rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
        display: block;
    }

    .form-control,
    .form-select {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 1rem;
        min-height: 52px;
        /* Large touch target */
        border-radius: 0.5rem;
        border: 2px solid var(--border);
    }

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    }

    /* Buttons - Large touch targets */
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        min-height: 52px;
        /* Large touch-friendly size */
        border-radius: 0.5rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .btn-lg {
        padding: 1.125rem 1.75rem;
        font-size: 1.0625rem;
        min-height: 56px;
    }

    .btn-secondary {
        background-color: var(--surface);
        color: var(--text-primary);
        border: 2px solid var(--border);
    }

    /* Filter and search - Stack vertically */
    .d-flex.flex-wrap,
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .d-flex.flex-wrap>*,
    .d-flex.justify-content-between>* {
        width: 100%;
    }

    /* Search and filter inputs */
    #search-users,
    #status-filter,
    #subscription-filter {
        width: 100%;
        min-height: 52px;
    }

    /* Add user button */
    #add-user-btn {
        width: 100%;
        margin-top: 0;
        order: -1;
        /* Move to top */
    }

    /* Pagination - Mobile friendly */
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 0;
    }

    .pagination-info {
        text-align: center;
        font-size: 0.9375rem;
        font-weight: 500;
    }

    .pagination-controls {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .page-btn,
    #prev-page,
    #next-page {
        min-width: 48px;
        min-height: 48px;
        font-size: 0.9375rem;
        padding: 0.75rem 1rem;
    }

    /* Action buttons - Larger */
    .action-buttons {
        display: flex;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .btn-action {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        font-size: 1rem;
        border-radius: 0.375rem;
    }

    /* User info in header */
    .user-info {
        font-size: 0.9375rem;
    }

    .user-name {
        display: none;
    }

    .theme-toggle {
        min-width: 48px;
        min-height: 48px;
        padding: 0.75rem;
        font-size: 1.25rem;
    }

    /* Login page - Mobile optimized */
    .login-container {
        padding: 1rem;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .login-card {
        width: 100%;
        max-width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 1rem;
        margin: 0;
    }

    .login-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .login-subtitle {
        font-size: 1rem;
    }

    .login-form .form-control {
        padding: 1rem;
        min-height: 52px;
        font-size: 16px;
    }

    .login-btn {
        min-height: 56px;
        font-size: 1.0625rem;
        margin-top: 1rem;
    }

    /* Header layout - keep horizontal on mobile */
    .header-left,
    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-left: auto;
    }

    /* Row layouts - Single column */
    .row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .col-md-8,
    .col-md-4,
    .col-md-6 {
        grid-column: 1;
    }

    /* Chart containers */
    canvas {
        max-width: 100%;
        height: auto !important;
    }

    /* Sidebar navigation - Larger touch targets */
    .sidebar-nav .nav-item {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-height: 52px;
    }

    .sidebar-nav .nav-item i {
        font-size: 1.25rem;
        width: 24px;
    }

    /* Checkbox labels - Larger */
    .checkbox-label {
        font-size: 1rem;
        padding: 0.75rem 0;
    }

    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 0.75rem;
    }
}

/* Small mobile devices (480px and below) */
@media (max-width: 480px) {
    .content {
        padding: 0.75rem;
    }

    .header {
        padding: 0.875rem;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .header-left {
        gap: 0.5rem;
        flex: 0 0 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        order: 1;
    }

    .header-right {
        flex: 1;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.5rem;
        margin-left: auto;
        order: 2;
    }

    .header-title {
        font-size: 1.125rem;
    }

    .user-info {
        display: none;
    }

    .admin-name-display {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .modal-content {
        border-radius: 0.5rem 0.5rem 0 0;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.875rem;
    }

    .table {
        font-size: 0.8125rem;
        min-width: 650px;
    }

    .table th,
    .table td {
        padding: 0.875rem 0.5rem;
    }

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

    .card-header h3 {
        font-size: 1.0625rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .login-card {
        padding: 1.75rem 1.25rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.9375rem;
    }

    .form-control,
    .form-select {
        padding: 0.875rem;
        min-height: 48px;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        min-height: 48px;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
        min-height: 52px;
    }

    .sidebar-nav .nav-item {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }
}

/* Dark mode toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--surface);
    color: var(--text-primary);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
    position: relative;
    z-index: 3100;
}

.mobile-menu-btn:hover {
    background-color: var(--surface);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        z-index: 3100;
    }

    .header {
        position: relative;
        z-index: 3100;
    }

    .header-left {
        position: relative;
        z-index: 3100;
    }
}

/* Login page styles - Modern Premium Light Design */
.login-page {
    background: linear-gradient(-45deg, #e8eaf6, #f3e5f5, #e0f2f1, #e8eaf6);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 50%);
    animation: floatBg 20s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.08) 0%, transparent 50%);
    animation: floatBg 25s ease-in-out infinite reverse;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

@keyframes floatBg {

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

    25% {
        transform: translate(2%, 2%) rotate(1deg);
    }

    50% {
        transform: translate(0, 4%) rotate(0deg);
    }

    75% {
        transform: translate(-2%, 2%) rotate(-1deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.5rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 0 40px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 0.5rem;
    display: block;
    object-fit: contain;
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.2));
    animation: pulseRound 3s ease-in-out infinite;
}

@keyframes pulseRound {

    0%,
    100% {
        filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.2));
    }

    50% {
        filter: drop-shadow(0 4px 20px rgba(102, 126, 234, 0.4));
    }
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #64748b;
    font-size: 1rem;
    opacity: 0.8;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #475569;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-form .form-label i {
    color: #667eea;
}

.login-form .form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 0 20px rgba(102, 126, 234, 0.1);
}

.login-form .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Additional utility classes */
.row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.col-md-8 {
    grid-column: 1;
}

.col-md-4 {
    grid-column: 2;
}

.col-md-6 {
    grid-column: span 1;
}

@media (max-width: 768px) {
    .row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .col-md-8,
    .col-md-4,
    .col-md-6 {
        grid-column: 1;
    }

    /* Chart containers */
    canvas {
        max-width: 100%;
        height: auto !important;
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    font-size: 0.9375rem;
}

/* Ensure user-name is always visible on mobile */
@media (max-width: 768px) {
    .user-name {
        display: block !important;
        visibility: visible !important;
        font-size: 0.875rem;
        font-weight: 600;
    }

    .user-role {
        display: block;
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
}

.page-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    min-width: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-view {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.btn-view:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-block {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.btn-block:hover {
    background: rgba(245, 158, 11, 0.2);
}

.btn-unblock {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.btn-unblock:hover {
    background: rgba(16, 185, 129, 0.2);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-recharge {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.btn-recharge:hover {
    background: rgba(168, 85, 247, 0.2);
}

.days-left {
    font-weight: 500;
}

.days-left.warning {
    color: var(--warning-color);
}

.days-left.danger {
    color: var(--danger-color);
}

.days-left.success {
    color: var(--success-color);
}

/* Row highlight classes for subscription status */
tr.row-green {
    background: rgba(0, 200, 83, 0.08);
    border-left: 3px solid #00c853;
}

tr.row-red {
    background: rgba(255, 23, 68, 0.08);
    border-left: 3px solid #ff1744;
}

tr.row-blue {
    background: rgba(33, 150, 243, 0.08);
    border-left: 3px solid #2196f3;
}

tr.row-yellow {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
}

/* Mobile card highlight variants */
.mobile-user-card.card-green {
    border-left: 3px solid #00c853;
    background: rgba(0, 200, 83, 0.06);
}

.mobile-user-card.card-red {
    border-left: 3px solid #ff1744;
    background: rgba(255, 23, 68, 0.06);
}

.mobile-user-card.card-blue {
    border-left: 3px solid #2196f3;
    background: rgba(33, 150, 243, 0.06);
}

.mobile-user-card.card-yellow {
    border-left: 3px solid #ffc107;
    background: rgba(255, 193, 7, 0.08);
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 768px) {
    .admin-form-row {
        grid-template-columns: 1fr;
    }
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* ========================================
   SweetAlert2 Dark Theme Customization
   ======================================== */
[data-theme="dark"] .swal2-popup,
.swal2-popup {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 1.25rem !important;
    box-shadow:
        0 25px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
    padding: 2rem !important;
}

.swal2-title {
    color: #f1f5f9 !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.swal2-html-container,
.swal2-content {
    color: #94a3b8 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

/* Icon styling */
.swal2-icon {
    border-color: transparent !important;
    margin: 1.5rem auto !important;
}

.swal2-icon.swal2-warning {
    border-color: rgba(251, 191, 36, 0.3) !important;
    color: #fbbf24 !important;
}

.swal2-icon.swal2-warning .swal2-icon-content {
    color: #fbbf24 !important;
    font-size: 3rem !important;
}

.swal2-icon.swal2-error {
    border-color: rgba(248, 113, 113, 0.3) !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #f87171 !important;
}

.swal2-icon.swal2-success {
    border-color: rgba(52, 211, 153, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #34d399 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(52, 211, 153, 0.3) !important;
}

.swal2-icon.swal2-info {
    border-color: rgba(102, 126, 234, 0.3) !important;
    color: #667eea !important;
}

/* Buttons */
.swal2-actions {
    margin-top: 1.5rem !important;
    gap: 0.75rem !important;
}

.swal2-styled {
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.625rem !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
}

.swal2-confirm:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-2px) !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 4px 15px rgba(16, 185, 129, 0.3) !important;
}

.swal2-cancel {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #f1f5f9 !important;
    transform: translateY(-2px) !important;
}

.swal2-cancel:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

/* Danger confirm button style */
.swal2-deny,
.swal2-styled.swal2-confirm[style*="#ef4444"],
.swal2-styled.swal2-confirm[style*="#dc2626"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
}

.swal2-deny:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Backdrop */
.swal2-container {
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

/* Animation */
.swal2-popup.swal2-show {
    animation: swalSlideIn 0.3s ease !important;
}

@keyframes swalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

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

/* Close button */
.swal2-close {
    color: #94a3b8 !important;
    transition: all 0.2s ease !important;
}

.swal2-close:hover {
    color: #f87171 !important;
    transform: scale(1.1) !important;
}

/* Timer progress bar */
.swal2-timer-progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
}

/* ==========================================
   Username Prefix Decoration Styles
   ========================================== */

/* Decorated username display in tables */
.prefix-decorated {
    display: inline-flex;
    align-items: center;
    font-family: inherit;
}

.prefix-chars {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: 1px;
    animation: prefixShimmer 3s ease-in-out infinite;
    background-size: 200% auto;
}

@keyframes prefixShimmer {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 200% center;
    }
}

/* ==========================================
   Mobile User Cards - Collapsible Layout
   ========================================== */

/* Hidden by default on desktop */
.mobile-cards-container {
    display: none;
}

@media (max-width: 768px) {

    /* Hide desktop table on mobile */
    .table-container {
        display: none !important;
    }

    /* Hide filter dropdowns on mobile */
    .mobile-filter-hide {
        display: none !important;
    }

    /* Show mobile cards */
    .mobile-cards-container {
        display: block;
        padding: 0.25rem 0;
    }

    .mobile-card-empty {
        text-align: center;
        padding: 3rem 1rem;
        color: var(--text-secondary);
        font-size: 0.9rem;
        font-style: italic;
    }

    .mobile-user-card {
        border: 1px solid var(--border);
        border-radius: 1rem;
        margin-bottom: 0.625rem;
        overflow: hidden;
        background: var(--surface);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-user-card.expanded {
        border-color: rgba(102, 126, 234, 0.3);
        box-shadow: var(--shadow-lg);
    }

    /* Card header - name bar */
    .mobile-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.25s ease;
        position: relative;
    }

    .mobile-card-header.mobile-card-green {
        background: linear-gradient(135deg, rgba(0, 200, 83, 0.55) 0%, rgba(0, 200, 83, 0.3) 100%);
        border-left: 3px solid #00c853;
    }

    .mobile-card-header.mobile-card-red {
        background: linear-gradient(135deg, rgba(255, 23, 68, 0.55) 0%, rgba(255, 23, 68, 0.3) 100%);
        border-left: 3px solid #ff1744;
    }

    .mobile-card-header.mobile-card-blue {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.55) 0%, rgba(33, 150, 243, 0.3) 100%);
        border-left: 3px solid #2196f3;
    }

    .mobile-card-header.mobile-card-yellow {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.6) 0%, rgba(255, 193, 7, 0.35) 100%);
        border-left: 3px solid #ffc107;
    }

    .mobile-card-name {
        font-weight: 600;
        font-size: 0.8125rem;
        color: var(--text-primary);
        flex: 1;
        text-align: center;
        padding: 0 0.5rem;
        letter-spacing: 0.01em;
    }

    .mobile-card-arrow {
        width: 1.5rem;
        height: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.625rem;
        color: var(--text-secondary);
        background: var(--glass-bg);
        border-radius: 50%;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex-shrink: 0;
    }

    .mobile-user-card.expanded .mobile-card-arrow {
        transform: rotate(180deg);
        background: rgba(102, 126, 234, 0.15);
        color: #667eea;
    }

    /* Action buttons row */
    .mobile-card-actions {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.625rem 1rem;
        background: var(--glass-bg);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }

    .mobile-card-actions .btn-action {
        width: 1.75rem;
        height: 1.75rem;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
    }

    .mobile-card-actions .btn-action:active {
        transform: scale(0.92);
    }

    .mobile-card-actions .btn-whatsapp {
        background: #25d366;
        color: #fff;
    }

    .mobile-card-actions .btn-whatsapp:active {
        background: #1da851;
    }

    /* Expandable details */
    .mobile-card-details {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-user-card.expanded .mobile-card-details {
        max-height: 600px;
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.625rem 1.125rem;
        border-bottom: 1px solid var(--border);
        transition: background 0.15s ease;
    }

    .mobile-card-row:nth-child(odd) {
        background: var(--glass-bg);
    }

    .mobile-card-row:last-child {
        border-bottom: none;
    }

    .mobile-card-label {
        font-size: 0.8125rem;
        color: var(--text-secondary);
        font-weight: 500;
        letter-spacing: 0.02em;
    }

    .mobile-card-value {
        font-size: 0.8125rem;
        color: var(--text-primary);
        font-weight: 600;
        text-align: right;
    }
}

/* ===== Notification Page Styles ===== */
.notification-target-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.radio-card {
    flex: 1;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    display: none;
}

.radio-card-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    background: var(--surface);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.25s ease;
}

.radio-card input[type="radio"]:checked+.radio-card-content {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.2);
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.25s ease;
}

.notification-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: var(--shadow);
}

.notification-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.notification-item-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.notification-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notification-item-body {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.notification-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-item-sender {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}