/* public/styles.css — WaPhone SaaS ("וואטסאפ ב-SMS") Vibrant Light & Colorful RTL Theme */
:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-sec: #475569;
    --text-muted: #94a3b8;

    --emerald: #10b981;
    --emerald-dark: #059669;
    --emerald-bg: #ecfdf5;
    --sky: #0ea5e9;
    --sky-bg: #f0f9ff;
    --indigo: #6366f1;
    --indigo-bg: #eef2ff;
    --violet: #8b5cf6;
    --violet-bg: #f5f3ff;
    --amber: #f59e0b;
    --amber-bg: #fffbeb;
    --rose: #f43f5e;
    --rose-bg: #fff1f2;

    --grad-brand: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
    --grad-hero: linear-gradient(135deg, #059669 0%, #0284c7 55%, #6366f1 100%);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px -8px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 50px -12px rgba(14, 165, 233, 0.18);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Heebo", "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(at 10% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 42%),
        radial-gradient(at 92% 4%, rgba(14, 165, 233, 0.13) 0px, transparent 45%),
        radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.07) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TOP NAVBAR --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.navbar-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--grad-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.4);
}

.brand-sub {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--emerald-dark);
    margin-top: -2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--emerald-bg);
    color: var(--emerald-dark);
    border: 1px solid rgba(16, 185, 129, 0.28);
    font-weight: 700;
    font-size: 0.86rem;
    direction: ltr;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.5);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -6px rgba(14, 165, 233, 0.48);
}

.btn-hero {
    padding: 16px 34px;
    font-size: 1.12rem;
    border-radius: 16px;
    background: var(--grad-hero);
    color: #fff;
    box-shadow: 0 14px 32px -8px rgba(2, 132, 199, 0.48);
}
.btn-hero:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 20px 38px -8px rgba(16, 185, 129, 0.52);
}

.btn-outline {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--sky);
    color: var(--sky);
    background: var(--sky-bg);
}

