/* ═══════════════════════════════════════════
   AI Chatbot Page — UX-Centered Styles
   ═══════════════════════════════════════════ */

/* ── Tab Navigation ── */
.ai-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.ai-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.2s;
}

.ai-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.ai-tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* ── Wizard Container ── */
.wizard-container {
    max-width: 640px;
    margin: 0 auto;
    animation: wizardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wizardSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Wizard Hero ── */
.wizard-hero {
    text-align: center;
    padding: 1.2rem 1rem 0.8rem;
    position: relative;
    overflow: hidden;
}

.wizard-hero-icon {
    font-size: 2.8rem;
    margin-bottom: 8px;
    display: inline-block;
    animation: wizardFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}

@keyframes wizardFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-6px) rotate(3deg);
    }
}

.wizard-hero h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), #8b5cf6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wizard-hero p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 0;
}

/* ── Wizard Steps ── */
.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--bg-hover);
    transition: all 0.3s;
}

.wizard-step.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.wizard-step.done {
    background: var(--success, #27ae60);
    color: #fff;
}

.wizard-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    transition: all 0.3s;
}

.wizard-step.active .wizard-step-num,
.wizard-step.done .wizard-step-num {
    background: rgba(255, 255, 255, 0.3);
    animation: stepPulse 2s ease-in-out infinite;
}

@keyframes stepPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    }
}

/* ── Template Cards (Premium) ── */
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.template-card {
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    background: var(--bg-card, #fff);
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color, #6366f1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.template-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.template-card:hover::before {
    opacity: 1;
}

.template-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(139, 92, 246, 0.06));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 6px 20px rgba(99, 102, 241, 0.1);
    animation: cardSelected 0.4s ease;
}

@keyframes cardSelected {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.template-card.selected::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--primary-color, #6366f1), #8b5cf6, #a855f7);
    height: 3px;
}

.template-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
    from {
        transform: scale(0) rotate(-180deg);
    }

    to {
        transform: scale(1) rotate(0);
    }
}

.template-card-icon {
    font-size: 2rem;
    margin-bottom: 6px;
    display: inline-block;
    transition: transform 0.3s;
}

.template-card:hover .template-card-icon {
    transform: scale(1.15) rotate(-5deg);
}

.template-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.template-card-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

/* ── Tone Selector ── */
.tone-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tone-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.tone-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.tone-option.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.06);
}

.tone-option-emoji {
    font-size: 1.5rem;
}

.tone-option-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.tone-option-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ── Model Selector ── */
.model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.model-option {
    text-align: center;
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.model-option:hover {
    border-color: var(--primary-color);
}

.model-option.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.06);
}

.model-option-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.model-option-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.model-option-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.model-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 4px;
}

.model-badge.recommended {
    background: var(--primary-color);
    color: #fff;
}

/* ── Chat Preview ── */
.chat-preview {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.chat-preview-header {
    background: linear-gradient(135deg, #075e54, #128c7e);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-preview-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-preview-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-preview-status {
    font-size: 0.72rem;
    opacity: 0.8;
}

.chat-preview-body {
    padding: 16px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: #e5ddd5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[data-theme="dark"] .chat-preview-body {
    background: #1a2733;
}

.chat-bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-wrap: break-word;
    animation: bubbleIn 0.3s ease;
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-bubble.user {
    align-self: flex-end;
    background: #dcf8c6;
    color: #111;
    border-bottom-right-radius: 2px;
}

[data-theme="dark"] .chat-bubble.user {
    background: #005c4b;
    color: #e9edef;
}

.chat-bubble.bot {
    align-self: flex-start;
    background: #fff;
    color: #111;
    border-bottom-left-radius: 2px;
}

[data-theme="dark"] .chat-bubble.bot {
    background: #1f2c34;
    color: #e9edef;
}

.chat-bubble-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 4px;
}

.chat-typing {
    align-self: flex-start;
    background: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    gap: 4px;
}

[data-theme="dark"] .chat-typing {
    background: #1f2c34;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-preview-input {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card, #fff);
}

.chat-preview-input input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    outline: none;
    background: var(--bg-hover);
}

.chat-preview-input button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.chat-preview-input button:hover {
    transform: scale(1.05);
}

.chat-preview-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Persona Cards (redesigned) ── */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.persona-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card, #fff);
    transition: all 0.2s;
}

.persona-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.persona-card-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #6c5ce7);
}

.persona-card-body {
    padding: 1rem;
}

.persona-card-tone {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--bg-hover);
}

.persona-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

/* ── Wizard Buttons ── */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ── WhatsApp-Style Test Chat ── */
.wa-chat-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    background: var(--bg-card, #fff);
}

