* {
    box-sizing: border-box;
}

:root {
    --ink: #1b2430;
    --ink-soft: #68727e;
    --line: #e1e6eb;
    --surface: #ffffff;
    --canvas: #f5f7f9;

    --brand: #2f5d50;
    --brand-dark: #234840;
    --brand-tint: #e8f0ed;

    --danger: #c0392b;
    --success: #1e6b3e;

    --radius: 10px;

    --shadow:
        0 1px 2px rgba(20, 30, 40, 0.04),
        0 8px 28px rgba(20, 30, 40, 0.07);
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--canvas);
    color: var(--ink);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}


/* =========================================================
   PAGE
========================================================= */

.vendor-page {
    min-height: 100vh;
    padding: 40px 16px 70px;
}

.vendor-shell {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}


/* =========================================================
   LOGO / HEADER
========================================================= */

.vendor-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.vendor-logo img {
    width: auto;
    height: 48px;
    max-width: 180px;
    object-fit: contain;
}

.vendor-heading {
    text-align: center;
    margin-bottom: 6px;
}

.vendor-heading h1 {
    margin: 0 0 6px;

    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.vendor-heading p {
    margin: 0;

    color: var(--ink-soft);
    font-size: 0.94rem;
}


/* =========================================================
   MESSAGE
========================================================= */

.vendor-message {
    margin: 20px auto 0;
    padding: 12px 16px;

    border-radius: 8px;

    font-size: 0.88rem;
    line-height: 1.5;
}

.vendor-message.alert-success {
    background: #e8f5ee;
    color: var(--success);
    border: 1px solid #bfe3cd;
}

.vendor-message.alert-danger {
    background: #fbeae8;
    color: var(--danger);
    border: 1px solid #f3c6c0;
}

.vendor-message p {
    margin: 0 0 4px;
}

.vendor-message p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   STEP TRACK
========================================================= */

.step-track {
    width: 100%;
    max-width: 560px;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    margin: 30px auto 28px;
}

.step-node {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;
}

.step-node:not(:last-child)::after {
    content: "";

    position: absolute;

    top: 17px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);

    height: 2px;

    background: var(--line);

    z-index: 0;
}

.step-node.completed:not(:last-child)::after {
    background: var(--brand);
}

.step-circle {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--surface);
    border: 2px solid var(--line);

    color: var(--ink-soft);

    font-size: 0.84rem;
    font-weight: 700;

    position: relative;
    z-index: 1;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.step-node.active .step-circle {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand);
}

.step-node.completed .step-circle {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.step-label {
    margin-top: 8px;

    color: var(--ink-soft);

    font-size: 0.77rem;
    font-weight: 600;
    line-height: 1.25;

    text-align: center;
}

.step-label span {
    display: block;
}

.step-node.active .step-label,
.step-node.completed .step-label {
    color: var(--ink);
}


/* =========================================================
   CARD
========================================================= */

.vendor-card {
    background: var(--surface);

    border: 1px solid var(--line);
    border-radius: var(--radius);

    box-shadow: var(--shadow);

    padding: 32px;
}


/* =========================================================
   STEP
========================================================= */

.step-container {
    display: none;
}

.step-container.active {
    display: block;

    animation: stepFade 0.2s ease;
}

@keyframes stepFade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   SECTION HEADER
========================================================= */

.fieldset-header {
    margin-bottom: 24px;
}

.fieldset-header h2 {
    margin: 0 0 5px;

    font-size: 1.08rem;
    font-weight: 700;
}

.fieldset-header p {
    margin: 0;

    color: var(--ink-soft);

    font-size: 0.84rem;
}


/* =========================================================
   FORM GRID
========================================================= */

.form-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px 20px;
}

.form-field {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.form-field.span-2 {
    grid-column: span 2;
}


/* =========================================================
   LABELS
========================================================= */

.form-field label {
    margin-bottom: 6px;

    color: var(--ink);

    font-size: 0.82rem;
    font-weight: 600;
}

.form-field label.required::after {
    content: " *";

    color: var(--danger);
}

.field-help {
    display: block;

    margin-top: 5px;

    color: var(--ink-soft);

    font-size: 0.74rem;
    line-height: 1.4;
}


/* =========================================================
   INPUT
========================================================= */

.form-control {
    width: 100%;
    min-height: 42px;

    padding: 9px 12px;

    background: var(--surface);

    border: 1px solid var(--line);
    border-radius: 8px;

    color: var(--ink);

    font-size: 0.9rem;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--brand);

    box-shadow:
        0 0 0 3px var(--brand-tint);

    outline: none;
}