.btn-soft-danger {
    background: var(--rose-bg);
    color: var(--rose);
    border-color: rgba(244, 63, 94, 0.2);
}
.btn-soft-danger:hover:not(:disabled) { background: #ffe4e6; }

.btn-sm { padding: 7px 13px; font-size: 0.82rem; border-radius: 9px; }

/* --- CARDS --- */
.card {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* --- HERO SECTION --- */
.hero {
    padding: 58px 0 42px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ecfdf5, #eff6ff);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-dark);
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(2.1rem, 4.2vw, 3.25rem);
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.text-gradient {
    background: var(--grad-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.lead {
    font-size: 1.1rem;
    color: var(--text-sec);
    margin-bottom: 28px;
    max-width: 540px;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.86rem;
    color: var(--text-sec);
    font-weight: 600;
}

.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust i { color: var(--emerald); }

/* --- PHONE PREVIEW CARD --- */
.demo-phone {
    background: linear-gradient(160deg, #ffffff 0%, #f0fdfa 55%, #eff6ff 100%);
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}

.demo-bubble {
    padding: 12px 15px;
    border-radius: 16px;
    font-size: 0.9rem;
    margin-bottom: 11px;
    line-height: 1.45;
}
.demo-bubble.sms {
    background: #ffffff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
    box-shadow: var(--shadow-sm);
}
.demo-bubble.wa {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #14532d;
}
.demo-bubble.ivr {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #4c1d95;
}

/* --- FEATURES GRID --- */
.section { padding: 44px 0; }
.section-title {
    text-align: center;
    margin-bottom: 34px;
}
.section-title h2 {
    font-size: 1.9rem;
    font-weight: 900;
    margin-bottom: 8px;
}
.section-title p { color: var(--text-sec); font-size: 1rem; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 14px;
}
.ic-emerald { background: var(--emerald-bg); color: var(--emerald-dark); }
.ic-sky { background: var(--sky-bg); color: var(--sky); }
.ic-violet { background: var(--violet-bg); color: var(--violet); }
.ic-amber { background: var(--amber-bg); color: var(--amber); }
.ic-rose { background: var(--rose-bg); color: var(--rose); }
.ic-indigo { background: var(--indigo-bg); color: var(--indigo); }

.feature-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.feature-card p { font-size: 0.89rem; color: var(--text-sec); }

/* --- STEPS STRIP --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.step-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px;
    border: 1px solid var(--border);
    position: relative;
}
.step-num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--grad-brand);
    color: #fff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

/* --- FORMS & INPUTS --- */
.form-group { margin-bottom: 15px; }
.form-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

/* --- TOGGLE SWITCH --- */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}
.toggle-row:hover { border-color: #cbd5e1; background: #fcfdff; }
.toggle-row.active-row { border-color: rgba(16, 185, 129, 0.35); background: #f8fffc; }

.toggle-meta { display: flex; align-items: center; gap: 12px; }
.toggle-meta .mini-ic {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.toggle-title { font-weight: 700; font-size: 0.93rem; display: block; }
.toggle-desc { font-size: 0.79rem; color: var(--text-sec); display: block; }

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 27px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #cbd5e1;
    border-radius: 999px;
    transition: 0.22s;
}
.slider:before {
    content: "";
    position: absolute;
    height: 21px;
    width: 21px;
    right: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    transition: 0.22s;
}
.switch input:checked + .slider { background: var(--emerald); }
.switch input:checked + .slider:before { transform: translateX(-21px); }
.switch input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }

/* --- MODAL --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 200;
    overflow-y: auto;
}
.modal-backdrop.open { display: flex; }

.modal-box {
    background: #fff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 540px;
    padding: 28px;
    box-shadow: 0 28px 60px -15px rgba(15, 23, 42, 0.28);
    position: relative;
    animation: popIn 0.22s ease;
    max-height: 92vh;
    overflow-y: auto;
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: var(--surface-soft);
    color: var(--text-sec);
    cursor: pointer;
    font-size: 1rem;
}
.modal-close:hover { background: #e2e8f0; color: var(--text); }

/* --- WIZARD STEPPER --- */
.stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}
.step-pill {
    flex: 1;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
}
.step-pill.active { background: var(--sky-bg); color: var(--sky); border: 1px solid rgba(14, 165, 233, 0.3); }
.step-pill.done { background: var(--emerald-bg); color: var(--emerald-dark); }

/* --- QR & PAIRING CODE --- */
.pair-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--surface-soft);
    padding: 5px;
    border-radius: 13px;
    margin-bottom: 18px;
}
.pair-tab {
    border: none;
    background: transparent;
    padding: 9px;
    border-radius: 9px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--text-sec);
    cursor: pointer;
}
.pair-tab.active {
    background: #fff;
    color: var(--emerald-dark);
    box-shadow: var(--shadow-sm);
}

.qr-frame {
    width: 248px;
    height: 248px;
    margin: 0 auto 14px;
    border-radius: 20px;
    border: 2px dashed rgba(16, 185, 129, 0.4);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }

.pairing-code-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    color: var(--emerald-dark);
    background: var(--emerald-bg);
    border: 2px solid rgba(16, 185, 129, 0.35);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    direction: ltr;
    margin: 14px 0;
}

/* --- STATUS BADGES & TOASTS --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-green { background: var(--emerald-bg); color: var(--emerald-dark); }
.badge-amber { background: var(--amber-bg); color: #b45309; }
.badge-rose { background: var(--rose-bg); color: var(--rose); }
.badge-indigo { background: var(--indigo-bg); color: var(--indigo); }
.badge-sky { background: var(--sky-bg); color: var(--sky); }

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.dot-green { background: var(--emerald); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22); }
.dot-amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22); }
.dot-rose { background: var(--rose); box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.22); }

#toast-container {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #fff;
    border: 1px solid var(--border);
    border-right: 4px solid var(--emerald);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast.error { border-right-color: var(--rose); }
.toast.warning { border-right-color: var(--amber); }

/* --- VOICE CHOICE PILLS --- */
.voice-pills {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.voice-pill {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-sec);
    cursor: pointer;
}
.voice-pill.active {
    border-color: var(--sky);
    background: var(--sky-bg);
    color: #0369a1;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hero-grid, .features-grid, .steps-grid { grid-template-columns: 1fr; }
    .hero { padding: 34px 0 26px; }
    .phone-pill { display: none; }
}
