* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #004b8d 0%, #0066b3 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
}

.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    height: fit-content;
    border-top: 4px solid #004b8d;
}

.main-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    border-top: 4px solid #004b8d;
}

.main-header {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sub-header {
    font-size: 1.4rem;
    color: #004b8d;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.sidebar-title {
    font-size: 1.4rem;
    color: #004b8d;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
    font-weight: 700;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
    border: 2px dashed #004b8d;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s;
    background-color: #f8fafc;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #003366;
    background-color: #f0f7ff;
}

.upload-area.highlight {
    border-color: #009639;
    background-color: #e8f8f1;
}

.upload-area.dragover {
    background: #e3f2fd;
    border-color: #004b8d;
}

.upload-icon {
    font-size: 40px;
    color: #004b8d;
    margin-bottom: 10px;
}

.upload-text {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #34495e;
}

.browse-btn {
    display: inline-block;
    background-color: #004b8d;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

.browse-btn:hover {
    background-color: #003366;
}

#file-input {
    display: none;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
    font-size: 0.9rem;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-left: 10px;
}

.remove-file {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 10px;
}

/* ===== BUTTONS ===== */
.convert-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #004b8d, #003366);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 75, 141, 0.3);
    margin-top: 20px;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 75, 141, 0.4);
}

.convert-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #009639, #007a2f);
    color: white;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 150, 57, 0.3);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 150, 57, 0.4);
}

/* ===== PROGRESS & STEPS ===== */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    height: 12px;
    background-color: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress {
    height: 100%;
    background: linear-gradient(135deg, #004b8d, #003366);
    width: 0%;
    transition: width 0.3s;
    border-radius: 6px;
}

.progress-text {
    text-align: center;
    margin-top: 12px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

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

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step.active .step-circle {
    background-color: #004b8d;
    color: white;
}

.step.completed .step-circle {
    background-color: #009639;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: center;
}

.step.active .step-label {
    color: #004b8d;
    font-weight: 600;
}

.step.completed .step-label {
    color: #009639;
}

/* ===== STATUS MESSAGES ===== */
.success-box {
    background-color: #004b8d;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: white;
    font-weight: 600;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===== STATS & INFO ===== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.info-section {
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-section ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.info-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ===== PREVIEW SECTIONS ===== */
.preview-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-section label {
    font-weight: 600;
    color: #333;
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 300px;
}

.filter-btn {
    padding: 10px 20px;
    background: #004b8d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.preview-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.debitur-preview {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #004b8d;
}

.debitur-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.debitur-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.debitur-header h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.3em;
}

.file-source {
    background: #e3f2fd;
    color: #004b8d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.debitur-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-label {
    font-weight: 600;
    color: #555;
}

.info-value {
    font-weight: 500;
    color: #333;
}

.fasilitas-section, .bank-section {
    margin-bottom: 25px;
}

.fasilitas-section h5, .bank-section h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.fasilitas-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.fasilitas-table th {
    background: #004b8d;
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #003366;
}

.fasilitas-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.fasilitas-table .plafon-row {
    background: #f8fff8;
}

.fasilitas-table .bade-row {
    background: #fff8f8;
}

.fasilitas-table .plafon-row td:first-child {
    background: #e8f5e8;
    font-weight: 600;
    color: #2e7d32;
}

.fasilitas-table .bade-row td:first-child {
    background: #f5e8e8;
    font-weight: 600;
    color: #c62828;
}

.fasilitas-table td:not(:first-child) {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
}

.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #004b8d, #0066b3);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bank-label {
    font-weight: 500;
}

.bank-value {
    font-weight: 700;
    font-size: 1.2em;
}

/* ===== TABLES ===== */
.ringkasan-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ringkasan-table th,
.ringkasan-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ringkasan-table th {
    background: #004b8d;
    color: white;
    font-weight: 600;
}

.ringkasan-table tr:hover {
    background: #f8f9fa;
}

.data-preview {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.preview-header {
    background-color: #004b8d;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

.preview-table th {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #2c3e50;
}

.preview-table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.preview-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

/* ===== MODAL ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-top: 4px solid #004b8d;
}

.filename-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    margin-bottom: 10px;
}

.filename-input:focus {
    border-color: #004b8d;
    outline: none;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn:hover {
    background: #f8f9fa;
}

.confirm-btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, #009639, #007a2f);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 150, 57, 0.3);
}

.download-section {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f8f1, #d4efdf);
    border-radius: 10px;
    border: 2px solid #009639;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
    font-weight: 600;
}

.submit-btn:hover:not(:disabled) {
    background: #27ae60;
}

.submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.form-message {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .step-indicator {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .step {
        flex: 1;
        min-width: 80px;
    }
    
    .debitur-info {
        grid-template-columns: 1fr;
    }
    
    .debitur-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .bank-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-section, .filter-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-select {
        min-width: 100%;
    }
    
    .preview-tabs {
        flex-wrap: wrap;
    }
    
    .preview-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}