/* ============================================
   WAFLOW.ONLINE - ULTRA MODERN UI
   Dark Theme with WhatsApp Green Accents
   NO BLUE COLORS - Pure Green/Teal/Dark
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    /* Primary Brand - WhatsApp Green Spectrum */
    --primary-50: #e8f8f0;
    --primary-100: #c3edd8;
    --primary-200: #9be2bf;
    --primary-300: #6dd6a6;
    --primary-400: #4bcd93;
    --primary-500: #25D366;
    /* Main WhatsApp Green */
    --primary-600: #20c65e;
    --primary-700: #1ab653;
    --primary-800: #14a849;
    --primary-900: #0a8f37;

    /* Teal Accent */
    --teal-50: #e0f2f1;
    --teal-500: #128C7E;
    /* WhatsApp Teal */
    --teal-700: #075E54;
    /* Dark Teal */
    --teal-900: #004d40;

    /* Dark Mode Backgrounds */
    --bg-1: #0a0e1a;
    /* Darkest */
    --bg-2: #111827;
    /* Dark */
    --bg-3: #1f2937;
    /* Mid Dark */
    --bg-4: #374151;
    /* Light Dark */
    --bg-card: #1a1f2e;
    --bg-elevated: #212736;

    /* Light Mode (for cards/modals) */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status Colors (NO BLUE!) */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #8b5cf6;
    /* Purple instead of blue */

    /* Shadows & Glows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.8);
    --glow-green: 0 0 20px rgba(37, 211, 102, 0.4);
    --glow-teal: 0 0 30px rgba(18, 140, 126, 0.5);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;
}

/* ============================================
   BASE STYLES
   ============================================ */

html {
    font-size: 16px;
    scroll-behavior: smooth
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
    color: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(18, 140, 126, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 211, 102, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0
}

/* ============================================
   AUTHENTICATION PAGE (LOGIN)
   ============================================ */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-6);
    position: relative;
    z-index: 1
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2
}

.auth-box {
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-12);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    position: relative;
    overflow: hidden
}

.auth-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(37, 211, 102, 0.1), transparent);
    animation: rotate 10s linear infinite;
    pointer-events: none
}

@keyframes rotate {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
    position: relative;
    z-index: 1
}

.auth-header .logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4)
}

.auth-header .logo h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-400), var(--teal-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em
}

.auth-header p {
    color: var(--gray-400);
    font-size: 0.9375rem
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-6);
    position: relative
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4)
}

.form-group.half {
    /* For grid layouts */
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-300);
    letter-spacing: 0.02em
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-elevated);
    border: 2px solid var(--gray-700);
    border-radius: var(--radius-md);
    color: var(--gray-100);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none
}

.form-group input:hover {
    border-color: var(--gray-600);
    background: var(--bg-4)
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-500);
    background: var(--bg-3);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1), var(--glow-green)
}

.form-group small {
    display: block;
    margin-top: var(--space-2);
    color: var(--gray-500);
    font-size: 0.8125rem
}

textarea {
    min-height: 120px;
    max-height: 300px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s
}

.btn:hover::before {
    left: 150%
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--teal-500));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    border: 1px solid var(--primary-600)
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5), var(--glow-green)
}

.btn-primary:active {
    transform: translateY(0)
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--gray-100);
    border: 2px solid var(--gray-700)
}

.btn-secondary:hover {
    border-color: var(--primary-500);
    background: var(--bg-3)
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem
}

.btn-block {
    width: 100%
}

/* Alerts */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border: 1px solid
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.3)
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3)
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-6)
}

.auth-footer a {
    color: var(--primary-400);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s
}

.auth-footer a:hover {
    color: var(--primary-300);
    text-decoration: underline
}

.info-box {
    background: var(--bg-elevated);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-top: var(--space-4);
    font-size: 0.875rem;
    color: var(--gray-400);
    border-left: 3px solid var(--primary-500)
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-page {
    background: var(--bg-1);
    min-height: 100vh;
    position: relative;
    z-index: 1
}

.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

/* Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--teal-900), var(--teal-700));
    color: var(--white);
    padding: var(--space-5) var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(37, 211, 102, 0.3)
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4)
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5)
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-5)
}

.user-email {
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px)
}

/* Status Badge */
.header-status,
.header-phone {
    display: flex;
    align-items: center
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.05em
}

.status-disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4)
}

