/* ====================================
   WA Pro Sender - Panel Overlay Styles
   ==================================== */

:root {
    /* Colors */
    --wa-primary: #00e5ff;
    --wa-primary-dark: #00b8d4;
    --wa-primary-light: #e0f7fa;
    --wa-primary-soft: rgba(0, 229, 255, 0.1);
    
    --wa-secondary: #161c27;
    --wa-danger: #ff5252;
    --wa-warning: #f5a623;
    --wa-success: #00e676;
    --wa-bg-main: #0a0e17;
    --wa-bg-card: rgba(255, 255, 255, 0.05);
    --wa-bg-glass: rgba(255, 255, 255, 0.03);
    --wa-text-primary: #ffffff;
    --wa-text-secondary: #94a3b8;
    --wa-border-color: rgba(255, 255, 255, 0.1);
    --wa-border-subtle: rgba(255, 255, 255, 0.05);

    /* Gradients */
    --wa-gradient-primary: linear-gradient(135deg, #00e5ff 0%, #0062ff 100%);
    --wa-gradient-bg: linear-gradient(135deg, #0a0e17 0%, #161c27 100%);
    --wa-gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    --wa-gradient-header: linear-gradient(180deg, rgba(0, 229, 255, 0.1) 0%, rgba(10, 14, 23, 0) 100%);
    --wa-shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --wa-glow-active: 0 0 15px rgba(0, 229, 255, 0.3);
}

/* ============================================
   Floating Button - Dolphin Identity
   ============================================ */
#wa-pro-floating-btn {
    position: fixed;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: grab;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.3s ease,
        drop-shadow 0.3s ease;
    user-select: none;
    padding: 0;
    /* ظل ناعم يعطي إحساس بالطفو */
    filter: drop-shadow(0 6px 16px rgba(0, 229, 255, 0.45));
    /* حركة الطفو المستمرة */
    animation: dolphin-float 3s ease-in-out infinite;
}

/* حركة الطفو المستمرة للدولفين */
@keyframes dolphin-float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(1.5deg);
    }

    50% {
        transform: translateY(-8px) rotate(0deg);
    }

    75% {
        transform: translateY(-5px) rotate(-1.5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

#wa-pro-floating-btn:hover {
    filter: drop-shadow(0 8px 24px rgba(37, 211, 102, 0.7)) brightness(1.1);
    animation-play-state: paused;
    transform: scale(1.12) translateY(-4px);
}

#wa-pro-floating-btn:active {
    cursor: grabbing;
    filter: drop-shadow(0 3px 10px rgba(37, 211, 102, 0.5));
    animation-play-state: paused;
    transform: scale(0.93);
}

/* الصورة داخل الزر */
#wa-pro-floating-btn img {
    width: 72px;
    height: 72px;
    pointer-events: none;
    object-fit: contain;
    border-radius: 0;
    /* انتقال سلس عند تبديل الصور */
    transition: opacity 0.25s ease, transform 0.3s ease;
}

/* انعكاس الصورة للـ LTR (واجهة إنجليزية) */
#wa-pro-floating-btn.dolphin-ltr img {
    transform: scaleX(-1);
}

/* حالة اللوحة مغلقة (دولفين نائم) - ظل هادئ */
#wa-pro-floating-btn.panel-closed {
    animation-duration: 6s;
    /* أبطأ = نائم */
}

/* حالة اللوحة مفتوحة (دولفين مستيقظ) - ظل نشيط */
#wa-pro-floating-btn.panel-open {
    filter: drop-shadow(0 6px 10px rgba(37, 211, 102, 0.4));
    animation-duration: 2.5s;
    /* أسرع = نشيط */
}

/* تأثير النبض عند التحول بين الحالتين */
#wa-pro-floating-btn.dolphin-pulse {
    animation: dolphin-pulse-anim 0.4s ease;
}

@keyframes dolphin-pulse-anim {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.2);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================
   Main Panel
   ============================================ */
#wa-pro-panel {
    position: fixed;
    top: 0;
    width: calc(70% - 50px);
    height: 100vh;
    background: var(--wa-gradient-bg);
    z-index: 999998;
    display: none;
    flex-direction: row;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: var(--wa-text-primary);
    overflow: hidden;
}

#wa-pro-panel.visible {
    display: flex;
    animation: panelSlideIn 0.3s ease;
}

/* RTL: Panel on left */
html[dir="rtl"] #wa-pro-panel,
.wa-rtl #wa-pro-panel {
    left: 0;
    border-right: 1px solid var(--wa-border-color);
}

/* LTR: Panel on right */
html[dir="ltr"] #wa-pro-panel,
.wa-ltr #wa-pro-panel {
    right: 0;
    border-left: 1px solid var(--wa-border-color);
}

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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


/* ============================================
   Sidebar Container
   ============================================ */
#wa-pro-sidebar {
    width: 180px;
    /* عرض ثابت أفضل للتصميم الاحترافي */
    max-width: 90vw;
    height: 100vh;
    /* Glassmorphism Effect */
    background: rgba(10, 22, 40, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--wa-border-subtle);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* RTL Support Logic */
html[dir="rtl"] #wa-pro-sidebar,
.wa-rtl #wa-pro-sidebar {
    border-right: none;
    border-left: 1px solid var(--wa-border-subtle);
    order: 2;
}

html[dir="ltr"] #wa-pro-sidebar,
.wa-ltr #wa-pro-sidebar {
    order: -1;
}

.wa-sidebar-logo {
    margin-top: 15px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px 10px 20px;
    text-align: center;
    background: var(--wa-gradient-header);
    border-bottom: 1px solid var(--wa-border-subtle);
}

.sidebar-header img {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    /* شكل "سكويركل" عصري */
    margin-bottom: 12px;
    /* border: 2px solid rgba(255, 255, 255, 0.1); */
    box-shadow: var(--wa-shadow-soft);
    transition: transform 0.3s;
}

.sidebar-header:hover img {
    transform: scale(1.05);
    border-color: var(--wa-primary);
}

.sidebar-header h2 {
    font-size: 16px;
    margin: 5px 0 2px;
    font-weight: 700;
    color: var(--wa-text-primary);
    letter-spacing: 0.5px;
}

.sidebar-header span {
    display: inline-block;
    font-size: 11px;
    color: var(--wa-primary);
    font-weight: 600;
    background: rgba(37, 211, 102, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1.4;
    word-break: break-word;
}



.sidebar-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.sub-badge {
    display: inline-block;
    font-size: 11px;
    color: var(--wa-primary);
    font-weight: 700;
    background: rgba(37, 211, 102, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(37, 211, 102, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-timer {
    font-size: 10px;
    color: var(--wa-text-secondary);
    font-weight: 500;
}

/* Sidebar Tabs Container */
.sidebar-tabs {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
    /* Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: var(--wa-border-subtle) transparent;
}

/* Individual Tab Item */
.sidebar-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 6px;
    /* مسافة بين العناصر */
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: transparent;
    color: var(--wa-text-secondary);
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    border-radius: 12px;
    /* حواف دائرية للعنصر نفسه */
    position: relative;
    overflow: hidden;
}

/* Hover State */
.sidebar-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--wa-text-primary);
    transform: translateX(3px);
    /* حركة بسيطة عند التحويم */
}

html[dir="rtl"] .sidebar-tab:hover,
.wa-rtl .sidebar-tab:hover {
    transform: translateX(-3px);
}

/* Active State - Modern Style */
.sidebar-tab.active {
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
    font-weight: 600;
    box-shadow: var(--wa-glow-active);
    /* توهج */
}

/* Active Indicator (Small line inside) */
.sidebar-tab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 3px;
    background: var(--wa-primary);
    border-radius: 0 4px 4px 0;
}

html[dir="rtl"] .sidebar-tab.active::before,
.wa-rtl .sidebar-tab.active::before {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* Icons */
.sidebar-tab .icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

/* SVG styling specifically */
.sidebar-tab svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    /* ليأخذ لون النص */
    fill: none;
}

.sidebar-tab.active svg path,
.sidebar-tab.active svg circle {
    stroke: var(--wa-primary);
}

/* Badge styling */
.sidebar-tab .badge {
    margin-left: auto;
    /* LTR default */
    background: var(--wa-danger);
    /* لون التنبيهات عادة أحمر */
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

html[dir="rtl"] .sidebar-tab .badge,
.wa-rtl .sidebar-tab .badge {
    margin-left: 0;
    margin-right: auto;
}

/* ============================================
   Content Area
   ============================================ */
#wa-pro-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Content Header */
.content-header {
    padding: 8px 20px;
    background: var(--wa-bg-card);
    border-bottom: 1px solid var(--wa-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--wa-text-primary);
}

.lang-tools-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.content-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--wa-text-primary);


}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wa-bg-glass);
    border: 1px solid var(--wa-border-color);
    color: var(--wa-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--wa-danger);
    border-color: var(--wa-danger);
}

