/* ============================================================
   ARAM MENU ONBOARDING - Stylesheet
   ============================================================ */

:root {
    --primary: #DA291C;
    --primary-dark: #B51E16;
    --primary-light: #FF4D3A;
    --primary-bg: rgba(218, 41, 28, 0.06);
    --secondary: #FFC72C;
    --secondary-dark: #E6A800;
    --accent: #FF8C00;
    --accent-dark: #E67E00;
    --bg: #FFFDF7;
    --bg-dark: #1A1A2E;
    --bg-dark-light: #252540;
    --text: #1C1C1C;
    --text-light: #6B7280;
    --text-lighter: #9CA3AF;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --error: #DC2626;
    --error-bg: #FEF2F2;
    --success: #059669;
    --success-bg: #ECFDF5;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 25px 60px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s ease;
    --transition-fast: 0.2s ease;
    --font: 'Tajawal', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { text-decoration: none; color: var(--primary); }
a:hover { text-decoration: underline; }

/* ==================== ONBOARDING CONTAINER ==================== */
.onboarding-container {
    display: flex;
    min-height: 100vh;
}

/* ==================== BRANDING PANEL (LEFT) ==================== */
.branding-panel {
    width: 440px;
    min-height: 100vh;
    background: linear-gradient(160deg, #B51E16 0%, #DA291C 30%, #8B0000 60%, #1A1A2E 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    flex-shrink: 0;
}

.branding-panel::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 199, 44, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.branding-panel::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.branding-content {
    text-align: center;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.branding-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 50px;
}

.branding-logo i { color: var(--secondary); }
.branding-logo .logo-highlight { color: var(--secondary); }
.branding-logo:hover { text-decoration: none; }

/* Branding Slideshow */
.branding-slideshow {
    position: relative;
    min-height: 280px;
    margin-bottom: 30px;
}

.branding-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.branding-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.slide-illustration {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-main-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.slide-floating-icons {
    position: absolute;
    inset: 0;
}

.slide-floating-icons i {
    position: absolute;
    font-size: 1rem;
    opacity: 0.7;
    animation: floatAround 4s ease-in-out infinite;
}

.slide-floating-icons .f1 { top: -5px; right: 10px; animation-delay: 0s; color: var(--secondary); }
.slide-floating-icons .f2 { bottom: 5px; right: -5px; animation-delay: 1s; color: var(--accent); }
.slide-floating-icons .f3 { bottom: 0; left: 5px; animation-delay: 2s; color: var(--secondary); }

@keyframes floatAround {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.1); }
}

.branding-slide h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.branding-slide p {
    font-size: 0.9rem;
    opacity: 0.75;
    line-height: 1.8;
    max-width: 300px;
    margin: 0 auto;
}

.branding-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.bdot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bdot.active {
    background: var(--secondary);
    width: 28px;
    border-radius: 20px;
}

/* Branding Stats */
.branding-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bstat {
    text-align: center;
}

.bstat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--secondary);
}

.bstat-label {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ==================== FORM PANEL (RIGHT) ==================== */
.form-panel {
    flex: 1;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #FAFBFC;
    padding: 30px 20px;
}

.form-panel-inner {
    width: 100%;
    max-width: 680px;
    padding: 20px 0 60px;
}

/* ==================== PROGRESS BAR ==================== */
.progress-container {
    margin-bottom: 40px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 12.5%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: default;
    opacity: 0.4;
    transition: all var(--transition);
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 0.7;
}

.progress-step.completed .ps-circle {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.ps-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-lighter);
    transition: all var(--transition);
}

.progress-step.active .ps-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.15);
}

/* ==================== STEPS WRAPPER ==================== */
.steps-wrapper {
    position: relative;
}

.form-step {
    display: none;
    animation: fadeSlideIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== STEP HEADER ==================== */
.step-header {
    text-align: center;
    margin-bottom: 35px;
}

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 16px;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.step-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==================== STEP FOOTER ==================== */
.step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--border-light);
    gap: 12px;
}

.step-footer .btn {
    min-width: 140px;
}

/* ==================== FORM ELEMENTS ==================== */
.input-group {
    margin-bottom: 22px;
}

.input-label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text);
}

.input-label.small {
    font-size: 0.82rem;
    font-weight: 600;
}

.required { color: var(--error); }

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--white);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.08);
}

.form-input::placeholder { color: var(--text-lighter); }

.form-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}

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

.input-hint {
    font-size: 0.8rem;
    color: var(--text-lighter);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-error {
    display: none;
    font-size: 0.82rem;
    color: var(--error);
    margin-top: 6px;
    align-items: center;
    gap: 5px;
}

.input-error.show {
    display: flex;
}

.input-error::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
}

.form-input.error {
    border-color: var(--error);
    background: var(--error-bg);
}

