/* ========================================= */
/* GLOBAL STYLES - Diterapkan ke semua halaman */
/* ========================================= */
html, body {
    height: 100%; /* Memastikan html dan body mengambil tinggi penuh */
    width: 100%;  /* Memastikan html dan body mengambil lebar penuh */
    margin: 0; /* Hapus !important */
    padding: 0; /* Hapus !important */
    box-sizing: border-box; /* Penting untuk konsistensi perhitungan ukuran */
    overflow-x: hidden; /* Mencegah scrollbar horizontal yang tidak diinginkan */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff; /* Latar belakang putih untuk seluruh halaman secara default */
    color: #333;
    display: flex; /* Hapus !important */
    flex-direction: column; /* Menumpuk header, konten utama, dan footer secara vertikal */
    min-height: 100vh; /* Memastikan body mengambil tinggi viewport penuh */
    /* width: 100%; <--- Hapus baris ini */
    /* max-width: none; <--- Hapus baris ini */
}

/* Header Styles */
.header {
    background-color: #0d2a4d; /* Latar belakang biru gelap */
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 50px;
    box-sizing: border-box;
    width: 100%; /* Memastikan header mengambil lebar penuh */
}

.header .logo-section {
    display: flex;
    align-items: center;
}

.header .logo-section img {
    height: 40px;
    width: auto;
    object-fit: contain;
    margin-right: 10px;
}

.header .logo-section span {
    font-weight: bold;
    font-size: 1.2em;
    letter-spacing: 0.5px;
}

.header .nav-links {
    display: flex;
    gap: 20px;
}

.header .nav-links a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
}

.header .nav-links a i {
    margin-right: 6px;
    font-size: 1.1em;
}

.header .nav-links a:hover {
    background-color: #1a4a7d;
    transform: translateY(-2px);
}

.header .nav-links a.active {
    background-color: #2a6a9d;
    font-weight: bold;
}