/* Content Body */
.content-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    direction: rtl;
}

html[dir="ltr"] .content-body,
.wa-ltr .content-body {
    direction: ltr;
}

/* Tab Content */
/* 1. الحالة الافتراضية: إخفاء جميع محتويات التابات */
.panel-tab-content {
    display: none;
    padding: 10px 20px;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.4s ease;
    width: 95%;
}

.panel-tab-content.active {
    display: flex !important;
    /* إظهار كـ Flex */
}

.action-buttons-mini {
    display: flex;
    gap: 10px;
}

.section-card {
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-subtle);
    border-radius: 16px;
    padding: 16px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--wa-text-secondary);
    font-size: 13px;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ============================================
   Form Elements
   ============================================ */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--wa-text-secondary);
    margin-bottom: 6px;
}

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: -webkit-fill-available;
    padding: 10px 12px;
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-color);
    border-radius: 8px;
    color: var(--wa-text-primary) !important;
    font-size: 13px;
    transition: all 0.3s ease;
}

.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--wa-primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

#wa-numbers {
    min-height: 100px;
}

/* ============================================
   Buttons
   ============================================ */
.btn,
.btn-icon {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--wa-gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

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

.btn-warning {
    background: var(--wa-warning);
    color: #000;
}

.btn-secondary {
    background: var(--wa-bg-glass);
    color: var(--wa-text-primary);
    border: 1px solid var(--wa-border-color);
}

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

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-group .btn {
    flex: 1;
}

.btn-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 8px;
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--wa-primary);
    border-color: var(--wa-primary);
    transform: scale(1.05);
}

.btn-danger-icon:hover {
    background: var(--wa-danger);
    border-color: var(--wa-danger);
}

/* ============================================
   Stats Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--wa-border-subtle);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card .number {
    font-size: 20px;
    font-weight: 700;
    color: var(--wa-text-primary);
    line-height: 1.2;
}

.stat-card .label {
    font-size: 11px;
    color: var(--wa-text-secondary);
    margin-top: 4px;
}

.stat-card.success .number {
    color: var(--wa-success);
}

.stat-card.error .number {
    color: var(--wa-danger);
}

.stat-card.pending .number {
    color: var(--wa-warning);
}

.stat-card.success {
    border-bottom: 3px solid var(--wa-success);
}

.stat-card.error {
    border-bottom: 3px solid var(--wa-danger);
}

.stat-card.pending {
    border-bottom: 3px solid var(--wa-warning);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-container {
    background: var(--wa-bg-card);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--wa-border-subtle);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--wa-text-primary);
}

.progress-bar {
    height: 8px;
    background: var(--wa-bg-card);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--wa-gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
    /* Striped Animation */
    background-image: linear-gradient(45deg, rgba(2, 197, 99, 0.849) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(14, 214, 64, 0.747) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }

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

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--wa-text-secondary);
}

/* 3. Inputs & Selects */
.modern-input,
.modern-select,
.modern-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--wa-border-subtle);
    color: var(--wa-text-primary);
    padding: 12px;
    border-radius: 10px;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
}

.modern-input:focus,
.modern-select:focus,
.modern-textarea:focus {
    border-color: var(--wa-primary);
    box-shadow: 0 0 0 3px var(--wa-primary-soft);
    background: rgba(0, 0, 0, 0.4);
}

.campaign-controls-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.select-wrapper {
    flex: 1;
}

.btn-mini {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-mini:hover {
    transform: scale(1.05);
}

.btn-mini.primary {
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
}

.btn-mini.danger {
    background: rgba(220, 53, 69, 0.2);
    color: var(--wa-danger);
}

.source-toggle-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.radio-card {
    cursor: pointer;
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card .card-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--wa-border-subtle);
    border-radius: 10px;
    transition: all 0.3s;
    color: var(--wa-text-secondary);
}

.radio-card input:checked+.card-content {
    background: var(--wa-primary-soft);
    border-color: var(--wa-primary);
    color: var(--wa-primary);
    font-weight: 600;
}

/* 6. Textarea with Actions */
.textarea-wrapper {
    position: relative;
}

.modern-textarea {
    min-height: 100px;
    resize: vertical;
    padding-bottom: 40px;
    /* Space for buttons */
}

.textarea-actions {
    position: absolute;
    bottom: 5px;
    left: 18px;
    /* RTL aware: this might need adjustment based on direction */
    display: flex;
    gap: 10px;
}

html[dir="rtl"] .textarea-actions {
    left: 8px;
    right: auto;
}

.action-link {
    background: none;
    border: none;
    color: var(--wa-primary);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(37, 211, 102, 0.1);
}

/* 7. File Upload Zone */
.file-upload-zone {
    position: relative;
    border: 2px dashed var(--wa-border-subtle);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    user-select: none;
}

.file-upload-zone:hover {
    border-color: var(--wa-primary);
    background: rgba(37, 211, 102, 0.05);
}

/* حالة السحب والإفلات النشطة */
.file-upload-zone.drag-active {
    border-color: var(--wa-primary);
    border-style: solid;
    background: rgba(37, 211, 102, 0.1);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.15);
    transform: scale(1.01);
}

.file-upload-zone.drag-active .upload-icon {
    opacity: 1;
    transform: scale(1.3);
    animation: bounce-upload 0.5s ease infinite alternate;
}

@keyframes bounce-upload {
    from {
        transform: translateY(0) scale(1.3);
    }

    to {
        transform: translateY(-5px) scale(1.3);
    }
}

.file-upload-zone.drag-active .upload-text {
    color: var(--wa-primary);
    font-weight: 600;
}

.file-upload-zone input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    /* منع input من التدخل في أحداث drag */
    pointer-events: none;
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.upload-text {
    margin: 0;
    font-size: 13px;
    color: var(--wa-text-primary);
    transition: color 0.3s;
}

.upload-hint {
    margin: 10px;
    font-size: 11px;
    color: var(--wa-text-secondary);
}

