/* ==================== RESET & BASE ==================== */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, sans-serif; }
body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; display: flex; justify-content: center; align-items: flex-start; }

.form-container { background: #fff; width: 100%; max-width: 650px; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); overflow: hidden; margin: 20px 0; }
.form-header { background: linear-gradient(135deg, #11998e, #38ef7d); color: white; padding: 25px; text-align: center; }
.form-header h2 { margin-bottom: 5px; font-size: 22px; }
.form-header p { font-size: 13px; opacity: 0.9; }

.progress-bar { display: flex; padding: 15px 10px; background: #f8f9fa; border-bottom: 1px solid #eee; overflow-x: auto; }
.step-indicator { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #888; flex: 1; min-width: 70px; }
.step-indicator.active { color: #11998e; font-weight: bold; }
.step-circle { width: 28px; height: 28px; border-radius: 50%; background: #ddd; color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; font-weight: bold; font-size: 12px; }
.step-indicator.active .step-circle { background: #11998e; }
.step-indicator.completed .step-circle { background: #28a745; }

.form-body { padding: 25px; }
.form-step { display: none; animation: fadeIn 0.4s; }
.form-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.form-group { margin-bottom: 18px; }
label { display: block; margin-bottom: 6px; font-weight: 600; color: #333; font-size: 13px; }
.label-hint { font-weight: normal; color: #888; font-size: 11px; display: block; margin-top: 2px; }
input, select, textarea { width: 100%; padding: 11px; border: 1.5px solid #ddd; border-radius: 8px; font-size: 14px; transition: border 0.3s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #11998e; }
input:disabled { background: #f1f3f5; color: #adb5bd; cursor: not-allowed; }
input.input-error { border-color: #dc3545; background: #fff5f5; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .form-group { flex: 1; min-width: 0; }

.row-date { display: flex; gap: 12px; flex-wrap: wrap; }
.row-date .form-group { flex: 1 1 100%; min-width: 0; }

.info-box { background: #e8f5e9; border-left: 4px solid #11998e; padding: 12px 15px; border-radius: 6px; font-size: 13px; color: #2e7d32; margin-bottom: 15px; }
.info-box strong { color: #1b5e20; }
.info-box.tenda { background: #fff3e0; border-left-color: #e65100; color: #bf360c; }
.info-box.tenda strong { color: #bf360c; }
.info-box.kombinasi { background: #f3e5f5; border-left-color: #6a1b9a; color: #4a148c; }
.info-box.kombinasi strong { color: #4a148c; }
.info-box.menginap { background: #e3f2fd; border-left-color: #1565c0; color: #0d47a1; }
.info-box.menginap strong { color: #0d47a1; }
.error-box { background: #f8d7da; border-left: 4px solid #dc3545; padding: 12px 15px; border-radius: 6px; font-size: 13px; color: #721c24; margin-bottom: 15px; display: none; }
.error-box.show { display: block; }

.price-display { background: linear-gradient(135deg, #11998e, #38ef7d); color: white; padding: 15px; border-radius: 10px; text-align: center; margin-top: 15px; }
.price-display.tenda { background: linear-gradient(135deg, #e65100, #ff9800); }
.price-display.grand { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }
.price-display .label { font-size: 12px; opacity: 0.9; }
.price-display .amount { font-size: 22px; font-weight: bold; margin-top: 5px; }

/* ==================== FOOTER LAYOUT (UPDATED) ==================== */
.form-footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 18px 25px; 
    background: #f8f9fa; 
    border-top: 1px solid #eee; 
    gap: 10px;
}

.footer-left,
.footer-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-left {
    justify-content: flex-start;
}

.footer-right {
    justify-content: flex-end;
}

/* ==================== TOMBOL HOME (BARU) ==================== */
.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    background: #ffffff;
    color: #11998e;
    border: 2px solid #11998e;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-home:hover {
    background: #11998e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.btn-home:active {
    transform: translateY(0);
}

.btn-home.btn-hidden {
    display: none;
}

/* ==================== BUTTONS ==================== */
button { 
    padding: 11px 22px; 
    border: none; 
    border-radius: 8px; 
    font-size: 14px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s; 
}

.btn-next, .btn-submit { background: #11998e; color: white; }
.btn-next:hover, .btn-submit:hover { background: #0d7a70; }
.btn-prev { background: #e9ecef; color: #495057; }
.btn-prev:hover { background: #dee2e6; }
.btn-hidden { visibility: hidden; }
.btn-submit { background: #25D366; }
.btn-submit:hover { background: #1ebe57; }
.btn-submit:disabled { background: #999; cursor: not-allowed; }

.summary-box { background: #f8f9fa; padding: 18px; border-radius: 10px; margin-bottom: 15px; overflow-x: auto; }
.summary-section { margin-bottom: 15px; padding-bottom: 12px; border-bottom: 1px dashed #ddd; }
.summary-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.summary-section h4 { color: #11998e; margin-bottom: 8px; font-size: 14px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 13px; gap: 10px; flex-wrap: wrap; }
.summary-subrow { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; color: #666; padding-left: 12px; gap: 10px; flex-wrap: wrap; }
.summary-total { background: linear-gradient(135deg, #11998e, #38ef7d); color: white; padding: 12px; border-radius: 8px; display: flex; justify-content: space-between; font-size: 16px; font-weight: bold; margin-top: 10px; flex-wrap: wrap; gap: 10px; }

.checkbox-group { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1.5px solid #eee; border-radius: 8px; cursor: pointer; transition: all 0.3s; margin-bottom: 10px; }
.checkbox-group:hover { border-color: #11998e; }
.checkbox-group.tenda:hover { border-color: #e65100; }
.checkbox-group input { width: auto; }
.checkbox-group.checked { border-color: #11998e; background: #e8f5e9; }
.checkbox-group.tenda.checked { border-color: #e65100; background: #fff3e0; }

.night-breakdown, .perahu-breakdown, .tenda-breakdown { background: #f8f9fa; border-radius: 8px; padding: 12px; margin-top: 12px; font-size: 12px; overflow-x: auto; }
.tenda-breakdown { background: #fff8e1; }
.night-breakdown h5, .perahu-breakdown h5, .tenda-breakdown h5 { font-size: 13px; color: #333; margin-bottom: 8px; }
.night-row, .perahu-row, .tenda-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed #ddd; gap: 8px; flex-wrap: wrap; }
.night-row:last-child, .perahu-row:last-child, .tenda-row:last-child { border-bottom: none; }
.night-row .date, .perahu-row .desc, .tenda-row .desc { color: #555; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.night-row .price, .perahu-row .price, .tenda-row .price { font-weight: 600; white-space: nowrap; }
.badge-weekend { background: #ffebee; color: #c62828; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; border: 1px solid #ef9a9a; }
.badge-weekday { background: #e8f5e9; color: #2e7d32; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; border: 1px solid #a5d6a7; }
.badge-perahu { background: #e3f2fd; color: #1565c0; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; border: 1px solid #90caf9; }
.price-weekend { color: #c62828; font-weight: bold; }
.price-weekday { color: #2e7d32; font-weight: bold; }

.section-card { background: #fafafa; border: 2px solid #e0e0e0; border-radius: 12px; padding: 18px; margin-bottom: 15px; }
.section-card.villa { border-color: #a5d6a7; background: #f1f8e9; }
.section-card.tenda { border-color: #ffcc80; background: #fff8e1; }
.section-card h4 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-card .tanggal-group { background: white; padding: 12px; border-radius: 8px; margin-bottom: 12px; border: 1px dashed #ccc; }
.section-card .tanggal-group .row-date { margin: 0; }

.jumlah-input-group { display: flex; align-items: center; gap: 10px; background: #f8f9fa; padding: 12px; border-radius: 8px; margin-top: 10px; border: 1.5px solid #e0e0e0; flex-wrap: wrap; }
.jumlah-input-group label { margin: 0; flex: 1; font-size: 13px; min-width: 150px; }
.jumlah-input-group input[type="number"] { width: 80px; padding: 8px; text-align: center; font-weight: bold; font-size: 16px; }
.jumlah-input-group .unit-info { font-size: 11px; color: #888; }

.jumlah-menginap-group { background: linear-gradient(135deg, #e3f2fd, #bbdefb); border: 2px solid #2196f3; padding: 15px; border-radius: 10px; margin-bottom: 15px; }
.jumlah-menginap-group label { color: #0d47a1; font-size: 14px; margin-bottom: 8px; }
.jumlah-menginap-group input[type="number"] { width: 100px; padding: 10px; text-align: center; font-weight: bold; font-size: 18px; border: 2px solid #2196f3; }
.jumlah-menginap-group .info-menginap { background: white; padding: 10px; border-radius: 6px; margin-top: 10px; font-size: 12px; color: #1565c0; border-left: 3px solid #2196f3; }
.jumlah-menginap-group .info-menginap strong { color: #0d47a1; }

.kapasitas-status { padding: 12px 15px; border-radius: 8px; margin-top: 15px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.kapasitas-status.ok { background: #e8f5e9; border: 2px solid #4caf50; color: #1b5e20; }
.kapasitas-status.kurang { background: #ffebee; border: 2px solid #f44336; color: #b71c1c; }
.kapasitas-status.lebih { background: #e3f2fd; border: 2px solid #2196f3; color: #0d47a1; }
.kapasitas-status .icon { font-size: 24px; }
.kapasitas-status .detail { flex: 1; }
.kapasitas-status .detail strong { font-size: 14px; display: block; margin-bottom: 2px; }
.kapasitas-status .detail small { font-size: 11px; opacity: 0.9; }

/* ==================== RESPONSIVE: MOBILE (UPDATED) ==================== */
@media (max-width: 600px) {
    body { padding: 10px; }
    .form-body { padding: 18px; }
    .form-header { padding: 20px 15px; }
    .form-header h2 { font-size: 18px; }
    
    /* Footer mobile */
    .form-footer { 
        padding: 15px; 
        flex-wrap: wrap; 
        gap: 10px; 
    }
    
    .footer-left,
    .footer-right {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
    }
    
    .footer-left {
        justify-content: flex-start;
    }
    
    .footer-right {
        justify-content: flex-end;
    }
    
    .footer-left button,
    .footer-right button,
    .footer-left .btn-home {
        flex: 1;
        min-width: 0;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .row { gap: 8px; }
    .row .form-group { flex: 1 1 calc(50% - 4px); min-width: 120px; }
    .row-date { flex-direction: column; gap: 10px; }
    .row-date .form-group { flex: 1 1 100%; width: 100%; }
    .section-card { padding: 14px; }
    .section-card .tanggal-group { padding: 10px; }
    .jumlah-input-group { flex-direction: column; align-items: stretch; }
    .jumlah-input-group input[type="number"] { width: 100%; }
    .jumlah-menginap-group input[type="number"] { width: 100%; }
    .summary-row, .summary-subrow { flex-direction: column; align-items: flex-start; gap: 2px; }
    .kapasitas-status { flex-direction: column; text-align: center; }
    .price-display .amount { font-size: 18px; }
    .night-row, .perahu-row, .tenda-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .row-date .form-group { flex: 1 1 calc(50% - 6px); }
}

@media (min-width: 901px) {
    .row-date .form-group { flex: 1 1 calc(50% - 6px); }
}