:root {
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* ================= LOGIN ================= */
.login-app {
  max-width: 420px;
  margin: auto;
  min-height: 100vh;
  background: var(--bg);
}

.login-header {
  background: var(--primary);
  color: #fff;
  padding: 64px 28px 96px;
  border-bottom-left-radius: 36px;
  border-bottom-right-radius: 36px;
}

.login-header h1 {
  margin: 0;
  font-size: 34px;
}

.login-header p {
  margin-top: 10px;
  opacity: .9;
}

.login-card {
  background: #fff;
  margin: -80px 20px 0;
  padding: 30px;
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(0,0,0,.14);
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}

.input-group {
  position: relative;
  margin-bottom: 22px;
}

.input-group input {
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  font-size: 15px;
}

.input-group label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  padding: 0 6px;
  color: var(--muted);
  transition: .25s;
}

.input-group input:focus,
.input-group input:valid {
  border-color: var(--primary);
}

.input-group input:focus + label,
.input-group input:valid + label {
  top: -7px;
  font-size: 12px;
  color: var(--primary);
}

.login-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 28px;
}

.btn-login {
  width: 100%;
  padding: 18px;
  border-radius: 20px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 14px 28px rgba(37,99,235,.45);
}

.error {
  margin-top: 16px;
  color: var(--danger);
  text-align: center;
}

/* ================= DASHBOARD ================= */
.dashboard-app {
  max-width: 420px;
  margin: auto;
  padding: 26px 20px 120px;
  min-height: 100vh;
}

/* Header */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.dash-header h2 {
  margin: 0;
  font-size: 22px;
}

.dash-header p {
  margin-top: 6px;
  color: var(--muted);
}

.profile-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Card umum */
.card {
  background: #fff;
  border-radius: 24px;
  padding: 26px 24px;
  margin-bottom: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

.card-title {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

/* Clock Card */
.clock-card {
  text-align: center;
}

.clock-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock-time {
  font-size: 38px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 1.5px;
}

.clock-date {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* User Card */
.user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  gap: 14px;
  align-items: center;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.user-info strong {
  font-size: 16px;
}

.user-info p {
  margin: 6px 0;
}

.btn-outline {
  background: var(--primary-soft);
  color: var(--primary);
  border: none;
  padding: 12px 20px;
  border-radius: 18px;
  font-size: 14px;
}

/* Status */
.status {
  border: 2px solid var(--primary);
  color: var(--primary);
  text-align: center;
  font-weight: 600;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

.menu-item {
  background: #f1f5f9;
  border-radius: 22px;
  padding: 24px 12px;
  text-align: center;
}

.menu-item .icon {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--primary);
}

/* Presensi Button */
.btn-presensi {
  width: 100%;
  padding: 22px;
  border-radius: 28px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 18px 36px rgba(37,99,235,.5);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.nav-item span {
  margin-top: 6px;
}

.nav-item.active {
  color: var(--primary);
}

/* ===== USER CARD REFINED ===== */
.user-card {
  padding: 28px 26px;
}

.user-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.user-text {
  max-width: 65%;
}

.user-text strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}

.user-text p {
  margin: 0 0 8px;
  font-size: 14px;
}

.user-text small {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

/* Foto user */
.user-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.user-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-soft);
}

/* Tombol aktivitas */
.btn-outline {
  padding: 10px 18px;
  border-radius: 16px;
  font-size: 14px;
}

.user-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-soft);
}

/* ===== ABSENSI LIST ===== */
.filter-row {
  display: flex;
  gap: 10px;
}

.filter-row select {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.absensi-item {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 16px 32px rgba(0,0,0,.1);
}

.absensi-date {
  font-weight: 700;
  margin-bottom: 6px;
}

.absensi-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-top: 6px;
}

.absensi-label {
  color: var(--muted);
}

.absensi-value {
  font-weight: 600;
}

.absensi-status {
  margin-top: 10px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-block;
}

.status-hadir {
  background: #dcfce7;
  color: #166534;
}

.status-izin {
  background: #fef9c3;
  color: #854d0e;
}

.status-alpha {
  background: #fee2e2;
  color: #991b1b;
}

/* Header tanggal + status */
.absensi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* Status NORMAL (chip hijau) */
.absensi-status-inline {
  background-color: #dcfce7; /* hijau muda */
  color: #166534;            /* hijau tua */
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Baris Masuk / Pulang */
.absensi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.absensi-label {
  color: #64748b;
  font-size: 14px;
}

.absensi-value {
  font-weight: 600;
  font-size: 14px;
}



/* ================= CEK LOKASI ================= */
.cek-lokasi-app {
  max-width: 420px;
  margin: auto;
  padding: 26px 20px;
  min-height: 100vh;
  background: var(--bg);
}

.cek-lokasi-card {
  background: #fff;
  border-radius: 28px;
  padding: 30px 26px;
  box-shadow: 0 24px 48px rgba(0,0,0,.14);
  text-align: center;
}

.cek-lokasi-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cek-lokasi-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.lokasi-status {
  margin: 18px 0;
  font-size: 14px;
  font-weight: 600;
}

.lokasi-koordinat {
  display: flex;
  gap: 12px;
  background: var(--primary-soft);
  padding: 16px;
  border-radius: 18px;
  margin-bottom: 22px;
}

.lokasi-koordinat div {
  flex: 1;
  text-align: left;
}

.lokasi-koordinat span {
  font-size: 12px;
  color: var(--muted);
}

.lokasi-koordinat strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.btn-cek-lokasi {
  width: 100%;
  padding: 18px;
  border-radius: 22px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(37,99,235,.45);
}

.status-allowed {
  color: #166534;
}

.status-denied {
  color: var(--danger);
}