/* 8. Buttons */
.btn-main-action {
    width: 100%;
    padding: 14px;
    background: var(--wa-gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-main-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-outline-full {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--wa-border-subtle);
    color: var(--wa-text-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline-full:hover {
    border-color: var(--wa-primary);
    color: var(--wa-primary);
}

/* 9. Logs Terminal */
.logs-container {
    margin-top: 10px;
    background: #0d1117;
    border: 1px solid var(--wa-border-subtle);
    border-radius: 8px;
    height: 120px;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.log-item {
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 2px;
}

.log-item .time {
    color: #8b949e;
    margin-right: 5px;
}

.log-item.info {
    color: #58a6ff;
}

.log-item.success {
    color: var(--wa-primary);
}

.log-item.error {
    color: var(--wa-danger);
}

/* Utilities */
.mt-3 {
    margin-top: 12px;
}

.mb-3 {
    margin-bottom: 12px;
}

/* ============================================
   Logs
   ============================================ */
.logs-container {
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-color);
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 12px;
}

.log-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--wa-border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-item:last-child {
    border-bottom: none;
}

.log-item.success {
    color: var(--wa-success);
}

.log-item.error {
    color: var(--wa-danger);
}

.log-item.info {
    color: var(--wa-text-secondary);
}

.log-item.waiting {
    color: var(--wa-warning);
}

/* ============================================
   Campaign Section
   ============================================ */
.campaign-section {
    background: var(--wa-bg-glass);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--wa-border-color);
}

.campaign-controls {
    display: flex;
    gap: 8px;
}

.campaign-controls select {
    flex: 1;
}

.campaign-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--wa-bg-card);
    border-radius: 6px;
    flex-wrap: wrap;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: var(--wa-success);
    color: white;
}

.status-badge.paused {
    background: var(--wa-warning);
    color: #000;
}

.status-badge.completed {
    background: var(--wa-primary);
    color: white;
}

.campaign-info {
    font-size: 11px;
    color: var(--wa-text-secondary);
}

/* ============================================
   File Upload
   ============================================ */
.file-upload {
    border: 2px dashed var(--wa-border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: var(--wa-primary);
    background: var(--wa-bg-glass);
}

.file-upload input {
    display: none;
}

.file-upload p {
    font-size: 12px;
    color: var(--wa-text-secondary);
    margin: 5px 0;
}

/* Media Preview */
.media-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.media-item {
    position: relative;
    width: 80px;
    min-height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--wa-border-color);
    background: var(--wa-bg-glass);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    padding-bottom: 4px;
}

.media-item:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.media-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

/* أيقونة الملف غير الصورة */
.media-file-icon {
    font-size: 28px;
    margin: 8px 0 4px;
    line-height: 1;
}

/* اسم الملف */
.media-item-name {
    font-size: 9px;
    color: var(--wa-text-secondary);
    text-align: center;
    padding: 2px 4px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
}

.media-item .remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    background: var(--wa-danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    color: white;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.15s, background 0.15s;
    z-index: 2;
}

.media-item .remove:hover {
    background: #ff2020;
    transform: scale(1.2);
}

/* ============================================
   Templates List
   ============================================ */
.templates-list {
    max-height: 250px;
    overflow-y: auto;
}

.template-item {
    background: var(--wa-bg-glass);
    border: 1px solid var(--wa-border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-item:hover {
    border-color: var(--wa-primary);
}

.template-item .name {
    font-weight: 600;
    margin-bottom: 4px;
}

.template-item .preview {
    font-size: 11px;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-item .actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.template-item .actions button {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
}

/* ============================================
   Settings
   ============================================ */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--wa-bg-glass);
    border-radius: 8px;
    margin-bottom: 8px;
}

.setting-item .info h4 {
    font-size: 13px;
    margin-bottom: 2px;
}

.setting-item .info p {
    font-size: 11px;
    color: var(--wa-text-secondary);
}

.setting-item input[type="number"] {
    width: 80px;
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--wa-bg-card);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle .slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    right: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked+.slider {
    background: var(--wa-primary);
}

.toggle input:checked+.slider:before {
    transform: translateX(-20px);
}

/* ============================================
   Coming Soon
   ============================================ */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.coming-soon .icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.coming-soon h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--wa-primary);
}

.coming-soon p {
    font-size: 14px;
    color: var(--wa-text-secondary);
}

/* ============================================
   Dashboard Sections
   ============================================ */
.dashboard-section {
    background: var(--wa-bg-glass);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--wa-border-color);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wa-border-color);
}

.section-header .section-icon {
    font-size: 24px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--wa-primary);
}

.section-description {
    margin-bottom: 12px;
}

.section-description p {
    font-size: 12px;
    color: var(--wa-text-secondary);
    margin: 0;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    text-align: center;
    padding: 20px;
}

.about-section .logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.about-section h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.about-section .version {
    font-size: 12px;
    color: var(--wa-text-secondary);
    margin-bottom: 20px;
}

.about-section .description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--wa-text-secondary);
    margin-bottom: 20px;
}

.about-features {
    text-align: right;
    background: var(--wa-bg-glass);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

html[dir="ltr"] .about-features,
.wa-ltr .about-features {
    text-align: left;
}

.about-features h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--wa-primary);
}

.about-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-features li {
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--wa-border-color);
}

.about-features li:last-child {
    border-bottom: none;
}

/* ============================================
   Scheduler
   ============================================ */
/* ============================================
   Scheduler Section Styling
   ============================================ */

/* حاوية قسم الجدولة */
.scheduler-panel {
    background: rgba(0, 0, 0, 0.25);
    /* خلفية داكنة قليلاً للتميز */
    border: 1px solid var(--wa-border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    flex-direction: column;
    gap: 15px;
    /* تأثير ظهور ناعم */
    animation: slideDown 0.3s ease-out;
}

/* شبكة التاريخ والوقت */
.datetime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* تقسيم المساحة بالتساوي */
    gap: 12px;
}

/* تنسيق حقول الإدخال (التاريخ والوقت) */
.datetime-grid .modern-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--wa-border-subtle);
    color: var(--wa-text-primary);
    padding: 10px;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    text-align: center;
    /* محاذاة النص في المنتصف */
    cursor: pointer;
    transition: all 0.3s ease;
}

/* تأثير عند التركيز على الحقل */
.datetime-grid .modern-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--wa-primary);
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.1);
    outline: none;
}

/* هام جداً: تغيير لون أيقونة التقويم والساعة للأبيض (لأن المتصفح يجعلها سوداء افتراضياً) */
.datetime-grid .modern-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    /* قلب اللون للابيض */
    opacity: 0.6;
    cursor: pointer;
    transition: 0.2s;
}

.datetime-grid .modern-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* زر تأكيد الجدولة */
.btn-secondary-full {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--wa-primary);
    /* حدود متقطعة تعطي طابع "منطقة عمل" */
    color: var(--wa-primary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* تأثير الـ Hover للزر */
.btn-secondary-full:hover {
    background: var(--wa-primary);
    color: #fff;
    border-style: solid;
    /* تحويل الحدود لخط متصل */
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
    transform: translateY(-2px);
}

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

/* أنيميشن بسيط للظهور */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ============================================
   Scrollbar
   ============================================ */
#wa-pro-panel ::-webkit-scrollbar {
    width: 6px;
}

#wa-pro-panel ::-webkit-scrollbar-track {
    background: var(--wa-bg-card);
}

#wa-pro-panel ::-webkit-scrollbar-thumb {
    background: var(--wa-primary);
    border-radius: 3px;
}

/* ============================================
   Toast
   ============================================ */
.wa-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wa-bg-glass);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 9999999;
    animation: slideUp 0.3s ease;
    color: var(--wa-text-primary);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* تنسيقات Accordion المجموعات */
.group-accordion {
    border: 1px solid var(--wa-border-color);
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--wa-bg-glass);
}