.wa-chat-header {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.wa-chat-header-info {
    flex: 1;
}

.wa-chat-header-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.wa-chat-header-status {
    font-size: 0.75rem;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wa-chat-header-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7eff9e;
    display: inline-block;
}

.wa-chat-body {
    padding: 16px;
    min-height: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: #e5ddd5 url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M20 2c1 0 2 1 2 2s-1 2-2 2-2-1-2-2 1-2 2-2' fill='%23d5cec5' opacity='.15'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23p)' width='200' height='200'/%3E%3C/svg%3E");
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[data-theme="dark"] .wa-chat-body {
    background: #0b141a url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M20 2c1 0 2 1 2 2s-1 2-2 2-2-1-2-2 1-2 2-2' fill='%23ffffff' opacity='.04'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23p)' width='200' height='200'/%3E%3C/svg%3E");
}

.wa-chat-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f0f2f5;
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .wa-chat-footer {
    background: #1f2c34;
}

.wa-chat-input {
    flex: 1;
    border: none;
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 0.9rem;
    outline: none;
    background: #fff;
    color: var(--text-primary, #111);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

[data-theme="dark"] .wa-chat-input {
    background: #2a3942;
    color: #e9edef;
}

.wa-chat-input:focus {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.wa-chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.wa-chat-send-btn:hover {
    background: #1da851;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.wa-chat-send-btn:active {
    transform: scale(0.95);
}

.wa-chat-send-btn:disabled {
    background: #a0a0a0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ═══════════════════════════════════════════════
   WIZARD V2 — Compact, Emotional, Premium
   Designed for 645px viewport — NO SCROLL
   ═══════════════════════════════════════════════ */

/* ── Modal Shell ── */
.wiz-modal {
    width: 540px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: wizModalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: var(--bg-card, #fff);
}

@keyframes wizModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ── Gradient Header with Hero ── */
.wiz-header {
    position: relative;
    text-align: center;
    padding: 22px 20px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #a855f7 70%, #c084fc 100%);
    overflow: hidden;
    flex-shrink: 0;
}

.wiz-header-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
}

.wiz-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.wiz-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.wiz-hero-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    animation: wizFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.2));
}

@keyframes wizFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.wiz-hero-title {
    margin: 0 0 2px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.01em;
}

.wiz-hero-sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

/* ── Dot Stepper ── */
.wiz-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.wiz-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
}

.wiz-dot.active {
    background: #fff;
    color: #6366f1;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.wiz-dot.done {
    background: rgba(255, 255, 255, 0.9);
    color: #22c55e;
    font-weight: 700;
}

.wiz-dot-line {
    width: 24px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.4s;
}

.wiz-dot-line.filled {
    background: rgba(255, 255, 255, 0.7);
}

/* ── Body ── */
.wiz-body {
    flex: 1;
    padding: 16px 20px 12px;
    overflow-y: auto;
    min-height: 0;
}

/* ── STEP 1: Horizontal Cards ── */
.wiz-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wiz-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    background: var(--bg-card, #fff);
}

.wiz-card:hover {
    border-color: #8b5cf6;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.wiz-card.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.08));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 4px 16px rgba(99, 102, 241, 0.1);
}

.wiz-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover, #f3f4f6);
    border-radius: 10px;
    transition: all 0.3s;
}

.wiz-card:hover .wiz-card-icon,
.wiz-card.selected .wiz-card-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.15));
    transform: scale(1.08);
}

.wiz-card-body {
    flex: 1;
    min-width: 0;
}

.wiz-card-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 1px;
}

.wiz-card-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wiz-card-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color, #d1d5db);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    font-size: 0.65rem;
    transition: all 0.3s;
}

.wiz-card.selected .wiz-card-check {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
    transform: scale(1);
    transition: all 0.2s ease;
}

/* ── STEP 2: Tone Pills ── */
.wiz-section-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wiz-tone-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wiz-tone {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.25s;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.wiz-tone:hover {
    border-color: #8b5cf6;
}

.wiz-tone.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.1));
    font-weight: 600;
}

.wiz-tone-label {
    font-size: 0.78rem;
}

/* ── STEP 2: Model Row ── */
.wiz-model-row {
    display: flex;
    gap: 8px;
}

.wiz-model {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.wiz-model:hover {
    border-color: #8b5cf6;
}

.wiz-model.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.1));
}

.wiz-model-icon {
    font-size: 1.3rem;
}

.wiz-model-name {
    font-size: 0.75rem;
    font-weight: 600;
}

.wiz-model-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── STEP 3: Form ── */
.wiz-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wiz-form-row label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.wiz-form-row .form-control {
    font-size: 0.88rem;
    padding: 7px 12px;
}

.wiz-form-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wiz-advanced-toggle {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.wiz-advanced-toggle:hover {
    color: var(--primary-color);
}

/* ── Footer ── */
.wiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color, #eee);
    flex-shrink: 0;
    background: var(--bg-card, #fff);
}

.wiz-btn-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color, #d1d5db);
    background: var(--bg-card, #fff);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.wiz-btn-back:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-2px);
}

.wiz-btn-next {
    padding: 10px 28px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wiz-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.wiz-btn-next:active {
    transform: scale(0.97);
}

.wiz-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wiz-btn-next.ready {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

/* ── Dark Mode Overrides ── */
[data-theme="dark"] .wiz-card {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .wiz-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .wiz-card-icon {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .wiz-tone,
[data-theme="dark"] .wiz-model {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .wiz-card-check {
    border-color: rgba(255, 255, 255, 0.15);
}