.header .nav-links .profile-pic {
    height: 28px;
    width: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Footer Styles */
.footer {
    background-color: #0d2a4d;
    color: white;
    text-align: right;
    padding: 10px 0;
    padding-right: 20px;
    font-size: 0.85em;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto; /* Mendorong footer ke bawah dalam flex column */
    width: 100%; /* Memastikan footer mengambil lebar penuh */
}

/* Custom Modal & Alert Styles (Global) */
.modal-overlay, .custom-alert-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content, .custom-alert-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content h3, .custom-alert-content p {
    color: #0d2a4d;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.modal-content p {
    color: #555;
    margin-bottom: 25px;
    font-size: 1.1em;
}

.modal-input {
    width: calc(100% - 20px);
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.modal-button.confirm {
    background-color: #4CAF50;
    color: white;
}

.modal-button.confirm:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.modal-button.cancel {
    background-color: #f44336;
    color: white;
}

.modal-button.cancel:hover {
    background-color: #da190b;
    transform: translateY(-1px);
}

.custom-alert-ok-button {
    background-color: #0d2a4d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.custom-alert-ok-button:hover {
    background-color: #0a1f38;
}

/* ========================================= */
/* RESPONSIVE ADJUSTMENTS (Global) */
/* ========================================= */
@media (max-width: 992px) {
    .header {
        flex-direction: column;
        padding: 10px 15px;
        gap: 10px;
        height: auto;
    }

    .header .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .header .nav-links a {
        padding: 5px 10px;
    }
}

@media (max-width: 768px) {
    .header .logo-section span {
        font-size: 1.2em;
    }

    .header .logo-section img {
        height: 30px;
    }

    .modal-content, .custom-alert-content {
        width: 95%;
        padding: 20px;
    }
}

/* ========================================= */
/* EFFICIENCY & RECOMMENDATIONS PAGE STYLES */
/* ========================================= */
.efficiency-recommendations-page {
    padding: 20px;
    /* Menggunakan variabel CSS dari style.css jika ada, atau fallback ke warna default */
    background-color: var(--background-color, #f4f7f6);
    color: var(--text-color, #333);
    font-family: Arial, sans-serif;
    flex-grow: 1; /* Memastikan halaman ini mengisi ruang yang tersedia */
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee; /* Garis pemisah */
    padding-bottom: 10px;
}

.page-header h1 {
    /* Menggunakan variabel CSS dari style.css jika ada, atau fallback */
    color: var(--primary-color, #333);
    margin: 0;
    font-size: 1.8em;
}

.page-logo {
    max-height: 60px; /* Sesuaikan ukuran logo */
    width: auto;
}

.content-wrapper {
    display: flex;
    gap: 20px; /* Jarak antar panel kiri dan kanan */
}

.left-panel {
    flex: 2; /* Panel kiri mengambil 2/3 ruang */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Jarak antar kartu di panel kiri */
}

.right-panel {
    flex: 1; /* Panel kanan mengambil 1/3 ruang */
    display: flex;
    flex-direction: column; /* Pastikan konten di dalamnya tersusun vertikal */
}

.card {
    /* Menggunakan variabel CSS dari style.css jika ada, atau fallback */
    background-color: var(--card-background-color, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0; /* Padding akan diatur di dalam tabel atau konten spesifik */
    overflow: hidden; /* Memastikan border/shadow tidak terpotong */
}

/* Styling Umum untuk Tabel */
.efficiency-table, .cop-table, .maintenance-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.efficiency-table th, .cop-table th, .maintenance-table th,
.efficiency-table td, .cop-table td, .maintenance-table td {
    border: 1px solid #ddd; /* Border tipis abu-abu */
    padding: 8px 12px;
    text-align: left;
    font-size: 0.9em;
}

/* Header Hijau untuk Tabel Efisiensi dan COP */
.efficiency-table th.green-header, .cop-table th.green-header {
    background-color: #4CAF50; /* Hijau */
    color: white;
    font-weight: bold;
}

/* Header Biru untuk Tabel Rekomendasi Maintenance */
.maintenance-table th.blue-header {
    background-color: #007bff; /* Biru */
    color: white;
    font-weight: bold;
    text-align: center;
}

.maintenance-table th.sub-header {
    background-color: #f2f2f2; /* Abu-abu terang untuk sub-header */
    color: var(--text-color, #333); /* Added fallback */
    font-weight: bold;
}

/* Sub-header Biru untuk bagian Maintenance */
.maintenance-table th.blue-subheader {
    background-color: #0056b3; /* Biru lebih gelap */
    color: white;
    font-weight: bold;
    text-align: center;
}

/* Header "Saving" */
.maintenance-table td.saving-header {
    font-weight: bold;
    background-color: #e9ecef; /* Abu-abu sangat terang */
}

/* Label baris yang tebal */
.row-label {
    font-weight: bold;
}

/* Penyelarasan teks untuk kolom nilai dan unit */
.efficiency-table td:nth-child(3), /* Kolom Aktual */
.efficiency-table td:nth-child(4), /* Kolom Desain */
.cop-table td:last-child, /* Kolom Value di COP */
.maintenance-table td:nth-child(2) /* Kolom Value di Maintenance */ {
    text-align: right;
}
.maintenance-table td:nth-child(3) { /* Kolom Unit/Persentase di Maintenance */
    text-align: left;
    white-space: nowrap; /* Mencegah unit pindah baris */
}

/* Styling untuk Bagian Rekomendasi */
.recommendations-section {
    padding: 20px; /* Tambahkan padding untuk konten kartu ini */
    height: 100%; /* Memastikan kartu mengisi tinggi yang tersedia */
    display: flex;
    flex-direction: column;
}

.recommendations-section h3.blue-header {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    /* Negatif margin untuk membuat header mengisi lebar penuh kartu */
    margin: -20px -20px 20px -20px;
    text-align: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.recommendations-content {
    flex-grow: 1; /* Memastikan konten mengisi sisa ruang */
    background-color: #f8f9fa; /* Latar belakang terang untuk konten */
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 5px;
    overflow-y: auto; /* Scroll jika konten terlalu panjang */
    line-height: 1.6;
}