.group-header {
    padding: 12px 15px;
    background: var(--wa-bg-card);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.group-header:hover {
    background: rgba(255, 255, 255, 0.1);
    /* تأثير تحويم خفيف */
}

.group-title {
    font-weight: bold;
    color: var(--wa-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-content {
    padding: 10px;
    background: #fff;
    border-top: 1px solid var(--wa-border-color);
}

.mini-table {
    font-size: 0.9em;
}

.mini-table th {
    background: var(--wa-bg-card) !important;
    /* بدلاً من #fff */
    color: var(--wa-text-secondary);
    /* بدلاً من #666 */
    border-bottom: 1px solid var(--wa-border-color);
}

/* تحسين شريط الأدوات */
.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f1f3f4;
    border-radius: 8px;
}

.toolbar-inputs {
    display: flex;
    gap: 10px;
}

.wa-input.compact {
    padding: 5px 10px;
    height: 32px;
}

.btn-action.small {
    padding: 5px 15px;
    height: 32px;
    font-size: 13px;
}

/* --- Audience Management Panel Styling --- */

/* Section Header */
.audience-section h3 {
    color: var(--wa-text-primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wa-border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 1. Extraction Buttons Grid */
.extract-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.btn-extract {
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-color);
    color: var(--wa-text-secondary);
    padding: 5px 15px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
}

.btn-extract .icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Hover Effects & Active States */
.btn-extract:hover,
.btn-extract.active {
    transform: translateY(-2px);
    background: var(--wa-bg-glass);
    color: var(--wa-text-primary);
}

.btn-extract.primary:hover,
.btn-extract.primary.active {
    border-color: var(--wa-primary);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-extract.info:hover,
.btn-extract.info.active {
    border-color: #00bcd4;
    /* Custom for groups */
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.2);
}

.btn-extract.success:hover,
.btn-extract.success.active {
    border-color: #2196f3;
    /* Custom for all contacts */
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
}

.btn-extract.secondary:hover,
.btn-extract.secondary.active {
    border-color: #9c27b0;
    /* Custom for unsaved with chat */
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.2);
}

.btn-extract.warning:hover,
.btn-extract.warning.active {
    border-color: #f7a934;
    box-shadow: 0 4px 15px rgba(247, 169, 52, 0.2);
}

.btn-extract.warning svg {
    stroke: var(--wa-text-secondary);
    transition: stroke 0.3s ease;
}

.btn-extract.warning:hover svg {
    stroke: #f7a934;
}

/* Label Color Dot */
.label-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Label List Item */
.label-list-item {
    display: flex;
    align-items: center;
}

.label-list-item .label-name {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--wa-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.label-list-item .label-badge {
    font-size: 0.75rem;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.label-list-item.active .label-name {
    color: white;
}

.label-list-item.active .label-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Saved Contacts Sub-Filter */
.saved-filter-container {
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 15px;
    animation: fadeSlideDown 0.3s ease-out;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.saved-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wa-text-secondary);
    margin-bottom: 10px;
}

.saved-filter-toggle {
    display: flex;
    gap: 10px;
}

.saved-filter-option {
    flex: 1;
    cursor: pointer;
}

.saved-filter-option input[type="radio"] {
    display: none;
}

.saved-filter-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--wa-border-color);
    background: var(--wa-bg-card);
    color: var(--wa-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
    text-align: center;
}

.saved-filter-card:hover {
    border-color: rgba(37, 211, 102, 0.4);
    background: rgba(37, 211, 102, 0.05);
}

.saved-filter-option input[type="radio"]:checked+.saved-filter-card {
    background: rgba(37, 211, 102, 0.15);
    border-color: var(--wa-primary);
    color: var(--wa-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.15);
}

.saved-filter-icon {
    font-size: 1rem;
}

/* 2. Status Box */
.status-box {
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(37, 211, 102, 0.1);
    /* Light green tint */
    border: 1px solid var(--wa-primary-dark);
    color: var(--wa-primary-light);
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

/* 3. Results Toolbar */
.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wa-bg-card);
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--wa-border-color);
}

.toolbar-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--wa-text-secondary);
}

.badge-count {
    background: var(--wa-primary);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.8rem;
}

.toolbar-inputs {
    display: flex;
    gap: 10px;
}

/* Inputs & Small Buttons */
.wa-input.compact {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--wa-border-color);
    color: var(--wa-text-primary);
    padding: 0px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    height: 30px;
}

.wa-input.compact:focus {
    border-color: var(--wa-primary);
}

.btn-action.small {
    background: var(--wa-secondary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-action.small:hover {
    background: var(--wa-primary-dark);
}

/* 4. Split View (Groups & Members) */
.split-view-container {
    display: flex;
    gap: 15px;
    height: 400px;
    /* Fixed height for scrolling */
    margin-top: 20px;
}

.split-column {
    flex: 1;
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.column-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--wa-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Items inside lists (Dynamic content styling) */
.list-item {
    padding: 10px;
    border-bottom: 1px solid var(--wa-border-color);
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 6px;
    color: var(--wa-text-secondary);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--wa-text-primary);
}

.list-item.active {
    background: var(--wa-gradient-primary);
    color: white;
    border: none;
}

.empty-state-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--wa-text-secondary);
    font-style: italic;
    opacity: 0.6;
}

/* Custom Scrollbar for the dark theme */
.column-content::-webkit-scrollbar {
    width: 6px;
}

.column-content::-webkit-scrollbar-track {
    background: transparent;
}

.column-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.column-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Subscriptions Section
   ============================================ */
.subscriptions-container {
    padding: 20px;
    width: 95%;
    margin: 0 auto;
}

/* === Free Trial Banner === */
.free-trial-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12), rgba(0, 200, 83, 0.06));
    border: 1.5px solid rgba(37, 211, 102, 0.35);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    overflow: hidden;
}

.trial-glow {
    position: absolute;
    top: -40%;
    right: -10%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.trial-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.trial-icon {
    font-size: 38px;
    flex-shrink: 0;
    animation: shake 2s ease-in-out infinite;
}

@keyframes shake {

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

    15% {
        transform: rotate(12deg);
    }

    30% {
        transform: rotate(-10deg);
    }

    45% {
        transform: rotate(6deg);
    }

    60% {
        transform: rotate(0deg);
    }
}

.trial-info {
    flex: 1;
    min-width: 150px;
}

.trial-info h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: var(--wa-primary);
    font-weight: 700;
}

.trial-info p {
    margin: 0;
    font-size: 12px;
    color: var(--wa-text-secondary);
}

.trial-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--wa-gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.trial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

/* === Currency Selector === */
.currency-selector-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 35px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    width: fit-content;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.currency-selector-wrapper label {
    font-size: 14px;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    font-weight: 600;
}

.currency-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.2) url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2325d366%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") no-repeat left 12px center;
    background-size: 10px;
    padding: 8px 16px 8px 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--wa-text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.currency-select:hover {
    border-color: rgba(37, 211, 102, 0.4);
    background-color: rgba(0, 0, 0, 0.3);
}

.currency-select:focus {
    border-color: var(--wa-primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
    outline: none;
}

/* === Subscriptions Grid === */
.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.subscription-box {
    background: linear-gradient(180deg, var(--wa-bg-card) 0%, rgba(20, 20, 20, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px 24px 24px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.subscription-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: transparent;
    transition: background 0.3s ease;
    z-index: 0;
}

.subscription-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(37, 211, 102, 0.05);
    border-color: rgba(37, 211, 102, 0.25);
}

.subscription-box:hover::before {
    background: var(--wa-gradient-primary);
    width: 80%;
    margin: 0 auto;
}

.subscription-box.featured {
    border: 1.5px solid var(--wa-primary);
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.06) 0%, rgba(20, 20, 20, 0.7) 100%);
    transform: scale(1.03);
    z-index: 1;
}

.subscription-box.featured::before {
    background: var(--wa-gradient-primary);
}

.subscription-box.featured:hover {
    transform: scale(1.03) translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 211, 102, 0.15);
}

.subscription-box.featured .featured-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--wa-gradient-primary);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    animation: featuredPulse 2.5s ease-in-out infinite;
}

@keyframes featuredPulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    }

    50% {
        box-shadow: 0 4px 22px rgba(37, 211, 102, 0.6);
    }
}

/* Plan Header Layout */
.plan-header-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.plan-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

/* Plan Icon */
.plan-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Plan Duration Badge */
.plan-duration-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: rgba(37, 211, 102, 0.12);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--wa-primary);
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subscription-box h3 {
    margin: 0;
    font-size: 21px;
    color: var(--wa-text-primary);
    font-weight: 700;
}

