/* Reusing the exact same premium auth styles for consistency */

.auth-card {
    background: var(--jp-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(30, 42, 107, 0.08);
    overflow: hidden;
    margin: 40px auto;
    border: 1px solid var(--jp-border-light);
}

.auth-visual {
    background: linear-gradient(135deg, var(--jp-navy-dark) 0%, var(--jp-navy) 100%);
    color: var(--jp-white);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.auth-visual::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(242, 99, 35, 0.15);
}

.auth-visual h2 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.auth-visual p {
    color: var(--jp-text-light-blue-2);
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.auth-form {
    padding: 3rem;
}

.auth-form h3 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--jp-heading-color);
    margin-bottom: 0.5rem;
}

.auth-form .subtitle {
    color: var(--jp-text-muted);
    font-size: 14.5px;
    margin-bottom: 2rem;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 38px;
    color: var(--jp-text-muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--jp-navy);
}

.form-check-input:checked {
    background-color: var(--jp-red);
    border-color: var(--jp-red);
}

.btn-auth {
    width: 100%;
    height: 50px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--jp-text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--jp-border-light);
}

.auth-divider span {
    padding: 0 12px;
}

.auth-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 14px;
    color: var(--jp-text-muted);
}

.auth-footer-text a {
    color: var(--jp-red);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

.terms-text {
    font-size: 13px;
    color: var(--jp-text-muted);
    line-height: 1.5;
}

.terms-text a {
    color: var(--jp-navy);
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 991px) {
    .auth-visual {
        padding: 2rem;
        text-align: center;
    }

    .auth-form {
        padding: 2rem;
    }
}

@media (max-width: 575px) {
    .auth-card {
        margin: 20px 16px;
        border-radius: 12px;
    }

    .auth-visual {
        padding: 1.5rem;
    }

    .auth-visual h2 {
        font-size: 1.4rem;
    }

    .auth-form {
        padding: 1.5rem;
    }
}



/* =========================================================
   JP EXPRESS - AUTH PAGES (login.html + registration.html)
   Load AFTER css/pages/login.css | registration.css
   ========================================================= */
.auth-card [hidden] {
    display: none !important;
}

/* ---------- Fields ---------- */
.auth-field {
    margin-bottom: 1.1rem;
    min-width: 0;
}

.auth-field>label,
.auth-legend {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--jp-text-muted-dark);
}

.auth-field>label i {
    margin-right: 4px;
    color: var(--jp-red);
}

.auth-field .req {
    color: var(--jp-red);
}

.auth-input {
    position: relative;
}

.auth-input-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--jp-text-muted);
    pointer-events: none;
    transition: color .2s ease;
}

.auth-input:focus-within .auth-input-ico {
    color: var(--jp-red);
}

.auth-field .form-control {
    height: 50px;
    padding: 0 16px;
    font-size: 15px;
    border: 1px solid var(--jp-border-muted);
    border-radius: 8px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-field .auth-input .form-control {
    padding-left: 42px;
    padding-right: 46px;
}

.auth-field textarea.form-control {
    height: auto;
    min-height: 84px;
    padding: 12px 16px;
    resize: vertical;
}

.auth-field .form-control:focus {
    outline: 0;
    border-color: var(--jp-red);
    box-shadow: 0 0 0 3px rgba(242, 99, 35, .12);
}

.auth-input .password-toggle {
    top: 50%;
    right: 6px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 8px;
    transform: translateY(-50%);
}

.auth-input .password-toggle:hover {
    background: var(--jp-bg-muted);
}

.auth-hint {
    display: block;
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--jp-text-muted);
}

.auth-err {
    display: none;
    margin-top: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #c0392b;
}

.auth-field.has-error .auth-err {
    display: block;
}

.auth-field.has-error .auth-hint {
    display: none;
}

.auth-field.has-error .form-control,
.auth-field.has-error .auth-select-btn {
    border-color: #c0392b;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: -.1rem 0 1.25rem;
}

.auth-options a {
    font-size: 14px;
    font-weight: 700;
    color: var(--jp-red);
}

.auth-options a:hover {
    text-decoration: underline;
}

