/* ===================================
   DYNAMIC THEMING WITH CSS VARIABLES
   =================================== */
:root {
    /* ... other variables ... */
    font-family: var(--custom-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-family) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force font loading */
* {
    font-family: inherit;
}

   .text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-alpha-30);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* ===================================
   FORM CONTAINER STYLES
   =================================== */
.form-container {
    padding: 2rem 0;
    min-height: 100vh;
}

.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}

.form-header h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header h4 {
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* ===================================
   WIZARD PROGRESS & STEPS STYLES
   =================================== */
.wizard-progress-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.wizard-progress {
    position: relative;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    width: 20%;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.wizard-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    text-align: center;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 3px solid transparent;
    position: relative;
    z-index: 2;
}

.wizard-step.active .step-circle {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px var(--primary-alpha-30);
    border-color: white;
}

.wizard-step.completed .step-circle {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    animation: pulse-success 0.6s ease;
}

@keyframes pulse-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    transition: color 0.3s ease;
    margin-top: 0.25rem;
}

.wizard-step.active .step-label {
    color: var(--primary-color);
    font-weight: 700;
}

.wizard-step.completed .step-label {
    color: #28a745;
}

/* ===================================
   WIZARD CONTENT STYLES
   =================================== */
.wizard-content {
    display: none;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 400px;
}

.wizard-content.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    background: linear-gradient(135deg, var(--primary-alpha-10) 0%, var(--primary-alpha-20) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }

.form-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px var(--primary-alpha-10);
    transform: translateY(-2px);
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
}

/* ===================================
   FLOW CARDS STYLES
   =================================== */
.flow-question-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid #dee2e6;
    animation: fadeInUp 0.6s ease;
}

.form-check-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.flow-card {
    border: 3px solid #dee2e6;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.flow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.flow-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px var(--primary-alpha-20);
}

.flow-card:hover::before {
    left: 100%;
}

.form-check-card input[type="radio"]:checked + label .flow-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-alpha-10) 0%, var(--primary-alpha-20) 100%);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px var(--primary-alpha-30);
}

.flow-card-a:hover,
.form-check-card input[type="radio"]:checked + label .flow-card-a {
    border-color: #17a2b8;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
}

.flow-card-b:hover,
.form-check-card input[type="radio"]:checked + label .flow-card-b {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
}

.flow-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* ===================================
   SUBSIDI OPTIONS STYLES
   =================================== */
.subsidi-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-check-card-small input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.subsidi-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    background: white;
    min-width: 200px;
}

.subsidi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.subsidi-card.success {
    border-color: #28a745;
}

.subsidi-card.success:hover,
.form-check-card-small input[type="radio"]:checked + label .subsidi-card.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border-color: #28a745;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
}

.subsidi-card.warning {
    border-color: #ffc107;
}

.subsidi-card.warning:hover,
.form-check-card-small input[type="radio"]:checked + label .subsidi-card.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 223, 0, 0.1) 100%);
    border-color: #ffc107;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.2);
}

.subsidi-card i {
    font-size: 1.5rem;
}

.subsidi-card.success i {
    color: #28a745;
}

.subsidi-card.warning i {
    color: #ffc107;
}

/* ===================================
   SAUDARA FIELDS STYLES
   =================================== */
.saudara-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 2px solid #e9ecef;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: slideInUp 0.5s ease;
    animation-fill-mode: both;
}

.saudara-item:nth-child(1) { animation-delay: 0.1s; }
.saudara-item:nth-child(2) { animation-delay: 0.2s; }
.saudara-item:nth-child(3) { animation-delay: 0.3s; }
.saudara-item:nth-child(4) { animation-delay: 0.4s; }
.saudara-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.saudara-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--primary-alpha-20);
}

.saudara-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

/* ===================================
   FILE UPLOAD STYLES
   =================================== */
.upload-section {
    animation: fadeInUp 0.6s ease;
}

.file-preview-simple {
    margin-top: 1rem;
}

.file-item-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    animation: fadeInRight 0.4s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-item-simple:hover {
    border-color: var(--primary-color);
    background: white;
}

/* ===================================
   WIZARD NAVIGATION STYLES
   =================================== */
.wizard-navigation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 2rem;
    border: 1px solid #dee2e6;
}

.btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

.step-info {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    font-weight: 600;
    color: var(--primary-color);
}

/* ===================================
   FORM CONTROLS ENHANCEMENT
   =================================== */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-alpha-20);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-check input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===================================
   CONFIRMATION CONTENT STYLES
   =================================== */
.confirmation-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.confirmation-section:nth-child(1) { animation-delay: 0.1s; }
.confirmation-section:nth-child(2) { animation-delay: 0.2s; }
.confirmation-section:nth-child(3) { animation-delay: 0.3s; }

.confirmation-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confirmation-data {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.confirmation-label {
    font-weight: 600;
    color: #6c757d;
}

.confirmation-value {
    color: #495057;
    word-break: break-word;
}

.confirmation-actions {
    background: linear-gradient(135deg, var(--primary-alpha-10) 0%, var(--primary-alpha-20) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid var(--primary-color);
}

/* ===================================
   LOADING STATES
   =================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   FORM VALIDATION STYLES
   =================================== */
.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid, .form-select.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    animation: fadeInUp 0.3s ease;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
    animation: fadeInUp 0.3s ease;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .wizard-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .wizard-step {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .subsidi-options {
        flex-direction: column;
    }

    .subsidi-card {
        min-width: auto;
    }

    .confirmation-data {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .confirmation-label {
        font-weight: 700;
        color: var(--primary-color);
    }
}

@media (max-width: 576px) {
    .wizard-progress-container {
        padding: 1rem;
    }

    .wizard-step {
        flex: 0 0 100%;
        margin-bottom: 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .step-header {
        padding: 1rem;
    }
}