/* ============================================================
   SMM Panel Theme v4 - Dark/Light
   Dark/Light switchable theme
   Font: Manrope (add to HTML head):
   <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap" rel="stylesheet">
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    /* Font & Color Aliases (v4 extraction variables) */
    --font-manrope: Manrope, sans-serif;
    --color-accent: #6366f1;
    --color-cyan: #06b6d4;

    /* Light Design Tokens */
    --bg-root: #f8fafc;
    --bg-body: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f8fafc;
    --bg-elevated: #f1f5f9;
    --border-subtle: rgba(0,0,0,0.06);
    --border-default: rgba(0,0,0,0.10);
    --border-active: rgba(99,102,241,0.5);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --glow-accent: 0 2px 12px rgba(99,102,241,0.15);

    /* Primary (Indigo) - standard light scale */
    --primary: #6366f1;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;
    --primary-950: #1e1b4b;

    /* Default scale - standard light values */
    --default-50: #fafafa;
    --default-100: #f4f4f5;
    --default-200: #e4e4e7;
    --default-300: #d4d4d8;
    --default-400: #a1a1aa;
    --default-500: #71717a;
    --default-600: #52525b;
    --default-700: #3f3f46;
    --default-800: #27272a;
    --default-900: #18181b;
    --default-950: #09090b;

    /* Semantic colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Component backgrounds */
    --footer-bg: #f8fafc;
    --modal-bg: #ffffff;

    /* Glass surfaces (light) */
    --glass-sidebar: rgba(255,255,255,0.95);
    --glass-topbar: rgba(255,255,255,0.85);
    --glass-card: rgba(255,255,255,0.90);
    --glass-input: rgba(248,250,252,0.90);
    --glass-dropdown: #ffffff;
    --shadow-card: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-elevated: 0 10px 30px rgba(0,0,0,0.10);
}

/* Dark mode overrides */
.dark {
    --bg-root: #080b16;
    --bg-body: #0c1024;
    --bg-sidebar: #0e1229;
    --bg-surface: #111631;
    --bg-surface-hover: #161c3d;
    --bg-elevated: #1a2044;
    --border-subtle: rgba(255,255,255,0.06);
    --border-default: rgba(255,255,255,0.1);
    --border-active: rgba(99,102,241,0.4);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --glow-accent: 0 0 20px rgba(99,102,241,0.3);

    --primary: #6366f1;
    --primary-50: #1e1b4b;
    --primary-100: #312e81;
    --primary-200: #3730a3;
    --primary-300: #4338ca;
    --primary-400: #4f46e5;
    --primary-500: #6366f1;
    --primary-600: #818cf8;
    --primary-700: #a5b4fc;
    --primary-800: #c7d2fe;
    --primary-900: #e0e7ff;
    --primary-950: #eef2ff;

    --default-50: #18181b;
    --default-100: #27272a;
    --default-200: #3f3f46;
    --default-300: #52525b;
    --default-400: #71717a;
    --default-500: #a1a1aa;
    --default-600: #d4d4d8;
    --default-700: #e4e4e7;
    --default-800: #f4f4f5;
    --default-900: #fafafa;
    --default-950: #ffffff;

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --footer-bg: #0e1229;
    --modal-bg: #111631;

    /* Glass surfaces (dark) */
    --glass-sidebar: rgba(14,18,41,0.92);
    --glass-topbar: rgba(12,16,36,0.80);
    --glass-card: rgba(17,22,49,0.80);
    --glass-input: rgba(17,22,49,0.60);
    --glass-dropdown: #111631;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.20);
    --shadow-elevated: 0 20px 60px rgba(0,0,0,0.40);
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(99,102,241,0.3) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: rgba(99,102,241,0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99,102,241,0.5);
}
::-webkit-scrollbar-corner {
    background: transparent;
}

/* Dark class scrollbar — same as base */
.dark ::-webkit-scrollbar-track,
.dark::-webkit-scrollbar-track { background: transparent; }
.dark ::-webkit-scrollbar-thumb,
.dark::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); }
.dark ::-webkit-scrollbar-thumb:hover,
.dark::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.5); }
.dark ::-webkit-scrollbar-corner,
.dark::-webkit-scrollbar-corner { background: transparent; }
.dark * { scrollbar-color: rgba(99,102,241,0.3) transparent; }