/* === Pricing === */
.subscription-price {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.subscription-price .price-main {
    font-size: 34px;
    font-weight: 800;
    color: var(--wa-text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    transition: all 0.3s ease;
}

.subscription-price .price-sub {
    font-size: 14px;
    color: var(--wa-text-secondary);
}

.price-per-month {
    font-size: 13px;
    color: var(--wa-primary);
    font-weight: 600;
    opacity: 0.9;
}

/* === Features === */
.subscription-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
    flex: 1;
}

.subscription-features .feature-item {
    color: var(--wa-text-secondary);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    padding-right: 22px;
    /* For pseudo-element icon (RTL) */
}

/* Custom Check or Icon for features to improve look without hardcoded emojis */
.subscription-features .feature-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 3px;
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2325d366%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%2220%206%209%2017%204%2012%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E") no-repeat center;
    background-size: contain;
}

.subscription-features .feature-item.save-tag {
    color: var(--wa-text-primary);
    font-weight: 700;
}

.subscription-features .feature-item.save-tag::before {
    background: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%2325d366%22%3E%3Cpath%20d%3D%22M12%201.25A10.75%2010.75%200%201%200%2022.75%2012%2010.76%2010.76%200%200%200%2012%201.25zm0%2019a8.25%208.25%200%201%201%208.25-8.25A8.26%208.26%200%200%201%2012%2020.25zM12%205.5a1.25%201.25%200%200%200-1.25%201.25v2h-1a1.25%201.25%200%201%200%200%202.5h1v1.5h-1a1.25%201.25%200%201%200%200%202.5h1v1.5a1.25%201.25%200%201%200%202.5%200v-1.5h1a1.25%201.25%200%201%200%200-2.5h-1v-1.5h1a1.25%201.25%200%201%200%200-2.5h-1v-2A1.25%201.25%200%200%200%2012%205.5zm1.25%204.5h-2.5v-1.5h2.5zm0%204h-2.5v-1.5h2.5z%22%2F%3E%3C%2Fsvg%3E") no-repeat center;
    top: 2px;
    width: 16px;
    height: 16px;
}


/* === Subscribe Button === */
.subscribe-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--wa-text-primary);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    box-sizing: border-box;
}

.subscribe-btn:hover {
    background: var(--wa-primary);
    color: #fff;
    border-color: var(--wa-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.subscribe-btn.btn-featured {
    background: var(--wa-gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
}

.subscribe-btn.btn-featured:hover {
    background: var(--wa-primary-dark);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
    transform: translateY(-2px);
}

/* === Renewal Info === */
.subscription-renewal {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: var(--wa-text-secondary);
}

.subscription-renewal strong {
    color: var(--wa-primary);
}

/* === Notes === */
.subscriptions-notes {
    margin-top: 10px;
    padding: 20px;
    background: var(--wa-bg-card);
    border-radius: 12px;
    border: 1px solid var(--wa-border-color);
}

.subscriptions-notes h4 {
    margin: 0 0 14px 0;
    font-size: 16px;
    color: var(--wa-text-primary);
}

.subscriptions-notes ul {
    margin: 0;
    padding-right: 20px;
    list-style: none;
}

.subscriptions-notes ul li {
    color: var(--wa-text-secondary);
    font-size: 13px;
    line-height: 2;
    position: relative;
    padding-right: 20px;
}

.subscriptions-notes ul li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: var(--wa-primary);
    font-size: 18px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

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

/* ====================================
   WA Pro Sender - Table Styles
   ==================================== */

/* حاوية الجدول - للتحكم في التمرير */
.table-container {
    /* تحديد ارتفاع أقصى للحاوية لتمكين التمرير الداخلي */
    /* الرقم 250px يترك مساحة للهيدر والأزرار العلوية */
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--wa-bg-card);
    border-radius: 12px;
    border: 1px solid var(--wa-border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
    backdrop-filter: blur(5px);
}

/* تنسيق الجدول العام */
.wa-table {
    width: 100%;
    border-collapse: collapse;
    /* دمج الحدود لتوفير المساحة */
    font-size: 0.85rem;
    /* خط أصغر قليلاً للبيانات الكثيفة */
    white-space: nowrap;
    /* منع النص من النزول لسطر جديد */
}

/* رأس الجدول (مثبت عند التمرير) */
.wa-table thead th {
    position: sticky;
    top: 0;
    background: #0d1e35;
    /* لون داكن ثابت ليغطي الصفوف عند التمرير تحته */
    color: var(--wa-primary);
    padding: 10px 12px;
    font-weight: 600;
    text-align: right;
    /* محاذاة لليمين للعربية */
    border-bottom: 2px solid var(--wa-border-color);
    z-index: 10;
}

/* تنسيق الخلايا (صفوف البيانات) */
.wa-table tbody td {
    /* المسافات المحدودة المطلوبة */
    padding: 6px 12px;
    border-bottom: 1px solid var(--wa-border-color);
    color: var(--wa-text-secondary);
    transition: background 0.2s ease;
}

/* تخصيص العمود الخاص بالأرقام */
.wa-table tbody td[dir="ltr"] {
    font-family: 'Consolas', 'Monaco', monospace;
    /* خط مخصص للأرقام لسهولة القراءة */
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--wa-text-primary);
}

/* تأثير عند مرور الماوس على الصف */
.wa-table tbody tr:hover {
    background-color: var(--wa-bg-glass);
}

/* تلوين تبادلي للصفوف (Zebra Striping) - مفيد جداً في الجداول الطويلة */
.wa-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* تنسيق التاغ (مثل كلمة "مسجل") */
.wa-table .tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    background: rgba(37, 211, 102, 0.15);
    /* خلفية خضراء شفافة */
    color: var(--wa-primary);
    border: 1px solid rgba(37, 211, 102, 0.3);
}

/* ====================================
   Custom Scrollbar (Dark Mode)
   ==================================== */
.table-container::-webkit-scrollbar {
    width: 6px;
    /* شريط نحيف */
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--wa-secondary);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--wa-primary-dark);
}

/* ====================================
   Modal Styles
   ==================================== */
