* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.layout-sidebar {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #F5F6FA;
  color: #1e1e1e;
  line-height: 1.5;
  display: flex !important;
  min-height: 100vh;
}

/* === SIDEBAR KIRI BERGAYA FUSION4 (Navy #2D3C73 + Merah #E02C2B, dari logo) === */
.sidebar {
  width: 240px;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  border-right: 1px solid #E4E7F0;
}

/* Curved Header Banner Fusion4 Navy */
.sidebar-header-orange {
  background-color: #2D3C73; /* Fusion4 Navy (nama class dipertahankan, warna diganti) */
  padding: 24px 16px 36px 16px;
  border-radius: 0 0 45px 0; /* Lengkungan Khas UI Mobile */
  margin-bottom: 20px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.bima-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  display: block;
  line-height: 1.1;
}

.brand-sub {
  color: #C7D0EC;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Menu Navigasi Sidebar */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  flex: 1;
}

.menu-label {
  font-size: 10px;
  font-weight: 800;
  color: #a0aec0;
  letter-spacing: 1px;
  margin-bottom: 4px;
  padding-left: 8px;
}

.sidebar-nav-btn {
  width: 100%;
  background: transparent;
  color: #363636; /* Dark Charcoal Icon & Text */
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 24px; /* Rounded Pill Shape */
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left; /* biar label yang wrap 2 baris (mis. "Monitoring Attendance & Enroll") rata kiri, bukan center */
  text-decoration: none; /* biar rapi kalau elemennya <a> (mis. tombol Monitoring Web) */
  box-sizing: border-box;
}

.sidebar-nav-btn .nav-icon {
  width: 18px;
  height: 18px;
  stroke: #363636;
  transition: stroke 0.2s ease;
}

.sidebar-nav-btn:hover {
  background-color: #f7fafc;
  color: #2D3C73;
}

.sidebar-nav-btn:hover .nav-icon {
  stroke: #2D3C73;
}

.sidebar-nav-btn.active {
  background-color: #EAEDF6; /* Soft Navy Tint */
  color: #2D3C73;
  border: 1px solid #CBD3EC;
  font-weight: 700;
}

.sidebar-nav-btn.active .nav-icon {
  stroke: #2D3C73;
}

.sidebar-nav-btn.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar-nav-btn.locked::after {
  content: '🔒';
  margin-left: auto;
  font-size: 12px;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid #edf2f7;
  background-color: #fafbfc;
}

/* === MAIN CONTENT AREA === */
.main-wrapper {
  margin-left: 240px;
  flex: 1;
  max-width: 1440px;
  padding: 30px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-tag {
  color: #2D3C73;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

.page-title-section h2 {
  font-size: 24px;
  font-weight: 800;
  color: #1a202c;
}

.page-title-section p {
  font-size: 13px;
  color: #718096;
}

/* Category Nav Tabs */
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  background-color: #ffffff;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background-color: #2D3C73;
  color: #ffffff;
  border-color: #2D3C73;
  box-shadow: 0 2px 6px rgba(45, 60, 115, 0.25);
}

/* Card Styling */
.card {
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E4E7F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #EEF0F6;
}

.card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1a202c;
}

.card-subtitle {
  font-size: 12px;
  color: #718096;
}

.card-header.space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Form Styles */
.card-form-body {
  padding: 20px;
}

.form-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
}

.input-group input {
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  outline: none;
}

.input-group input:focus {
  border-color: #2D3C73;
  box-shadow: 0 0 0 3px rgba(45, 60, 115, 0.12);
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background-color: #2D3C73;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #1F2B54;
}

.flex-action {
  grid-column: span 2;
  display: flex;
  gap: 10px;
}

/* Table Styling */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

th {
  background-color: #EEF0F6;
  color: #555555;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid #E4E7F0;
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid #EEF0F6;
  color: #2D3748;
  white-space: nowrap;
}

.badge-count {
  background-color: #EAEDF6;
  color: #2D3C73;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-unit {
  background-color: #edf2f7;
  color: #4a5568;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.table-search-bar {
  padding: 12px 24px;
  background-color: #EEF0F6; /* Sedikit lebih gelap agar field cari terlihat kontras */
  border-bottom: 1px solid #E4E7F0;
}

.search-input {
  width: 100%;
  padding: 9px 14px;
  font-size: 12px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  outline: none;
}