/* Light mode scrollbar */
html:not(.dark) * { scrollbar-color: rgba(0,0,0,0.12) transparent; }
html:not(.dark) ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
html:not(.dark) ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.main-content {
    min-width: 0;
    overflow-x: hidden;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   UTILITY CLASSES — Backward Compatible
   ============================================================ */

/* Primary */
.bg-primary         { background-color: var(--primary) !important; }
.bg-primary\/5      { background-color: rgba(99,102,241,0.05) !important; }
.bg-primary\/10     { background-color: rgba(99,102,241,0.1) !important; }
.bg-primary\/20     { background-color: rgba(99,102,241,0.2) !important; }
.text-primary       { color: var(--primary) !important; }
.text-primary-500   { color: var(--primary-500) !important; }
.text-primary-600   { color: var(--primary-600) !important; }
.border-primary     { border-color: var(--primary) !important; }
.border-primary\/20           { border-color: rgba(99,102,241,0.2) !important; }
.border-primary-500\/20       { border-color: rgba(99,102,241,0.2) !important; }
.hover\:bg-primary:hover      { background-color: var(--primary) !important; }
.hover\:border-primary:hover  { border-color: var(--primary) !important; }
.hover\:text-primary:hover    { color: var(--primary) !important; }
.hover\:text-primary-500:hover{ color: var(--primary-500) !important; }
.hover\:text-white:hover      { color: #ffffff !important; }
.ring-primary                 { --tw-ring-color: var(--primary) !important; }
.focus\:ring-primary:focus    { --tw-ring-color: var(--primary) !important; }

/* Default scale */
.text-default-50  { color: var(--default-50); }
.text-default-100 { color: var(--default-100); }
.text-default-200 { color: var(--default-200); }
.text-default-300 { color: var(--default-300); }
.text-default-400 { color: var(--default-400); }
.text-default-500 { color: var(--default-500); }
.text-default-600 { color: var(--default-600); }
.text-default-700 { color: var(--default-700); }
.text-default-800 { color: var(--default-800); }
.text-default-900 { color: var(--default-900); }
.text-default-950 { color: var(--default-950); }

.bg-default-50  { background-color: var(--default-50); }
.bg-default-100 { background-color: var(--default-100); }
.bg-default-200 { background-color: var(--default-200); }

.border-default-200 { border-color: var(--default-200); }
.border-default-300 { border-color: var(--default-300); }

/* Semantic */
.bg-success  { background-color: var(--success) !important; }
.bg-warning  { background-color: var(--warning) !important; }
.bg-danger   { background-color: var(--danger) !important; }
.bg-info     { background-color: var(--info) !important; }
.text-success{ color: var(--success) !important; }
.text-warning{ color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info   { color: var(--info) !important; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--glass-sidebar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-subtle);
    z-index: 40;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sidebar-logo img {
    max-height: 36px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 10px;
    overflow-y: auto;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: var(--border-subtle);
    transition: background 0.2s ease;
}

.sidebar-footer .user-info:hover {
    background: rgba(99,102,241,0.1);
}

/* Nav Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(99,102,241,0.1);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-item.active {
    background: rgba(99,102,241,0.15);
    color: #818cf8;
    border-left-color: #6366f1;
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.75;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}

/* Nav Group Title */
.nav-group-title {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 24px 14px 8px;
    display: block;
}

/* Collapsible nav sections */
.nav-collapse-wrap {
    overflow: hidden;
}

.nav-collapse-wrap .nav-item {
    padding-left: 38px;
    font-size: 0.8125rem;
}

.hs-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.hs-collapse.open {
    max-height: 600px;
}

/* Collapse toggle button */
.nav-collapse-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    cursor: pointer;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
}

.nav-collapse-toggle:hover {
    background: rgba(99,102,241,0.1);
    color: var(--text-primary);
}

.nav-collapse-toggle .toggle-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.nav-collapse-toggle.active .toggle-arrow {
    transform: rotate(90deg);
}

/* Mobile overlay */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8,11,22,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 35;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

/* Recharge Card */
.recharge-card {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.recharge-card:hover {
    box-shadow: 0 10px 30px rgba(99,102,241,0.15);
    transform: translateY(-2px);
    border-color: rgba(99,102,241,0.2);
}

.recharge-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.recharge-card-body {
    padding: 20px;
}

/* Step Card */
.step-card {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
}

.step-card:hover {
    border-color: rgba(99,102,241,0.3);
    box-shadow: var(--glow-accent);
}

/* Info Card */
.info-card {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
}

/* Summary Card */
.summary-card {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
}

/* Soft Card V3 */
.soft-card-v3 {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.soft-card-v3:hover {
    box-shadow: 0 12px 40px rgba(99,102,241,0.15);
    transform: translateY(-2px);
    border-color: rgba(99,102,241,0.2);
}

.soft-card-v3 ::-webkit-scrollbar            { width: 6px; height: 6px; }
.soft-card-v3 ::-webkit-scrollbar-track      { background: transparent; border-radius: 3px; }
.soft-card-v3 ::-webkit-scrollbar-thumb      { background: rgba(99,102,241,0.3); border-radius: 3px; }
.soft-card-v3 ::-webkit-scrollbar-thumb:hover{ background: rgba(99,102,241,0.5); }
.dark .soft-card-v3 ::-webkit-scrollbar-track      { background: transparent; }
.dark .soft-card-v3 ::-webkit-scrollbar-thumb      { background: rgba(99,102,241,0.3); }
.dark .soft-card-v3 ::-webkit-scrollbar-thumb:hover{ background: rgba(99,102,241,0.5); }

/* Welcome Banner V3 */
.welcome-banner-v3 {
    background: var(--accent-gradient);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(99,102,241,0.3), 0 10px 20px rgba(99,102,241,0.2);
    position: relative;
    overflow: hidden;
}

.welcome-banner-v3::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.welcome-banner-v3::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-20px) rotate(5deg); }
}

/* Stat Card V3 */
.stat-card-v3 {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
}

.stat-card-v3::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 20px 0 80px;
    opacity: 0.15;
}

