/* =====================================================
   JURNAL GURU — Design System
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-mid: #3b82f6;
  --success: #16a34a;
  --success-light: #dcfce7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --info: #0284c7;
  --info-light: #e0f2fe;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-border: #1e293b;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.1), 0 4px 10px -5px rgba(0,0,0,.06);
  --sidebar-w: 260px;
  --topbar-h: 60px;
  --transition: 0.2s ease;
}

/* =====================================================
   BASE RESET & TYPOGRAPHY
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1,h2,h3,h4 { line-height: 1.3; color: var(--gray-900); }

img { max-width: 100%; }

/* =====================================================
   LAYOUT — SIDEBAR + MAIN
   ===================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #e2e8f0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar .brand {
  padding: 22px 20px 18px;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar .brand i { color: #60a5fa; margin-right: 6px; font-size: 18px; }
.sidebar .brand small {
  display: block;
  font-weight: 400;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.sidebar nav {
  flex: 1;
  padding: 10px 0;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 20px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.sidebar nav a i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.sidebar nav a:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
  text-decoration: none;
}
.sidebar nav a.active {
  background: var(--sidebar-hover);
  border-left-color: var(--primary-mid);
  color: #fff;
  font-weight: 600;
}
.sidebar nav a.active i { color: #60a5fa; }

.sidebar .user-box {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.7;
}
.sidebar .user-box strong { color: #e2e8f0; font-size: 13px; }
.sidebar .user-box a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f87171;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}
.sidebar .user-box a:hover { color: #fca5a5; text-decoration: none; }

/* --- Hamburger toggle (mobile) --- */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--sidebar-bg);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow-md);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}
.sidebar-overlay.open { display: block; }

/* --- Main content --- */
.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  padding: 32px 36px 80px;
}

/* =====================================================
   TOP BAR
   ===================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}
.topbar h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar p {
  margin: 4px 0 0;
  color: var(--gray-500);
  font-size: 13.5px;
}
.topbar .topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  padding: 22px 24px;
  margin-bottom: 22px;
}
.card h2 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2 i { color: var(--primary); font-size: 16px; }

/* =====================================================
   STAT CARDS
   ===================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card .num {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .label { font-size: 12.5px; color: var(--gray-500); font-weight: 500; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}
.btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.btn:active { transform: translateY(0); }

.btn.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.btn.btn-secondary:hover {
  background: var(--gray-50);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn.btn-danger { background: var(--danger); }
.btn.btn-danger:hover { background: #b91c1c; box-shadow: 0 4px 12px rgba(220,38,38,.3); }

.btn.btn-success { background: var(--success); }
.btn.btn-success:hover { background: #15803d; }

.btn.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* =====================================================
   FORMS
   ===================================================== */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gray-700);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="month"],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

textarea { resize: vertical; min-height: 90px; }
.form-row { margin-bottom: 18px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* =====================================================
   TABLE
   ===================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 11px 14px;
  background: var(--gray-50);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  font-weight: 700;
  border-bottom: 1.5px solid var(--gray-200);
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbff; }

.actions-cell {
  white-space: nowrap;
  text-align: right;
}
.actions-cell .btn { margin-left: 4px; }

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-purple { background: #ede9fe; color: #6b21a8; }

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid;
}
.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-color: var(--success);
}
.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: var(--danger);
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0f172a 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,.15), transparent 70%);
  top: -100px; right: -100px;
  border-radius: 50%;
  pointer-events: none;
}
.login-box {
  background: #fff;
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px rgba(0,0,0,.35);
  position: relative;
  z-index: 1;
}
.login-box h1 {
  font-size: 22px;
  margin: 0 0 4px;
  text-align: center;
  color: var(--gray-900);
}
.login-box h1 i { color: var(--primary); margin-right: 6px; }
.login-box p.sub {
  text-align: center;
  color: var(--gray-500);
  font-size: 13px;
  margin: 0 0 28px;
}
.login-box .btn {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  padding: 12px;
  font-size: 15px;
}

/* =====================================================
   PILL NAV (tab navigation)
   ===================================================== */
.pill-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pill-nav a {
  padding: 7px 15px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--transition);
}
.pill-nav a:hover { background: var(--gray-50); text-decoration: none; border-color: var(--gray-300); }
.pill-nav a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}

