/* ========================= 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 LAYOUT ========================= */ .main { flex: 1; padding: 30px; 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: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); overflow: hidden; } .form-header { background: #f8faff; padding: 15px 25px; border-bottom: 1px solid #edf2f7; font-weight: 600; color: #2156c9; font-size: 16px; } .kabar-form { padding: 25px; } .form-group { margin-bottom: 20px; } .form-group label { display: block; font-size: 14px; font-weight: 550; color: #4a5568; margin-bottom: 8px; } .form-group input[type="text"], .form-group input[type="date"], .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid #cacdd2; border-radius: 6px; font-size: 14px; color: #2d3748; transition: all 0.2s; } .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.15); } .form-group label i { margin-right: 6px; color: #2563eb; font-size: 14px; } .form-header i { margin-right: 6px; color: #2563eb; } .upload-title i { margin-right: 6px; color: #2563eb; } .form-actions button i { margin-right: 6px; } /* ========================= UPLOAD AREA (DASHED) ========================= */ .upload-area { border: 2px dashed #cbd5e0; border-radius: 8px; padding: 30px; text-align: center; background: #fcfdfe; } .upload-title { font-weight: 600; color: #2d3748; margin-bottom: 5px; } .upload-subtitle { font-size: 12px; color: #718096; margin-bottom: 20px; } .file-input { display: none; } .file-custom-input { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 80%; margin: 0 auto; } .file-custom-input button { background: #f1f5f9; border: 1px solid #cbd5e0; padding: 8px 15px; border-radius: 4px; font-size: 13px; cursor: pointer; } #file-name { font-size: 13px; color: #718096; } /* ========================= BUTTONS ========================= */ .form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 30px; } .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; } .btn-primary { background: #1e5cc8; color: #fff; border: none; padding: 10px 25px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s; } .btn-primary:hover { background: #16469d; box-shadow: 0 4px 10px rgba(30, 92, 200, 0.3); } /* ==================== MOBILE RESPONSIVE ===================== */ /* ===== GENERAL ===== */ @media (max-width: 992px) { body { display: block; } /* ===== SIDEBAR MOBILE ===== */ .sidebar { position: fixed; top: 0; left: -260px; height: 100vh; z-index: 1200; transition: left 0.3s ease; } .sidebar.active { left: 0; } /* MAIN FULL WIDTH */ .main { width: 100% !important; padding: 18px; } .sidebar.collapsed ~ .main { width: 100% !important; } /* SEMBUNYIKAN TOGGLE DESKTOP */ .sidebar-toggle { display: none; } } /* ===== MOBILE TOGGLE BUTTON ===== */ .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; } @media (max-width: 992px) { .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; } } /* ===== 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: 6px; } .kabar-form { padding: 18px; } .form-group label { font-size: 13px; } .form-group input, .form-group textarea { font-size: 13px; padding: 10px 12px; } .upload-area { padding: 20px; } .file-custom-input { flex-direction: column; gap: 8px; } .file-custom-input button { width: 100%; } } /* ===== 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; } }