.stat-card-v3.green::before  { background: linear-gradient(135deg,#22c55e,#16a34a); }
.stat-card-v3.blue::before   { background: linear-gradient(135deg,#6366f1,#06b6d4); }
.stat-card-v3.orange::before { background: linear-gradient(135deg,#f97316,#ea580c); }

.stat-card-v3:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-elevated);
    border-color: rgba(99,102,241,0.2);
}

.stat-icon-v3 {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card-v3:hover .stat-icon-v3 {
    transform: rotate(-8deg) scale(1.1);
}

/* Category Card V3 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.category-card-v3 {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.category-card-v3:hover {
    transform: translateY(-6px);
    border-color: rgba(99,102,241,0.4);
    box-shadow: var(--glow-accent);
}

.category-card-v3:hover .category-icon-v3 {
    transform: scale(1.15) rotate(8deg);
}

.category-icon-v3 {
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================================
   MODALS
   ============================================================ */

/* Bootstrap Modal */
.modal-content {
    border-radius: 16px;
    border: 1px solid var(--border-default);
    background: var(--glass-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
}

.modal-header  { border-color: var(--border-subtle); }
.modal-footer  { border-color: var(--border-subtle); }
.dark .btn-close { filter: invert(1); }

.modal-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
}

/* z-index layers */
.modal-backdrop   { z-index: 1040 !important; }
.modal            { z-index: 1050 !important; }
.swal2-container  { z-index: 2000 !important; }

/* Modal Service Card */
.modal-service-card {
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.modal-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99,102,241,0.2);
}

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

.service-icon-modal {
    transition: transform 0.3s ease;
}

/* Modal Category V3 */
.modal-category-v3 {
    background: var(--glass-card);
    border: 1px solid var(--border-default);
    border-radius: 16px;
}

.modal-service-item {
    background: var(--glass-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.modal-service-item:hover {
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.08);
}

.modal-category-v3 .overflow-y-auto::-webkit-scrollbar            { width: 6px; }
.modal-category-v3 .overflow-y-auto::-webkit-scrollbar-track      { background: transparent; border-radius: 3px; }
.modal-category-v3 .overflow-y-auto::-webkit-scrollbar-thumb      { background: rgba(99,102,241,0.3); border-radius: 3px; }
.modal-category-v3 .overflow-y-auto::-webkit-scrollbar-thumb:hover{ background: rgba(99,102,241,0.5); }
.dark .modal-category-v3 .overflow-y-auto::-webkit-scrollbar-track      { background: transparent; }
.dark .modal-category-v3 .overflow-y-auto::-webkit-scrollbar-thumb      { background: rgba(99,102,241,0.3); }
.dark .modal-category-v3 .overflow-y-auto::-webkit-scrollbar-thumb:hover{ background: rgba(99,102,241,0.5); }

/* Modal Notification V3 */
.modal-notification-v3 {
    background: var(--glass-card);
    border: 1px solid var(--border-default);
    border-radius: 16px;
}

.modal-notification-v3 .overflow-y-auto::-webkit-scrollbar            { width: 6px; }
.modal-notification-v3 .overflow-y-auto::-webkit-scrollbar-track      { background: transparent; border-radius: 3px; }
.modal-notification-v3 .overflow-y-auto::-webkit-scrollbar-thumb      { background: rgba(99,102,241,0.3); border-radius: 3px; }
.modal-notification-v3 .overflow-y-auto::-webkit-scrollbar-thumb:hover{ background: rgba(99,102,241,0.5); }
.dark .modal-notification-v3 .overflow-y-auto::-webkit-scrollbar-track      { background: transparent; }
.dark .modal-notification-v3 .overflow-y-auto::-webkit-scrollbar-thumb      { background: rgba(99,102,241,0.3); }
.dark .modal-notification-v3 .overflow-y-auto::-webkit-scrollbar-thumb:hover{ background: rgba(99,102,241,0.5); }

/* ============================================================
   NOTICE CARD
   ============================================================ */
.notice-card {
    background: rgba(113,63,18,0.1);
    border: 1px solid rgba(161,98,7,0.3);
    border-radius: 12px;
    padding: 1.25rem;
    height: fit-content;
}

.dark .notice-card {
    background: rgba(113,63,18,0.15);
    border-color: rgba(161,98,7,0.3);
}

.notice-card-title {
    font-weight: 600;
    color: #854d0e;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .notice-card-title { color: #fef08a; }

.notice-card-content {
    font-size: 0.875rem;
    color: #a16207;
}

.dark .notice-card-content { color: #fde68a; }

.notice-card-content * {
    color: inherit !important;
    background: transparent !important;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-input,
.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    background: var(--glass-input);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-input::placeholder,
.form-control::placeholder,
.form-select::placeholder {
    color: #64748b;
}

/* Input Group */
.input-group { display: flex; }

.input-group .input-group-text {
    padding: 0.5rem 1rem;
    background: var(--glass-card);
    border: 1px solid var(--border-default);
    border-right: none;
    border-radius: 12px 0 0 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.input-group .form-control,
.input-group .form-select {
    border-radius: 0 12px 12px 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-main {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    transition: all 0.2s ease;
}

.btn-main:hover {
    box-shadow: var(--glow-accent);
    transform: translateY(-1px);
}

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

/* ============================================================
   BADGE
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

/* ============================================================
   ALERT
   ============================================================ */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.alert-primary {
    background-color: rgba(99,102,241,0.15);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.3);
}

/* ============================================================
   SERVER OPTION
   ============================================================ */
.server-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--glass-input);
}

.server-option:hover {
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.08);
}

.server-option:has(:checked) {
    border-color: rgba(99,102,241,0.5);
    background: rgba(99,102,241,0.1);
}

.dark .server-option:hover,
.dark .server-option:has(:checked) {
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.1);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--glass-input);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99,102,241,0.3);
}

/* ============================================================
   DATA TABLE
   ============================================================ */
[x-cloak] { display: none !important; }

.dataTable-wrapper .dataTable-container { overflow-x: auto; }
.dataTable-wrapper .dataTable-table { width: 100%; border-collapse: collapse; }

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

.dataTable-wrapper .dataTable-table th {
    background: var(--default-50);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--default-500);
}

.dataTable-wrapper .dataTable-table tbody tr:hover {
    background: rgba(99,102,241,0.05);
}

.dataTable-pagination            { display: flex; gap: 0.25rem; justify-content: center; padding: 1rem; }
.dataTable-pagination li         { list-style: none; }

.dataTable-pagination a,
.dataTable-pagination button {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-default);
    background: var(--glass-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dataTable-pagination a:hover,
.dataTable-pagination button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.dataTable-pagination .active a {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.dataTable-search input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--glass-input);
    color: var(--text-primary);
}

.dataTable-search input:focus {
    outline: none;
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.dataTable-selector {
    padding: 0.5rem;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--glass-input);
    color: var(--text-primary);
}

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

.dataTable-top,
.dataTable-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
}

.dataTable-container {
    overflow: auto;
    max-height: 70vh;
    -webkit-overflow-scrolling: touch;
}

.dataTable-wrapper {
    width: 100%;
    overflow: hidden;
}

.dataTable-table {
    width: 100%;
    min-width: 600px;
    table-layout: auto;
}

.dataTable-table th,
.dataTable-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.dataTable-table td.wrap-text {
    white-space: normal;
    word-break: break-word;
}

.dataTable-container,
.dataTable-top {
    margin-bottom: 1.25rem;
}

.dataTable-bottom,
.dataTable-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.dataTable-pagination { margin-left: auto; }

.dataTable-pagination ul {
    display: flex;
    align-items: center;
}

.dataTable-pagination a {
    display: grid;
    height: 2.25rem;
    width: 2.25rem;
    place-content: center;
    border-radius: 9999px;
    background-color: var(--glass-card);
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.dataTable-pagination a:hover {
    background-color: var(--primary) !important;
    color: white !important;
}

.dataTable-pagination .active a {
    cursor: default;
    background-color: var(--primary);
    color: white;
}

.dataTable-sorter {
    position: relative;
    display: inline-block;
    height: 100%;
    width: max-content;
    padding-right: 1.75rem;
}

.dataTable-sorter:after,
.dataTable-sorter:before {
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    right: 0.25rem;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    opacity: 0.4;
}

.dataTable-sorter:before { border-top: 5px solid var(--text-primary); bottom: 4px; }
.dataTable-sorter:after  { border-bottom: 5px solid var(--text-primary); border-top: 5px solid transparent; top: -2px; }

.asc  .dataTable-sorter:after  { border-bottom-color: var(--primary); opacity: 1; }
.desc .dataTable-sorter:before { border-top-color: var(--primary); opacity: 1; }

.ltr .dataTable-search { margin-left: auto; }
.rtl .dataTable-search { margin-right: auto; }

.dataTable-dropdown .dataTable-selector,
.dataTable-search .dataTable-input {
    width: auto;
    background-color: var(--glass-input);
    color: var(--text-secondary);
    border-color: var(--border-default);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    border-width: 1px;
    outline: none !important;
}

.dataTable-dropdown .dataTable-selector:focus,
.dataTable-search .dataTable-input:focus {
    border-color: rgba(99,102,241,0.5);
}

.dataTable-search .dataTable-input { box-shadow: none !important; }

.dataTable-dropdown .dataTable-selector {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    padding-left: 0.5rem;
    padding-right: 1rem;
}

.dataTable-dropdown label { margin-bottom: 0; }

/* ============================================================
   TABLE STYLES
   ============================================================ */
.table-responsive { overflow: auto; }

table {
    width: 100%;
    border-collapse: collapse !important;
}

table.dataTable-table tfoot tr th,
table.dataTable-table thead tr th {
    font-weight: 700;
}

table.table-bordered tbody tr td,
table.table-bordered thead tr th {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: var(--border-subtle) !important;
}

table.table-compact tbody tr td,
table.table-compact thead tr th {
    padding: 0.5rem 0.75rem !important;
}

.sticky-header table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.sticky-header .dataTable-container { height: 500px; }

.sticky-column table tbody tr td:first-child,
.sticky-column table thead tr th:first-child {
    position: sticky;
    z-index: 8;
    background-color: var(--bg-surface);
    left: 0;
}

.sticky-column table tbody tr td:nth-child(2),
.sticky-column table thead tr th:nth-child(2) {
    position: sticky;
    z-index: 8;
    background-color: var(--bg-surface);
    left: 58px;
}

.sticky-header.sticky-column table thead tr th:first-child,
.sticky-header.sticky-column table thead tr th:nth-child(2) {
    top: 0;
}

table tfoot tr,
table thead tr {
    border-bottom-width: 0;
    background-color: var(--glass-card) !important;
}

table tbody tr td,
table tfoot tr th,
table thead tr th {
    padding: 0.75rem 1rem;
    text-align: left;
}

table tfoot tr th,
table thead tr th { font-weight: 600; }

table tbody tr {
    border-bottom-width: 1px;
    border-color: var(--border-subtle) !important;
}

table.table-hover tbody tr:hover {
    background-color: rgba(99,102,241,0.05) !important;
}

:is(.dark table.table-hover tbody tr:hover) {
    background-color: rgba(99,102,241,0.05) !important;
}

table.table-striped tbody tr:nth-child(odd) {
    background-color: transparent !important;
}

table.dataTable-table tbody tr td,
table.dataTable-table tbody tr th {
    border-bottom-width: 1px;
    border-color: var(--border-subtle);
    padding: 0.75rem 1rem;
    text-align: left;
}

table.dataTable-table tbody tr:last-child td { border-bottom-width: 0; }

th { text-align: inherit; text-align: -webkit-match-parent; }

tbody, td, tfoot, th, thead, tr {
    border: 0 solid;
    border-color: inherit;
}

/* Pagination variants */
.no-number-pagination ul.dataTable-pagination-list li         { display: none; }
.no-number-pagination ul.dataTable-pagination-list li.pager   { display: block !important; }

.next-prev-pagination .dataTable-pagination a {
    width: max-content;
    border-radius: 0.375rem;
    border-width: 1px;
    padding: 0.5rem 1.25rem;
}

.next-prev-pagination .dataTable-pagination a,
:is(.dark .next-prev-pagination .dataTable-pagination a) {
    border-color: var(--primary);
    background-color: transparent;
    color: var(--primary);
}

.next-prev-pagination .dataTable-bottom {
    flex-direction: column;
    justify-content: center;
}

.next-prev-pagination .dataTable-pagination { margin-left: 0; }

.invoice-table .dataTable-wrapper .dataTable-bottom,
.invoice-table .dataTable-wrapper .dataTable-top {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ============================================================
   SWEETALERT2
   ============================================================ */
.swal2-popup {
    flex-direction: column;
    justify-content: center;
    padding: 20px !important;
    box-sizing: border-box;
    background: var(--glass-card) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: 16px !important;
}

.dark .swal2-popup .swal2-title { color: var(--text-secondary); }

.swal2-popup .swal2-title {
    display: block;
    margin: 0 !important;
    width: 100%;
    color: #818cf8;
    font-size: 1em !important;
}

.swal2-popup .swal2-styled {
    box-shadow: var(--shadow-card) !important;
    letter-spacing: 1px;
    font-size: 14px !important;
    line-height: 20px !important;
    transition: all 0.3s ease-out;
    -webkit-transition: all 0.3s ease-out;
    margin: 0 5px;
    padding: 8px 20px;
    border-radius: 10px;
}

.swal2-popup .swal2-styled.swal2-cancel {
    background-color: var(--border-default) !important;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    box-shadow: none;
    padding: 7px 20px;
}

.dark .swal2-popup .swal2-styled.swal2-cancel {
    background-color: rgba(99,102,241,0.15) !important;
    color: #818cf8;
    border-color: rgba(99,102,241,0.3);
}

.swal2-popup .swal2-styled.swal2-confirm { background: var(--accent-gradient); }
.swal2-popup .swal2-styled.swal2-confirm:focus { box-shadow: none !important; }

.swal2-popup .swal2-html-container { color: var(--text-secondary); font-weight: 600; }

.swal2-popup .swal2-close {
    position: absolute;
    top: 16px;
    transition: color 0.1s ease-out;
    font-family: serif;
    color: var(--text-muted);
}

:is([dir="ltr"] .swal2-popup .swal2-close) { right: 1rem; }
:is([dir="rtl"] .swal2-popup .swal2-close) { left: 1rem; }
.dark .swal2-popup .swal2-close { color: var(--text-muted); }

.swal2-popup.swal2-toast {
    flex-direction: row;
    align-items: center;
    width: auto !important;
    box-shadow: var(--shadow-card);
    padding: 2em;
    overflow-y: hidden;
    display: flex !important;
}

.swal2-popup.swal2-toast.swal2-show { animation: showSweetToast 0.5s; }
.swal2-popup pre { color: #06b6d4; }

.swal2-icon {
    position: relative;
    box-sizing: initial;
    justify-content: center;
    width: 5em;
    height: 5em;
    margin: 1.25em auto 1.875em;
    border-radius: 50%;
    border: 0.25em solid #000;
    font-family: inherit;
    line-height: 5em;
    cursor: default;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.swal2-icon:not(.swal2-error):not(.swal2-success) {
    width: 2em !important;
    line-height: 119px !important;
    height: 2em !important;
    margin: 0.25em auto 0.875em !important;
}

.swal2-icon.swal2-error {
    border: 5px solid var(--border-default) !important;
    box-shadow: 0 3px 25px 0 rgba(99,102,241,0.2);
}

.swal2-icon.swal2-warning { color: #f59e0b !important; }

.swal2-icon.swal2-info,
.swal2-icon.swal2-warning {
    border: 5px solid var(--border-default) !important;
    box-shadow: 0 3px 25px 0 rgba(99,102,241,0.2);
    font-size: 60px;
    line-height: 80px;
    text-align: center;
}

.swal2-icon.swal2-info { color: #06b6d4 !important; }

.swal2-icon.swal2-question {
    color: #818cf8 !important;
    border-style: solid;
    border-width: 4px !important;
    border-color: transparent !important;
    box-shadow: 0 3px 25px 0 rgba(99,102,241,0.2);
    font-size: 60px;
    line-height: 80px;
    text-align: center;
}

.swal2-icon.swal2-success .swal2-success-fix {
    position: absolute;
    top: 0.5em;
    left: 1.625em;
    width: 0.4375em;
    height: 5.625em;
    transform: rotate(-45deg);
    z-index: 1;
}

.swal2-icon.swal2-success .swal2-success-ring {
    position: absolute;
    top: -0.25em;
    left: -0.25em;
    width: 100%;
    height: 100%;
    border: 0.25em solid rgba(34,197,94,0.3);
    border-radius: 50%;
    z-index: 2;
    box-sizing: initial;
}

.swal2-icon.swal2-success [class^="swal2-success-circular-line"][class$="right"] {
    top: -0.6875em;
    left: 1.875em;
    transform: rotate(-45deg);
    transform-origin: 0 3.75em;
    border-radius: 0 7.5em 7.5em 0;
}

.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
    background: #6366f1 !important;
}

.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step {
    background: var(--border-default) !important;
}

.dark .swal2-progress-steps .swal2-progress-step { color: var(--text-primary); }
.swal2-icon-content { font-size: 5.75rem !important; }
.swal2-show { animation: swal2-show 0.3s; }
.swal2-modal.background-modal .swal2-title { color: #ffffff !important; }

.dark .swal2-input {
    background-color: var(--bg-surface);
    border-color: var(--border-default);
    color: var(--text-primary);
}

.dark .swal2-footer { border-color: var(--border-subtle); }
.swal2-image { margin-bottom: 32px !important; }

.sweet-alerts.swal2-popup .swal2-html-container {
    margin-top: 1rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.swal2-container .swal2-close       { color: var(--text-secondary); }
.swal2-container .swal2-close:hover { color: var(--text-primary); }
.swal2-container .swal2-close:focus { box-shadow: none; }

/* Toast */
.swal2-container .swal2-popup.swal2-toast {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border-left: 4px solid transparent;
    background: var(--glass-card);
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon {
    width: 2em !important;
    height: 2em !important;
    margin: 0 0.75em 0 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { font-size: 1.5rem !important; }

.swal2-container .swal2-popup.swal2-toast .swal2-html-container,
.swal2-popup.swal2-toast .swal2-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}

/* Toast color-success */
.swal2-container .swal2-popup.swal2-toast.color-success {
    background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(34,197,94,0.08) 100%);
    border-left-color: #22c55e;
}
.swal2-container .swal2-popup.swal2-toast.color-success .swal2-title,
.swal2-container .swal2-popup.swal2-toast.color-success .swal2-html-container { color: #86efac !important; }
.swal2-container .swal2-popup.swal2-toast.color-success .swal2-icon.swal2-success { border-color: #22c55e !important; color: #22c55e !important; }
.swal2-container .swal2-popup.swal2-toast.color-success .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(34,197,94,0.3) !important; }
.swal2-container .swal2-popup.swal2-toast.color-success .swal2-icon.swal2-success [class^=swal2-success-line] { background-color: #22c55e !important; }

/* Toast color-error / color-danger */
.swal2-container .swal2-popup.swal2-toast.color-error,
.swal2-container .swal2-popup.swal2-toast.color-danger {
    background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(239,68,68,0.08) 100%);
    border-left-color: #ef4444;
}
.swal2-container .swal2-popup.swal2-toast.color-error .swal2-title,
.swal2-container .swal2-popup.swal2-toast.color-error .swal2-html-container,
.swal2-container .swal2-popup.swal2-toast.color-danger .swal2-title,
.swal2-container .swal2-popup.swal2-toast.color-danger .swal2-html-container { color: #fca5a5 !important; }
.swal2-container .swal2-popup.swal2-toast.color-error .swal2-icon.swal2-error,
.swal2-container .swal2-popup.swal2-toast.color-danger .swal2-icon.swal2-error { border-color: #ef4444 !important; color: #ef4444 !important; }
.swal2-container .swal2-popup.swal2-toast.color-error .swal2-icon.swal2-error [class^=swal2-x-mark-line],
.swal2-container .swal2-popup.swal2-toast.color-danger .swal2-icon.swal2-error [class^=swal2-x-mark-line] { background-color: #ef4444 !important; }

/* Toast color-warning */
.swal2-container .swal2-popup.swal2-toast.color-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.08) 100%);
    border-left-color: #f59e0b;
}
.swal2-container .swal2-popup.swal2-toast.color-warning .swal2-title,
.swal2-container .swal2-popup.swal2-toast.color-warning .swal2-html-container { color: #fcd34d !important; }
.swal2-container .swal2-popup.swal2-toast.color-warning .swal2-icon.swal2-warning { border-color: #f59e0b !important; color: #f59e0b !important; }

/* Toast color-info */
.swal2-container .swal2-popup.swal2-toast.color-info {
    background: linear-gradient(135deg, rgba(6,182,212,0.15) 0%, rgba(6,182,212,0.08) 100%);
    border-left-color: #06b6d4;
}
.swal2-container .swal2-popup.swal2-toast.color-info .swal2-title,
.swal2-container .swal2-popup.swal2-toast.color-info .swal2-html-container { color: #67e8f9 !important; }
.swal2-container .swal2-popup.swal2-toast.color-info .swal2-icon.swal2-info { border-color: #06b6d4 !important; color: #06b6d4 !important; }

/* Toast color-primary */
.swal2-container .swal2-popup.swal2-toast.color-primary {
    background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0.08) 100%);
    border-left-color: #6366f1;
}
.swal2-container .swal2-popup.swal2-toast.color-primary .swal2-title,
.swal2-container .swal2-popup.swal2-toast.color-primary .swal2-html-container { color: #a5b4fc !important; }

/* Toast color-secondary */
.swal2-container .swal2-popup.swal2-toast.color-secondary {
    background: linear-gradient(135deg, rgba(139,92,246,0.15) 0%, rgba(139,92,246,0.08) 100%);
    border-left-color: #8b5cf6;
}
.swal2-container .swal2-popup.swal2-toast.color-secondary .swal2-title,
.swal2-container .swal2-popup.swal2-toast.color-secondary .swal2-html-container { color: #c4b5fd !important; }

/* Dark toast mirror — same since always dark */
.dark .swal2-container .swal2-popup.swal2-toast { background: rgba(17,22,49,0.97); }
.dark .swal2-container .swal2-popup.swal2-toast.color-success { background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(34,197,94,0.08) 100%); }
.dark .swal2-container .swal2-popup.swal2-toast.color-success .swal2-title,
.dark .swal2-container .swal2-popup.swal2-toast.color-success .swal2-html-container { color: #86efac !important; }
.dark .swal2-container .swal2-popup.swal2-toast.color-error,
.dark .swal2-container .swal2-popup.swal2-toast.color-danger { background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(239,68,68,0.08) 100%); }
.dark .swal2-container .swal2-popup.swal2-toast.color-error .swal2-title,
.dark .swal2-container .swal2-popup.swal2-toast.color-error .swal2-html-container,
.dark .swal2-container .swal2-popup.swal2-toast.color-danger .swal2-title,
.dark .swal2-container .swal2-popup.swal2-toast.color-danger .swal2-html-container { color: #fca5a5 !important; }
.dark .swal2-container .swal2-popup.swal2-toast.color-warning { background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.08) 100%); }
.dark .swal2-container .swal2-popup.swal2-toast.color-warning .swal2-title,
.dark .swal2-container .swal2-popup.swal2-toast.color-warning .swal2-html-container { color: #fcd34d !important; }
.dark .swal2-container .swal2-popup.swal2-toast.color-info { background: linear-gradient(135deg, rgba(6,182,212,0.15) 0%, rgba(6,182,212,0.08) 100%); }
.dark .swal2-container .swal2-popup.swal2-toast.color-info .swal2-title,
.dark .swal2-container .swal2-popup.swal2-toast.color-info .swal2-html-container { color: #67e8f9 !important; }

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 99999;
    left: 0;
    top: 0;
    background-color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.dark #preloader { background-color: var(--bg-body); }

.loader {
    height: 20px;
    width: 250px;
    position: relative;
}

.loader--dot {
    animation-name: loader;
    animation-timing-function: ease-in-out;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    height: 20px;
    width: 20px;
    border-radius: 100%;
    background-color: var(--accent);
    position: absolute;
    border: 2px solid var(--border-default);
}

.loader--dot:first-child { background-color: #6366f1; animation-delay: 0.5s; }
.loader--dot:nth-child(2){ background-color: #7c3aed; animation-delay: 0.4s; }
.loader--dot:nth-child(3){ background-color: #0891b2; animation-delay: 0.3s; }
.loader--dot:nth-child(4){ background-color: #06b6d4; animation-delay: 0.2s; }
.loader--dot:nth-child(5){ background-color: #818cf8; animation-delay: 0.1s; }
.loader--dot:nth-child(6){ background-color: #a5b4fc; animation-delay: 0s;   }

.loader--text {
    position: absolute;
    top: 200%;
    left: 0;
    right: 0;
    width: 4rem;
    margin: auto;
}

.loader:after {
    content: "Loading";
    font-weight: bold;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    color: var(--accent);
    animation-name: loading-text;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

@keyframes loader {
    15% { transform: translateX(0); }
    45% { transform: translateX(230px); }
    65% { transform: translateX(230px); }
    95% { transform: translateX(0); }
}

@keyframes loading-text {
    0%  { content: "Loading";    }
    25% { content: "Loading.";   }
    50% { content: "Loading..";  }
    75% { content: "Loading..."; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
    }

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

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

    .dataTable-container {
        max-height: 60vh;
    }

    .dataTable-table th,
    .dataTable-table td {
        padding: 0.5rem 0.5rem !important;
        font-size: 0.75rem;
        max-width: 150px;
    }

    .dataTable-top,
    .dataTable-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dataTable-search { width: 100%; }
    .dataTable-search .dataTable-input { width: 100%; }
}

@media (max-width: 480px) {
    .dataTable-table th,
    .dataTable-table td {
        padding: 0.4rem 0.3rem !important;
        font-size: 0.7rem;
        max-width: 100px;
    }

    .dataTable-pagination a {
        height: 1.75rem;
        width: 1.75rem;
        font-size: 0.7rem;
    }
}

@media screen and (max-width: 767px) {
    .dataTable-bottom { flex-direction: column; }
    .ltr .dataTable-pagination { margin-left: 0; }
    .rtl .dataTable-pagination { margin-right: 0; }
}