.form-control[type="file"] {
    padding: 7px 10px;
}

.text-uppercase {
    text-transform: uppercase;
}


/* =========================================================
   SELECT2
========================================================= */

.select2-container {
    width: 100% !important;
}

.select2-container--default
.select2-selection--single {
    height: 42px !important;

    display: flex !important;
    align-items: center;

    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
}

.select2-container--default
.select2-selection--single
.select2-selection__rendered {
    padding-left: 12px !important;

    color: var(--ink) !important;

    line-height: 40px !important;
}

.select2-container--default
.select2-selection--single
.select2-selection__arrow {
    height: 40px !important;
}

.select2-container--default.select2-container--focus
.select2-selection--single,
.select2-container--default.select2-container--open
.select2-selection--single {
    border-color: var(--brand) !important;

    box-shadow:
        0 0 0 3px var(--brand-tint);
}


/* Multiple select */

.select2-container--default
.select2-selection--multiple {
    min-height: 42px;

    padding: 3px 6px;

    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
}

.select2-container--default.select2-container--focus
.select2-selection--multiple {
    border-color: var(--brand) !important;

    box-shadow:
        0 0 0 3px var(--brand-tint);
}


/* =========================================================
   MAP
========================================================= */

#mapPreview {
    width: 100%;
    height: 230px;

    border: 1px solid var(--line);
    border-radius: 8px;

    overflow: hidden;

    background: #eef1f3;
}


/* =========================================================
   VALIDATION
========================================================= */

label.error {
    display: block;

    margin-top: 5px;
    margin-bottom: 0;

    color: var(--danger);

    font-size: 0.76rem;
    font-weight: 500;
}

.form-control.error,
.select2-container .select2-selection.error {
    border-color: var(--danger) !important;
}


/* =========================================================
   BUTTONS
========================================================= */

.step-actions {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 28px;
    padding-top: 20px;

    border-top: 1px solid var(--line);
}

.step-actions.align-end {
    justify-content: flex-end;
}

.btn {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 9px 20px;

    border-radius: 8px;

    font-size: 0.88rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary,
.btn-success {
    background: var(--brand);
    border: 1px solid var(--brand);

    color: #fff;
}

.btn-primary:hover,
.btn-success:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);

    color: #fff;
}

.btn-secondary {
    background: transparent;

    border: 1px solid var(--line);

    color: var(--ink-soft);
}

.btn-secondary:hover {
    background: var(--canvas);

    color: var(--ink);
}

.btn:disabled {
    opacity: 0.65;

    cursor: not-allowed;
}

.btn-arrow {
    font-size: 1rem;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .vendor-page {
        padding: 28px 12px 50px;
    }

    .vendor-card {
        padding: 22px 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .form-field.span-2 {
        grid-column: span 1;
    }

    #mapPreview {
        height: 210px;
    }
}


@media (max-width: 480px) {

    .vendor-page {
        padding: 22px 10px 40px;
    }

    .vendor-logo {
        margin-bottom: 14px;
    }

    .vendor-logo img {
        height: 42px;
    }

    .vendor-heading h1 {
        font-size: 1.45rem;
    }

    .vendor-heading p {
        font-size: 0.82rem;
    }

    .step-track {
        margin: 24px auto;
    }

    .step-circle {
        width: 32px;
        height: 32px;
    }

    .step-node:not(:last-child)::after {
        top: 15px;

        left: calc(50% + 19px);
        right: calc(-50% + 19px);
    }

    .step-label {
        font-size: 0.69rem;
    }

    .vendor-card {
        padding: 18px 14px;
    }

    .fieldset-header {
        margin-bottom: 20px;
    }

    .step-actions {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .step-actions.align-end {
        align-items: stretch;
    }

    .step-actions .btn {
        width: 100%;
    }

    #mapPreview {
        height: 190px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.btn:focus-visible,
.form-control:focus-visible {
    outline: 3px solid var(--brand-tint);
    outline-offset: 1px;
}


@media (prefers-reduced-motion: reduce) {

    .step-container.active,
    .step-circle,
    .btn,
    .form-control {
        animation: none;
        transition: none;
    }
}