/* ── CV Writer Wizard ─────────────────────────────────────────────────────── */

#nw-cv-wizard {
    padding: 60px 0 80px;
    background: var(--nw-bg, #F8FAFC);
    min-height: 80vh;
}

.nw-cw-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.nw-cw-sidebar {
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 24px 0;
    position: sticky;
    top: 90px;
}

.nw-cw-sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
    padding: 0 20px 12px;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 8px;
}

.nw-cw-sidebar-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: default;
    transition: background 0.15s;
}

.nw-cw-sidebar-step__num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #CBD5E1;
    color: #94A3B8;
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.nw-cw-sidebar-step__label {
    font-size: 0.875rem;
    color: #64748B;
    font-weight: 500;
    transition: color 0.2s;
}

.nw-cw-sidebar-step.is-done .nw-cw-sidebar-step__num {
    background: #DCFCE7;
    border-color: #22C55E;
    color: #16A34A;
}

.nw-cw-sidebar-step.is-done .nw-cw-sidebar-step__num::after {
    content: '✓';
    font-size: 0.75rem;
}

.nw-cw-sidebar-step.is-done .nw-cw-sidebar-step__num span { display: none; }

.nw-cw-sidebar-step.is-active {
    background: #EFF6FF;
}

.nw-cw-sidebar-step.is-active .nw-cw-sidebar-step__num {
    background: #1D4ED8;
    border-color: #1D4ED8;
    color: #fff;
}

.nw-cw-sidebar-step.is-active .nw-cw-sidebar-step__label {
    color: #1D4ED8;
    font-weight: 600;
}

/* ── Main Panel ──────────────────────────────────────────────────────────── */

.nw-cw-main {
    min-width: 0;
}

#nw-cw-notice {
    display: none;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

#nw-cw-notice.nw-notice--error   { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
#nw-cw-notice.nw-notice--success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
#nw-cw-notice.nw-notice--info    { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

.nw-notice-link { color: inherit; font-weight: 700; }

.nw-cw-step-panel,
.nw-cw-preview-panel {
    display: none;
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    overflow: hidden;
}

.nw-cw-step-panel:first-of-type,
.nw-cw-step-panel[id="nw-cw-step-1"] {
    display: block; /* First step visible by default, JS takes over */
}

.nw-cw-step-head {
    padding: 28px 32px 20px;
    border-bottom: 1px solid #F1F5F9;
}

.nw-cw-step-head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 4px;
}

.nw-cw-step-head p {
    font-size: 0.875rem;
    color: #64748B;
    margin: 0;
}

.nw-cw-step-body {
    padding: 28px 32px;
}

.nw-cw-step-foot {
    padding: 20px 32px;
    border-top: 1px solid #F1F5F9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.nw-cw-step-counter {
    font-size: 0.8125rem;
    color: #94A3B8;
    font-weight: 500;
}

/* ── Form Fields ──────────────────────────────────────────────────────────── */

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

.nw-cw-form-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.nw-cw-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nw-cw-form-group.is-full {
    grid-column: 1 / -1;
}

.nw-cw-form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.nw-cw-form-group label .nw-optional {
    font-weight: 400;
    color: #94A3B8;
    font-size: 0.75rem;
}

.nw-cw-form-group input[type="text"],
.nw-cw-form-group input[type="email"],
.nw-cw-form-group input[type="tel"],
.nw-cw-form-group input[type="url"],
.nw-cw-form-group input[type="number"],
.nw-cw-form-group select,
.nw-cw-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #0F172A;
    background: #F8FAFC;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    font-family: inherit;
}

.nw-cw-form-group input:focus,
.nw-cw-form-group select:focus,
.nw-cw-form-group textarea:focus {
    outline: none;
    border-color: #1D4ED8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
}

.nw-cw-form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.nw-cw-form-group input.nw-input-error,
.nw-cw-form-group textarea.nw-input-error {
    border-color: #EF4444;
    background: #FFF5F5;
}

.nw-cw-hint {
    font-size: 0.78rem;
    color: #94A3B8;
    line-height: 1.4;
    margin-top: 4px;
}

/* ── Repeatable rows ─────────────────────────────────────────────────────── */

.nw-cw-repeat-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nw-cw-repeat-item {
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    background: #FAFBFC;
}

.nw-cw-repeat-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.nw-cw-repeat-item-num {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748B;
}

