
/* -------------------------------------------
   RESET
------------------------------------------- */
#pth-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#pth-wrap .pth-container {
    width: 100%;
    max-width: 620px;
}

#pth-wrap .pth-hero {
    width: 100%;
    max-width: 620px;
}

#pth-wrap .pth-step-indicator {
    width: 100%;
    max-width: 620px;
}


#pth-wrap,
#pth-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* -------------------------------------------
   MAIN WRAPPER
------------------------------------------- */
#pth-wrap {
    background: #f5f5f7;
    padding: 40px 16px 60px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* -------------------------------------------
   HERO SECTION
------------------------------------------- */
.pth-hero {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 32px;
}

.pth-hero h1 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.pth-hero p {
    font-size: 16px;
    color: #666;
}

/* -------------------------------------------
   STEP INDICATOR
------------------------------------------- */
.pth-step-indicator {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #323CC7;
    margin-bottom: 24px;
    letter-spacing: .3px;
}
div#pth-wrap div.pth-progress-bar-wrap {
    width: 50%;
    height: 6px !important;
    background: #e0e0eb !important;
    border-radius: 4px !important;
    display: block !important;
    overflow: visible !important;
    margin: 8px 0 24px !important;
}

div#pth-wrap div.pth-progress-bar-fill {
    height: 6px !important;
    width: 50%;
    background: #323CC7 !important;
    border-radius: 4px !important;
    display: block !important;
}

/* -------------------------------------------
   CENTER CONTAINER
------------------------------------------- */
.pth-container {
    max-width: 620px;
    margin: 0 auto;
}

/* -------------------------------------------
   CARDS — white box with shadow
------------------------------------------- */
.pth-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 28px !important;
    margin-bottom: 20px;
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* -------------------------------------------
   CARD TITLE
------------------------------------------- */
.pth-card-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #f0f0f5 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* -------------------------------------------
   2-COLUMN GRID
------------------------------------------- */
.pth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 540px) {
    .pth-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------
   FIELD WRAPPER
------------------------------------------- */
.pth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.pth-field:last-child {
    margin-bottom: 0;
}

/* -------------------------------------------
   LABELS
------------------------------------------- */
.pth-field label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #444 !important;
    letter-spacing: .2px;
}

/* -------------------------------------------
   INPUTS & SELECTS
------------------------------------------- */
.pth-field input,
.pth-field select {
    height: 48px !important;
    padding: 0 14px !important;
    border: 1.5px solid #e0e0eb !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    color: #555 !important;
    -webkit-text-fill-color: #555 !important;
    background: #fafafa !important;
    outline: none !important;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
}

.pth-field input::placeholder {
    color: #bbb !important;
    -webkit-text-fill-color: #bbb !important;
}

.pth-field input:focus,
.pth-field select:focus {
    border-color: #323CC7 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(50, 60, 199, 0.08) !important;
}

/* -------------------------------------------
   INVALID STATE
------------------------------------------- */
.pth-field input.pth-invalid,
.pth-field select.pth-invalid {
    border-color: #e55 !important;
    background: #fff9f9 !important;
}

/* -------------------------------------------
   HELPER TEXT
------------------------------------------- */
.pth-field small {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

/* -------------------------------------------
   ERROR MESSAGES
------------------------------------------- */
.pth-err {
    font-size: 12px;
    color: #e55;
    min-height: 15px;
    display: block;
    margin-top: 2px;
}

/* -------------------------------------------
   SELECT CUSTOM ARROW
------------------------------------------- */
.pth-select-wrap {
    position: relative;
}

.pth-select-wrap::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    font-size: 13px;
}

.pth-select-wrap select {
    padding-right: 36px !important;
    cursor: pointer;
}

/* -------------------------------------------
   GENDER RADIO BUTTONS
------------------------------------------- */
.pth-radio-group {
    display: flex;
    gap: 12px;
}

.pth-radio-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1.5px solid #e0e0eb !important;
    border-radius: 10px !important;
    cursor: pointer;
    font-size: 15px !important;
    color: #aaa !important;
    background: #fafafa !important;
    transition: all .2s;
    user-select: none;
    font-weight: 500;
}

.pth-radio-btn input {
    display: none;
}

.pth-radio-btn.selected {
    border-color: #323CC7 !important;
    background: #f0f2ff !important;
    color: #323CC7 !important;
    font-weight: 700 !important;
}

