:root {
    --primary-navy: var(--theme-color, #0A1F44);
    --secondary-red: var(--secondary-color, #CA102E);
    --accent-gold: #B8922A;
    --light-bg: #F8FAFC;
    --border-color: #E2E8F0;
    --text-main: #1E293B;
    --text-muted: #64748B;
}

.application-container {
    background-color: var(--light-bg);
    padding-bottom: 80px;
}

/* ─── PROGRESS BAR ─── */
.progress-section {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.step-item::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: -1;
}

.step-item:last-child::after {
    display: none;
}

.step-item.done::after, .step-item.active::after {
    background: var(--secondary-red);
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-item.active .step-icon {
    border-color: var(--secondary-red);
    background: var(--secondary-red);
    color: white;
    box-shadow: 0 0 0 4px rgba(202, 16, 46, 0.15);
}

.step-item.done .step-icon {
    border-color: var(--secondary-red);
    background: var(--secondary-red);
    color: white;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.step-item.active .step-label {
    color: var(--secondary-red);
}

/* ─── CARDS ─── */
.form-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header-custom {
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to right, var(--redLight), #ffffff);
}

.card-header-custom h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
}

.card-header-custom p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 5px;
}

.card-body-custom {
    padding: 30px;
}

/* ─── FORM ELEMENTS ─── */
.form-group-custom {
    margin-bottom: 1rem;
}
.form-group-custom:has(.required) label:after, .form-group-custom:has(.require) label:after{
    content: ' *';
    color: var(--bs-danger);
}
.f-hint{
    font-size: 13px;
}
#apCaseId:before{
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--secondary-color);
    animation: pulse 1.8s infinite;
}
.form-group-custom label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control-custom {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.2s;
}
.form-control-custom::placeholder{
    color: #9E9E9E;
}
.form-control-custom:focus {
    outline: none;
    border-color: var(--secondary-red);
    box-shadow: 0 0 0 4px rgba(202, 16, 46, 0.05);
}

.form-select-custom {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px;
}

/* ─── LOAN TYPE GRID ─── */
.loan-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.loan-type-card {
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.loan-type-card:hover {
    border-color: var(--secondary-red);
    transform: translateY(-5px);
    background: rgba(202, 16, 46, 0.02);
    box-shadow: 0 10px 15px -3px rgba(202, 16, 46, 0.1);
}

.loan-type-card.selected {
    border-color: var(--secondary-red);
    background: rgba(202, 16, 46, 0.02);
    box-shadow: 0 10px 15px -3px rgba(202, 16, 46, 0.1);
}

.loan-type-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}
.loan-type-icon img{
    height: 60px;
    object-fit: contain;
}

.loan-type-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-navy);
}

/* ─── SIDEBAR PANEL ─── */
.summary-panel {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.summary-header {
    background: var(--primary-navy);
    color: white;
    padding: 20px;
}

.summary-header h3 {
    color: white;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.summary-body {
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 14px;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-muted);
    font-weight: 500;
}

.summary-value {
    color: var(--primary-navy);
    font-weight: 700;
    text-align: right;
}

/* ─── UTILITIES ─── */
.btn-flex {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-full {
    flex: 1;
}

.amount-display {
    background: rgba(202, 16, 46, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    border: 1px dashed var(--secondary-red);
}

.amount-display span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary-red);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.amount-display h3 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
}

.alert-custom {
    padding: 15px;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #be123c;
    font-size: 14px;
    margin-top: 20px;
    display: none;
}

.terms-container {
    height: 300px;
    overflow-y: auto;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background: #f8fafc;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.terms-container h3 {
    color: var(--primary-navy);
    font-weight: 700;
    margin-top: 15px;
}

.checkbox-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #bcf1c9;
}

.checkbox-wrapper input {
    margin-top: 4px;
    accent-color: var(--secondary-red);
}

.checkbox-wrapper label {
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

/* Success Page Styles */
.success-animation {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
}