.app-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-card {
  background: #ffffff;
  padding: 24px 28px;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.modal-card::-webkit-scrollbar {
  width: 6px;
}
.modal-card::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.modal-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.modal-card::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Styling Tombol Aksi Tabel Icon Monokrom */
.action-btns {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background-color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-icon svg {
  width: 15px;
  height: 15px;
  stroke: #4A5568; /* Monokrom Slate Gray Default */
  transition: stroke 0.2s ease;
}

/* State Hover Tombol Edit (Aksen Fusion4 Navy) */
.btn-icon-edit:hover {
  background-color: #EAEDF6;
  border-color: #CBD3EC;
  transform: translateY(-1px);
}

.btn-icon-edit:hover svg {
  stroke: #2D3C73;
}

/* State Hover Tombol Delete (Aksen Fusion4 Merah) */
.btn-icon-delete:hover {
  background-color: #FDECEC;
  border-color: #F3B3B2;
  transform: translateY(-1px);
}

.btn-icon-delete:hover svg {
  stroke: #E02C2B;
}

/* === KARTU PROFIL USER ELEGAN (SOFT NEUMORPHIC CARD) === */
.sidebar-user {
  padding: 12px;
  background-color: #EEF0F6; /* Framed Outer Container */
  border-radius: 16px;
  margin: 12px;
  border: 1px solid #DDE2F0;
}

.user-card-profile {
  background: linear-gradient(145deg, #ffffff, #EEF0F6);
  border: 1px solid #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.user-card-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.user-avatar-icon {
  width: 18px;
  height: 18px;
  color: #2D3C73; /* Fusion4 Navy Accent Icon */
  flex-shrink: 0;
}

.user-card-name {
  font-size: 15px;
  font-weight: 800;
  color: #2b2533;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-role {
  font-size: 11px;
  font-weight: 600;
  color: #6a717c;
  padding-left: 24px; /* Align sejajar di bawah teks nama */
}

/* Tombol Logout Pill Fusion4 Merah */
.btn-logout-card {
  background: linear-gradient(180deg, #E02C2B 0%, #B32220 100%);
  color: #ffffff;
  border: 1px solid #8E1B1A;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(179, 34, 32, 0.35);
  transition: all 0.2s ease;
}

.btn-logout-card svg {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
}

/* Cuma tombol Logout di kartu profil sidebar yang full-width -- tombol lain
   (Edit/Hapus di tabel, dll) pakai class .btn-logout-card yang sama tapi
   harus tetap inline/kecil, jadi width:100% di-scope ke sini aja. */
.user-card-profile .btn-logout-card {
  width: 100%;
}

.btn-logout-card:hover {
  background: linear-gradient(180deg, #EA3F3E 0%, #C22826 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(179, 34, 32, 0.45);
}

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

/* Input Form & Search Bar Tetap Putih Bersih Agar Mudah Dibaca */
.input-group input,
.search-input {
  background-color: #FFFFFF;
  border: 1px solid #D7DCEA;
}

/* Toast Notification */
#toastContainer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease forwards;
}

.toast.success {
  background: linear-gradient(180deg, #3fa34d 0%, #2c7a37 100%);
}

.toast.error {
  background: linear-gradient(180deg, #E02C2B 0%, #B32220 100%);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

.toast.hide {
  animation: toastOut 0.3s ease forwards;
}

/* ==========================================================================
   WORKFLOW APPROVAL & VOUCHER STYLES
   ========================================================================== */
.badge-status-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-pending-propose {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.badge-proposed {
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.badge-reviewed {
  background: #EDE9FE;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

.badge-approved {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.badge-rejected {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
}

.voucher-code-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: #F1F5F9;
  color: #0F172A;
  border: 1.5px dashed #94A3B8;
  letter-spacing: 0.05em;
}

.voucher-active {
  background: #ECFDF5;
  color: #065F46;
  border-color: #10B981;
}

.voucher-used {
  background: #F3F4F6;
  color: #9CA3AF;
  border-color: #D1D5DB;
  text-decoration: line-through;
}

.btn-action-propose {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25);
}

.btn-action-review {
  background: linear-gradient(180deg, #8B5CF6 0%, #6D28D9 100%);
  color: #FFFFFF;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(109, 40, 217, 0.25);
}

.btn-action-approve {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
}

.step-tracker-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}

.step-tracker-mini .step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #CBD5E1;
}

.step-tracker-mini .step-dot.active {
  background: #F59E0B;
}

.step-tracker-mini .step-dot.done {
  background: #10B981;
}

.badge-timelimit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F8FAFC;
  color: #334155;
  border: 1px solid #E2E8F0;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  white-space: nowrap;
}