/* ---------- Status box ---------- */
.auth-status {
    margin: 0 0 1rem;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    border: 1px solid;
    border-radius: 10px;
}

.auth-status.is-error {
    background: #fdf1ef;
    border-color: #f3c9c2;
    color: #a93226;
}

.auth-status.is-success {
    background: var(--jp-success-bg);
    border-color: var(--jp-success-border);
    color: var(--jp-success-text);
}

.auth-status.is-info {
    background: #f1f4fd;
    border-color: #d5dcf4;
    color: var(--jp-navy);
}

.btn-auth:disabled {
    opacity: .85;
    cursor: progress;
}

/* ---------- Left visual list ---------- */
.auth-points {
    position: relative;
    z-index: 1;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--jp-text-light-blue-2);
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.auth-points i {
    color: var(--jp-orange-accent);
}

/* ---------- Account type selector (registration) ---------- */
.reg-types {
    min-width: 0;
    margin: 0 0 .75rem;
    padding: 0;
    border: 0;
}

.reg-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.reg-type {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.reg-type input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.reg-type>span {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 88px;
    padding: 12px 8px;
    text-align: center;
    background: var(--jp-white);
    border: 1.5px solid var(--jp-border-muted);
    border-radius: 12px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.reg-type>span>i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-size: 15px;
    color: var(--jp-red);
    background: rgba(242, 99, 35, .1);
    border-radius: 10px;
    transition: background .2s ease, color .2s ease;
}

.reg-type b {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--jp-navy);
}

.reg-type small {
    font-size: 11.5px;
    line-height: 1.2;
    color: var(--jp-text-muted);
}

.reg-type:hover>span {
    border-color: var(--jp-border-hover-2);
    transform: translateY(-1px);
}

.reg-type input:checked+span {
    background: #fff6f1;
    border-color: var(--jp-red);
    box-shadow: 0 6px 16px rgba(242, 99, 35, .14);
}

.reg-type input:checked+span>i {
    background: var(--jp-red);
    color: var(--jp-white);
}

.reg-type input:checked+span::after {
    content: "\f00c";
    position: absolute;
    top: 6px;
    right: 8px;
    font-family: "Font Awesome 6 Free";
    font-size: 10px;
    font-weight: 900;
    color: var(--jp-red);
}

.reg-type input:focus-visible+span {
    outline: 2px solid var(--jp-red);
    outline-offset: 2px;
}

.reg-type-note {
    margin: 0 0 1.25rem;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--jp-text-muted-dark);
    background: var(--jp-bg-soft);
    border-left: 3px solid var(--jp-red);
    border-radius: 0 8px 8px 0;
}

/* ---------- Searchable branch select ---------- */
.auth-select {
    position: relative;
}

.auth-select-btn {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
    font-size: 15px;
    text-align: left;
    color: var(--jp-ink);
    background: var(--jp-white);
    border: 1px solid var(--jp-border-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-select-btn:focus-visible,
.auth-select.is-open .auth-select-btn {
    outline: 0;
    border-color: var(--jp-red);
    box-shadow: 0 0 0 3px rgba(242, 99, 35, .12);
}

.auth-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-select-text.is-placeholder {
    color: #8a97aa;
}

.auth-select-btn>i {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--jp-text-muted);
    transition: transform .2s ease;
}

.auth-select.is-open .auth-select-btn>i {
    transform: rotate(180deg);
}

.auth-select-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    padding: 8px;
    background: var(--jp-white);
    border: 1px solid var(--jp-border-muted);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(30, 42, 107, .16);
    animation: pgUp .18s ease both;
}

.auth-select-search {
    position: relative;
    margin-bottom: 6px;
}

.auth-select-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--jp-text-muted);
}

.auth-select-search input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 34px;
    font-size: 16px;
    border: 1px solid var(--jp-border-muted);
    border-radius: 8px;
    outline: 0;
}

.auth-select-search input:focus {
    border-color: var(--jp-red);
}