.nw-cw-remove-row {
    background: none;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    font-size: 0.8125rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nw-cw-remove-row:hover {
    color: #EF4444;
    background: #FEF2F2;
}

.nw-cw-add-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px dashed #CBD5E1;
    color: #1D4ED8;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    transition: background 0.15s, border-color 0.15s;
}

.nw-cw-add-row:hover {
    background: #EFF6FF;
    border-color: #1D4ED8;
}

.cw-end-date-wrap { transition: opacity 0.2s; }

.nw-cw-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.nw-cw-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1D4ED8;
}

.nw-cw-checkbox-row label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

/* ── Preview panel ───────────────────────────────────────────────────────── */

.nw-cw-preview-panel .nw-cw-step-head h2 {
    font-size: 1.25rem;
}

.nw-cw-preview-content {
    padding: 0 32px 8px;
}

.nw-cw-preview-section {
    border-bottom: 1px solid #F1F5F9;
    padding: 20px 0;
}

.nw-cw-preview-section:last-child {
    border-bottom: none;
}

.nw-cw-preview-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.nw-cw-preview-section-head h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1D4ED8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.nw-cw-preview-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 16px;
    padding: 4px 0;
    font-size: 0.875rem;
}

.nw-cw-preview-row--full {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    font-size: 0.9rem;
    color: #0F172A;
    padding: 4px 0;
}

.nw-cw-preview-label {
    color: #64748B;
    font-weight: 500;
}

.nw-cw-preview-val {
    color: #0F172A;
}

.nw-cw-preview-empty {
    font-size: 0.875rem;
    color: #94A3B8;
    font-style: italic;
    margin: 0;
}

/* ── Generate area ───────────────────────────────────────────────────────── */

.nw-cw-generate-area {
    padding: 24px 32px;
    border-top: 1px solid #F1F5F9;
}

.nw-cw-gen-info {
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nw-cw-gen-info .nw-free-badge {
    background: #DCFCE7;
    color: #16A34A;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
}

.nw-cw-gen-info .nw-credit-badge {
    background: #EFF6FF;
    color: #1D4ED8;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
}

.nw-cw-gen-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nw-cw-gen-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid #E2E8F0;
    border-top-color: #1D4ED8;
    border-radius: 50%;
    animation: nw-spin 0.7s linear infinite;
}

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

.nw-cw-gen-note {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: #94A3B8;
    font-style: italic;
}

.nw-cw-download-area {
    display: none;
    margin-top: 20px;
    padding: 16px 20px;
    background: #F0FDF4;
    border: 1.5px solid #BBF7D0;
    border-radius: 10px;
    display: none;
    align-items: center;
    gap: 16px;
}

.nw-cw-download-area .nw-dl-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.nw-cw-download-area p {
    margin: 0;
    font-size: 0.9rem;
    color: #166534;
    font-weight: 500;
}

.nw-cw-download-area p span {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: #4ADE80;
    margin-top: 2px;
}

/* ── Privacy bar ─────────────────────────────────────────────────────────── */

.nw-cw-privacy-bar {
    background: #F0FDF4;
    border-bottom: 1px solid #BBF7D0;
    padding: 10px 0;
}

.nw-cw-privacy-bar .nw-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    color: #166534;
    line-height: 1.5;
}

.nw-cw-privacy-bar svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #16A34A;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.nw-cw-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
    padding: 60px 0 40px;
    text-align: center;
    color: #fff;
}

.nw-cw-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.nw-cw-hero p {
    font-size: 1.0625rem;
    color: #94A3B8;
    margin: 0 auto;
    max-width: 520px;
}

.nw-cw-credit-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    color: #93C5FD;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .nw-cw-layout {
        grid-template-columns: 1fr;
    }

    .nw-cw-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 12px;
        border-radius: 10px;
    }

    .nw-cw-sidebar-title { display: none; }

    .nw-cw-sidebar-step {
        padding: 6px 10px;
        border-radius: 6px;
    }

    .nw-cw-sidebar-step__label { display: none; }
}

@media (max-width: 600px) {
    .nw-cw-step-head,
    .nw-cw-step-body,
    .nw-cw-step-foot,
    .nw-cw-preview-content,
    .nw-cw-generate-area {
        padding-left: 18px;
        padding-right: 18px;
    }

    .nw-cw-form-grid,
    .nw-cw-form-grid--3 {
        grid-template-columns: 1fr;
    }

    .nw-cw-preview-row {
        grid-template-columns: 1fr;
    }
}
