/* --- GLOBAL STYLES --- */
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f8fafc; padding: 40px 20px; margin: 0; color:#333; }

#pageLoader { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: #f8fafc; z-index: 9999; justify-content: center; align-items: center; flex-direction: column; color: #0f4c81; font-weight: 600; font-size: 16px; }
.modern-spinner { width: 50px; height: 50px; border: 4px solid #e2e8f0; border-top: 4px solid #0f4c81; border-radius: 50%; animation: spin-fast 1s linear infinite; margin-bottom: 20px; }
@keyframes spin-fast { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- LOGIN --- */
#login-section { display: none; justify-content: center; align-items: center; min-height: 80vh; background-color: #f8fafc; }
.login-card { background: #ffffff; padding: 45px 40px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); border: 1px solid #e2e8f0; width: 100%; max-width: 380px; text-align: center; }
.login-logo { margin-bottom: 20px; display: flex; justify-content: center; }
.login-logo img { width: 160px; height: auto; object-fit: contain; }
.login-tagline { font-size: 13px; color: #64748b; margin-bottom: 25px; font-weight: 500; letter-spacing: 0.3px; }
.login-instruction { font-size: 14px; color: #475569; margin-bottom: 20px; text-align: left; }
.input-with-icon { position: relative; margin-bottom: 16px; text-align: left; }
.input-with-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; width: 18px; height: 18px; }
.input-with-icon input { width: 100%; padding: 13px 13px 13px 42px !important; border: 1px solid #cbd5e1; border-radius: 8px; box-sizing: border-box; font-size: 14px; font-family: inherit; transition: all 0.3s; background-color: #f8fafc; color: #334155; }
.input-with-icon input:focus { border-color: #0f4c81; background-color: #ffffff; outline: none; box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1); }
.btn-login { width: 100%; background-color: #16a34a; color: white; padding: 13px; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: bold; margin-top: 5px; transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 4px 6px rgba(22, 163, 74, 0.2);}
.btn-login:hover { background-color: #15803d; }
.btn-login:disabled { background-color: #94a3b8; cursor: not-allowed; box-shadow: none;}
.login-forgot { margin-top: 20px; font-size: 13px; color: #3b82f6; cursor: pointer; display: inline-block; text-decoration: none; font-weight: 500;}
.login-footer { margin-top: 40px; font-size: 12px; color: #94a3b8; }

/* --- INPUT & DASHBOARD GLOBAL --- */
input[type="text"], input[type="password"], input[type="date"], textarea, input[type="file"], select { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 8px; box-sizing: border-box; font-family: inherit; font-size: 14px; background-color: #f8fafc; transition: all 0.3s ease; color: #334155; }
input:focus, textarea:focus, select:focus { border-color: #0f4c81; background-color: #ffffff; outline: none; box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1); }
input[readonly] { background-color: #f1f5f9; cursor: not-allowed; color: #64748b; font-weight: bold; border-color: #e2e8f0; }
textarea { resize: vertical; height: 80px; }

/* KARTU MENU BARU */
.menu-card { background: #ffffff; padding: 35px 25px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #e2e8f0; width: 100%; max-width: 320px; text-align: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.menu-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); border-color: #cbd5e1; }
.menu-icon { font-size: 48px; margin-bottom: 15px; }

.dashboard-wrapper { display: none; flex-direction: column; gap: 30px; width: 100%; max-width: 95%; margin: 0 auto; align-items: flex-start; }
@media (min-width: 850px) { .dashboard-wrapper { flex-direction: row; justify-content: center; } }

.form-container { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; width: 100%; flex: 1; box-sizing: border-box; }
.info-container { background: transparent; width: 100%; flex: 1.2; display: flex; flex-direction: column; gap: 20px;}

.cuti-card { background: #eff6ff; padding: 20px; border-radius: 12px; border-left: 6px solid #3b82f6; box-shadow: 0 4px 15px rgba(0,0,0,0.02); display: flex; justify-content: space-between; align-items: center;}
.cuti-number { font-size: 36px; font-weight: bold; color: #1e3a8a; line-height: 1;}
.cuti-label { font-size: 14px; color: #475569; font-weight: bold; }

.table-card { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; }
.table-wrapper { max-height: 400px; overflow-y: auto; margin-top: 15px; border: 1px solid #f1f5f9; border-radius: 8px;}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px;}
th { background-color: #f8fafc; padding: 14px 12px; position: sticky; top: 0; box-shadow: 0 1px 0 #e2e8f0; color: #475569;}
td { padding: 14px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top;}
tr:hover { background-color: #f8fafc; }

h2.dash-title, h4.dash-title { text-align: center; color: #0f4c81; margin-top: 0; margin-bottom: 25px; font-weight: 800;}
.form-group { margin-bottom: 16px; text-align: left; }
label { display: block; font-weight: bold; margin-bottom: 8px; color: #475569; font-size: 14px;}

.btn-submit { width: 100%; background-color: #16a34a; color: white; padding: 13px; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: bold; margin-top: 10px; display: flex; justify-content: center; align-items: center; gap: 8px; transition: 0.2s;}
.btn-submit:hover { background-color: #15803d; }
.btn-submit:disabled { background-color: #94a3b8; cursor: not-allowed; }

.header-bar { width: 100%; max-width: 1200px; margin: 0 auto; display: none; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #e2e8f0;}
.btn-logout { background-color: #ef4444; color: white; border: none; border-radius: 6px; padding: 8px 20px; font-size: 14px; cursor: pointer; transition: 0.2s; font-weight: bold;}
.btn-logout:hover { background-color: #dc2626; }

.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }
#statusMessage, #loginResult, #taskStatusMessage { text-align: center; margin-top: 15px; font-weight: bold; line-height: 1.5; font-size: 14px;}
.success { color: #166534; background: #dcfce7; padding: 12px; border-radius: 8px; border: 1px solid #bbf7d0;}
.error { color: #991b1b; background: #fee2e2; padding: 12px; border-radius: 8px; border: 1px solid #fecaca;}

/* --- MODAL & PASSWORD --- */
.btn-edit-pass { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 15px; font-size: 14px; cursor: pointer; transition: 0.2s; font-weight: bold;}
.btn-edit-pass:hover { background-color: #e2e8f0; color: #0f4c81;}

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(15, 23, 42, 0.6); z-index: 10000; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.modal-card { background: #ffffff; padding: 40px 35px; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); width: 100%; max-width: 420px; position: relative; text-align: left; animation: modalFadeIn 0.3s ease-out;}
@keyframes modalFadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.btn-close-modal { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 28px; cursor: pointer; color: #94a3b8; transition: 0.2s; line-height: 1; padding: 0;}
.btn-close-modal:hover { color: #ef4444; transform: scale(1.1);}
#passResult { text-align: center; margin-top: 15px; font-weight: bold; font-size: 14px; min-height: 20px;}

.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { padding-right: 45px !important; }
.btn-toggle-pass { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none !important; border: none !important; box-shadow: none !important; cursor: pointer; color: #94a3b8; padding: 5px; display: flex; align-items: center; justify-content: center; }
.btn-toggle-pass:hover { color: #0f4c81; }
.btn-toggle-pass svg { width: 20px; height: 20px; }

/* --- GANTT CHART STYLES --- */
.gantt-container { 
    width: 100%; 
    max-width: 100%; /* Memastikan wadah tidak melebihi layar HP */
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; /* Membuat scroll horizontal lebih mulus di HP */
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); 
    border: 1px solid #f1f5f9; 
    padding-bottom: 10px;
}

.gantt-table { 
    border-collapse: collapse; 
    font-size: 13px; 
    text-align: left;
    /* [KUNCI PERBAIKAN]: Memaksa tabel selebar konten aslinya, dilarang menyusut! */
    width: max-content !important; 
    min-width: max-content !important; 
}

.gantt-table th, .gantt-table td { 
    border: 1px solid #e2e8f0; 
    padding: 10px; 
}

.gantt-table th { 
    background-color: #f8fafc; 
    color: #475569; 
    position: sticky; 
    top: 0; 
    z-index: 10; 
    font-weight: 600; 
    white-space: nowrap;
}

.gantt-table td { 
    background-color: #ffffff; 
    color: #334155; 
}

/* Memaksa kotak sel kalender tidak ikut menyusut */
.gantt-cell { 
    text-align: center; 
    padding: 0 !important; 
    position: relative; 
    min-width: 35px !important; /* Mengunci lebar minimal sama dengan header tanggal */
}

/* Sticky Left Columns */
.gantt-table .col-fixed { position: sticky; left: 0; z-index: 5; background-color: #ffffff; }
.gantt-table th.col-fixed { z-index: 11; background-color: #f8fafc; }

/* Date Header Columns */
.gantt-table .col-date { text-align: center; width: 35px; min-width: 35px; padding: 5px; font-size: 12px;}
.gantt-table .is-weekend { background-color: #f1f5f9 !important; color: #94a3b8; }

/* Timeline Blocks */
.gantt-cell { text-align: center; padding: 0 !important; position: relative; }
.gantt-block { position: absolute; top: 5px; bottom: 5px; left: 0; right: 0; border-radius: 4px; z-index: 2;}

.bg-high { background-color: #dc2626; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1); }
.bg-medium { background-color: #f59e0b; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);}
.bg-low { background-color: #10b981; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);}

/* --- BUTTONS DALAM TABEL --- */
.btn-sm-edit { background-color: #f59e0b; color: white; border: none; padding: 6px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; font-weight: bold; margin-right: 5px; transition: 0.2s;}
.btn-sm-edit:hover { background-color: #d97706; }
.btn-sm-view { background-color: #0f4c81; color: white; border: none; padding: 6px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; font-weight: bold; transition: 0.2s;}
.btn-sm-view:hover { background-color: #1e3a8a; }
.btn-sm-view.empty { background-color: #94a3b8; cursor: not-allowed; } /* Warna abu-abu jika note kosong */
/* --- MENU DROPDOWN PROFIL & TOMBOL HOME --- */
.btn-icon-user { background: #e2e8f0; border: none; border-radius: 50%; padding: 10px; cursor: pointer; color: #0f4c81; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-icon-user:hover { background: #cbd5e1; }
.btn-icon-user svg { width: 22px; height: 22px; }

.dropdown-content { display: none; position: absolute; right: 0; top: 50px; background-color: #ffffff; min-width: 180px; box-shadow: 0px 8px 24px rgba(0,0,0,0.1); border-radius: 12px; border: 1px solid #e2e8f0; z-index: 1000; overflow: hidden; }
.dropdown-content a { color: #475569; padding: 14px 20px; text-decoration: none; display: block; font-size: 14px; font-weight: 600; border-bottom: 1px solid #f1f5f9; transition: 0.2s;}
.dropdown-content a:hover { background-color: #f8fafc; color: #0f4c81;}
.dropdown-content a:last-child { border-bottom: none; }

.btn-circle { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 50%; padding: 12px; cursor: pointer; color: #475569; display: flex; align-items: center; justify-content: center; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02);}
.btn-circle:hover { background: #f8fafc; color: #0f4c81; border-color: #94a3b8; transform: translateY(-2px);}
.btn-circle svg { width: 20px; height: 20px; }

/* Pembantu Layout Flex di Page Izin */
@media (min-width: 850px) { .flex-desktop { flex-direction: row !important; align-items: stretch; } }

/* --- ANIMASI SPINNER BUTTON --- */
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* --- WIDGET TO DO LIST & CHART --- */

/* 1. Container Utama (Wajib Transparan) */
.todo-container { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* Membagi rata 3 kolom presisi */
    gap: 30px; 
    width: 100%; 
    background: transparent !important; /* Mematikan background lama */
    border: none !important; 
    box-shadow: none !important;
}

/* 2. Box Kiri (Mengambil 2 kolom, sejajar menu 1 & 2) */
.todo-left { 
    grid-column: span 2; 
    background: #ffffff; 
    border-radius: 16px; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.03); 
    border: 1px solid #f1f5f9; 
    padding: 30px; 
}

/* 3. Box Kanan (Mengambil 1 kolom, sejajar menu 3) */
.todo-right { 
    grid-column: span 1; 
    background: #ffffff; 
    border-radius: 16px; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.03); 
    border: 1px solid #f1f5f9; 
    padding: 30px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start; 
}

.todo-title { font-size: 16px; color: #1e293b; font-weight: 600; margin-top: 0; margin-bottom: 20px; }

/* 4. Styling Scrollbar pada List */
#todoListContent {
    max-height: 380px; 
    overflow-y: auto;
    padding-right: 10px;
}
#todoListContent::-webkit-scrollbar { width: 6px; }
#todoListContent::-webkit-scrollbar-track { background: transparent; }
#todoListContent::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }

/* 5. Styling Item List */
.todo-group-label { font-size: 13px; color: #10b981; font-weight: 800; margin: 15px 0 10px 0; }
.todo-item { display: flex; align-items: center; background: #f8fafc; border-radius: 12px; padding: 12px; margin-bottom: 10px; transition: 0.2s; border: 1px solid transparent;}
.todo-item:hover { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transform: translateX(4px); }

.todo-date-box { color: white; border-radius: 8px; width: 50px; height: 50px; display: flex; flex-direction: column; justify-content: center; align-items: center; line-height: 1.1; flex-shrink: 0; margin-right: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);}
.todo-date-day { font-size: 20px; font-weight: 800; }
.todo-date-month { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}

.todo-details { flex-grow: 1; overflow: hidden; margin-right: 15px;}
.todo-task-name { font-weight: 700; color: #334155; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;}
.todo-task-group { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.todo-badge { font-size: 11px; padding: 5px 12px; border-radius: 20px; font-weight: 700; flex-shrink: 0;}

/* 6. Styling Donut Chart & Legend */
.chart-container { position: relative; width: 160px; height: 160px; margin-top: 10px; margin-bottom: 30px; }
.donut-chart { width: 100%; height: 100%; border-radius: 50%; display: flex; justify-content: center; align-items: center; background: #e2e8f0; transition: background 0.5s;}
.donut-inner { width: 115px; height: 115px; background: #ffffff; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 32px; font-weight: 800; color: #1e293b; line-height: 1.1; box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);}

.chart-legend { width: 100%; margin-top: 25px;}
.legend-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: #475569;}
.legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 8px; vertical-align: middle;}

/* 7. Mode Layar Kecil (Mobile) */
@media (max-width: 850px) {
    .todo-container { grid-template-columns: 1fr; }
    .todo-left, .todo-right { grid-column: span 1; }
}

/* Styling Container List agar bisa di-scroll */
#todoListContent {
    max-height: 380px; /* Batas tinggi widget */
    overflow-y: auto;
    padding-right: 10px;
}

/* Mempercantik bentuk Scrollbar */
#todoListContent::-webkit-scrollbar { width: 6px; }
#todoListContent::-webkit-scrollbar-track { background: transparent; }
#todoListContent::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }

/* --- KUNCI PENYELARASAN PIXEL-PERFECT (TODO & MENU) --- */
#todo-section, #menu-section {
    max-width: 1020px !important; /* Memaksa lebar maksimal yang sama persis */
    margin-left: auto !important; /* Memaksa posisi ke tengah layar */
    margin-right: auto !important;
    width: 100% !important;
}

/* Memastikan Menu Card membagi ruang dengan seimbang */
.menu-card {
    flex: 1;
    min-width: 250px;
}

/* ==========================================================
   FORUM POST STYLING (Murni CSS, Tanpa Bootstrap)
   ========================================================== */
.forum-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    text-align: left;
}

.forum-feed {
    flex: 1;
    min-width: 0; /* Mencegah flexbox meluber */
}

.forum-sidebar {
    width: 300px;
    position: sticky;
    top: 20px;
}

.forum-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    margin-bottom: 20px;
}

/* Create Post Box */
.create-post-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0369a1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 16px;
}

.forum-input {
    width: 100%;
    border: none;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #334155;
    box-sizing: border-box;
    transition: all 0.2s;
}

.forum-input:focus {
    outline: none;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}

.title-input { font-weight: 700; font-size: 15px; }
.detail-input { resize: none; font-size: 14px; margin-bottom: 15px; line-height: 1.5; }

.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

.action-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.media-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.media-upload-btn:hover { background: #f1f5f9; color: #0f4c81; }

.forum-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 13px;
    color: #475569;
    background: white;
    cursor: pointer;
}

.publish-btn {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.publish-btn:hover { background: #0b5ed7; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(13,110,253,0.3); }

/* Sidebar List */
.group-item {
    padding: 10px 15px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 5px;
    transition: 0.2s;
}

.group-item:hover { background: #f8fafc; color: #0f4c81; }
.group-item.active { background: #e0f2fe; color: #0369a1; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .forum-layout { flex-direction: column; }
    .forum-sidebar { width: 100%; position: relative; top: 0; }
    .action-left { flex-wrap: wrap; }
}

/* =======================================================
   PERBAIKAN GANTT CHART RESPONSIVE & ANTI-TEMBUS
   ======================================================= */

/* 1. Berikan warna solid pada kolom yang dikunci agar tidak tembus pandang */
.gantt-table .col-fixed {
    position: sticky !important;
    background-color: #ffffff !important; 
    z-index: 50 !important; /* <--- INI KUNCINYA: Naikkan kasta jauh di atas balok kalender */
    box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1); 
}

/* 2. Pastikan Header (Judul Kolom) berada di lapisan paling atas */
.gantt-table thead .col-fixed {
    z-index: 60 !important; /* <--- Header harus paling tinggi */
    background-color: #f8fafc !important; 
}

@media screen and (max-width: 768px) {
    /* 1. Perkecil kolom No agar hemat ruang */
    .gantt-table th.col-fixed:nth-child(1),
    .gantt-table td.col-fixed:nth-child(1) {
        min-width: 35px !important;
        width: 35px !important;
        font-size: 11px;
    }
    
    /* 2. Set kolom Nama Task ke lebar minimal yang optimal (sekitar 110px - 120px) */
    .gantt-table th.col-fixed:nth-child(2),
    .gantt-table td.col-fixed:nth-child(2) {
        min-width: 115px !important; 
        width: 115px !important;
        left: 35px !important; /* Mengikuti lebar kolom No */
        padding: 8px 5px !important;
        font-size: 11px; /* Perkecil font sedikit agar muat lebih banyak kata */
        line-height: 1.3;
        white-space: normal !important; 
        word-break: break-word; /* Paksa teks turun ke bawah jika panjang */
        background-color: #ffffff !important;
        box-shadow: 3px 0 6px -3px rgba(0,0,0,0.2); /* Bayangan lebih tegas sebagai pemisah */
    }

    /* 3. Perkecil lebar kotak tanggal agar lebih banyak tanggal yang terlihat */
    .gantt-table .col-date {
        min-width: 30px !important;
        width: 30px !important;
        font-size: 10px !important;
    }

    /* 4. Sesuaikan ukuran bar progress agar tidak terlihat kebesaran */
    .gantt-block {
        top: 8px;
        bottom: 8px;
    }
}

/* CSS Khusus agar rapi di HP */
.allowance-wrapper { max-width: 100%; margin: 0 auto; box-sizing: border-box; padding: 0 10px; }
.allowance-card { width: 100%; box-sizing: border-box; background: #ffffff; padding: 25px; border-radius: 20px; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(112, 144, 176, 0.05); }
.allowance-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 20px; }
.allowance-title h3 { color: #0f4c81; margin: 0 0 5px 0; font-size: 22px; font-weight: 800; }
.allowance-title p { color: #64748b; font-size: 14px; margin: 0; line-height: 1.5; }
.allowance-total-box { text-align: right; background: linear-gradient(135deg, #0f4c81 0%, #1e3a8a 100%); color: white; padding: 20px 25px; border-radius: 16px; box-shadow: 0 10px 20px rgba(15, 76, 129, 0.2); min-width: 250px; }
.allowance-filter { margin-bottom: 20px; }
.allowance-filter select { padding: 12px 15px; border-radius: 12px; border: 1px solid #cbd5e1; outline: none; cursor: pointer; color: #475569; font-size: 14px; min-width: 200px; background: #f8fafc; }
.allowance-table-container { width: 100%; overflow-x: auto; border-radius: 12px; border: 1px solid #f1f5f9; }

/* ATURAN SAAT DIBUKA DI HP (Layar Sempit) */
@media (max-width: 768px) {
    .allowance-card { padding: 15px; } /* Kurangi jarak pinggir agar lega */
    .allowance-header { flex-direction: column; align-items: stretch; gap: 15px; margin-bottom: 15px; }
    .allowance-total-box { text-align: left; padding: 20px; width: 100%; box-sizing: border-box; } /* Kotak biru jadi penuh ke samping */
    .allowance-filter select { width: 100%; } /* Dropdown penuh ke samping */
}

/* ========================================== */
/* MODAL UPDATE PROGRESS (TIMELINE DESIGN) */
/* ========================================== */
.timeline-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 76, 129, 0.4); align-items: center; justify-content: center; backdrop-filter: blur(4px); }
    
.timeline-card { background-color: #fff; border-radius: 16px; width: 90%; max-width: 600px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(0,0,0,0.1); overflow: hidden; }

/* Perbaikan Form Flexbox Bug */
#progressForm { display: flex; flex-direction: column; height: 100%; width: 100%; overflow: hidden; margin: 0; }

/* Header Fixed */
.timeline-header { padding: 25px 30px 15px 30px; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; position: relative; }
.timeline-header h4 { margin: 0; font-size: 13px; color: #64748b; font-weight: 600; }
.timeline-header h2 { margin: 5px 0 0 0; font-size: 16px; color: #1e293b; font-weight: 600; }
.close-timeline { position: absolute; right: 25px; top: 25px; font-size: 24px; color: #94a3b8; cursor: pointer; background: none; border: none; line-height: 1; }
.close-timeline:hover { color: #ef4444; }

/* Area Scrollable (min-height: 0 adalah kuncinya) */
.timeline-body { padding: 25px 30px; overflow-y: auto; flex: 1; background: #fafcff; min-height: 0; }

.timeline-container { position: relative; padding-left: 60px; }
.timeline-container::before { content: ''; position: absolute; left: 48px; top: 10px; bottom: 0; width: 2px; background: #e2e8f0; }
.timeline-item { position: relative; margin-bottom: 25px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-pct { position: absolute; left: -60px; top: 0; width: 40px; text-align: right; font-size: 18px; font-weight: 800; color: #0f4c81; }
.timeline-dot { position: absolute; left: -19px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #0f4c81; border: 3px solid #e0f2fe; }
.timeline-date { margin-top: 4px; font-size: 11px; color: #94a3b8; margin-bottom: 5px; font-weight: 600; }
.timeline-text { font-size: 13px; color: #475569; line-height: 1.5; background: #fff; padding: 12px 15px; border-radius: 8px; border: 1px solid #f1f5f9; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }

/* Footer Fixed */
.timeline-footer { padding: 20px 30px 25px 30px; background: #fff; border-top: 1px solid #e2e8f0; flex-shrink: 0; }
.timeline-input-group { display: flex; gap: 15px; margin-bottom: 15px; }
.timeline-input-pct { width: 120px; padding: 12px 15px; border-radius: 10px; border: 1px solid #cbd5e1; font-size: 14px; outline: none; cursor: pointer; background: #fff; }
.timeline-input-pct:focus, .timeline-input-desc:focus { border-color: #0f4c81; box-shadow: 0 0 0 3px #e0f2fe; }
.timeline-input-desc { flex: 1; padding: 12px 15px; border-radius: 10px; border: 1px solid #cbd5e1; font-size: 14px; outline: none; resize: vertical; min-height: 80px; font-family: inherit; }
.btn-update-orange { background: #f59e0b; color: #fff; border: none; padding: 12px 25px; border-radius: 25px; font-weight: 700; cursor: pointer; float: right; font-size: 14px; transition: background 0.2s; }
.btn-update-orange:hover { background: #d97706; }
.btn-update-orange:disabled { opacity: 0.7; cursor: not-allowed; }

/* =======================================================
   1. GABUNGAN DARI STYLE-MANAGEMENT.CSS
   ======================================================= */
.mgmt-header { max-width: 1400px; margin: 0 auto; padding: 15px 20px; border-bottom: 1px solid #cbd5e1; margin-bottom: 15px; width: 100%; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; background: transparent; }
.mgmt-wrapper { max-width: 1400px; margin: 0 auto; padding: 0 20px 20px 20px; box-sizing: border-box; }
.main-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; }
@media (max-width: 1100px) { .main-grid { grid-template-columns: 1fr; } }
.column-left { display: flex; flex-direction: column; gap: 20px; }
.column-right { display: flex; flex-direction: column; gap: 20px; }
.split-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
@media (max-width: 768px) { .split-row { grid-template-columns: 1fr; } }

/* CUSTOM MODAL GANTI PASSWORD */
.pwd-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 76, 129, 0.4); backdrop-filter: blur(3px); z-index: 10000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.pwd-modal-overlay.show { opacity: 1; visibility: visible; }
.pwd-modal-content { background: #fff; width: 90%; max-width: 400px; border-radius: 12px; padding: 30px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); transform: translateY(20px); transition: transform 0.3s ease; position: relative; text-align: left; }
.pwd-modal-overlay.show .pwd-modal-content { transform: translateY(0); }
.pwd-input-group { margin-bottom: 15px; position: relative; }
.pwd-input-group label { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 5px; }
.pwd-input-group input { width: 100%; padding: 10px 15px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; outline: none; box-sizing: border-box; transition: border 0.2s; color: #334155;}
.pwd-input-group input:focus { border-color: #0f4c81; }
.pwd-toggle-icon { position: absolute; right: 12px; top: 28px; cursor: pointer; color: #94a3b8; }
.pwd-toggle-icon:hover { color: #0f4c81; }


/* =======================================================
   2. GABUNGAN DARI STYLE MODAL FLOATING (DARI INDEX.HTML)
   ======================================================= */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

#taskModal { 
    justify-content: flex-end !important; 
    align-items: center !important; 
    padding: 24px !important; 
}

#taskModal .modal-card {
    margin: 0 !important; 
    height: auto !important;
    max-height: 85vh !important;
    max-width: 420px !important; 
    border-radius: 24px !important; 
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards !important;
    overflow-y: auto !important; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
    display: flex !important; 
    flex-direction: column !important; 
    padding: 35px !important;
}

#taskModal .modal-card h3 { color: #1e293b !important; font-size: 22px !important; margin-bottom: 5px !important;}
#taskModal .modal-card p { color: #64748b !important; margin-bottom: 25px !important; font-size: 13px !important;}
#taskModal .form-group label { color: #475569 !important; font-weight: 600 !important; font-size: 13px !important; margin-bottom: 8px !important; letter-spacing: 0.3px !important;}

#taskModal input[type="date"], #taskModal select, #taskModal textarea {
    border: 1px solid #e2e8f0 !important; background-color: #f8fafc !important; border-radius: 12px !important;
    padding: 12px 16px !important; transition: all 0.3s ease !important; color: #334155 !important; font-size: 14px !important;
}
#taskModal input:focus, #taskModal select:focus, #taskModal textarea:focus {
    border-color: #3b82f6 !important; background-color: #ffffff !important; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

#taskModal .btn-submit {
    background: #16a34a !important; border-radius: 12px !important;
    font-size: 14px !important; font-weight: bold !important; padding: 14px !important; margin-top: 15px !important;
    box-shadow: 0 8px 15px rgba(1, 31, 10, 0.2) !important; border: none !important; transition: all 0.3s ease !important; color: white !important;
}
#taskModal .btn-submit:hover { transform: translateY(-2px) !important; box-shadow: 0 12px 20px rgba(7, 58, 12, 0.3) !important; background: #14611b !important; }

#taskModal .btn-close-modal {
    top: 20px !important; right: 20px !important; background: transparent !important; width: 32px !important; height: 32px !important;
    border-radius: 50% !important; display: flex !important; justify-content: center !important; align-items: center !important; font-size: 24px !important; color: #94a3b8 !important;
}
#taskModal .btn-close-modal:hover { background: #f1f5f9 !important; color: #ef4444 !important; }

/* =======================================================
   MENGHILANGKAN SEMUA ICON BAWAAN BROWSER DI INPUT PASSWORD
   ======================================================= */
/* 1. Hilangkan icon mata (reveal) bawaan Edge & IE */
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 2. Hilangkan icon kunci/mata dari Autofill Chrome & Safari */
input::-webkit-credentials-auto-fill-button,
input::-webkit-contacts-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    right: 0 !important;
}

/* 3. Pastikan input tidak menabrak icon custom kita */
.input-with-icon input[type="password"] {
    padding-right: 40px !important;
}

/* Area Scrollable (min-height: 0 adalah kuncinya) */
.timeline-body { padding: 25px 30px; overflow-y: auto; flex: 1; background: #fafcff; min-height: 0; }

.timeline-container { position: relative; padding-left: 85px; }
.timeline-container::before { content: ''; position: absolute; left: 65px; top: 10px; bottom: 0; width: 2px; background: #cbd5e1; }
.timeline-item { position: relative; margin-bottom: 25px; }
.timeline-item:last-child { margin-bottom: 0; }

/* Posisi Persentase Kiri */
.timeline-pct { position: absolute; left: -85px; top: 0; width: 53px; text-align: right; font-size: 17px; font-weight: 800; color: #0f4c81; line-height: 20px; letter-spacing: -0.5px;}

/* Titik Lingkaran Tengah yang Lurus */
.timeline-dot { position: absolute; left: -27px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #0f4c81; border: 3px solid #ffffff; box-shadow: 0 0 0 1px #cbd5e1; box-sizing: content-box; }

/* Tanggal & Teks Kanan */
.timeline-date { margin: 0 0 8px 0; font-size: 12px; color: #94a3b8; font-weight: 600; line-height: 20px; }
.timeline-text { font-size: 13px; color: #475569; line-height: 1.5; background: #fff; padding: 12px 15px; border-radius: 8px; border: 1px solid #e2e8f0; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }

/* ========================================================== */
/* PERBAIKAN TOMBOL BACK TO DASHBOARD (GLOBAL HEADER)         */
/* ========================================================== */
#btnGlobalHome {
    background-color: #e0f2fe !important; 
    color: #0284c7 !important; 
    border: 1px solid #bae6fd !important; 
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.05) !important;
}

#btnGlobalHome:hover {
    background-color: #0f4c81 !important; /* Warna biru gelap MEL saat di-hover */
    color: #ffffff !important;
    border-color: #0f4c81 !important;
    box-shadow: 0 4px 10px rgba(15, 76, 129, 0.2) !important;
    transform: translateY(-1px) !important;
}

/* ========================================================== */
/* PERBAIKAN FINAL TOMBOL BACK SPA (ANTI-LOADING BUG)         */
/* ========================================================== */
body.hide-home-btn #btnGlobalHome {
    display: none !important;
}

/* ========================================================== */
/* PENYELARASAN LEBAR HEADER DENGAN KONTEN UTAMA              */
/* ========================================================== */
.header-bar.mgmt-header {
    max-width: 95% !important;     /* Samakan dengan max-width dashboard-wrapper */
    padding-left: 0 !important;    /* Hilangkan jarak renggang bawaan header */
    padding-right: 0 !important;   /* Hilangkan jarak renggang bawaan header */
    margin: 15px auto 25px auto !important; /* Posisikan pas di tengah */
}