.auth-select-list {
    position: relative;
    max-height: 240px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.auth-select-list li[role="option"] {
    padding: 11px 12px;
    font-size: 14.5px;
    color: var(--jp-text-muted-dark);
    border-radius: 8px;
    cursor: pointer;
}

.auth-select-list li[role="option"]:hover,
.auth-select-list li.is-active {
    background: var(--jp-bg-soft);
    color: var(--jp-navy);
}

.auth-select-list li.is-sel {
    background: #fff2ed;
    color: var(--jp-red);
    font-weight: 700;
}

.auth-select-empty {
    padding: 14px 12px;
    font-size: 14px;
    text-align: center;
    color: var(--jp-text-muted);
}

/* ---------- Password strength ---------- */
.pw-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.pw-meter-bar {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.pw-meter-bar span {
    height: 4px;
    background: var(--jp-border-muted);
    border-radius: 4px;
    transition: background .2s ease;
}

.pw-meter small {
    min-width: 48px;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    color: var(--jp-text-muted);
}

.pw-meter[data-level="1"] span:nth-child(-n+1) {
    background: #e74c3c;
}

.pw-meter[data-level="2"] span:nth-child(-n+2) {
    background: #f59e0b;
}

.pw-meter[data-level="3"] span:nth-child(-n+3) {
    background: #43b36f;
}

.pw-meter[data-level="4"] span:nth-child(-n+4) {
    background: #1da86b;
}

/* ---------- Mobile ---------- */
@media (max-width: 575px) {

    .auth-field .form-control,
    .auth-select-btn {
        font-size: 16px;
    }

    /* stops iOS zoom on focus */
    .reg-types-grid {
        gap: 8px;
    }

    .reg-type>span {
        min-height: 78px;
        padding: 10px 4px;
    }

    .reg-type small {
        display: none;
    }

    .reg-type b {
        font-size: 12.5px;
    }

    .auth-select-list {
        max-height: 210px;
    }
}

.auth-select-list {
    max-height: 210px;
}


/* =========================================================
   MOBILE ONLY — same left/right edge as the other pages
   (10px, like About Us) + tighter spacing
   Applies to login.html and registration.html
   ========================================================= */
@media (max-width: 767px) {

    /* 1. Same 10px page edge as .container-fluid */
    main.flex-grow-1>.container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    main.flex-grow-1>.container>.row {
        --bs-gutter-x: 0;
    }

    main.flex-grow-1>.container>.row>[class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    /* 2. Card: full width, small vertical gap */
    .auth-card {
        margin: 12px 0 16px;
        border-radius: 14px;
        box-shadow: 0 6px 22px rgba(30, 42, 107, .08);
    }

    /* 3. Less inner padding */
    .auth-form {
        padding: 16px 14px 18px;
    }

    .auth-form h3 {
        margin-bottom: 2px;
        font-size: 1.3rem;
    }

    .auth-form .subtitle {
        margin-bottom: 14px;
        font-size: 13.5px;
        line-height: 1.45;
    }

    /* 4. Tighter fields */
    .auth-field {
        margin-bottom: .7rem;
    }

    .auth-field>label,
    .auth-legend {
        margin-bottom: 4px;
        font-size: 12.5px;
    }

    .auth-field .form-control,
    .auth-select-btn {
        height: 46px;
    }

    .auth-field textarea.form-control {
        height: auto;
        min-height: 68px;
        padding: 10px 14px;
    }

    .auth-hint,
    .auth-err {
        margin-top: 3px;
        font-size: 12px;
    }

    .auth-options {
        margin: 0 0 .9rem;
        gap: 6px 12px;
    }

    .auth-options a,
    .auth-options .form-check-label {
        font-size: 13.5px !important;
    }

    /* 5. Registration: compact account-type cards */
    .reg-types {
        margin-bottom: .55rem;
    }

    .reg-types-grid {
        gap: 8px;
    }

    .reg-type>span {
        min-height: 70px;
        padding: 8px 4px;
        gap: 3px;
        border-radius: 10px;
    }

    .reg-type>span>i {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .reg-type-note {
        margin-bottom: .9rem;
        padding: 8px 10px;
        font-size: 12.5px;
    }

    /* 6. Buttons, divider, footer text */
    .btn-auth {
        height: 46px;
        font-size: 14.5px;
    }

    .auth-status {
        margin-bottom: .7rem;
        padding: 9px 12px;
        font-size: 13px;
    }

    .auth-divider {
        margin: 1rem 0;
    }

    .auth-footer-text {
        margin-top: .9rem;
        font-size: 13.5px;
    }

    .pw-meter {
        margin-top: 6px;
    }

    .terms-text {
        font-size: 12.5px;
    }

    .auth-select-panel {
        padding: 6px;
    }
}


@media (max-width: 380px) {

    .auth-form {
        padding: 14px 12px 16px;
    }

    .reg-type b {
        font-size: 12px;
    }
}


.auth-steps {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0;
    display: flex;
    gap: 6px;
}

.auth-steps li {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.auth-steps li>span {
    display: block;
    height: 4px;
    border-radius: 4px;
    background: var(--jp-border-muted);
    transition: background .25s ease;
}

.auth-steps li>b {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--jp-text-muted);
    transition: color .25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-steps li.is-on>span,
.auth-steps li.is-done>span {
    background: var(--jp-red);
}

.auth-steps li.is-on>b,
.auth-steps li.is-done>b {
    color: var(--jp-navy);
}

.otp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.otp-grid input {
    width: 100%;
    height: 54px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--jp-navy);
    background: var(--jp-white);
    border: 1.5px solid var(--jp-border-muted);
    border-radius: 10px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
    -moz-appearance: textfield;
    appearance: textfield;
}

.otp-grid input::-webkit-outer-spin-button,
.otp-grid input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-grid input:focus {
    outline: 0;
    border-color: var(--jp-red);
    box-shadow: 0 0 0 3px rgba(242, 99, 35, .12);
}

.otp-grid input.is-filled {
    border-color: var(--jp-red);
    background: #fff8f4;
}

.auth-field.has-error .otp-grid input {
    border-color: #c0392b;
}

.otp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.otp-meta small {
    font-size: 12.5px;
    color: var(--jp-text-muted);
}

.otp-resend {
    background: none;
    border: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--jp-red);
    cursor: pointer;
}

.otp-resend:disabled {
    color: var(--jp-text-muted);
    cursor: not-allowed;
    font-weight: 600;
}

.otp-resend:not(:disabled):hover {
    text-decoration: underline;
}

.auth-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--jp-red);
}

.auth-inline-link:hover {
    text-decoration: underline;
}

.pw-rules {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    gap: 5px;
}

.pw-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--jp-text-muted);
    transition: color .2s ease;
}