.status-waiting {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4)
}

.status-connected {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: var(--glow-green)
}

.status-loading {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8)
}

.connected-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3
}

.status-note {
    font-size: 0.75rem;
    opacity: 0.8
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-left-color: var(--primary-400);
    border-radius: 50%;
    animation: spin 0.8s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: var(--space-3);
    border-radius: var(--radius-full);
    color: var(--white);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg)
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--space-6);
    padding: var(--space-8);
    max-width: 1800px;
    margin: 0 auto;
    width: 100%
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-5)
}

.dashboard-main-content {
    min-width: 0
}

/* Cards */
.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(37, 211, 102, 0.1);
    transition: all 0.3s
}

.sidebar-card:hover {
    box-shadow: var(--shadow-lg), var(--glow-green);
    transform: translateY(-2px)
}

.sidebar-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--gray-100);
    display: flex;
    align-items: center;
    gap: var(--space-2)
}

/* Tabs */
.tabs {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-elevated);
    padding: var(--space-1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4)
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-600), var(--teal-600));
    color: var(--white);
    box-shadow: var(--shadow-sm)
}

.tab-btn:hover:not(.active) {
    color: var(--gray-200);
    background: var(--bg-3)
}

/* Input Group */
.input-group {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--gray-700);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s
}

.input-group:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1)
}

.input-group .prefix {
    background: var(--bg-elevated);
    padding: var(--space-4);
    color: var(--gray-300);
    font-weight: 700;
    border-right: 2px solid var(--gray-700);
    display: flex;
    align-items: center
}

.input-group input {
    border: none;
    background: transparent;
    flex: 1;
    padding: var(--space-4);
    color: var(--gray-100);
    outline: none
}

/* QR Code */
.qr-container {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-6);
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--gray-700)
}

#qr-image {
    max-width: 280px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    /* Quiet zone for QR scanning */
    background: white;
    padding: 16px;
    box-sizing: content-box
}

.qr-loading,
.qr-error {
    text-align: center;
    color: var(--gray-400)
}

.qr-loading .spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
    margin: 0 auto var(--space-4)
}

.qr-instructions {
    color: var(--gray-400);
    font-size: 0.875rem;
    margin-bottom: var(--space-4)
}

.qr-steps {
    margin-top: var(--space-4);
    text-align: left;
    background: var(--bg-elevated);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-500)
}

.qr-steps h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--gray-200)
}

.qr-steps ol {
    padding-left: var(--space-5);
    font-size: 0.8125rem;
    color: var(--gray-400)
}

.qr-steps li {
    margin-bottom: var(--space-2)
}

/* Leads Table */
.leads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
    gap: var(--space-4)
}

.leads-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-400), var(--teal-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.leads-stats {
    display: flex;
    gap: var(--space-5)
}

.stat-item {
    font-size: 0.8125rem;
    color: var(--gray-400);
    display: flex;
    align-items: baseline;
    gap: var(--space-1)
}

.stat-item span {
    font-weight: 800;
    font-size: 1.5rem
}

.stat-item.stat-success span {
    color: var(--success)
}

.stat-item.stat-error span {
    color: var(--error)
}

.stat-item.stat-warning span {
    color: var(--warning)
}

.leads-table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid rgba(37, 211, 102, 0.1)
}

.leads-table {
    width: 100%;
    border-collapse: collapse
}

.leads-table thead {
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-3))
}

.leads-table th {
    padding: var(--space-4) var(--space-6);
    text-align: left;
    font-weight: 700;
    color: var(--gray-300);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em
}

.leads-table tbody tr {
    border-bottom: 1px solid var(--gray-800);
    transition: background 0.2s
}

.leads-table tbody tr:hover {
    background: var(--bg-elevated)
}

.leads-table tbody tr:last-child {
    border-bottom: none
}

.leads-table td {
    padding: var(--space-4) var(--space-6);
    font-size: 0.9375rem;
    color: var(--gray-200)
}

.leads-table td:first-child {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600
}

.empty-state-content {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--gray-500)
}

.empty-state-content p {
    font-size: 1.25rem;
    margin-bottom: var(--space-2)
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3)
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3)
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3)
}

/* Action Buttons */
.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    margin-left: var(--space-1);
    color: var(--gray-400)
}

