:root {
    --navy: #444791;
    --teal: #2563eb;
    --teal-lt: #e6f7f8;
    --green: #22a861;
    --green-lt: #e8f7ef;
    --red: #d93025;
    --red-lt: #fdecea;
    --gray1: #f5f6f8;
    --gray2: #eaecef;
    --gray3: #d0d4da;
    --gray4: #9aa0ac;
    --gray5: #6b7280;
    --gray6: #1f2937;
    --white: #ffffff;
    --mono: 'Courier New', monospace;
    --radius: 8px;
    --shadow: 0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

/* ── Stepper ── */
.stepper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

    .stepper::-webkit-scrollbar {
        height: 3px;
    }

    .stepper::-webkit-scrollbar-thumb {
        background: var(--gray3);
        border-radius: 2px;
    }

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--gray3);
    margin-top: 14px;
    min-width: 18px;
}

    .step-line.done {
        background: var(--teal);
    }

.sn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid var(--gray3);
    background: var(--white);
    color: var(--gray4);
    transition: all .2s;
}

.step.done .sn {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--white);
}

.step.active .sn {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.sl {
    font-size: 10px;
    color: var(--gray4);
    margin-top: 5px;
    text-align: center;
    white-space: nowrap;
}

.step.active .sl {
    color: var(--navy);
    font-weight: 600;
}

.step.done .sl {
    color: var(--teal);
}

/* ── Card ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    overflow: hidden;
}

.ch {
    padding: 13px 18px;
    border-bottom: 1px solid var(--gray2);
    background: var(--gray1);
}

.ct {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.cb {
    padding: 18px;
}

/* ── Field grid ── */
.fg {
    display: grid;
    gap: 14px;
}

    .fg.c2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .fg.c3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .fg.c4 {
        grid-template-columns: repeat(4, 1fr);
    }

@media(max-width:700px) {
    .fg.c2, .fg.c3, .fg.c4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:480px) {
    .fg.c2, .fg.c3, .fg.c4 {
        grid-template-columns: 1fr;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .field label {
        font-size: 11px;
        font-weight: 600;
        color: var(--gray5);
        text-transform: uppercase;
        letter-spacing: .04em;
    }

.req {
    color: var(--red);
}

.fhint {
    font-size: 10px;
    color: var(--gray4);
    margin-top: 3px;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray3);
    border-radius: 6px;
    font-size: 13px;
    color: var(--gray6);
    background: var(--white);
    outline: none;
    transition: border-color .15s;
    appearance: none;
    -webkit-appearance: none;
}

    .form-control:focus {
        border-color: var(--teal);
        box-shadow: 0 0 0 3px var(--teal-lt);
    }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa0ac' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

select[multiple].form-control {
    background-image: none;
    padding-right: 10px;
    height: auto;
    min-height: 90px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.span2 {
    grid-column: span 2;
}

.span3 {
    grid-column: span 3;
}

.span4 {
    grid-column: span 4;
}

/* ── Location card ── */
.loc-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loc-num {
    width: 28px;
    height: 28px;
    background: var(--navy);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.loc-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.loc-sub {
    font-size: 11px;
    color: var(--gray4);
}

/* ── App access table ── */
.at-wrap {
    overflow-x: auto;
}

table.at {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    table.at th {
        text-align: left;
        padding: 9px 10px;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--gray4);
        background: var(--gray1);
        border-bottom: 1px solid var(--gray2);
        white-space: nowrap;
    }

    table.at td {
        padding: 9px 10px;
        border-bottom: 1px solid var(--gray2);
        vertical-align: middle;
    }

    table.at tr:last-child td {
        border-bottom: none;
    }

    table.at tr:hover td {
        background: var(--gray1);
    }

.app-name {
    font-weight: 600;
    font-size: 12px;
}

.app-code {
    font-size: 10px;
    font-family: var(--mono);
    color: var(--gray4);
}

table.at select, table.at input[type=text], table.at input[type=date] {
    border: 1px solid var(--gray3);
    border-radius: 5px;
    padding: 5px 7px;
    font-size: 12px;
    color: var(--gray6);
    background: var(--white);
    outline: none;
}

    table.at select:focus, table.at input:focus {
        border-color: var(--teal);
    }

table.at select {
    width: 110px;
    appearance: none;
    -webkit-appearance: none;
}

table.at input[type=text] {
    width: 110px;
}

table.at input[type=date] {
    width: 115px;
}

table.at input[type=checkbox] {
    width: 15px;
    height: 15px;
    accent-color: var(--navy);
    cursor: pointer;
}

/* ── Review rows ── */
.ir {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray2);
}

    .ir:last-child {
        border-bottom: none;
    }

.ir-l {
    font-size: 11px;
    color: var(--gray4);
    min-width: 130px;
    flex-shrink: 0;
}

.ir-v {
    font-size: 13px;
    color: var(--gray6);
    font-weight: 500;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

@media(max-width:600px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

/* ── Badge ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

    .badge.bg {
        background: var(--teal-lt);
        color: var(--teal);
    }

    .badge.ng {
        background: var(--gray2);
        color: var(--gray5);
    }

    .badge.rg {
        background: var(--red-lt);
        color: var(--red);
    }

    .badge.gg {
        background: var(--green-lt);
        color: var(--green);
    }

/* ── Success banner ── */
.sbanner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--green-lt);
    border: 1px solid #b6e8d0;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 14px;
}

/* ── Terms box ── */
.terms-box {
    font-size: 12px;
    color: var(--gray5);
    line-height: 1.7;
    background: var(--gray1);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.tc-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
}

    .tc-label input {
        margin-top: 2px;
        width: 15px;
        height: 15px;
        accent-color: var(--navy);
        flex-shrink: 0;
    }

    .tc-label span {
        font-size: 13px;
        color: var(--gray6);
        line-height: 1.5;
    }

/* ── Actions bar ── */
.reg-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    gap: 10px;
}

.reg-step-info {
    font-size: 12px;
    color: var(--gray4);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-p {
    background: var(--navy);
    color: var(--white);
}

    .btn-p:hover {
        background: var(--navy);
        color: var(--white);
    }

.btn-s {
    background: var(--green);
    color: var(--white);
}

    .btn-s:hover {
        background: var(--green);
        color: var(--white);
    }

.btn-o {
    background: var(--white);
    color: var(--gray6);
    border: 1px solid var(--gray3);
}

    .btn-o:hover {
        background: var(--gray1);
        border-color: var(--gray4);
    }

.btn-sm {
    padding: 5px 12px;
    font-size: 11px;
}

/* ── Toast ── */
#toast {
    width:90%;
    position: fixed;
    bottom: 24px;
    left: 5%;
    padding: 10px 18px;
    border-radius: 8px;
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    display: none;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* ── Modal ── */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.modal-box {
    background: var(--white);
    border-radius: 12px;
    padding: 28px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

/* ── Steps container ── */
.step-pane {
    display: none;
}

    .step-pane.active {
        display: block;
    }

/* ── Separator ── */
.sep {
    height: 1px;
    background: var(--gray2);
    margin: 14px 0;
}