.pw-rules li i {
    font-size: 11px;
    color: var(--jp-border-hover);
    transition: color .2s ease;
}

.pw-rules li.is-ok {
    color: var(--jp-success-text);
}

.pw-rules li.is-ok i {
    color: var(--jp-success-text);
}

@media (max-width: 575px) {
    .otp-grid {
        gap: 6px;
    }

    .otp-grid input {
        height: 48px;
        font-size: 19px;
        border-radius: 9px;
    }

    .auth-steps li>b {
        font-size: 10.5px;
    }
}

@media (max-width: 380px) {
    .otp-grid input {
        height: 44px;
        font-size: 17px;
    }

    .auth-steps {
        gap: 4px;
    }
}




/* =========================================================
   PREMIUM COMPACT OVERRIDE (paste at the very bottom)
   ========================================================= */

/* ---------- DESKTOP + TABLET (768px and up) ---------- */
@media (min-width: 768px) {

    .auth-card {
        margin: 20px auto 28px;
        border-radius: 14px;
    }

    .auth-visual {
        padding: 28px 32px;
    }

    .auth-visual h2 {
        font-size: 1.5rem;
        margin-bottom: .6rem;
    }

    .auth-visual p {
        font-size: 14px;
        line-height: 1.55;
    }

    .auth-points {
        margin-top: 1rem;
    }

    .auth-points li {
        margin-bottom: 8px;
    }

    .auth-form {
        padding: 26px 32px 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-form h3 {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }

    .auth-form .subtitle {
        font-size: 14px;
        line-height: 1.45;
        margin-bottom: 16px;
    }

    .auth-field {
        margin-bottom: .8rem;
    }

    .auth-field>label,
    .auth-legend {
        margin-bottom: 4px;
        font-size: 12.5px;
    }

    .auth-field .form-control,
    .auth-select-btn {
        height: 44px;
        font-size: 14.5px;
    }

    .auth-field textarea.form-control {
        height: auto;
        min-height: 64px;
        padding: 10px 14px;
    }

    .auth-field .auth-input .form-control {
        padding-left: 40px;
        padding-right: 44px;
    }

    .auth-input .password-toggle {
        width: 34px;
        height: 34px;
    }

    .auth-hint,
    .auth-err {
        margin-top: 3px;
        font-size: 12px;
    }

    .auth-options {
        margin: 0 0 .9rem;
    }

    .btn-auth {
        height: 46px;
        font-size: 14.5px;
    }

    .auth-divider {
        margin: 1rem 0;
    }

    .auth-footer-text {
        margin-top: .8rem;
    }

    .auth-steps {
        margin-bottom: 1rem;
    }

    .reg-types {
        margin-bottom: .5rem;
    }

    .reg-type>span {
        min-height: 74px;
        padding: 9px 6px;
        gap: 3px;
    }

    .reg-type>span>i {
        width: 32px;
        height: 32px;
    }

    .reg-type-note {
        margin-bottom: .9rem;
        padding: 8px 12px;
        font-size: 12.5px;
    }

    .otp-grid input {
        height: 48px;
    }

    .pw-meter {
        margin-top: 6px;
    }

    .pw-rules {
        margin-top: 6px;
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
    }
}

/* ---------- MOBILE (767px and down) ---------- */
@media (max-width: 767px) {

    .auth-card {
        margin: 8px 0 12px;
        border-radius: 12px;
    }

    .auth-form {
        padding: 14px 12px 16px;
    }

    .auth-form h3 {
        font-size: 1.2rem;
    }

    .auth-form .subtitle {
        margin-bottom: 10px;
        font-size: 13px;
    }

    .auth-field {
        margin-bottom: .55rem;
    }

    .auth-field .form-control,
    .auth-select-btn {
        height: 44px;
        font-size: 16px;
        /* stops iOS zoom */
    }

    .auth-field .auth-input .form-control {
        padding-left: 38px;
    }

    .auth-input .password-toggle {
        width: 34px;
        height: 34px;
    }

    .auth-options {
        margin: 0 0 .7rem;
    }

    .btn-auth {
        height: 44px;
    }

    .auth-divider {
        margin: .75rem 0;
    }

    .auth-footer-text {
        margin-top: .6rem;
    }

    .auth-steps {
        margin-bottom: .8rem;
    }

    .reg-type>span {
        min-height: 64px;
        padding: 7px 4px;
    }

    .reg-type>span>i {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .reg-type-note {
        margin-bottom: .7rem;
        padding: 7px 10px;
    }

    .otp-grid input {
        height: 44px;
    }

    .pw-rules {
        grid-template-columns: 1fr 1fr;
        gap: 3px 10px;
    }

    .pw-rules li {
        font-size: 12px;
    }

    .terms-text {
        font-size: 12px;
    }
}




/* =========================================================
   ACCOUNT TYPE CARDS: icon + text on ONE line
   (paste at the very bottom, after the compact override)
   ========================================================= */

/* ---------- Card layout: icon left, text right ---------- */
.reg-type>span {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
        "ico title"
        "ico sub";
    align-items: center;
    justify-content: stretch;
    column-gap: 10px;
    row-gap: 1px;
    min-height: 58px;
    padding: 10px 12px;
    text-align: left;
}

.reg-type>span>i {
    grid-area: ico;
    width: 36px;
    height: 36px;
    font-size: 15px;
}

.reg-type>span>b {
    grid-area: title;
    align-self: end;
    font-size: 13.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reg-type>span>small {
    grid-area: sub;
    align-self: start;
    font-size: 11.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* tick mark: keep it in the top-right corner, clear of the text */
.reg-type input:checked+span::after {
    top: 5px;
    right: 7px;
    font-size: 9px;
}

/* ---------- Tablet / small desktop (576px to 991px) ---------- */
@media (max-width: 991px) {

    .reg-type>span {
        grid-template-columns: 32px minmax(0, 1fr);
        column-gap: 8px;
        padding: 9px 10px;
        min-height: 54px;
    }

    .reg-type>span>i {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .reg-type>span>b {
        font-size: 13px;
    }

    .reg-type>span>small {
        font-size: 11px;
    }
}



/* =========================================================
   MOBILE ONLY (575px and down): account type cards
   Icon on top, text below. Desktop is not affected.
   ========================================================= */
@media (max-width: 575px) {

    .reg-types-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .reg-type>span {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 92px;
        padding: 12px 4px 10px;
        text-align: center;
        border-radius: 12px;
    }

    .reg-type>span>i {
        width: 36px;
        height: 36px;
        font-size: 15px;
        border-radius: 10px;
    }

    .reg-type>span>b {
        width: 100%;
        font-size: 13px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .reg-type>span>small {
        display: block;
        width: 100%;
        font-size: 11px;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    /* tick mark: small, top-right corner */
    .reg-type input:checked+span::after {
        top: 6px;
        right: 7px;
        transform: none;
        font-size: 9px;
    }
}

/* Very small phones (380px and down) */
@media (max-width: 380px) {

    .reg-types-grid {
        gap: 6px;
    }

    .reg-type>span {
        min-height: 86px;
        padding: 10px 2px 8px;
    }

    .reg-type>span>i {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .reg-type>span>b {
        font-size: 12px;
    }

    .reg-type>span>small {
        font-size: 10.5px;
    }
}



/* ---------- Demo notice (temporary) ---------- */
.auth-demo {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px dashed #f5b08a;
    border-radius: 12px;
    background: #fff7f2;
    color: #5b4636;
    font-size: 13px;
    line-height: 1.55
}

.auth-demo[hidden] {
    display: none
}

.auth-demo>i {
    color: #F26323;
    margin-top: 3px;
    flex: none
}

.auth-demo b {
    color: #1B2559
}

.auth-demo code {
    display: inline-block;
    background: #fff;
    border: 1px solid #f1d7c8;
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 12.5px;
    color: #2B3990;
    word-break: break-all
}

@media (max-width:575px) {
    .auth-demo {
        padding: 11px 12px;
        font-size: 12.5px
    }
}


/* =========================================================
   LEGAL MODAL — Terms & Privacy popup
   Matches existing JP Express design tokens
   ========================================================= */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.auth-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 70, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.auth-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: min(86vh, 780px);
    display: flex;
    flex-direction: column;
    background: var(--jp-white);
    border: 1px solid var(--jp-border-light);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(15, 23, 70, .35);
    transform: translateY(14px) scale(.98);
    transition: transform .28s cubic-bezier(.22, .61, .36, 1);
    overflow: hidden;
}

.auth-modal.is-open .auth-modal__dialog {
    transform: none;
}

/* --- Head --- */
.auth-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 14px;
    background: linear-gradient(135deg, var(--jp-navy-dark), var(--jp-navy));
    color: var(--jp-white);
}

.auth-modal__head-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.auth-modal__ico {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 18px;
    color: var(--jp-orange-accent);
}

.auth-modal__head h2 {
    margin: 0;
    font: 800 17px/1.2 "Plus Jakarta Sans", sans-serif;
    letter-spacing: -.01em;
}

.auth-modal__head p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--jp-blue-light);
    line-height: 1.35;
}

.auth-modal__close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.auth-modal__close:hover {
    background: var(--jp-red);
    border-color: var(--jp-red);
    transform: scale(1.05);
}

/* --- Tabs --- */
.auth-modal__tabs {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--jp-border-light);
    background: var(--jp-bg-soft);
}

.auth-modal__tabs button {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 12px;
    font: 700 13px/1 Inter, system-ui, sans-serif;
    color: var(--jp-text-muted-dark);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.auth-modal__tabs button i {
    font-size: 13px;
    color: var(--jp-orange);
}

.auth-modal__tabs button:hover {
    background: var(--jp-white);
    color: var(--jp-navy);
}

.auth-modal__tabs button.is-active {
    background: var(--jp-white);
    border-color: var(--jp-border-muted);
    color: var(--jp-navy);
    box-shadow: 0 2px 8px rgba(30, 42, 107, .07);
}

/* --- Body --- */
.auth-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px 22px;
    overscroll-behavior: contain;
    background: var(--jp-white);
    color: var(--jp-text-muted-dark);
    font-size: 13.8px;
    line-height: 1.7;
    scrollbar-width: thin;
    scrollbar-color: var(--jp-border-hover) transparent;
}

.auth-modal__body::-webkit-scrollbar {
    width: 8px;
}

.auth-modal__body::-webkit-scrollbar-thumb {
    background: var(--jp-border-hover);
    border-radius: 8px;
}

.legal-panel h3 {
    margin: 16px 0 6px;
    font: 800 14.5px/1.3 "Plus Jakarta Sans", sans-serif;
    color: var(--jp-navy);
    letter-spacing: -.005em;
}

.legal-panel h3:first-child {
    margin-top: 0;
}

.legal-panel p {
    margin: 0 0 10px;
    font-size: 13.8px;
    line-height: 1.7;
    color: var(--jp-text-muted-dark);
}

.legal-panel a {
    color: var(--jp-red);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-panel a:hover {
    color: #d4500f;
}

.legal-panel[hidden] {
    display: none !important;
}

/* --- Foot --- */
.auth-modal__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--jp-border-light);
    background: var(--jp-bg-soft);
}

.auth-modal__btn {
    height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: 700 13.5px/1 Inter, system-ui, sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.auth-modal__btn.ghost {
    background: var(--jp-white);
    color: var(--jp-navy);
    border: 1px solid var(--jp-border-muted);
}

.auth-modal__btn.ghost:hover {
    background: var(--jp-bg-muted);
    border-color: var(--jp-border-hover);
}

.auth-modal__btn.primary {
    background: var(--jp-red);
    color: #fff;
    border: 1px solid var(--jp-red);
    box-shadow: 0 6px 16px rgba(242, 99, 35, .28);
}

.auth-modal__btn.primary:hover {
    background: #d4500f;
    border-color: #d4500f;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(242, 99, 35, .35);
}

/* --- Mobile: bottom sheet --- */
@media (max-width: 575px) {
    .auth-modal {
        padding: 0;
        align-items: flex-end;
    }

    .auth-modal__dialog {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
        transform: translateY(100%);
    }

    .auth-modal.is-open .auth-modal__dialog {
        transform: none;
    }

    .auth-modal__dialog::before {
        content: "";
        display: block;
        width: 42px;
        height: 4px;
        margin: 8px auto 0;
        border-radius: 4px;
        background: rgba(255, 255, 255, .5);
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }

    .auth-modal__head {
        padding: 22px 14px 12px;
    }

    .auth-modal__ico {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .auth-modal__head h2 {
        font-size: 15.5px;
    }

    .auth-modal__head p {
        font-size: 12px;
    }

    .auth-modal__tabs {
        padding: 8px 10px;
    }

    .auth-modal__tabs button {
        height: 38px;
        font-size: 12px;
        padding: 0 8px;
        gap: 5px;
    }

    .auth-modal__tabs button i {
        font-size: 12px;
    }

    .auth-modal__body {
        padding: 14px 16px 18px;
        font-size: 13.5px;
    }

    .legal-panel p {
        font-size: 13.5px;
    }

    .auth-modal__foot {
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    .auth-modal__btn {
        flex: 1 1 0;
        padding: 0 14px;
        height: 44px;
        font-size: 13.5px;
    }
}

@media (max-width: 380px) {
    .auth-modal__tabs button {
        font-size: 11px;
        gap: 4px;
    }

    .auth-modal__tabs button i {
        display: none;
    }
}

/* Prevent body scroll when modal open */
body.auth-modal-open {
    overflow: hidden;
}