﻿.frm-wrap {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 0.75rem 3rem;
}

.frm-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* ── Header ── */
.frm-header {
    background: #1B3A6B;
    padding: 1.25rem 1.5rem 0;
}

    .frm-header h1 {
        font-size: 17px;
        font-weight: 700;
        color: #fff;
        margin: 0 0 1rem;
        letter-spacing: -.01em;
    }

.progress-track {
    height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: #FDE68A;
    border-radius: 2px;
    transition: width .4s ease;
}

/* ── Step tabs ── */
.step-tabs {
    display: flex;
    margin-top: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .step-tabs::-webkit-scrollbar {
        display: none;
    }

.step-tab {
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px 10px;
    border-bottom: 2px solid transparent;
    transition: border-color .2s;
}

    .step-tab.active {
        border-bottom-color: #FDE68A;
    }

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.6);
    transition: background .2s, color .2s;
}

.step-tab.active .step-num {
    background: #FDE68A;
    color: #1B3A6B;
}

.step-tab.done .step-num {
    background: #22C55E;
    color: #fff;
}

    .step-tab.done .step-num::before {
        content: '✓';
    }

.step-lbl {
    font-size: 10px;
    color: rgba(255,255,255,.45);
    text-align: center;
    line-height: 1.3;
}

.step-tab.active .step-lbl {
    color: rgba(255,255,255,.9);
}

/* ── Body ── */
.frm-body {
    padding: 1.5rem;
}

.sec-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #f3f4f6;
}

/* ── Fields ── */
.field-group {
    margin-bottom: 1.25rem;
}

.field-label {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1B3A6B;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.field-req {
    color: #EF4444;
    font-size: 12px;
}

/* ── Hint pills — BS5 badge base, neutral by default ── */
.hint-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.hint-pill {
    font-size: 11px;
    font-weight: 500;
    transition: background-color .2s, color .2s, border-color .2s;
}

.frm-input {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

    .frm-input:focus {
        border-color: #1B3A6B;
        box-shadow: 0 0 0 3px rgba(27,58,107,.1);
    }

    .frm-input.is-invalid {
        border-color: #EF4444;
    }

    .frm-input.is-valid {
        border-color: #22C55E;
    }

.frm-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea.frm-input {
    height: auto;
    padding: 10px 12px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Alerts ── */
.frm-alert {
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: 13px;
    margin-bottom: 1rem;
}

.frm-alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.frm-alert-danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ── Footer ── */
.frm-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .875rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
}

.frm-step-info {
    font-size: 12px;
    color: #6b7280;
}

.btn-group-nav {
    display: flex;
    gap: 8px;
}

.btn-back {
    height: 36px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-next {
    height: 36px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: #1B3A6B;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}

    .btn-next:hover {
        background: #15305a;
    }

.btn-success-nav {
    background: #22C55E;
}

    .btn-success-nav:hover {
        background: #16a34a;
    }

/* ── Success / empty states ── */
.state-center {
    text-align: center;
    padding: 2.5rem 1rem;
}

.state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

    .state-icon.success {
        background: #dcfce7;
        color: #16a34a;
    }

    .state-icon.warning {
        background: #fef9c3;
        color: #ca8a04;
    }

    .state-icon.danger {
        background: #fee2e2;
        color: #dc2626;
    }

.state-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 .5rem;
}

.state-body {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ── Mobile: full screen ── */
@media (max-width: 576px) {
    .frm-wrap {
        margin: 0;
        padding: 0;
    }

    .frm-card {
        border-radius: 0;
        border: none;
        box-shadow: none;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .frm-body {
        flex: 1;
        overflow-y: auto;
    }

    .frm-footer {
        position: sticky;
        bottom: 0;
        z-index: 10;
    }

    .field-row {
        grid-template-columns: 1fr;
    }
}

/* ── Mobile progress bar (replaces tabs on small screens) ── */
.mob-progress-bar {
    display: none;
}

@media (max-width: 480px) {
    .step-tabs {
        display: none;
    }

    .mob-progress-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 0 12px;
    }

    .mob-pct-label {
        font-size: 11px;
        color: rgba(255,255,255,.7);
        white-space: nowrap;
    }

    .mob-track {
        flex: 1;
        height: 4px;
        background: rgba(255,255,255,.2);
        border-radius: 2px;
    }

    .mob-fill {
        height: 100%;
        background: #FDE68A;
        border-radius: 2px;
        transition: width .4s;
    }
}