.form-input.success {
    border-color: var(--success);
    background: var(--success-bg);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-align: center;
    white-space: nowrap;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(218, 41, 28, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-text-link {
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 0.88rem;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-text-link:hover {
    text-decoration: underline;
}

.btn-loading,
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== STEP 1: EMAIL + OTP ==================== */
.email-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    transition: all var(--transition-fast);
}

.email-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.08);
}

.email-prefix {
    padding: 13px 16px;
    background: var(--border-light);
    font-size: 1.1rem;
    color: #4285F4;
    border-left: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-input {
    border: none !important;
    border-radius: 0 !important;
    flex: 1;
}

.email-input:disabled,
.phone-input:disabled {
    background: var(--border-light);
    cursor: not-allowed;
}

/* Phone input (used for whatsapp in step 4 — keep for reference) */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    transition: all var(--transition-fast);
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.08);
}

.phone-prefix {
    padding: 13px 16px;
    background: var(--border-light);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-light);
    border-left: 2px solid var(--border);
    white-space: nowrap;
}

.phone-input {
    border: none !important;
    border-radius: 0 !important;
    flex: 1;
}

.phone-input:focus {
    box-shadow: none !important;
}

.step-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-lighter);
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Password Section */
.password-section {
    margin-top: 20px;
    padding-top: 20px;
}
.step-divider {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}
.step-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
    z-index: 0;
}
.step-divider span {
    background: var(--bg-card);
    padding: 0 16px;
    position: relative;
    z-index: 1;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 700;
}

/* OTP Section */
.otp-section {
    margin-top: 10px;
}

.otp-header {
    text-align: center;
    margin-bottom: 24px;
}

.otp-sent-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 16px;
}

.otp-header h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.otp-header p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

.otp-note {
    margin-top: 10px;
    padding: 8px 12px;
    background: #FFF7ED;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: #C2410C;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.otp-note i {
    font-size: 0.85rem;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 20px;
}

.otp-digit {
    width: 60px;
    height: 65px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    transition: all var(--transition-fast);
    outline: none;
}

.otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.1);
}

.otp-digit.filled {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.otp-digit.error {
    border-color: var(--error);
    background: var(--error-bg);
    animation: shake 0.4s ease;
}

/* ==================== PIN INPUTS ==================== */
.pin-section {
    margin-top: 16px;
    padding: 20px;
    background: var(--primary-bg);
    border: 2px dashed var(--primary-light);
    border-radius: 12px;
}

.pin-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}

.pin-digit {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    font-family: 'Tajawal', monospace;
    transition: all 0.2s;
    outline: none;
}

.pin-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.15);
}

.pin-digit.filled {
    border-color: var(--primary);
    background: var(--primary-bg);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.otp-error {
    display: none;
    text-align: center;
    color: var(--error);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.otp-error.show { display: block; }

.otp-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--success);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.otp-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.resend-timer {
    font-size: 0.85rem;
    color: var(--text-lighter);
}

/* ==================== STEP 2: APP TYPE SELECTION ==================== */
.app-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.app-type-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px 20px;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
    text-align: center;
}

.app-type-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.app-type-card.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.08);
}

.app-type-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.atc-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.atc-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 14px;
    transition: all var(--transition);
}

.app-type-card.selected .atc-icon {
    background: var(--primary);
    color: var(--white);
}

.atc-content h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.atc-content > p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.atc-features {
    list-style: none;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atc-features li {
    font-size: 0.78rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.atc-features li i {
    color: var(--success);
    font-size: 0.7rem;
}

.atc-check {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--primary);
    font-size: 1.4rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition);
}

.app-type-card.selected .atc-check {
    opacity: 1;
    transform: scale(1);
}

/* ==================== DOMAIN INPUT ==================== */
.domain-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    transition: all var(--transition-fast);
}

.domain-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.08);
}

.domain-prefix {
    padding: 13px 16px;
    background: var(--border-light);
    font-size: 0.9rem;
    color: var(--text-light);
    border-left: 2px solid var(--border);
    white-space: nowrap;
    direction: ltr;
}

.domain-input {
    border: none !important;
    border-radius: 0 !important;
    flex: 1;
}

.domain-input:focus {
    box-shadow: none !important;
}

/* ==================== STEP 5: BRANDING ==================== */
.logo-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 35px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
    position: relative;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.logo-upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.1);
}

.logo-upload-placeholder {
    color: var(--text-lighter);
}

.logo-upload-placeholder i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    color: var(--primary);
    opacity: 0.5;
}

.logo-upload-placeholder span {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-light);
}

.logo-upload-placeholder small {
    font-size: 0.78rem;
    color: var(--text-lighter);
}

.logo-preview {
    position: relative;
    display: inline-block;
}

.logo-preview img {
    max-width: 200px;
    max-height: 120px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.logo-remove-btn {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--error);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: var(--shadow);
}

/* Color Picker */
.color-picker-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-preset {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.color-preset:hover {
    transform: scale(1.15);
}

.color-preset.active {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--text);
}

.color-custom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-color-input {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: var(--white);
}

