/* ===================================================
   SIMOGU – Sistem Monitoring Guru MIN 1 Wakatobi
   Main Stylesheet
   =================================================== */

:root {
  --hijau-tua: #0F766E;
  --hijau-muda: #10B981;
  --hijau-terang: #34D399;
  --hijau-pale: #D1FAE5;
  --putih: #FFFFFF;
  --abu-muda: #F3F4F6;
  --abu-sedang: #E5E7EB;
  --abu-tua: #6B7280;
  --teks-utama: #111827;
  --teks-sekunder: #6B7280;
  --merah: #EF4444;
  --kuning: #F59E0B;
  --biru: #3B82F6;
  --ungu: #8B5CF6;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(15,118,110,0.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
  --trans: all 0.22s ease;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--abu-muda);
  color: var(--teks-utama);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hijau-muda); border-radius: 10px; }

/* ===================================================
   LOGIN PAGE
   =================================================== */
.login-page { background: #0d1b2a; overflow: hidden; }

.login-bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #0F766E 0%, #064e3b 50%, #0d1b2a 100%);
}
.login-overlay {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2310B981' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-shapes .shape {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.15;
}
.shape-1 { width: 400px; height: 400px; background: var(--hijau-muda); top: -100px; right: -100px; }
.shape-2 { width: 300px; height: 300px; background: var(--hijau-tua); bottom: -50px; left: -80px; }
.shape-3 { width: 200px; height: 200px; background: #34D399; top: 50%; left: 50%; transform: translate(-50%,-50%); }

.login-card {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
}

.logo-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 32px; color: white;
  box-shadow: 0 8px 24px rgba(15,118,110,0.35);
  margin: 0 auto;
}

.badge-madrasah {
  display: inline-block;
  background: var(--hijau-pale);
  color: var(--hijau-tua);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 12px; border-radius: 20px;
}

.login-title {
  font-size: 32px; font-weight: 800;
  color: var(--hijau-tua); letter-spacing: -0.5px;
  margin: 4px 0 2px;
}

.login-subtitle {
  color: var(--teks-sekunder); font-size: 13px; margin-bottom: 0;
}

.login-body { margin-top: 28px; }

.form-label-custom {
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--teks-utama); text-transform: uppercase;
  margin-bottom: 6px; display: block;
}

.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--abu-tua); font-size: 14px; pointer-events: none;
}
.form-control-custom {
  padding: 11px 14px 11px 40px;
  border: 2px solid var(--abu-sedang);
  border-radius: var(--radius);
  font-size: 14px; transition: var(--trans);
  background: var(--abu-muda);
}
.form-control-custom:focus {
  border-color: var(--hijau-muda); background: white;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
  outline: none;
}
.btn-toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--abu-tua); cursor: pointer;
  padding: 4px; transition: var(--trans);
}
.btn-toggle-pw:hover { color: var(--hijau-tua); }

.role-selector {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.role-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border-radius: 10px;
  border: 2px solid var(--abu-sedang);
  background: var(--abu-muda); color: var(--teks-sekunder);
  cursor: pointer; font-size: 11px; font-weight: 600;
  transition: var(--trans); text-transform: uppercase; letter-spacing: 0.03em;
}
.role-btn i { font-size: 18px; }
.role-btn:hover { border-color: var(--hijau-muda); color: var(--hijau-tua); }
.role-btn.active {
  border-color: var(--hijau-muda);
  background: var(--hijau-pale);
  color: var(--hijau-tua);
}

.btn-login {
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
  color: white; border: none;
  padding: 13px; border-radius: var(--radius);
  font-weight: 700; font-size: 15px;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px rgba(15,118,110,0.35);
  transition: var(--trans);
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,118,110,0.45);
  color: white;
}
.btn-login:active { transform: translateY(0); }

.login-footer-note { color: var(--teks-sekunder); font-size: 12px; }
.login-footer-note strong { color: var(--hijau-tua); }

/* ===================================================
   MAIN APP LAYOUT
   =================================================== */
.app-wrapper { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #064e3b 0%, #0F766E 100%);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  display: flex; flex-direction: column;
  transition: transform 0.28s ease;
  overflow-y: auto; overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
  flex-shrink: 0;
}
.sidebar-logo-text h2 {
  font-size: 16px; font-weight: 800; color: white; margin: 0;
  letter-spacing: -0.3px;
}
.sidebar-logo-text p {
  font-size: 10px; color: rgba(255,255,255,0.65);
  margin: 0; text-transform: uppercase; letter-spacing: 0.04em;
}