.wa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.wa-modal-content {
    background: var(--wa-gradient-bg);
    border: 1px solid var(--wa-border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

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

.wa-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--wa-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wa-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.wa-modal-close {
    background: transparent;
    border: none;
    color: var(--wa-text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.wa-modal-close:hover {
    color: var(--wa-danger);
}

.wa-modal-body {
    padding: 20px;
}

.wa-modal-body label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.wa-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--wa-border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.wa-modal-footer .btn {
    width: auto;
    padding: 10px 20px;
}

/* ====================================
   Saved Lists Styles
   ==================================== */
.saved-lists-container {
    max-height: 300px;
    overflow-y: auto;
}

.saved-list-item {
    background: var(--wa-bg-glass);
    border: 1px solid var(--wa-border-color);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.saved-list-item:hover {
    border-color: var(--wa-primary);
}

.saved-list-item .list-info {
    flex: 1;
}

.saved-list-item .list-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.saved-list-item .list-meta {
    font-size: 11px;
    color: var(--wa-text-secondary);
    display: flex;
    gap: 12px;
}

.saved-list-item .list-actions {
    display: flex;
    gap: 6px;
}

.saved-list-item .list-actions button {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 14px;
    border-radius: 6px;
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saved-list-item .list-actions button:hover {
    transform: scale(1.1);
}

.saved-list-item .list-actions .btn-use:hover {
    background: var(--wa-primary);
    border-color: var(--wa-primary);
}

.saved-list-item .list-actions .btn-rename:hover {
    background: var(--wa-warning);
    border-color: var(--wa-warning);
}

.saved-list-item .list-actions .btn-download:hover {
    background: #17a2b8;
    border-color: #17a2b8;
}

.saved-list-item .list-actions .btn-delete:hover {
    background: var(--wa-danger);
    border-color: var(--wa-danger);
}

/* List info badge in send tab */
.list-info-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--wa-primary);
    font-weight: 500;
}

/* Button action small primary */
.btn-action.small.primary {
    background: var(--wa-gradient-primary);
    color: white;
    border: none;
}

.btn-action.small.primary:hover {
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.4);
}

/* About Section Styles */
.about-container {
    padding: 25px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.about-header {
    margin-bottom: 30px;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 50px;
    background: var(--wa-gradient-glass);
    padding: 15px;
    border-radius: 20px;
    border: 1px solid var(--wa-border-color);
}

.brand-name {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0;
    letter-spacing: 1px;
}

.version-badge {
    background: var(--wa-primary-dark);
    color: var(--wa-primary-light);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    border: 1px solid var(--wa-primary);
}

.main-description {
    line-height: 1.8;
    color: var(--wa-text-secondary);
    margin-bottom: 25px;
}

.main-description span {
    color: var(--wa-primary);
    font-weight: bold;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 35px;
}

.feature-item {

    transition: 0.3s;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.feature-item .icon {
    font-size: 24px;
    display: block;
}

.feature-item h4 {
    margin: 5px 0;
    font-size: 16px;
    color: var(--wa-primary);
}

.feature-item p {
    font-size: 12px;
    color: var(--wa-text-secondary);
    margin: 0;
}

/* Contact Section */
.contact-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--wa-text-primary);
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--wa-bg-card);
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--wa-text-primary);
    border: 1px solid var(--wa-border-color);
    transition: all 0.2s ease;
}

.contact-card:hover {
    background: var(--wa-gradient-primary);
    border-color: transparent;
    transform: scale(1.02);
}

.contact-card.whatsapp:hover {
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.about-footer {
    margin-top: 40px;
    font-size: 11px;
    color: var(--wa-text-secondary);
    opacity: 0.6;
}

/* ============================================
   Compact Control Hub (CCH) - Floating Widget
   ============================================ */

/* ---- Container ---- */
#wa-cch-widget {
    position: fixed;
    bottom: 120px;
    left: 20px;
    z-index: 99999999;
    border-radius: 28px;
    background: rgba(10, 22, 40, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(37, 211, 102, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #fff;
    cursor: grab;
    transition: opacity 0.35s ease, transform 0.35s ease, left 0.4s cubic-bezier(.25, .8, .25, 1), right 0.4s cubic-bezier(.25, .8, .25, 1);
    opacity: 1;
    transform: scale(1);
    touch-action: none;
    /* for pointer events */
}

#wa-cch-widget.cch-hidden {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
    display: none;
}

#wa-cch-widget.cch-visible {
    display: block;
    animation: cch-fadeIn 0.4s ease forwards;
}

#wa-cch-widget.cch-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    transition: none;
    /* disable snap transition while dragging */
}

/* ---- Pulse border animation (active campaign) ---- */
#wa-cch-widget.cch-active {
    animation: cch-pulse 2.5s ease-in-out infinite;
}

@keyframes cch-pulse {

    0%,
    100% {
        border-color: rgba(37, 211, 102, 0.25);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }

    50% {
        border-color: rgba(37, 211, 102, 0.65);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 18px rgba(37, 211, 102, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    }
}

@keyframes cch-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

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

/* ---- Main Widget Body ---- */
.cch-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px 10px 10px;
    min-width: 340px;
}

/* ---- Progress Ring Section ---- */
.cch-progress-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.cch-ring-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
}

.cch-ring {
    width: 56px;
    height: 56px;
    transform: rotate(-90deg);
}

.cch-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 5;
}

/* C = 2 * π * 36 ≈ 226.19 */
.cch-ring-fill {
    fill: none;
    stroke: var(--wa-primary, #25d366);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 226.19;
    stroke-dashoffset: 226.19;
    /* starts at 0% */
    transition: stroke-dashoffset 0.5s ease;
}

.cch-ring-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    pointer-events: none;
}

.cch-timer {
    font-size: 10px;
    font-weight: 600;
    color: var(--wa-text-secondary, #a0aec0);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* ---- Live Stats Section ---- */
.cch-stats-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cch-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 36px;
}

.cch-stat-icon {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.cch-stat-count {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cch-stat-success .cch-stat-icon {
    color: #28a745;
}

.cch-stat-success .cch-stat-count {
    color: #28a745;
}

.cch-stat-failed .cch-stat-icon {
    color: #dc3545;
}

.cch-stat-failed .cch-stat-count {
    color: #dc3545;
}

.cch-stat-pending .cch-stat-icon {
    color: #ffc107;
}

.cch-stat-pending .cch-stat-count {
    color: #ffc107;
}

.cch-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
}

/* ---- Actions Section ---- */
.cch-actions-section {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.cch-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    color: #fff;
}

.cch-btn-pause {
    background: rgba(37, 211, 102, 0.2);
    border: 1px solid rgba(37, 211, 102, 0.35);
}

.cch-btn-pause:hover {
    background: rgba(37, 211, 102, 0.4);
    transform: scale(1.08);
}

.cch-btn-pause.cch-paused {
    background: rgba(37, 211, 102, 0.35);
    border-color: rgba(37, 211, 102, 0.6);
}

.cch-btn-stop {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.cch-btn-stop:hover {
    background: rgba(220, 53, 69, 0.4);
    transform: scale(1.08);
}

/* ---- Log Toggle ---- */
.cch-log-toggle {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 16px;
    border: none;
    border-radius: 0 0 8px 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--wa-text-secondary, #a0aec0);
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.cch-log-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.cch-log-toggle.cch-log-open span {
    transform: rotate(180deg);
    display: inline-block;
}

/* ---- Slide-out Log Panel ---- */
.cch-log-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(.25, .8, .25, 1), padding 0.35s ease;
    border-top: 0px solid transparent;
    padding: 0 12px;
}

.cch-log-panel.cch-log-expanded {
    max-height: 160px;
    padding: 8px 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cch-log-list {
    max-height: 140px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.cch-log-list::-webkit-scrollbar {
    width: 4px;
}

.cch-log-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.cch-log-entry {
    font-size: 11px;
    padding: 3px 0;
    color: var(--wa-text-secondary, #a0aec0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    animation: cch-logSlideUp 0.3s ease;
    word-break: break-word;
}

.cch-log-entry:last-child {
    border-bottom: none;
}

.cch-log-entry.success {
    color: #28a745;
}

.cch-log-entry.error {
    color: #dc3545;
}

.cch-log-entry.warning {
    color: #ffc107;
}

.cch-log-entry.waiting {
    color: #17a2b8;
}

.cch-log-entry.info {
    color: #a0aec0;
}

@keyframes cch-logSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* ---- Status Dot (pulsing) ---- */
.cch-status-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #28a745;
    border: 2px solid rgba(10, 22, 40, 0.9);
    animation: cch-dotPulse 1.5s ease-in-out infinite;
}

#wa-cch-widget.cch-paused-state .cch-status-dot {
    background: #ffc107;
}

@keyframes cch-dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* ============================================
   Group Management - Complete UI
   ============================================ */

/* Segment Control */
.gm-segment-control {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--wa-border-subtle);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Initial State (Big Buttons) */
.gm-segment-control.gm-initial-state {
    flex-direction: column;
    background: transparent;
    border: none;
    gap: 20px;
    margin-top: 50px;
    align-items: center;
}

.gm-segment-control.gm-initial-state .gm-segment {
    flex-direction: column;
    padding: 40px;
    font-size: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--wa-border-subtle);
    width: 100%;
    max-width: 400px;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.gm-segment-control.gm-initial-state .gm-segment:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.gm-segment-control.gm-initial-state .gm-segment svg {
    width: 48px;
    height: 48px;
    color: var(--wa-text-primary);
    transition: color 0.3s;
}

.gm-segment-control.gm-initial-state .gm-segment:hover svg {
    color: var(--wa-primary, #25d366);
}

.gm-segment-control.gm-initial-state .gm-segment span {
    font-size: 18px;
    font-weight: 600;
}

.gm-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--wa-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.gm-segment:hover {
    color: var(--wa-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.gm-segment.active {
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.gm-segment svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Views */
.gm-view {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.gm-view.active {
    display: flex;
}

/* Step Progress Indicator */
.gm-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    padding: 16px 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid var(--wa-border-subtle);
}

.gm-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.gm-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: var(--wa-text-secondary);
    border: 2px solid var(--wa-border-subtle);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gm-step-dot.active .gm-step-num {
    background: var(--wa-primary);
    color: #fff;
    border-color: var(--wa-primary);
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.4);
}

.gm-step-dot.completed .gm-step-num {
    background: rgba(37, 211, 102, 0.2);
    color: var(--wa-primary);
    border-color: var(--wa-primary);
}

.gm-step-label {
    font-size: 10px;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    transition: color 0.3s;
}

.gm-step-dot.active .gm-step-label {
    color: var(--wa-primary);
    font-weight: 600;
}

.gm-step-line {
    flex: 1;
    height: 2px;
    background: var(--wa-border-subtle);
    margin: 0 6px;
    margin-bottom: 20px;
    transition: background 0.4s;
    min-width: 20px;
}

.gm-step-line.active {
    background: var(--wa-primary);
}

/* Step Content */
.gm-step-content {
    display: none;
    animation: gmSlideIn 0.35s ease;
}

.gm-step-content.active {
    display: block;
}

@keyframes gmSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* Cards */
.gm-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--wa-border-subtle);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.gm-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.gm-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--wa-border-subtle);
    background: rgba(0, 0, 0, 0.15);
}

.gm-card-icon {
    font-size: 18px;
}

.gm-card-header h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--wa-text-primary);
}

.gm-card-body {
    padding: 18px;
}

/* Form Elements */
.gm-form-group {
    margin-bottom: 16px;
}

.gm-form-group:last-child {
    margin-bottom: 0;
}

.gm-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--wa-text-secondary);
    margin-bottom: 6px;
}