/* -------------------------------------------
   LOAN AMOUNT GRID
------------------------------------------- */
.pth-loan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .pth-loan-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 400px) {
    .pth-loan-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------
   LOAN CARDS
------------------------------------------- */
.pth-loan-card {
    border: 2px solid #e0e0eb !important;
    border-radius: 12px !important;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    background: #fafafa !important;
    transition: all .2s;
}

.pth-loan-card input[type="radio"] {
    display: none;
}

.pth-loan-card:hover {
    border-color: #323CC7 !important;
    background: #f0f2ff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(50, 60, 199, 0.12);
}

.pth-loan-card.selected {
    border-color: #323CC7 !important;
    background: #f0f2ff !important;
    box-shadow: 0 4px 12px rgba(50, 60, 199, 0.12);
}

.pth-loan-card strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #555;
    margin-bottom: 4px;
}

.pth-loan-card span {
    font-size: 12px;
    color: #aaa;
}

.pth-loan-card.selected strong {
    color: #323CC7;
}

/* -------------------------------------------
   OPTION CARDS (Deposit / Treatment)
------------------------------------------- */
.pth-option-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.pth-option-card {
    border: 2px solid #e0e0eb !important;
    border-radius: 12px !important;
    padding: 18px !important;
    cursor: pointer;
    background: #fafafa !important;
    transition: all .2s;
}

.pth-option-card input[type="radio"] {
    display: none;
}

.pth-option-card:hover {
    border-color: #323CC7 !important;
}

.pth-option-card.selected {
    border-color: #323CC7 !important;
    background: #f0f2ff !important;
    box-shadow: 0 4px 12px rgba(50, 60, 199, 0.10);
}

.pth-option-card strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #555;
    margin-bottom: 5px;
}

.pth-option-card span {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
}

.pth-option-card em {
    display: block;
    font-size: 13px;
    font-style: normal;
    color: #555;
    font-weight: 600;
}

.pth-option-card.selected strong {
    color: #323CC7;
}

/* -------------------------------------------
   CHECKBOXES
------------------------------------------- */
.pth-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    cursor: pointer;
}

.pth-check:last-child {
    margin-bottom: 0;
}

.pth-check input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    margin-top: 3px;
    accent-color: #323CC7;
    cursor: pointer;
}

.pth-check span {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.pth-check a {
    color: #323CC7;
    text-decoration: underline;
}

/* -------------------------------------------
   BUTTONS WRAPPER
------------------------------------------- */
.pth-submit-wrap {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* -------------------------------------------
   PRIMARY BUTTON
------------------------------------------- */
.pth-btn-primary {
    min-width: 200px;
    height: 52px !important;
    background: #323CC7 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    padding: 0 36px !important;
    box-shadow: 0 4px 14px rgba(50, 60, 199, 0.3);
}

.pth-btn-primary:hover {
    background: #2530a8 !important;
    box-shadow: 0 6px 20px rgba(50, 60, 199, 0.4);
    transform: translateY(-1px);
}

.pth-btn-primary:active {
    transform: scale(.98);
}

.pth-btn-primary:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* -------------------------------------------
   SECONDARY BUTTON (Previous step)
------------------------------------------- */
.pth-btn-secondary {
    min-width: 140px;
    height: 52px !important;
    background: #fff !important;
    color: #555 !important;
    border: 1.5px solid #ddd !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all .2s;
    padding: 0 24px !important;
}

.pth-btn-secondary:hover {
    border-color: #323CC7 !important;
    color: #323CC7 !important;
}

/* -------------------------------------------
   SUCCESS STATE
------------------------------------------- */
#pth-success {
    text-align: center;
    padding: 56px 24px !important;
}

#pth-success h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

#pth-success p {
    font-size: 16px;
    color: #666;
}

/* -------------------------------------------
   ERROR STATE
------------------------------------------- */
#pth-api-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px !important;
    border: 1.5px solid #ffccc7 !important;
    background: #fff9f9 !important;
    box-shadow: none !important;
}

#pth-api-error p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

#pth-api-error button {
    background: #323CC7;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* -------------------------------------------
   MOBILE — single column, larger touch targets
------------------------------------------- */
@media (max-width: 540px) {
    .pth-card {
        padding: 20px !important;
    }

    .pth-btn-primary,
    .pth-btn-secondary {
        width: 100%;
    }

    .pth-option-row {
        grid-template-columns: 1fr;
    }
}