/* ============================================================
   U.A.D — Unit Absensi Digital
   Token visual:
   - Warna: --ink (teks utama), --paper (latar), --brand (slate-blue),
     --stamp (amber, aksen "cap kehadiran"), status HADIR/IZIN/SAKIT/ALPHA/LIBUR
   - Tipografi: Space Grotesk (judul/brand), Inter (isi), IBM Plex Mono (ID
     perangkat, UID kartu, angka rekap) — mono dipakai karena sistem ini
     berbasis kartu/ID digital, jadi elemen data terasa seperti "kode kartu".
   - Signature: badge status berbentuk seperti cap/stempel presensi bulat.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --ink: #161B22;
  --ink-soft: #4B5563;
  --paper: #F6F5F1;
  --panel: #FFFFFF;
  --line: #E4E1D8;
  --brand: #2E4057;
  --brand-dark: #1D2B3A;
  --stamp: #D68A2E;

  --hadir: #2F7D5A;
  --hadir-bg: #E7F3EC;
  --izin: #B07A1E;
  --izin-bg: #FBF1DF;
  --sakit: #3B6FA0;
  --sakit-bg: #E6EFF7;
  --alpha: #B5453D;
  --alpha-bg: #FBEAE8;
  --libur: #6B6F76;
  --libur-bg: #EDEDEC;
}

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
}

.font-brand {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* ---- Brand mark: dipakai di header semua halaman ---- */
.uad-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.uad-brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* ---- Kartu panel umum ---- */
.uad-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* ---- Signature element: badge status berbentuk "cap presensi" ---- */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px dashed currentColor;
}
.status-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-HADIR { color: var(--hadir); background: var(--hadir-bg); }
.status-IZIN  { color: var(--izin);  background: var(--izin-bg); }
.status-SAKIT { color: var(--sakit); background: var(--sakit-bg); }
.status-ALPHA { color: var(--alpha); background: var(--alpha-bg); }
.status-LIBUR { color: var(--libur); background: var(--libur-bg); }

/* ---- Device / UID tag ala keycard ---- */
.device-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  background: var(--brand-dark);
  color: #EFE8D8;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

/* ---- Sidebar nav aktif ---- */
.nav-link {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: #EEEBE1; color: var(--ink); }
.nav-link.active { background: var(--brand); color: white; }

.btn-primary {
  background: var(--brand);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-stamp {
  background: var(--stamp);
  color: #24160A;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
}
.btn-stamp:hover { filter: brightness(0.95); }

input[type="text"], input[type="password"], input[type="date"], select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  width: 100%;
  background: white;
}
input:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

table.uad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.uad-table th {
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1.5px solid var(--line);
  padding: 0.6rem 0.5rem;
}
table.uad-table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
table.uad-table tr:hover td { background: #FBFAF6; }