.gm-required {
    color: var(--wa-danger);
    font-weight: 700;
}

.gm-optional {
    color: var(--wa-text-secondary);
    font-weight: 400;
    font-size: 11px;
}

.gm-input,
.gm-textarea,
.gm-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--wa-border-subtle);
    border-radius: 10px;
    color: var(--wa-text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.gm-input:focus,
.gm-textarea:focus,
.gm-select:focus {
    border-color: var(--wa-primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

.gm-input.error {
    border-color: var(--wa-danger);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.gm-textarea {
    resize: vertical;
    min-height: 70px;
}

.gm-select {
    min-height: 80px;
    cursor: pointer;
}

.gm-select option {
    padding: 8px;
    background: #1a2744;
    color: var(--wa-text-primary);
}

.gm-input-error {
    display: none;
    font-size: 11px;
    color: var(--wa-danger);
    margin-top: 4px;
    padding-inline-start: 2px;
}

.gm-input-error.visible {
    display: block;
    animation: gmShake 0.3s ease;
}

@keyframes gmShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* Image Upload */
.gm-image-upload {
    position: relative;
    width: 100px;
    height: 100px;
    border: 2px dashed var(--wa-border-subtle);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.gm-image-upload:hover {
    border-color: var(--wa-primary);
    background: rgba(37, 211, 102, 0.05);
}

.gm-image-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.gm-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--wa-text-secondary);
    gap: 4px;
}

.gm-image-placeholder svg {
    opacity: 0.5;
}

.gm-image-placeholder span {
    font-size: 9px;
    text-align: center;
}

.gm-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Settings */
.gm-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
}

.gm-setting-row.compact {
    padding: 10px 0;
}

.gm-setting-info h5 {
    font-size: 13px;
    font-weight: 500;
    color: var(--wa-text-primary);
    margin: 0 0 2px;
}

.gm-setting-desc {
    font-size: 11px;
    color: var(--wa-text-secondary);
    margin: 4px 0 0;
    line-height: 1.5;
}

.gm-divider {
    height: 1px;
    background: var(--wa-border-subtle);
    margin: 2px 0;
}

.gm-radio-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.gm-radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--wa-border-subtle);
    transition: all 0.25s;
    margin: 0;
}

.gm-radio-option:has(input:checked) {
    background: var(--wa-primary-soft);
    border-color: var(--wa-primary);
}

.gm-radio-option input {
    accent-color: var(--wa-primary);
    margin: 0;
}

.gm-radio-label {
    font-size: 12px;
    color: var(--wa-text-primary);
    white-space: nowrap;
}

/* Source Toggle */
.gm-source-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.gm-source-option {
    cursor: pointer;
    margin: 0;
}

.gm-source-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gm-source-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--wa-border-subtle);
    border-radius: 10px;
    color: var(--wa-text-secondary);
    font-size: 12px;
    transition: all 0.3s;
}

.gm-source-option input:checked+.gm-source-card {
    background: var(--wa-primary-soft);
    border-color: var(--wa-primary);
    color: var(--wa-primary);
    font-weight: 600;
}

.gm-source-card svg {
    flex-shrink: 0;
}

.gm-source-panel {
    margin-top: 12px;
}

/* CSV Dropzone */
.gm-csv-dropzone {
    position: relative;
    border: 2px dashed var(--wa-border-subtle);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
}

.gm-csv-dropzone:hover,
.gm-csv-dropzone.drag-active {
    border-color: var(--wa-primary);
    background: rgba(37, 211, 102, 0.05);
}

.gm-csv-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.gm-csv-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--wa-text-secondary);
}

.gm-csv-placeholder svg {
    opacity: 0.5;
}

.gm-csv-placeholder span {
    font-size: 12px;
}

.gm-csv-placeholder small {
    font-size: 10px;
    opacity: 0.7;
}

.gm-csv-loaded {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: var(--wa-primary-soft);
    border-radius: 8px;
}

.gm-csv-icon {
    font-size: 20px;
}

.gm-csv-filename {
    font-size: 13px;
    color: var(--wa-text-primary);
    font-weight: 500;
}

.gm-csv-remove {
    background: rgba(220, 53, 69, 0.2);
    border: none;
    color: var(--wa-danger);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.gm-csv-remove:hover {
    background: var(--wa-danger);
    color: #fff;
}

/* Preview / Data Health */
.gm-preview-area {
    margin-top: 16px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid var(--wa-border-subtle);
}

.gm-preview-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--wa-text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gm-health-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.gm-health-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border-radius: 10px;
    text-align: center;
}

.gm-health-card.valid {
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.25);
}

.gm-health-card.warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.gm-health-card.invalid {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.25);
}

.gm-health-num {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.gm-health-card.valid .gm-health-num {
    color: var(--wa-primary);
}

.gm-health-card.warning .gm-health-num {
    color: var(--wa-warning);
}

.gm-health-card.invalid .gm-health-num {
    color: var(--wa-danger);
}

.gm-health-label {
    font-size: 10px;
    color: var(--wa-text-secondary);
}

.gm-dedup-msg,
.gm-batch-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
}

.gm-dedup-msg {
    background: rgba(37, 211, 102, 0.08);
    color: var(--wa-primary);
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.gm-batch-hint {
    background: rgba(255, 193, 7, 0.08);
    color: var(--wa-warning);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* Summary Grid */
.gm-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gm-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid var(--wa-border-subtle);
}

.gm-summary-label {
    font-size: 11px;
    color: var(--wa-text-secondary);
}

.gm-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--wa-text-primary);
}

/* Progress Panel */
.gm-progress-panel {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--wa-border-subtle);
    animation: gmSlideIn 0.3s ease;
}

