/* =========================================================
   WIZARD — design tokens (mirror ERP palette)
========================================================= */

:root {
    --bg-base: #f4f6f8;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --surface-hover: #f1f5f9;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-soft: #94a3b8;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;

    --line: #e2e8f0;
    --line-strong: #cbd5e1;

    --left-sidebar: #ffffff;
    --sidebar-text: #334155;
    --sidebar-muted: #94a3b8;

    --shadow-sm:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 2px 6px rgba(15, 23, 42, 0.04);

    --radius: 10px;
    --radius-sm: 6px;
}


/* =========================================================
   RESET — match ERP base.css
========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 15px;
    line-height: 1.5;

    background: var(--bg-base);
    color: var(--text-main);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   WIZARD SHELL — same grid pattern as the ERP
========================================================= */

.wizard-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);

    width: 100%;
    min-height: 100vh;

    background: var(--bg-base);
}


/* =========================================================
   SIDEBAR
========================================================= */

.wizard-sidebar {
    position: sticky;
    top: 0;

    width: 300px;
    height: 100vh;

    padding: 24px 18px 18px;

    display: flex;
    flex-direction: column;

    background: var(--left-sidebar);

    border-right: 1px solid var(--line);
}

.wizard-brand {
    padding: 2px 12px 26px;

    border-bottom: 1px solid var(--line);
}

.wizard-brand-kicker {
    margin: 0 0 3px;

    color: var(--sidebar-muted);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.wizard-brand h1 {
    margin: 0;

    color: var(--text-main);

    font-size: 22px;
    font-weight: 750;

    line-height: 1.2;
    letter-spacing: -0.03em;
}

.wizard-brand-sub {
    margin: 6px 0 0;

    color: var(--text-muted);

    font-size: 13px;
}


/* =========================================================
   STEP INDICATOR
========================================================= */

.wizard-steps {
    margin: 22px 0 0;
    padding: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;

    list-style: none;
}

.wizard-step {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 10px 12px;

    color: var(--text-muted);

    background: transparent;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 14px;
    font-weight: 500;

    cursor: default;
}

.wizard-step-number {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    color: var(--text-muted);
    background: var(--surface);

    border: 1px solid var(--line-strong);
    border-radius: 50%;

    font-size: 12px;
    font-weight: 700;

    flex-shrink: 0;
}

.wizard-step.is-current {
    color: var(--accent);
    background: var(--accent-soft);

    border-color: transparent;
}

.wizard-step.is-current .wizard-step-number {
    color: #ffffff;
    background: var(--accent);

    border-color: var(--accent);
}

.wizard-step.is-done {
    color: var(--text-main);
}

.wizard-step.is-done .wizard-step-number {
    color: #ffffff;
    background: var(--text-main);

    border-color: var(--text-main);
}

.wizard-step-label {
    flex: 1;
}


/* =========================================================
   SIDEBAR FOOTER
========================================================= */

.wizard-sidebar-footer {
    margin-top: auto;
    padding-top: 16px;

    border-top: 1px solid var(--line);

    color: var(--text-soft);

    font-size: 12px;
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.wizard-content {
    display: flex;
    flex-direction: column;
}

.wizard-topbar {
    padding: 22px 32px;

    background: var(--surface);

    border-bottom: 1px solid var(--line);
}

.wizard-topbar h2 {
    margin: 0;

    color: var(--text-main);

    font-size: 20px;
    font-weight: 700;

    letter-spacing: -0.02em;
}

.wizard-topbar p {
    margin: 4px 0 0;

    color: var(--text-muted);

    font-size: 14px;
}

.wizard-panel {
    flex: 1;

    width: 100%;
    max-width: 1280px;
    margin: 0 auto;

    padding: 32px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.wizard-card {
    width: 100%;
    max-width: 640px;

    padding: 24px;

    background: var(--surface);

    border: 1px solid var(--line);
    border-radius: var(--radius);

    box-shadow: var(--shadow-sm);
}

.wizard-card h3:first-child {
    margin-top: 0;
}

.wizard-card p {
    color: var(--text-muted);

    font-size: 14px;

    line-height: 1.55;
}


/* =========================================================
   FORMS
========================================================= */

.wizard-form {
    display: flex;
    flex-direction: column;

    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 14px 18px;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.form-row.is-full {
    grid-column: 1 / -1;
}

label {
    display: block;

    margin-bottom: 6px;

    color: var(--text-main);

    font-size: 13px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    padding: 9px 11px;

    color: var(--text-main);
    background: var(--surface);

    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);

    font-size: 14px;
    font-family: inherit;

    outline: none;

    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        background-color 150ms ease;
}

input,
select {
    min-height: 40px;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--text-soft);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);

    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-help {
    margin-top: 4px;

    color: var(--text-soft);

    font-size: 12px;
}

.form-error {
    margin-top: 6px;

    color: #b91c1c;

    font-size: 12px;
    font-weight: 500;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: #dc2626;
}


/* =========================================================
   BUTTONS / ACTIONS
========================================================= */

.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 6px;
}

.wizard-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 10px 18px;

    color: #ffffff;
    background: var(--accent);

    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: background-color 150ms ease;
}

.wizard-cta:hover {
    background-color: var(--accent-hover);

    border-color: var(--accent-hover);
}

.wizard-cta:disabled {
    opacity: 0.5;

    cursor: not-allowed;
}

.wizard-cta.is-secondary {
    color: var(--text-main);
    background: var(--surface);

    border-color: var(--line-strong);
}

.wizard-cta.is-secondary:hover {
    background: var(--surface-hover);
}

.wizard-link-back {
    color: var(--text-muted);

    text-decoration: none;

    font-size: 13px;
}

.wizard-link-back:hover {
    color: var(--text-main);
}


/* =========================================================
   WELCOME LIST
========================================================= */

.wizard-list {
    margin: 18px 0 24px;
    padding: 0;

    list-style: none;
}

.wizard-list li {
    position: relative;

    padding: 8px 0 8px 28px;

    color: var(--text-main);

    font-size: 14px;
}

.wizard-list li::before {
    content: counter(wizard-step);

    position: absolute;
    left: 0;
    top: 8px;

    width: 20px;
    height: 20px;

    color: var(--accent);
    background: var(--accent-soft);

    border-radius: 50%;

    font-size: 11px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-list {
    counter-reset: wizard-step;
}

.wizard-list li {
    counter-increment: wizard-step;
}


/* =========================================================
   FILE UPLOAD
========================================================= */

.wizard-file {
    display: flex;
    flex-direction: column;

    gap: 8px;

    padding: 18px;

    color: var(--text-muted);
    background: var(--surface-alt);

    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);

    text-align: center;
}

.wizard-file input[type="file"] {
    display: none;
}

.wizard-file-label {
    color: var(--accent);

    text-decoration: underline;

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 860px) {
    .wizard-shell {
        grid-template-columns: 1fr;
    }

    .wizard-sidebar {
        position: relative;

        width: 100%;
        height: auto;
    }

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