.color-hex-input {
    width: 110px !important;
    text-align: center;
    font-family: monospace;
    letter-spacing: 1px;
}

/* ==================== STEP 6: TEMPLATE SELECTION ==================== */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.template-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
}

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

.template-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.08);
}

.template-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.template-preview {
    padding: 16px;
    background: var(--border-light);
}

.tp-mockup {
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tp-header {
    height: 30px;
}

.tp-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tp-item {
    height: 10px;
    border-radius: 3px;
    width: 100%;
}

.tp-item.short { width: 65%; }

/* Template color variations */
.tp-modern .tp-header { background: #1A1A2E; }
.tp-modern .tp-item { background: #E5E7EB; }

.tp-classic .tp-header { background: #5C4033; }
.tp-classic .tp-item { background: #E5E7EB; }

.tp-bold .tp-header { background: #C62828; }
.tp-bold .tp-item { background: #E5E7EB; }

.tp-minimal .tp-header { background: #37474F; }
.tp-minimal .tp-item { background: #E5E7EB; }

.template-info {
    padding: 14px 16px;
    text-align: center;
}

.template-info h4 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.template-info p {
    font-size: 0.8rem;
    color: var(--text-light);
}

.template-check {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--primary);
    font-size: 1.4rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition);
}

.template-card.selected .template-check {
    opacity: 1;
    transform: scale(1);
}

/* ==================== STEP 7: PLANS ==================== */
.plans-grid.onboarding-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.plan-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
}

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

.plan-card.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.08);
}

.plan-card.popular {
    border-color: var(--secondary);
}

.plan-card.popular.selected {
    border-color: var(--primary);
}

.plan-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
    padding: 4px 20px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.plan-card.popular .plan-header {
    padding-top: 8px;
}

.plan-header {
    text-align: center;
    margin-bottom: 18px;
}

.plan-header h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.price-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.price-currency {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.price-period {
    font-size: 0.8rem;
    color: var(--text-lighter);
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-features li {
    font-size: 0.82rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    color: var(--success);
    font-size: 0.75rem;
}

.plan-check {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--primary);
    font-size: 1.4rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition);
}

.plan-card.selected .plan-check {
    opacity: 1;
    transform: scale(1);
}

/* ==================== STEP 8: REVIEW ==================== */
.review-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.review-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--border-light);
}

.review-section-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-section-header h4 i {
    color: var(--primary);
    font-size: 0.85rem;
}

.review-edit-btn {
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 0.82rem;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-edit-btn:hover {
    text-decoration: underline;
}

.review-grid {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-item.full-width {
    grid-column: 1 / -1;
}

.review-label {
    font-size: 0.78rem;
    color: var(--text-lighter);
    font-weight: 500;
}

.review-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: inline-block;
}

/* Terms Checkbox */
.terms-agreement {
    margin-top: 25px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 5px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.65rem;
}

.checkbox-label a {
    color: var(--primary);
    font-weight: 600;
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.success-modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    text-align: center;
    max-width: 480px;
    width: 100%;
    animation: modalPop 0.4s ease;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.success-animation {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin: 0 auto 20px;
    animation: successPop 0.6s ease 0.2s both;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-modal h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.success-modal p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* EmailJS status indicator */
.email-status {
    margin-top: 10px;
    padding: 10px 14px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.email-status i {
    color: #059669;
}
.bypass-phone-btn {
    margin-top: 10px;
    background: transparent;
    color: var(--text-lighter);
    border: 1px dashed var(--border);
    font-size: 0.82rem;
    padding: 8px;
    opacity: 0.6;
}

.bypass-phone-btn:hover {
    opacity: 1;
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 140, 0, 0.05);
}
.loading-spinner-large {
    text-align: center;
    color: var(--white);
}

.spinner-large {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: block;
    margin: 0 auto 16px;
}

.loading-spinner-large p {
    font-size: 1rem;
    font-weight: 500;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .branding-panel {
        display: none;
    }

    .form-panel {
        padding: 20px 16px;
    }

    .form-panel-inner {
        padding: 10px 0 40px;
    }

    .app-types-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .plans-grid.onboarding-plans {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .templates-grid {
        grid-template-columns: 1fr 1fr;
    }

    .progress-step span {
        display: none;
    }

    .progress-steps {
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .templates-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }

    .step-header h2 {
        font-size: 1.3rem;
    }

    .step-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .step-footer .btn {
        width: 100%;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .progress-step {
        min-width: 40px;
    }

    .ps-circle {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .otp-digit {
        width: 50px;
        height: 55px;
        font-size: 1.3rem;
    }

    .color-presets {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 10px 10px;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-digit {
        width: 45px;
        height: 50px;
        font-size: 1.2rem;
    }

    .otp-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .branding-stats {
        gap: 15px;
    }

    .bstat-number {
        font-size: 1.1rem;
    }

    .success-modal {
        padding: 30px 20px;
    }
}