.btn-action:hover {
    transform: scale(1.15)
}

.btn-action-resend {
    color: var(--primary-400)
}

.btn-action-resend:hover {
    background: rgba(37, 211, 102, 0.1)
}

.btn-action-delete {
    color: var(--error)
}

.btn-action-delete:hover {
    background: rgba(239, 68, 68, 0.1)
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-6)
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
    animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(37, 211, 102, 0.2)
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1
}

.modal-header h2 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--gray-100)
}

.modal-close {
    background: var(--bg-elevated);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all 0.2s
}

.modal-close:hover {
    background: var(--bg-3);
    color: var(--gray-100);
    transform: rotate(90deg)
}

.modal-body {
    padding: var(--space-6)
}

.webhook-url-container {
    display: flex;
    gap: var(--space-3)
}

.webhook-url-container input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    background: var(--bg-elevated)
}

.settings-section {
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--gray-800)
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0
}

.settings-section:first-child {
    padding-top: 0
}

.settings-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--gray-100)
}

.password-input-group {
    position: relative
}

.toggle-password {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-500);
    font-size: 1.125em;
    user-select: none;
    transition: color 0.2s
}

.toggle-password:hover {
    color: var(--primary-400)
}

.dashboard-footer {
    padding: var(--space-6);
    background: var(--bg-card);
    margin-top: auto;
    border-top: 1px solid var(--gray-800)
}

/* ============================================
   TOAST NOTIFICATIONS - TOP CENTER
   ============================================ */

#toast-container {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
    max-width: 90%;
    width: 440px
}

.toast {
    background: var(--bg-card);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: toastSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    border-left: 4px solid var(--primary-500);
    border: 1px solid rgba(37, 211, 102, 0.3)
}

.toast.toast-success {
    border-left-color: var(--success);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(16, 185, 129, 0.3)
}

.toast.toast-error {
    border-left-color: var(--error);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(239, 68, 68, 0.3)
}

.toast.toast-info {
    border-left-color: var(--info);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(139, 92, 246, 0.3)
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1)
    }

    to {
        opacity: 0;
        transform: scale(0.9)
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.9375rem;
    color: var(--gray-100);
    font-weight: 600
}

.toast-content span:first-child {
    font-size: 1.375em
}

.toast-close {
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--gray-500);
    background: none;
    border: none;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: all 0.2s
}

.toast-close:hover {
    background: var(--bg-elevated);
    color: var(--gray-100)
}

/* ============================================
   CONFIRMATION MODAL
   ============================================ */

.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6)
}

.confirm-modal {
    background: var(--bg-card);
    padding: var(--space-10);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.25s ease;
    text-align: center;
    border: 1px solid rgba(37, 211, 102, 0.2)
}

.confirm-modal h3 {
    margin-bottom: var(--space-3);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-100)
}

.confirm-modal p {
    margin-bottom: var(--space-8);
    color: var(--gray-400);
    line-height: 1.6;
    font-size: 1rem
}

.confirm-modal .actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center
}

.confirm-modal .btn {
    min-width: 120px
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media(max-width:1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .leads-stats {
        flex-wrap: wrap
    }
}

@media(max-width:768px) {
    .dashboard-header {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
        padding: var(--space-4) var(--space-5)
    }

    .header-left h1 {
        font-size: 1.25rem
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-2)
    }

    .leads-table {
        font-size: 0.8125rem
    }

    .leads-table th,
    .leads-table td {
        padding: var(--space-3) var(--space-4)
    }

    .leads-header {
        flex-direction: column;
        align-items: flex-start
    }

    #toast-container {
        top: 70px;
        width: 95%
    }

    .modal-content {
        max-width: 95%
    }

    .dashboard-content {
        padding: var(--space-4)
    }
}

/* ============================================
   AUTO-BOT TOGGLE
   ============================================ */

.autobot-toggle-container {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(0, 0, 0, 0.2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.autobot-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.autobot-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(239, 68, 68, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-full);
    border: 2px solid rgba(239, 68, 68, 0.8);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.autobot-toggle input:checked+.toggle-slider {
    background: rgba(16, 185, 129, 0.6);
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.autobot-toggle input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.autobot-toggle input:focus+.toggle-slider {
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3);
}

.autobot-status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
    min-width: 60px;
}

.autobot-status.active {
    color: var(--success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}