.gm-progress-header {
    margin-bottom: 14px;
}

.gm-safe-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 20px;
    font-size: 12px;
    color: var(--wa-primary);
    font-weight: 500;
}

.gm-safe-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wa-primary);
    animation: gmPulse 1.5s ease-in-out infinite;
}

@keyframes gmPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 6px rgba(37, 211, 102, 0);
    }
}

.gm-progress-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.gm-prog-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    color: var(--wa-text-secondary);
    transition: all 0.3s;
}

.gm-prog-item.active {
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
}

.gm-prog-item.done {
    color: var(--wa-primary);
    opacity: 0.7;
}

.gm-prog-icon {
    font-size: 16px;
}

.gm-progress-bar-wrapper {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.gm-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--wa-gradient-primary);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Wizard Footer */
.gm-wizard-footer {
    display: flex;
    gap: 10px;
    padding: 14px 0 4px;
    margin-top: 8px;
    border-top: 1px solid var(--wa-border-subtle);
    position: sticky;
    bottom: 0;
    background: var(--wa-bg-main);
    z-index: 5;
}

.gm-btn-next,
.gm-btn-execute {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.gm-btn-next {
    background: var(--wa-gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.gm-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.gm-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gm-btn-execute {
    background: linear-gradient(135deg, #25d366 0%, #075e54 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.gm-btn-execute:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.gm-btn-finish {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid rgba(37, 211, 102, 0.5);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(37, 211, 102, 0.1);
    color: var(--wa-primary);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.1);
}

.gm-btn-finish:hover {
    transform: translateY(-2px);
    background: rgba(37, 211, 102, 0.2);
    border-color: var(--wa-primary);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.25);
}

.gm-btn-back {
    padding: 12px 20px;
    border: 1px solid var(--wa-border-subtle);
    border-radius: 10px;
    background: transparent;
    color: var(--wa-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.gm-btn-back:hover {
    border-color: var(--wa-text-secondary);
    color: var(--wa-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Invite Info */
.gm-invite-toggle-section {
    margin-top: 16px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    border: 1px solid var(--wa-border-subtle);
}

.gm-invite-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.15);
    border-radius: 8px;
    font-size: 11px;
    color: var(--wa-text-secondary);
    line-height: 1.5;
}

.gm-invite-info svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--wa-primary);
}

/* Groups List (for Add Members) */
.gm-groups-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--wa-border-subtle);
    border-radius: 10px;
    margin-top: 8px;
}

.gm-group-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--wa-border-subtle);
}

.gm-group-item:last-child {
    border-bottom: none;
}

.gm-group-item:hover {
    background: rgba(37, 211, 102, 0.06);
}

.gm-group-item.selected {
    background: var(--wa-primary-soft);
    border-color: var(--wa-primary);
}

.gm-group-item .gm-group-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.gm-group-item .gm-group-name {
    font-size: 13px;
    color: var(--wa-text-primary);
    font-weight: 500;
}

.gm-empty-state {
    padding: 30px;
    text-align: center;
    color: var(--wa-text-secondary);
    font-size: 12px;
}

.gm-selected-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--wa-primary-soft);
    border: 1px solid var(--wa-primary);
    border-radius: 10px;
}

.gm-selected-icon {
    font-size: 16px;
}

.gm-selected-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wa-primary);
}

/* Custom Language Dropdown */
.custom-lang-dropdown {
    position: relative;
    display: inline-block;
    min-width: 130px;
    user-select: none;
    z-index: 1000;
}

.lang-dropdown-selected {
    display: flex;
    align-items: center;
    background: var(--wa-bg-glass);
    border: 1px solid var(--wa-border-color);
    border-radius: 12px;
    padding: 0 12px;
    height: 36px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--wa-text-primary);
    font-size: 13px;
    font-weight: 500;
}

.lang-dropdown-selected:hover {
    background: var(--wa-primary-soft);
    border-color: var(--wa-primary);
}

.lang-dropdown-selected svg {
    color: var(--wa-text-secondary);
    margin-right: 8px;
    /* For LTR */
    transition: color 0.3s ease;
}

html[dir="rtl"] .lang-dropdown-selected svg,
.wa-rtl .lang-dropdown-selected svg {
    margin-right: 0;
    margin-left: 8px;
}

.lang-dropdown-selected:hover svg {
    color: var(--wa-primary);
}

.lang-arrow {
    font-size: 10px;
    color: var(--wa-text-secondary);
    margin-left: auto;
}

html[dir="rtl"] .lang-arrow,
.wa-rtl .lang-arrow {
    margin-left: 0;
    margin-right: auto;
}

.lang-dropdown-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--wa-bg-main);
    border: 1px solid var(--wa-border-color);
    border-radius: 12px;
    overflow: hidden;
    display: none;
    /* hidden by default */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lang-dropdown-options.show {
    display: block;
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

.lang-option {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wa-text-primary);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.lang-option:hover {
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
}

/* ============================================
   Subscriptions Grid & License Activation
   ============================================ */
.subscriptions-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-bottom: 30px;
}

.subscription-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wa-bg-glass);
    padding: 20px 25px;
    border-radius: 16px;
    border: 1px solid var(--wa-border-subtle);
}

.subscription-status-header h2 {
    margin: 0 0 5px 0;
    font-size: 22px;
    color: var(--wa-primary);
}

.subscription-status-header p {
    margin: 0;
    font-size: 14px;
    color: var(--wa-text-secondary);
}

.badge-premium {
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--wa-primary);
    box-shadow: var(--wa-glow-active);
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.subscription-box {
    background: var(--wa-bg-card);
    border: 1px solid var(--wa-border-subtle);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.subscription-box:hover {
    transform: translateY(-10px);
    border-color: var(--wa-primary);
    background: rgba(255, 255, 255, 0.08);
}

.subscription-box.featured {
    border: 2px solid var(--wa-primary);
    background: rgba(37, 211, 102, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.plan-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wa-primary);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.plan-header .plan-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 15px;
}

.plan-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--wa-text-primary);
}

.plan-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--wa-text-primary);
    margin-bottom: 20px;
}

.plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--wa-text-secondary);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    flex-grow: 1;
}

.plan-features li {
    font-size: 13px;
    color: var(--wa-text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--wa-border-subtle);
}

.plan-features li:last-child {
    border-bottom: none;
}

.btn-plan {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--wa-bg-glass);
    color: var(--wa-text-primary);
    border: 1px solid var(--wa-border-color);
}

.btn-plan:hover {
    background: var(--wa-text-primary);
    color: #000;
}

.btn-plan.featured {
    background: var(--wa-primary);
    color: #000;
    border: none;
}

.btn-plan.featured:hover {
    background: #fff;
    transform: scale(1.05);
}

.trial-btn {
    border-color: var(--wa-warning);
    color: var(--wa-warning);
}

.trial-btn:hover {
    background: var(--wa-warning);
    color: #000;
}

/* License Activation Card */
.license-activation-card {
    background: var(--wa-bg-glass);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--wa-border-subtle);
    margin-top: 10px;
}

.license-activation-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.license-activation-card .card-header .icon {
    font-size: 24px;
}

.license-activation-card .card-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--wa-text-primary);
}

.activation-form {
    display: flex;
    gap: 15px;
}

.activation-form .modern-input {
    flex-grow: 1;
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.activation-form .btn {
    width: auto;
    padding: 0 30px;
}

.activation-hint {
    margin-top: 15px;
    font-size: 12px;
    color: var(--wa-text-secondary);
    text-align: center;
}

#wa-device-id-display {
    color: var(--wa-primary);
    font-weight: 600;
}

/* Audience SVG Styling */
.btn-extract svg {
    margin-bottom: 8px;
    color: var(--wa-text-primary);
}

.btn-extract:hover svg {
    transform: scale(1.1);
    color: inherit;
}