/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0F172A;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Glassmorphism */
.glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Shadow Glow */
.shadow-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Scan Animation for QR */
.scan-line {
    width: 100%;
    height: 2px;
    background: #10B981;
    position: absolute;
    animation: scan 2s linear infinite;
    box-shadow: 0 0 4px #10B981;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid #6366F1;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Checkbox */
.custom-checkbox:checked {
    background-color: #6366F1;
    border-color: #6366F1;
}

/* Tables */
.contacts-table {
    border-collapse: collapse;
    width: 100%;
}

.contacts-table th,
.contacts-table td {
    padding: 12px 16px;
    text-align: left;
}

.contacts-table th {
    background: rgba(15, 23, 42, 0.8);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
    font-weight: 600;
}

.contacts-table tr {
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.contacts-table tr:hover {
    background: rgba(51, 65, 85, 0.3);
}

/* Log Colors */
.log-success { color: #10B981; }
.log-error { color: #EF4444; }
.log-warn { color: #F59E0B; }
.log-info { color: #6366F1; }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
    background: #475569;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.5);
}

.btn-secondary {
    background: #1E293B;
    color: #CBD5E1;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #334155;
    color: white;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #EF4444;
    color: white;
}

/* Form Inputs */
.input-field {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 14px;
    color: white;
    font-size: 14px;
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-field::placeholder {
    color: #64748B;
}

/* File Upload */
.file-upload {
    border: 2px dashed #334155;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload:hover {
    border-color: #6366F1;
    background: rgba(99, 102, 241, 0.05);
}

.file-upload.dragover {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

/* KPI Cards */
.kpi-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.kpi-card:hover {
    background: rgba(51, 65, 85, 0.4);
    transform: translateY(-2px);
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s;
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.1);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Phone Preview */
.phone-frame {
    width: 280px;
    height: 560px;
    background: #0F172A;
    border-radius: 36px;
    border: 6px solid #1E293B;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: #1E293B;
    border-radius: 0 0 12px 12px;
    z-index: 20;
}

.phone-header {
    background: #075E54;
    height: 72px;
    display: flex;
    align-items: flex-end;
    padding: 12px 16px;
    flex-shrink: 0;
}

.phone-body {
    background: #0d1418;
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-bubble {
    align-self: flex-end;
    background: #005c4b;
    padding: 8px 12px;
    border-radius: 8px;
    border-top-right-radius: 0;
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Wizard Steps */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-dot {
    height: 8px;
    border-radius: 9999px;
    transition: all 0.3s;
}

.step-dot.active {
    width: 32px;
    background: #6366F1;
}

.step-dot.inactive {
    width: 8px;
    background: #334155;
}

.step-dot.completed {
    width: 8px;
    background: #6366F1;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-slide-in-up {
    animation: slideInUp 0.4s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-hidden {
        transform: translateX(-100%);
    }
}

/* ==========================================
   LIGHT MODE THEME
   ========================================== */

.light-mode {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
}

.light-mode body {
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 50%, #e0f2fe 100%);
}

.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(99, 102, 241, 0.15);
}

.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.1);
}

.light-mode .nav-item {
    color: #475569;
}

.light-mode .nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.light-mode .nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.light-mode .text-white {
    color: #1e293b !important;
}

.light-mode .text-slate-300,
.light-mode .text-slate-400 {
    color: #64748b !important;
}

.light-mode .text-slate-500 {
    color: #94a3b8 !important;
}

.light-mode .input-field {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(99, 102, 241, 0.2);
    color: #1e293b;
}

.light-mode .input-field::placeholder {
    color: #94a3b8;
}

.light-mode .btn-secondary {
    background: rgba(241, 245, 249, 0.9);
    color: #1e293b;
    border-color: rgba(99, 102, 241, 0.2);
}

.light-mode .btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.light-mode table th {
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
}

.light-mode table td {
    border-color: rgba(99, 102, 241, 0.1);
    color: #1e293b;
}

.light-mode .contacts-table tr {
    border-color: rgba(99, 102, 241, 0.1);
}

.light-mode .contacts-table tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.light-mode .log-container,
.light-mode #log-container {
    background: rgba(241, 245, 249, 0.9);
}

.light-mode .modal-content,
.light-mode #modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(99, 102, 241, 0.2);
}

.light-mode #modal-content .text-white {
    color: #1e293b !important;
}

.light-mode ::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.light-mode ::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.light-mode .border-slate-800 {
    border-color: rgba(99, 102, 241, 0.1) !important;
}

.light-mode .bg-slate-900\/50,
.light-mode .bg-slate-800\/30 {
    background: rgba(241, 245, 249, 0.9) !important;
}

/* Campaign Spinner Paused State */
.spinner.paused {
    animation-play-state: paused;
    border-top-color: #f59e0b;
}

/* Line Clamp Utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Text Colors */
.text-primary { color: #6366f1; }
.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }

/* Background Colors */
.bg-primary { background-color: #6366f1; }
.bg-success { background-color: #10b981; }
.bg-warning { background-color: #f59e0b; }
/* Circular Progress Dashboard */
.progress-ring {
    transform: rotate(-90deg);
    transition: transform 0.3s ease;
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-linecap: round;
}

.list-card {
    position: relative;
    overflow: hidden;
}

.list-card-icon-bg {
    position: absolute;
    right: -15px;
    bottom: -15px;
    font-size: 84px;
    opacity: 0.03;
    transform: rotate(-15deg);
    pointer-events: none;
}

.circular-progress-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-progress-text {
    position: absolute;
    font-size: 14px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
}

/* Animations */
@keyframes dash {
    from { stroke-dashoffset: 251; }
}

.animate-dash {
    animation: dash 1s ease-out forwards;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #F1F5F9;
}