/* WhatsApp Channel Settings Module */
.channel-settings-page {
    --ch-primary: #2563eb;
    --ch-primary-soft: #dbeafe;
    --ch-success: #16a34a;
    --ch-warning: #f59e0b;
    --ch-danger: #dc2626;
    --ch-ink: #0f172a;
    --ch-muted: #64748b;
    --ch-bg: #f8fafc;
    padding: 1.25rem;
    background:
        radial-gradient(circle at 8% -8%, rgba(37, 99, 235, 0.08), transparent 35%),
        radial-gradient(circle at 92% 0%, rgba(99, 102, 241, 0.07), transparent 32%),
        var(--ch-bg);
    border-radius: 1rem;
}

.ch-title {
    color: var(--ch-ink);
    letter-spacing: 0.15px;
}

.ch-subtitle {
    color: var(--ch-muted);
}

.ch-card {
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.ch-card .card-header {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05), transparent);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.ch-status-badge {
    padding: 0.35rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.ch-status-badge.verified {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #BBf7d0;
}

.ch-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.ch-status-badge.failed {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ch-info-box {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.85rem;
}

.ch-info-box .label {
    color: var(--ch-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.ch-info-box .value {
    color: var(--ch-ink);
    font-size: 0.95rem;
    font-weight: 600;
}

.ch-alert {
    border-radius: 0.75rem;
    border-left: 4px solid;
}

.ch-alert.info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.ch-alert.warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.ch-test-btn {
    transition: all 0.2s;
}

.ch-test-btn:hover {
    transform: translateY(-1px);
}

.ch-webhook-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.ch-webhook-status.healthy {
    background: #22c55e;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.4);
}

.ch-webhook-status.unhealthy {
    background: #ef4444;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 currentColor;
    }
    50% {
        box-shadow: 0 0 0 4px transparent;
    }
}

.ch-limit-tier {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.88rem;
}

.ch-copy-btn {
    cursor: pointer;
    transition: all 0.15s;
}

.ch-copy-btn:hover {
    color: var(--ch-primary) !important;
}

/* ============================================================
   DARK MODE
   ============================================================ */
html.dark-theme .channel-settings-page {
    --ch-ink: #e2e8f0;
    --ch-muted: #94a3b8;
    --ch-bg: #0f172a;
    background:
        radial-gradient(circle at 8% -8%, rgba(37, 99, 235, 0.1), transparent 35%),
        radial-gradient(circle at 92% 0%, rgba(99, 102, 241, 0.08), transparent 32%),
        var(--ch-bg);
}

html.dark-theme .ch-title {
    color: #e2e8f0;
}

html.dark-theme .ch-subtitle {
    color: #94a3b8;
}

html.dark-theme .ch-card {
    background: #1e293b;
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html.dark-theme .ch-card .card-header {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent);
    border-bottom-color: rgba(37, 99, 235, 0.15);
}

html.dark-theme .ch-status-badge.verified {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

html.dark-theme .ch-status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

html.dark-theme .ch-status-badge.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

html.dark-theme .ch-info-box {
    background: #1a2332;
    border-color: rgba(37, 99, 235, 0.25);
}

html.dark-theme .ch-info-box .label {
    color: #94a3b8;
}

html.dark-theme .ch-info-box .value {
    color: #e2e8f0;
}

html.dark-theme .ch-alert.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #93c5fd;
}

html.dark-theme .ch-alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #fcd34d;
}

html.dark-theme .ch-webhook-status.healthy {
    background: #22c55e;
}

html.dark-theme .ch-webhook-status.unhealthy {
    background: #ef4444;
}

html.dark-theme .ch-limit-tier {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

html.dark-theme .ch-copy-btn:hover {
    color: #60a5fa !important;
}