.sidebar-user {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white; flex-shrink: 0;
}
.sidebar-user-info h4 {
  font-size: 13px; font-weight: 700; color: white; margin: 0;
}
.sidebar-user-info span {
  font-size: 10px; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.sidebar-nav { flex: 1; padding: 16px 12px; }
.nav-section-label {
  font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 10px 4px; margin-top: 8px;
}
.nav-item { margin-bottom: 2px; }
.nav-link-custom {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.75); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: var(--trans); cursor: pointer;
}
.nav-link-custom i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-link-custom:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-link-custom.active {
  background: rgba(255,255,255,0.18);
  color: white; font-weight: 700;
  box-shadow: inset 3px 0 0 rgba(255,255,255,0.6);
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.btn-logout {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.7); background: none; border: none;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: var(--trans); width: 100%;
}
.btn-logout:hover { background: rgba(239,68,68,0.2); color: #fca5a5; }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: white;
  border-bottom: 1px solid var(--abu-sedang);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.btn-sidebar-toggle {
  display: none; background: none; border: none;
  font-size: 20px; color: var(--teks-sekunder); cursor: pointer;
  padding: 6px; border-radius: 8px; transition: var(--trans);
}
.btn-sidebar-toggle:hover { background: var(--abu-muda); color: var(--hijau-tua); }
.topbar-title { flex: 1; }
.topbar-title h3 { font-size: 18px; font-weight: 700; color: var(--teks-utama); margin: 0; }
.topbar-title p { font-size: 12px; color: var(--teks-sekunder); margin: 0; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn-topbar {
  width: 38px; height: 38px;
  border-radius: 10px; background: var(--abu-muda); border: none;
  color: var(--teks-sekunder); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans); position: relative;
}
.btn-topbar:hover { background: var(--hijau-pale); color: var(--hijau-tua); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; background: var(--merah); border-radius: 50%;
  border: 2px solid white;
}

.topbar-date {
  font-size: 12px; color: var(--teks-sekunder);
  background: var(--abu-muda);
  padding: 6px 12px; border-radius: 8px;
  white-space: nowrap;
}

/* PAGE CONTENT */
.page-content { padding: 24px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 22px; font-weight: 800; color: var(--teks-utama); margin: 0; }
.page-header p { color: var(--teks-sekunder); margin: 0; font-size: 13px; }

/* ===================================================
   CARDS
   =================================================== */
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--abu-sedang);
  transition: var(--trans);
  position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card .card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
}
.stat-card .card-value {
  font-size: 28px; font-weight: 800; color: var(--teks-utama);
  line-height: 1; margin-bottom: 4px;
}
.stat-card .card-label {
  font-size: 12px; color: var(--teks-sekunder); font-weight: 500;
}
.stat-card .card-trend {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px;
}
.card-icon.green { background: var(--hijau-pale); color: var(--hijau-tua); }
.card-icon.red { background: #FEE2E2; color: var(--merah); }
.card-icon.yellow { background: #FEF3C7; color: var(--kuning); }
.card-icon.blue { background: #DBEAFE; color: var(--biru); }
.card-icon.purple { background: #EDE9FE; color: var(--ungu); }
.trend-up { background: #D1FAE5; color: #065F46; }
.trend-down { background: #FEE2E2; color: #991B1B; }
.trend-neutral { background: #F3F4F6; color: #6B7280; }

/* Card section */
.card-section {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--abu-sedang);
  overflow: hidden;
}
.card-section-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--abu-muda);
  display: flex; align-items: center; justify-content: space-between;
}
.card-section-header h5 {
  font-size: 14px; font-weight: 700; color: var(--teks-utama); margin: 0;
}
.card-section-body { padding: 20px; }

/* ===================================================
   STATUS BADGES
   =================================================== */
.badge-hadir { background: #D1FAE5; color: #065F46; }
.badge-terlambat { background: #FEF3C7; color: #92400E; }
.badge-izin { background: #DBEAFE; color: #1E40AF; }
.badge-sakit { background: #EDE9FE; color: #5B21B6; }
.badge-dinas { background: #E0F2FE; color: #0369A1; }
.badge-alfa { background: #FEE2E2; color: #991B1B; }
.badge-status {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; display: inline-block;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ===================================================
   TABLE
   =================================================== */
.table-custom { width: 100%; border-collapse: collapse; }
.table-custom th {
  background: var(--abu-muda); padding: 10px 14px;
  font-size: 11px; font-weight: 700; color: var(--teks-sekunder);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--abu-sedang);
  white-space: nowrap;
}
.table-custom td {
  padding: 12px 14px; border-bottom: 1px solid var(--abu-muda);
  font-size: 13px; color: var(--teks-utama);
}
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tr:hover td { background: var(--abu-muda); }
.table-responsive-x { overflow-x: auto; }

/* ===================================================
   FORM ELEMENTS
   =================================================== */
.form-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--abu-sedang);
  padding: 24px;
}
.form-label-sm {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--teks-sekunder); margin-bottom: 6px;
}
.form-control-sm-custom {
  padding: 9px 12px; border: 2px solid var(--abu-sedang);
  border-radius: 9px; font-size: 13px; transition: var(--trans);
  background: var(--abu-muda); width: 100%;
}
.form-control-sm-custom:focus {
  border-color: var(--hijau-muda); background: white;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12); outline: none;
}
select.form-control-sm-custom { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; padding-right: 30px; }

/* ===================================================
   PROGRESS BAR
   =================================================== */
.progress-custom {
  height: 8px; background: var(--abu-sedang); border-radius: 20px; overflow: hidden;
}
.progress-bar-custom {
  height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--hijau-tua), var(--hijau-muda));
  transition: width 0.6s ease;
}

/* ===================================================
   ABSENSI PAGE
   =================================================== */
.absen-card {
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
  border-radius: 20px; padding: 28px; color: white;
  position: relative; overflow: hidden;
}
.absen-card::before {
  content: ''; position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -60px; right: -60px;
}
.absen-time { font-size: 48px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.absen-date { font-size: 14px; opacity: 0.85; margin-top: 4px; }
.absen-status-row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.absen-status-item {
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  border-radius: 10px; padding: 10px 14px; flex: 1; min-width: 100px;
}
.absen-status-item .label { font-size: 10px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.05em; }
.absen-status-item .val { font-size: 15px; font-weight: 700; margin-top: 2px; }

.btn-absen {
  padding: 14px 28px; border-radius: 12px;
  font-weight: 700; font-size: 14px; border: none;
  cursor: pointer; transition: var(--trans);
  display: flex; align-items: center; gap: 8px;
  justify-content: center; width: 100%;
}
.btn-absen-masuk {
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
  color: white; box-shadow: 0 4px 14px rgba(15,118,110,0.35);
}
.btn-absen-pulang {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  color: white; box-shadow: 0 4px 14px rgba(245,158,11,0.35);
}
.btn-absen:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-absen:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.camera-preview {
  width: 100%; aspect-ratio: 4/3; background: #1a1a2e;
  border-radius: 12px; overflow: hidden; position: relative;
}
.camera-preview video, .camera-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.camera-overlay {
  position: absolute; inset: 0;
  border: 2px dashed rgba(255,255,255,0.3); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* ===================================================
   IKG / SKG SCORE
   =================================================== */
.score-circle {
  width: 80px; height: 80px;
  border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-weight: 800; position: relative;
}
.score-circle .score-val { font-size: 22px; line-height: 1; }
.score-circle .score-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.8; }
.score-sangat-baik { background: var(--hijau-pale); color: var(--hijau-tua); border: 3px solid var(--hijau-muda); }
.score-baik { background: #DBEAFE; color: #1D4ED8; border: 3px solid var(--biru); }
.score-cukup { background: #FEF3C7; color: #B45309; border: 3px solid var(--kuning); }
.score-pembinaan { background: #FEE2E2; color: var(--merah); border: 3px solid var(--merah); }

/* ===================================================
   PENGUMUMAN
   =================================================== */
.notif-item {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--abu-muda);
}
.notif-item:last-child { border-bottom: none; }
.notif-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}
.notif-item h6 { font-size: 13px; font-weight: 700; margin: 0 0 4px; }
.notif-item p { font-size: 12px; color: var(--teks-sekunder); margin: 0; }
.notif-item time { font-size: 11px; color: var(--teks-sekunder); display: block; margin-top: 4px; }

/* ===================================================
   RANKING / LEADERBOARD
   =================================================== */
.rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  transition: var(--trans); margin-bottom: 4px;
}
.rank-item:hover { background: var(--abu-muda); }
.rank-num {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.rank-1 { background: #FEF3C7; color: #B45309; }
.rank-2 { background: #F3F4F6; color: #374151; }
.rank-3 { background: #FEF3C7; color: #B45309; }
.rank-n { background: var(--abu-muda); color: var(--teks-sekunder); }
.rank-info { flex: 1; }
.rank-info h6 { font-size: 13px; font-weight: 700; margin: 0; }
.rank-info span { font-size: 11px; color: var(--teks-sekunder); }

/* ===================================================
   MODAL / OVERLAY
   =================================================== */
.modal-custom-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-custom-box {
  background: white; border-radius: 20px;
  width: 100%; max-width: 500px; max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}
.modal-custom-header {
  padding: 20px 24px; border-bottom: 1px solid var(--abu-muda);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: white; z-index: 1;
}
.modal-custom-header h5 { font-size: 16px; font-weight: 700; margin: 0; }
.btn-modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--abu-muda); border: none; color: var(--teks-sekunder);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: var(--trans);
}
.btn-modal-close:hover { background: #FEE2E2; color: var(--merah); }
.modal-custom-body { padding: 20px 24px; }
.modal-custom-footer {
  padding: 16px 24px; border-top: 1px solid var(--abu-muda);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
  color: white; border: none; padding: 10px 20px;
  border-radius: 10px; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: var(--trans);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary-custom:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(15,118,110,0.35); filter: brightness(1.05); }
.btn-secondary-custom {
  background: var(--abu-muda); color: var(--teks-utama); border: 1px solid var(--abu-sedang);
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 13px;
  cursor: pointer; transition: var(--trans);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary-custom:hover { background: var(--abu-sedang); }
.btn-danger-custom {
  background: #FEE2E2; color: var(--merah); border: none;
  padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: var(--trans);
}

/* ===================================================
   TOAST NOTIFICATIONS
   =================================================== */
.toast-container-custom {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast-item {
  background: white; border-radius: 12px;
  padding: 14px 16px; min-width: 280px; max-width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex; align-items: flex-start; gap: 12px;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--hijau-muda);
}
.toast-item.error { border-left-color: var(--merah); }
.toast-item.warning { border-left-color: var(--kuning); }
.toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.toast-content h6 { font-size: 13px; font-weight: 700; margin: 0 0 2px; }
.toast-content p { font-size: 12px; color: var(--teks-sekunder); margin: 0; }

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

/* ===================================================
   CHARTS AREA
   =================================================== */
.chart-wrap { position: relative; width: 100%; }
.chart-placeholder {
  width: 100%; background: var(--abu-muda);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--teks-sekunder); font-size: 13px; gap: 8px;
}

/* ===================================================
   SIDEBAR OVERLAY (MOBILE)
   =================================================== */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 199;
}

/* ===================================================
   PAGE SECTION TABS
   =================================================== */
.page-tabs {
  display: flex; gap: 4px; background: var(--abu-muda);
  padding: 4px; border-radius: 12px; margin-bottom: 24px;
  overflow-x: auto; flex-wrap: nowrap;
}
.page-tab {
  padding: 8px 16px; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; background: none; color: var(--teks-sekunder);
  transition: var(--trans); white-space: nowrap;
}
.page-tab.active { background: white; color: var(--hijau-tua); box-shadow: var(--shadow-sm); }

/* ===================================================
   UPLOAD AREA
   =================================================== */
.upload-zone {
  border: 2px dashed var(--abu-sedang); border-radius: 12px;
  padding: 32px; text-align: center; cursor: pointer;
  transition: var(--trans); background: var(--abu-muda);
}
.upload-zone:hover { border-color: var(--hijau-muda); background: var(--hijau-pale); }
.upload-zone i { font-size: 32px; color: var(--abu-tua); margin-bottom: 8px; display: block; }
.upload-zone p { color: var(--teks-sekunder); font-size: 13px; margin: 0; }
.upload-zone span { color: var(--hijau-tua); font-weight: 700; }

/* ===================================================
   CHECKLIST ITEMS
   =================================================== */
.checklist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--abu-muda);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.check-done { background: var(--hijau-pale); color: var(--hijau-tua); }
.check-todo { background: #FEE2E2; color: var(--merah); }
.checklist-info { flex: 1; }
.checklist-info h6 { font-size: 13px; font-weight: 700; margin: 0; }
.checklist-info span { font-size: 11px; color: var(--teks-sekunder); }

/* ===================================================
   RESPONSIVE / MOBILE
   =================================================== */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .btn-sidebar-toggle { display: flex; }
  .topbar-date { display: none; }
}

@media (max-width: 767px) {
  .page-content { padding: 16px; }
  .absen-time { font-size: 36px; }
  .login-card { padding: 28px 20px; }
  .stat-card .card-value { font-size: 22px; }
  .modal-custom-box { max-height: 95vh; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 14px; }
}

@media (max-width: 480px) {
  .role-selector { grid-template-columns: 1fr 1fr; }
  .role-btn:last-child { grid-column: 1 / -1; }
  .absen-status-row { gap: 8px; }
}
