/* ========================= RESET & BASE ========================= */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: "Poppins", sans-serif; } body { background: #e4eaf6; display: flex; } /* ========================= SIDEBAR ========================= */ .sidebar { width: 240px; min-height: 100vh; /* ikut tinggi konten */ position: relative; /* BUKAN fixed */ background: #1e5cc8; color: #fff; display: flex; flex-direction: column; } /* COLLAPSE MODE */ .sidebar.collapsed { width: 80px; } /* ========================= SIDEBAR HEADER ========================= */ .sidebar-header { display: flex; align-items: center; gap: 14px; padding: 20px 20px 20px; margin-bottom: 5px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); } .logo-desa { width: 55px; height: 55px; object-fit: contain; filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.3)); } .header-text { display: flex; flex-direction: column; line-height: 1.2; } .desa-title { font-size: 14px; opacity: 0.9; } .desa-name { font-size: 16px; font-weight: 600; } /* Header saat collapse */ .sidebar.collapsed .header-text { display: none; } .sidebar.collapsed .sidebar-header { justify-content: center; } /* ========================= SIDEBAR MENU (SCROLLABLE) ========================= */ .sidebar-menu { list-style: none; overflow: visible; /* SEMUA MENU TERLIHAT */ } /* Scrollbar */ .sidebar-menu::-webkit-scrollbar { width: 6px; } .sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 10px; } /* Section title */ .menu-section { margin-top: 7px; padding: 10px 20px; font-size: 11px; font-weight: 700; opacity: 0.6; } /* Menu item */ .menu-item { display: flex; align-items: center; gap: 12px; padding: 10px 20px; font-size: 14px; color: #fff; text-decoration: none; opacity: 0.9; border-left: 3px solid transparent; transition: 0.2s ease; } .menu-item i { font-size: 18px; } .menu-item:hover { background: rgba(255, 255, 255, 0.2); opacity: 1; } .menu-item.active { background: rgba(255, 255, 255, 0.25); border-left-color: #fff; opacity: 1; font-weight: 600; /* BOLD saat aktif */ } /* Menu saat collapse */ .sidebar.collapsed .menu-item span, .sidebar.collapsed .menu-section { display: none; } .sidebar.collapsed .menu-item { justify-content: center; } /* ========================= LOGOUT BUTTON ========================= */ .sidebar-logout { padding: 35px 20px; font-weight: 600; } .logout-btn { display: flex; align-items: center; /* center vertikal */ justify-content: center; /* center horizontal */ gap: 12px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 15px; text-decoration: none; transition: 0.3s ease; } .logout-btn:hover { background: rgba(255, 255, 255, 0.3); } .sidebar.collapsed .logout-btn span { display: none; } .sidebar.collapsed .logout-btn { justify-content: center; } /* ========================= TOGGLE BUTTON ========================= */ .sidebar-toggle { position: relative; bottom: 15px; margin: 20px auto; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s ease; } .sidebar-toggle:hover { background: rgba(255, 255, 255, 0.35); } .main { padding: 25px; width: calc(100% - 240px); background: var(--bg-soft); } .sidebar.collapsed ~ .main { width: calc(100% - 80px); } /* ========================= MAIN CONTENT ========================= */ .main { flex: 1; padding: 30px; background: #e4eaf6; overflow-y: auto; } /* ========================= HEADER BANNER ========================= */ .header-banner { background: #1e5cc8; color: #fff; padding: 20px 40px; border-radius: 12px; margin-bottom: 30px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .header-banner h1 { font-size: 24px; font-weight: 700; margin-bottom: 5px; } .header-banner p { font-size: 14px; opacity: 0.8; } .header-banner { display: flex; justify-content: space-between; /* kiri & kanan */ align-items: center; background: #1e5cc8; color: #fff; padding: 20px 30px; border-radius: 12px; margin-bottom: 30px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .header-banner h1 { font-size: 24px; font-weight: 700; margin-bottom: 5px; } .header-banner p { font-size: 14px; opacity: 0.8; } /* Tombol Kembali */ .btn-back { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; background: #f1f5f9; color: #1e5cc8; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: 0.2s ease; } .btn-back i { font-size: 16px; } .btn-back:hover { background: #e2e8f0; } /* ========================= FORM CONTAINER ========================= */ .form-container { background: #ffffff; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06); overflow: hidden; } /* ========================= FORM HEADER ========================= */ .form-header { background: #f8faff; padding: 15px 25px; border-bottom: 1px solid #edf2f7; font-weight: 600; color: #2156c9; font-size: 16px; } /* ========================= FORM BODY ========================= */ .kabar-form { padding: 26px; } /* ========================= FORM GROUP ========================= */ .form-group { margin-bottom: 22px; } .form-group label { display: block; font-size: 14px; font-weight: 550; color: #4a5568; margin-bottom: 8px; } /* ========================= INPUT & TEXTAREA ========================= */ .form-group input[type="text"], .form-group input[type="date"], .form-group textarea { width: 100%; padding: 11px 14px; font-size: 14px; color: #2d3748; border: 1px solid #c3c5ca; border-radius: 6px; background: #ffffff; transition: 0.2s ease; } .form-group textarea { resize: vertical; line-height: 1.6; } .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25); } /* Icon di label form */ .form-group label i, .form-header i, .current-photo-box label i { margin-right: 6px; /* jarak antara icon & teks */ color: #2563eb; /* biru konsisten */ font-size: 14px; vertical-align: middle; } /* Tombol dengan icon */ .form-actions button i { margin-right: 6px; } /* ========================= FILE INPUT CUSTOM ========================= */ .file-custom-input { display: flex; align-items: center; gap: 12px; margin-top: 6px; } .file-custom-input button { background: #f1f5f9; border: 1px solid #cbd5e0; padding: 8px 16px; border-radius: 6px; font-size: 13px; color: #2d3748; cursor: pointer; transition: 0.2s ease; } .file-custom-input button:hover { background: #e8eef6; } #file-name { font-size: 13px; color: #718096; } /* ========================= FORM HELP TEXT ========================= */ .form-help { display: block; margin-top: 6px; font-size: 12px; color: #718096; } /* ========================= CURRENT PHOTO ========================= */ .current-photo-box label { display: block; font-size: 13.5px; font-weight: 500; color: #4a5568; margin-bottom: 10px; } .photo-preview { width: 200px; border-radius: 8px; overflow: hidden; border: 1px solid #e2e8f0; background: #f8fafc; } .photo-preview img { width: 100%; display: block; } /* ========================= FORM ACTIONS ========================= */ .form-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: 30px; padding-top: 20px; border-top: 1px solid #e5eaf2; } /* ========================= BUTTONS ========================= */ .btn-secondary { background: #ef4444; color: #ffffff; border: 1px solid #cbd5e0; padding: 10px 26px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s ease; } .btn-secondary:hover { background: #f7fafc; } /* UPDATE BUTTON */ .btn-primary-update { background: linear-gradient(135deg, #1e5cc8, #2563eb); color: #ffffff; border: none; padding: 10px 28px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s ease; } .btn-primary-update:hover { box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35); transform: translateY(-1px); } /* ==================== MOBILE RESPONSIVE ===================== */ /* ===== MOBILE LAYOUT ===== */ @media (max-width: 768px) { body { display: block; } /* ===== SIDEBAR MOBILE ===== */ .sidebar { position: fixed; top: 0; left: -260px; height: 100vh; width: 240px; z-index: 1200; transition: left 0.3s ease; } .sidebar.show { left: 0; } /* ===== MAIN FULL WIDTH ===== */ .main { width: 100% !important; padding: 20px; } /* ===== SEMBUNYIKAN TOGGLE DESKTOP ===== */ .sidebar-toggle { display: none; } /* ===== HAMBURGER MOBILE ===== */ .mobile-toggle { display: none; position: fixed; top: 16px; left: 16px; z-index: 1300; background: #1e5cc8; color: #fff; border: none; padding: 10px 14px; font-size: 22px; border-radius: 10px; cursor: pointer; } } /* ===== HEADER BANNER MOBILE ===== */ @media (max-width: 768px) { .header-banner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; } .header-banner h1 { font-size: 20px; } .header-banner p { font-size: 13px; } .header-right { width: 100%; } .btn-back { width: 100%; justify-content: center; } } /* ===== FORM MOBILE ===== */ @media (max-width: 768px) { .form-container { border-radius: 8px; } .kabar-form { padding: 18px; } .form-group label { font-size: 13px; } .form-group input, .form-group textarea { font-size: 13px; padding: 10px 12px; } .file-custom-input { flex-direction: column; align-items: flex-start; } .file-custom-input button { width: 100%; } .photo-preview { width: 100%; max-width: 240px; } } /* ===== FORM ACTIONS MOBILE ===== */ @media (max-width: 576px) { .form-actions { flex-direction: column-reverse; gap: 10px; } .form-actions button { width: 100%; justify-content: center; } } /* ============================== HAMBURGER MOBILE ============================== */ .mobile-hamburger { display: none; } /* MOBILE MODE */ @media (max-width: 768px) { .mobile-hamburger { display: flex; position: fixed; top: 16px; right: 16px; z-index: 1200; width: 44px; height: 44px; background: #1e5cc8; color: #fff; border-radius: 10px; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); } /* Sidebar jadi drawer */ .sidebar { position: fixed; top: 0; left: -240px; height: 100vh; z-index: 1000; transition: left 0.3s ease; } .sidebar.show { left: 0; } /* PAKSA TEKS MUNCUL */ .sidebar.show .menu-item span, .sidebar.show .menu-section, .sidebar.show .header-text, .sidebar.show .logout-btn span { display: block !important; } .sidebar.show .menu-item { justify-content: flex-start; } /* Main full */ .main { width: 100%; padding: 16px; } } /* ============================== HIDE DESKTOP TOGGLE ON MOBILE ============================== */ @media (max-width: 768px) { .sidebar-toggle { display: none !important; } }