/* =====================================================
   MISC UTILITIES
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
  font-size: 14px;
}
.empty-state i {
  display: block;
  font-size: 36px;
  color: var(--gray-300);
  margin-bottom: 12px;
}
.empty-state a { font-weight: 600; }

.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.text-muted { color: var(--gray-500); font-size: 13px; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* =====================================================
   MODALS
   ===================================================== */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.modal-bg.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease;
}
.modal-box h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 17px;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-box h3 i { color: var(--primary); }

@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* =====================================================
   ATTENDANCE (PRESENSI) — Card Style
   ===================================================== */
.presensi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.presensi-card {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.presensi-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); }

.presensi-card .student-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.presensi-card .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.presensi-card .student-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.3;
}
.presensi-card .student-nis {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* Radio-button status buttons */
.presensi-status-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.presensi-status-group input[type="radio"] {
  display: none;
}
.status-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-50);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  transition: all var(--transition);
  text-align: center;
  line-height: 1.3;
  user-select: none;
  gap: 4px;
}
.status-btn i { font-size: 15px; }
.status-btn:hover { border-color: var(--gray-300); background: #fff; color: var(--gray-700); }

/* Active states per status */
input[type="radio"].status-hadir:checked ~ .status-btn-hadir,
.status-btn-hadir.selected {
  background: #dcfce7; border-color: #16a34a; color: #166534;
}
input[type="radio"].status-sakit:checked ~ .status-btn-sakit,
.status-btn-sakit.selected {
  background: #fef3c7; border-color: #d97706; color: #92400e;
}
input[type="radio"].status-izin:checked ~ .status-btn-izin,
.status-btn-izin.selected {
  background: #dbeafe; border-color: #2563eb; color: #1e40af;
}
input[type="radio"].status-alpa:checked ~ .status-btn-alpa,
.status-btn-alpa.selected {
  background: #fee2e2; border-color: #dc2626; color: #991b1b;
}

/* Sibling label trick — wrap each in a label */
.status-label {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Summary bar */
.presensi-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}
.presensi-summary .sum-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.sum-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sum-dot.hadir { background: #16a34a; }
.sum-dot.sakit { background: #d97706; }
.sum-dot.izin  { background: #2563eb; }
.sum-dot.alpa  { background: #dc2626; }

/* Quick-select bar */
.presensi-quickset {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.presensi-quickset span {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}

/* =====================================================
   SECTION HEADER
   ===================================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.section-header h2 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =====================================================
   DETAIL INFO BLOCK
   ===================================================== */
.info-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.info-item { }
.info-item .info-label { font-size: 11.5px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.info-item .info-val { font-size: 14.5px; color: var(--gray-800); font-weight: 500; }

/* =====================================================
   MOBILE NAV HEADER (visible on mobile only)
   ===================================================== */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--sidebar-bg);
  height: var(--topbar-h);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.mobile-header .mobile-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-header .mobile-title i { color: #60a5fa; }

/* =====================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ===================================================== */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .main { padding: 28px 24px 60px; }
}

/* =====================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ===================================================== */
@media (max-width: 768px) {
  /* Sidebar becomes off-canvas drawer */
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-toggle { display: flex; }

  .mobile-header { display: flex; }

  .main {
    margin-left: 0;
    padding: 16px 16px 80px;
  }

  /* Stat grid: 2 cols on mobile */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card .num { font-size: 24px; }

  /* Topbar stacks */
  .topbar { margin-bottom: 20px; gap: 10px; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions { width: 100%; }
  .topbar-actions .btn { flex: 1; }

  /* Cards */
  .card { padding: 16px; }

  /* Tables → scroll hint */
  .table-wrap::before {
    content: '';
    display: block;
  }

  /* Modals full-screen on small */
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
    padding: 24px 18px 30px;
    max-width: 100%;
  }

  /* Attendance cards: single col */
  .presensi-grid { grid-template-columns: 1fr; }

  /* Form grid: single col */
  .form-grid { grid-template-columns: 1fr; }

  /* Actions cell: wrap */
  .actions-cell { white-space: normal; }
  .actions-cell .btn { margin: 2px; }

  /* Pill nav scroll */
  .pill-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pill-nav a { white-space: nowrap; }

  /* Flex between: column */
  .flex-between { flex-direction: column; align-items: flex-start; }

  .btn-group { width: 100%; }
  .btn-group .btn { flex: 1; }
}

/* =====================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ===================================================== */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 22px; }

  .presensi-status-group { grid-template-columns: repeat(4, 1fr); }
  .status-btn { font-size: 10px; padding: 6px 2px; }
  .status-btn i { font-size: 14px; }

  .login-box { padding: 28px 18px; }

  .topbar h1 { font-size: 18px; }
}
