/* Imajireka Absensi — tema elegan, mobile-first. Vanilla CSS + Bootstrap. */

:root {
  /* Palet disamakan dengan TrialForm: krem / coklat muda + navy + oranye */
  --orange-1: #FFC15C;
  --orange-2: #F5A623;
  --orange-3: #EE7A1E;
  --navy: #152B4E;
  --navy-2: #25406B;
  --cream: #FBF2E2;
  --cream-2: #FFFDF8;
  --white: #FFFFFF;
  --brand: #152B4E;
  --brand-2: #25406B;
  --accent: #F5A623;
  --accent-soft: #FFF3DC;
  --bg: #FBF2E2;
  --surface: #FFFFFF;
  --ink: #2A2418;
  --muted: #8C816C;
  --line: #EDE2CC;
  --ok: #2E7D4F;
  --warn: #A05A00;
  --danger: #E24B33;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(37, 27, 10, .10);
  --shadow-sm: 0 2px 10px rgba(37, 27, 10, .08);
  --nav-h: 68px;
}

* { -webkit-tap-highlight-color: transparent; }

html { font-size: 15px; }

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  min-height: 100vh;
  min-height: 100dvh;
}

/* Cangkang ponsel: penuh di HP, kartu tengah di desktop — krem seperti TrialForm */
.phone {
  max-width: 480px;
  margin: 0 auto;
  background: var(--cream);
  min-height: 100vh;
  min-height: 100dvh;
  box-shadow: var(--shadow);
  padding-bottom: calc(var(--nav-h) + 20px);
  position: relative;
  overflow: clip;
}

@media (min-width: 560px) {
  body { padding: 28px 16px; }
  .phone {
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .7);
  }
}

/* Kepala aplikasi — navy gradient ala TrialForm */
.appbar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 56px;
  position: relative;
  overflow: hidden;
}
.appbar::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 193, 92, .35), transparent 65%);
}
.brandrow { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.appbar-simple { padding-bottom: 64px; }
.appbar-simple.appbar-compact { padding-bottom: 40px; }
.appbar-simple.appbar-slim { padding-bottom: 20px; }
.brandrow-simple { justify-content: space-between; }
.brandspacer { flex: 1; }
.brandmark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-3));
  color: var(--navy); font-weight: 800; font-size: 19px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.brandlogo {
  height: 34px; width: auto; max-width: 170px; flex: none;
  object-fit: contain; display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25));
}
.brandname { font-family: 'Baloo 2', sans-serif; font-weight: 600; letter-spacing: .3px; font-size: 15px; color: var(--orange-1); }
.brandname small { display: block; font-weight: 400; opacity: .75; font-size: 11.5px; }
.greet {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 14px; position: relative; z-index: 1;
}
.greet .who { font-size: 17px; font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.greet .who small { display: block; font-size: 12px; font-weight: 400; opacity: .8; margin-top: 2px; }

.btn-notif {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
  color: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; text-decoration: none; white-space: nowrap;
  backdrop-filter: blur(6px);
}
.btn-notif:active { transform: scale(.97); }

/* Konten */
.content { padding: 0 14px; margin-top: -38px; position: relative; z-index: 2; }
.content-plain { margin-top: 0; padding-top: 26px; }
.phone:has(.content-plain) { padding-bottom: 24px; }
.content > *:first-child { margin-top: 0; }

.cardx {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
  min-width: 0;
}
.hero {
  background: var(--white);
  border: 1px solid var(--line);
}
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--orange-3);
}
.hero h2 { font-family: 'Baloo 2', 'Plus Jakarta Sans', sans-serif; font-size: 21px; margin: 4px 0 2px; font-weight: 700; color: var(--navy); }
.muted { color: var(--muted); font-size: 13px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  background: #FFF3DC; border: 1px solid #F5D9A8; color: #A05A00;
  font-weight: 700;
}
.chip.ok { background: #EAF4EE; border-color: #C4E2D0; color: var(--ok); }
.chip.late { background: #FDEBE7; border-color: #F5C4BA; color: var(--danger); }
.chip.soft { background: var(--accent-soft); border-color: #F5D9A8; color: #A05A00; }

.statusline { display: flex; gap: 12px; align-items: center; }
.thanks { font-size: 13.5px; font-weight: 600; color: var(--navy); margin-top: 6px; line-height: 1.5; }
.dailyquote { font-size: 12.5px; font-style: italic; color: var(--muted); margin-top: 6px; line-height: 1.5; background: var(--cream-2); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot.idle { background: #C9BFAE; box-shadow: 0 0 0 5px rgba(201, 191, 174, .25); }
.dot.late { background: var(--danger); box-shadow: 0 0 0 5px rgba(226, 75, 51, .18); }
.dot.in { background: var(--ok); box-shadow: 0 0 0 5px rgba(46, 125, 79, .18); }
.dot.done { background: var(--ok); box-shadow: 0 0 0 5px rgba(46, 125, 79, .18); }

/* Tombol stempel — oranye gradient ala TrialForm */
.stampwrap { text-align: center; padding: 8px 0 2px; }
.stampbtn {
  width: min(200px, 62vw); height: min(200px, 62vw);
  border-radius: 50%; font-size: 19px; font-weight: 800; line-height: 1.25;
  font-family: 'Baloo 2', 'Plus Jakarta Sans', sans-serif;
  color: var(--navy); border: none; cursor: pointer;
  background: radial-gradient(circle at 30% 25%, var(--orange-1), var(--orange-3) 70%);
  box-shadow: 0 14px 32px rgba(238, 122, 30, .35), inset 0 2px 6px rgba(255, 255, 255, .45);
  outline: 8px solid rgba(245, 166, 35, .18);
  transition: transform .12s ease, filter .12s ease;
  min-height: 44px;
}
.stampbtn:hover { filter: brightness(1.05); }
.stampbtn small { display: block; font-size: 12.5px; font-weight: 600; opacity: .8; font-family: 'Plus Jakarta Sans', sans-serif; }
.stampbtn:active { transform: scale(.96); }
.stampbtn.gray { background: radial-gradient(circle at 30% 25%, var(--orange-1), var(--orange-3) 70%); outline-color: rgba(245, 166, 35, .18); }
.stampbtn.late { background: radial-gradient(circle at 30% 25%, #F0826B, var(--danger) 65%); color: #fff; outline-color: rgba(226, 75, 51, .2); box-shadow: 0 14px 32px rgba(226, 75, 51, .35), inset 0 2px 6px rgba(255, 255, 255, .25); }
.stampbtn.go { background: radial-gradient(circle at 30% 25%, #4CAF7D, var(--ok) 65%); color: #fff; outline-color: rgba(46, 125, 79, .18); }
.stampbtn.pulse { animation: stampPulse 2s ease-in-out infinite; }
@keyframes stampPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Form — input krem lembut ala TrialForm */
label { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 4px; display: block; }
.form-select, .form-control {
  min-height: 48px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); font-size: 15px;
  background: var(--cream-2); color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.form-select:focus, .form-control:focus {
  border-color: var(--orange-2);
  box-shadow: 0 0 0 .2rem rgba(245, 166, 35, .15);
  background: #fff;
}
.btn { min-height: 44px; border-radius: 12px; font-weight: 700; font-family: 'Baloo 2', 'Plus Jakarta Sans', sans-serif; }
.btn-primary { background: linear-gradient(135deg, var(--orange-1), var(--orange-3)); border: none; color: var(--navy); }
.btn-primary:hover, .btn-primary:focus { filter: brightness(1.05); background: linear-gradient(135deg, var(--orange-1), var(--orange-3)); color: var(--navy); border: none; }
.btn-success { background: var(--ok); border-color: var(--ok); }

/* Tabel responsif */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.table { margin: 0; font-size: 13.5px; }
.table thead th { background: #FFF3DC; color: var(--navy); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td, .table th { padding: 10px 12px; }

/* Daftar riwayat ala kartu */
.recrow {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.recrow:last-child { border-bottom: none; }
.rec-single { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); }
.rec-single b { font-weight: 700; font-variant-numeric: tabular-nums; }
.recdate { font-weight: 750; font-size: 14.5px; }
.recdate small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.rectime { text-align: right; font-size: 13.5px; }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rec-line { display: flex; justify-content: flex-start; align-items: center; gap: 6px; font-size: 13px; }
.rec-line span { color: var(--muted); }
.rec-line b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Kartu absen selesai */
.donecard { text-align: left; }
.donetitle { font-family: 'Baloo 2', sans-serif; font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.donecard .dailyquote { margin-top: 0; }

/* Judul halaman — navy di atas krem ala TrialForm (tidak lagi putih di atas navy) */
.page-head { position: relative; z-index: 2; padding: 43px 2px 2px; color: var(--navy); }
.page-head h4 { color: var(--navy); font-family: 'Baloo 2', sans-serif; font-size: 20px; margin: 0 0 2px; font-weight: 700; }
.page-head p { margin: 0; font-size: 13px; color: var(--muted); }
.page-head .monthrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; margin-bottom: 0; }
.page-head + .cardx { margin-top: 8px; }
/* Pengganti jarak atas saat page-head dihapus (tinggi sama dengan padding-top page-head) */
.page-pad { height: 43px; }
.backbtn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: none;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.backbtn:hover { background: #FFF3DC; color: var(--navy); }

/* Kartu pengumuman */
.anncard { padding: 14px 16px; }
.anncard.annnew { border-color: var(--orange-2); box-shadow: var(--shadow); }
/* Pengumuman ringkas di atas kartu absen */
.announce { display: flex; flex-direction: column; gap: 8px; }
.annrow {
  display: flex; align-items: center; gap: 10px;
  background: #FFF8EA; border: 1px solid #F5D9A8; border-radius: 14px;
  padding: 10px 12px; text-decoration: none; color: inherit;
}
.annrow.annnew { border-color: var(--orange-2); box-shadow: var(--shadow-sm); }
.annrow .annico { font-size: 18px; flex: none; }
.annrow .anntxt { flex: 1; min-width: 0; font-size: 13.5px; }
.annrow .anntxt b { color: var(--navy); }
.annrow .anntxt small { color: var(--muted); }
.annrow .anngo { font-size: 20px; font-weight: 700; color: #A05A00; flex: none; }
.anntop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* Slider pengumuman — 1 card saja, isi polos tanpa card dalam (legacy, dipertahankan) */
.annslider-card { padding: 14px 14px 12px; }
.annslider-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.annslider-title { display: flex; align-items: center; gap: 8px; }

/* Kartu Pengumuman Home — redesign tanpa biru: header + daftar rapi */
.ann-card { padding: 0; overflow: hidden; }
.ann-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 12px; }
.ann-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ann-ico {
  width: 38px; height: 38px; border-radius: 13px; flex: none;
  display: grid; place-items: center; color: var(--navy);
  background: linear-gradient(135deg, var(--orange-1), var(--orange-3));
  box-shadow: 0 4px 12px rgba(238, 122, 30, .30), inset 0 1px 3px rgba(255,255,255,.5);
}
.ann-head-text { min-width: 0; display: flex; align-items: center; }
.ann-head-text h5 { margin: 0; line-height: 1.2; }
.ann-all, .ann-all:visited {
  flex: none; font-size: 12.5px; font-weight: 800; color: #A05A00; text-decoration: none;
  background: #FFF3DC; border: 1px solid #F5D9A8; border-radius: 999px; padding: 7px 12px;
}
.ann-all:hover, .ann-all:active { color: #7C4300; background: #FFECCB; text-decoration: none; }
.ann-list { display: flex; flex-direction: column; padding: 0 10px 10px; gap: 8px; }
.ann-item, .ann-item:visited {
  display: flex; align-items: center; gap: 10px;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 12px; text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
}
.ann-item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #D9C9A8;
}
.ann-item.annnew { background: #FFF8EA; border-color: #F5D9A8; }
.ann-item.annnew::before { background: linear-gradient(180deg, var(--orange-1), var(--orange-3)); }
.ann-item:hover, .ann-item:active { text-decoration: none; color: inherit; border-color: var(--orange-2); }
.ann-item-body { flex: 1; min-width: 0; }
.ann-item-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ann-item-title { font-weight: 800; font-size: 13.5px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-item-excerpt { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-item-date { font-size: 11.5px; color: #B3A482; margin-top: 5px; font-weight: 600; }
.ann-chev { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 800; line-height: 1; color: #A05A00; background: #FFF3DC; border: 1px solid #F5D9A8; }
.ann-item.annnew .ann-chev { color: #fff; background: linear-gradient(135deg, var(--orange-1), var(--orange-3)); border: none; }
/* Catatan info di hero — pengganti alert-info biru Bootstrap */
.hero-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: #FFF8EA; border: 1px solid #F5D9A8; border-radius: 14px;
  padding: 10px 12px; margin-top: 10px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.5; color: #6B4A12;
}
.hero .hero-note { margin-bottom: 0; }
.hero .hero-note + .hero-note { margin-top: 8px; }
/* Catatan satu baris: ikon dan teks sejajar tengah */
.hero-note.hn-middle { align-items: center; }
.hero-note small { color: #8C6A2E; }
.hero-note.hn-green { background: #EAF4EE; border-color: #C4E2D0; color: #245C3E; }
.hero-note.hn-green small { color: #4E7D64; }
.hero-note.hn-navy { background: #EEF1F7; border-color: #D3DCEB; color: var(--navy); }
.hero-note.hn-navy small { color: #5A6B8A; }
.hn-ico { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; background: rgba(245,166,35,.18); }
.hn-ico svg { width: 17px; height: 17px; display: block; }
.hn-green .hn-ico { background: rgba(46,125,79,.14); }
.hn-navy .hn-ico { background: rgba(21,43,78,.10); }
.ann-mega { flex: none; display: block; }
.annslider-all, .annslider-all:visited { font-size: 13px; font-weight: 700; color: #A05A00; text-decoration: none; white-space: nowrap; }
.annslider-all:hover, .annslider-all:active { color: #EE7A1E; text-decoration: none; }
.annslider-viewport { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.annslider-viewport::-webkit-scrollbar { display: none; }
.annslide, .annslide:visited { min-width: 100%; flex: none; scroll-snap-align: center; display: block; text-decoration: none; color: inherit; }
.annslide:hover, .annslide:active { text-decoration: none; color: inherit; }
.annslide .anntxt { display: block; font-size: 13.5px; }
.annslide .anntxt b { color: var(--navy); }
.annslide .anntxt small { color: var(--muted); }
.annslider-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.annnav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 18px; font-weight: 800; line-height: 1; box-shadow: var(--shadow-sm); cursor: pointer; }
.annnav:active { transform: scale(.95); }
.anndots { display: flex; gap: 6px; align-items: center; }
.anndot { width: 8px; height: 8px; border-radius: 50%; border: none; background: #E3D5B8; padding: 0; cursor: pointer; }
.anndot.active { background: var(--orange-3); width: 22px; border-radius: 999px; }
.anntop b { color: var(--navy); font-family: 'Baloo 2', sans-serif; font-size: 15.5px; }
.anndate { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.annbody { font-size: 14px; line-height: 1.55; white-space: pre-line; }

/* Validasi + textarea */
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }
textarea.form-control { min-height: 88px; resize: vertical; }
.monthnav {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 12px; flex: none;
  border: 1px solid var(--line); background: var(--white);
  color: var(--navy); text-decoration: none; font-size: 16px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.monthnav:hover { background: #FFF3DC; color: var(--navy); }
.monthlabel { font-size: 13px; font-weight: 700; color: #A05A00; background: #FFF3DC; border: 1px solid #F5D9A8; padding: 7px 14px; border-radius: 999px; }

/* Section di dalam kartu */
.cardx h5, .section-title { font-family: 'Baloo 2', sans-serif; color: var(--navy); font-size: 16px; margin: 0 0 4px; font-weight: 700; }
.section-sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.divider { border: none; border-top: 1.5px dashed var(--line); margin: 16px 0; }

/* Statistik 3 kolom agar tidak sempit */
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center; }
.stat b { display: block; font-size: 18px; color: var(--navy); font-family: 'Baloo 2', sans-serif; }
.stat span { font-size: 11.5px; color: var(--muted); }
.stat.highlight { background: #FFF3DC; border-color: #F5D9A8; }
.stat.highlight b { color: #A05A00; }

/* Form pengajuan — stacked rapi, bukan col-4 sempit */
.form-grid { display: grid; gap: 12px; min-width: 0; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.form-grid-2 > * { min-width: 0; }
@media (max-width: 430px) { .form-grid-2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 0; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; display: block; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
.btn-block { width: 100%; max-width: 100%; display: block; min-height: 50px; font-size: 15px; }
.form-control, .form-select { max-width: 100%; min-width: 0; }
input[type="date"].form-control, input[type="time"].form-control { min-height: 48px; width: 100%; min-width: 0; }
.empty-state { background: var(--cream-2); border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 16px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* Status pill tambahan */
.pill.pending { background: #FFF3DC; border-color: #F5D9A8; color: #A05A00; }
.pill.approved, .pill.disetujui { background: #EAF4EE; border-color: #C4E2D0; color: var(--ok); }
.pill.rejected, .pill.ditolak { background: #FDEBE7; border-color: #F5C4BA; color: var(--danger); }

/* Login — simple elegan */
.loginwrap { max-width: 400px; margin: 0 auto; padding: 26px 6px 10px; }
.login-simple { max-width: 380px; padding-top: 22px; }
.login-top { text-align: center; margin-bottom: 16px; }
.login-logobadge {
  display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: 20px; padding: 14px 24px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.login-logobadge::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 193, 92, .5), transparent 65%);
}
.login-logobadge img { height: 38px; width: auto; max-width: 190px; object-fit: contain; display: block; position: relative; z-index: 1; }
.login-app {
  margin-top: 10px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--orange-3);
}
.login-simple h1 { font-family: 'Baloo 2', sans-serif; font-size: 22px; font-weight: 700; color: var(--navy); margin: 6px 0 2px; letter-spacing: -.2px; }
.login-top p { color: var(--muted); font-size: 13.5px; margin: 0; }
.logincard { background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 20px 18px; }
.login-error ul { margin: 0 0 12px; padding-left: 18px; font-size: 13.5px; }
.login-error:empty { display: none; }
.passwrap { position: relative; }
.passwrap .form-control { padding-right: 48px; }
.passeye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--muted);
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; padding: 0; cursor: pointer;
}
.passeye:hover { color: var(--navy); background: #FFF3DC; }
.passeye:active { opacity: .6; }
.passeye svg { display: block; }
.btn-login { min-height: 52px; border-radius: 14px; font-size: 16px; letter-spacing: .2px; background: linear-gradient(135deg, var(--orange-1), var(--orange-3)); color: var(--navy); border: none; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

/* Navigasi bawah — krem */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}
.bottomnav a {
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600;
  text-align: center; flex: 1; padding: 6px 2px; border-radius: 10px; line-height: 1.3;
}
.bottomnav a .ico { display: block; font-size: 19px; margin-bottom: 1px; }
.bottomnav a .ico svg { width: 23px; height: 23px; display: block; margin: 0 auto 2px; }
.btn-notif svg { vertical-align: -2px; }
.bottomnav a.active, .bottomnav a:active { color: var(--navy); background: #FFF3DC; }

/* Popup sukses (pengganti alert hijau) */
.success-popup-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px;
  background: rgba(21, 43, 78, .45);
  animation: fadeIn .2s ease;
}
.success-popup {
  background: #fff; border-radius: 22px;
  padding: 28px 26px 24px; max-width: 320px; width: 100%;
  text-align: center; box-shadow: var(--shadow);
  animation: popIn .25s ease;
  border: 1px solid var(--line);
}
.success-check {
  width: 68px; height: 68px; border-radius: 50%;
  margin: 0 auto 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-3)); color: var(--white);
  animation: stampPulse 1.6s ease-in-out infinite;
}
.success-msg { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.success-quote { font-size: 12.5px; font-style: italic; color: var(--muted); margin: 10px 0 16px; line-height: 1.5; background: var(--cream-2); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.success-quote:empty { display: none; }
.success-popup-overlay.hide { opacity: 0; transition: opacity .3s ease; }
@keyframes popIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Profil — layout beda, tanpa card */
.profile-top { text-align: center; padding: 10px 0 6px; }
.profile-avatar {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; color: var(--navy); font-size: 30px; font-weight: 800; letter-spacing: 1px;
  font-family: 'Baloo 2', sans-serif;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-3));
  outline: 6px solid rgba(245, 166, 35, .2);
  box-shadow: var(--shadow);
}
.profile-avatar-img {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 12px;
  object-fit: cover; display: block;
  outline: 6px solid rgba(245, 166, 35, .2);
  box-shadow: var(--shadow); background: #FFF3DC;
}
/* Tombol kamera di sudut avatar — membuka pemilih file foto profil */
.avatar-wrap { position: relative; display: inline-block; }
.avatar-edit {
  position: absolute; right: 2px; bottom: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: var(--navy); background: linear-gradient(135deg, var(--orange-1), var(--orange-3));
  border: 2px solid #fff; box-shadow: var(--shadow);
  padding: 0;
}
.avatar-edit:active { transform: scale(.93); }
.profile-name { font-size: 20px; font-weight: 700; color: var(--navy); font-family: 'Baloo 2', sans-serif; }
.profile-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profile-sub { font-size: 13px; color: var(--navy); font-weight: 600; margin-top: 6px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.profile-badge { font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: #FFF3DC; border: 1px solid #F5D9A8; color: #A05A00; }
.profile-rows { margin-top: 18px; border-top: 1px solid var(--line); }
.profile-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-row span { color: var(--muted); }
.profile-row b { font-weight: 700; }
.profile-menu { margin-top: 18px; border-top: 1px solid var(--line); }
.profile-menu a { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14.5px; color: var(--ink); text-decoration: none; }
.profile-menu a:active { opacity: .6; }
.profile-menu .chev { color: var(--muted); font-size: 20px; line-height: 1; }
.profile-logout { width: 100%; margin-top: 20px; padding: 13px; border-radius: 14px; border: 1.5px solid rgba(179, 55, 58, .5); background: transparent; color: var(--danger); font-weight: 700; font-size: 14.5px; }

/* Pengumuman, alert — ala TrialForm (tanpa biru, selaras krem/navy/oranye) */
.alert { border-radius: var(--radius-sm); font-size: 14px; }
.alert-info { background: #FFF8EA; border-color: #F5D9A8; color: #6B4A12; }
.alert-info small { color: #8C6A2E; }
.alert-info a, .alert-info a:visited { color: var(--navy); }
.alert-warning { background: #FFF3DC; border-color: #F5D9A8; color: #A05A00; }
.alert-danger { background: #FDEBE7; border-color: #F5C4BA; color: var(--danger); }
.alert-success { background: #EAF4EE; border-color: #C4E2D0; color: var(--ok); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #FFF3DC; border: 1px solid #F5D9A8; color: #A05A00; }
.pill.ok { background: #EAF4EE; border-color: #C4E2D0; color: var(--ok); }
.pill.warn { background: #FDEBE7; border-color: #F5C4BA; color: var(--danger); }

h4, h5 { color: var(--navy); font-weight: 700; font-family: 'Baloo 2', 'Plus Jakarta Sans', sans-serif; }
h4 { font-size: 19px; }
h5 { font-size: 16px; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (min-width: 768px) {
  html { font-size: 16px; }
  .content { padding: 0 20px; }
}

/* Kalender riwayat — mirip referensi: kartu putih bersih, angka polos + titik status */
.cal-section { font-family: 'Baloo 2', 'Plus Jakarta Sans', sans-serif; color: var(--navy); font-size: 15.5px; font-weight: 700; margin: 14px 2px 10px; }
.cal-card { background: #fff; border: 1px solid #F3EAD6; border-radius: 16px; box-shadow: 0 8px 24px rgba(37, 27, 10, .08); padding: 16px 16px 14px; }
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cal-nav {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: inline-grid; place-items: center;
  background: #FAF1DC; border: 1px solid #F0E2C2; color: #5A4A2A;
  font-size: 16px; font-weight: 800; line-height: 1; text-decoration: none; cursor: pointer;
}
a.cal-nav:hover { background: #F7E8C8; color: var(--navy); }
span.cal-nav[aria-disabled="true"] { opacity: .4; cursor: default; }
.cal-title { font-size: 13.5px; font-weight: 800; color: #0F2A4A; letter-spacing: .1px; text-transform: capitalize; }

.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.cal-week span { text-align: center; font-size: 11px; font-weight: 600; color: #A5906E; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-empty { min-height: 48px; }
.cal-day {
  position: relative; min-height: 48px; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 4px 0 6px; border-radius: 10px; font-family: inherit;
}
.cal-day:active { transform: scale(.94); }
.cal-num {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #22303F; line-height: 1;
  font-variant-numeric: tabular-nums; background: transparent;
  border: 1.5px solid transparent;
}
.cal-dotrow { height: 8px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.cal-dot-none { background: transparent; }
.dot-hadir { background: #4CAF7D; }
.dot-telat { background: #FFD21F; }
.dot-sakit { background: #D96C06; }
.dot-izin { background: #F2B705; }
.dot-cuti { background: #0E7490; }
.dot-pending { background: #B98A2F; }
.dot-alpha { background: #E53935; }
.dot-libur { background: #E53935; }
/* Badge kuning Telat (tak terpakai lagi sebagai dot, dipertahankan untuk kompatibilitas) */
.cal-dot-in { width: 5px; height: 5px; border-radius: 50%; display: block; line-height: 0; }
.cal-dot-in.dot-telat { background: #FFD21F; }

/* Skema: merah=Alpha, hijau fill=Hadir, hijau fill + lingkaran kuning berisi angka=Telat, biru=Libur, ungu=Sakit/Izin/Cuti */
.cal-hadir .cal-num { background: #22A06B; color: #fff; font-weight: 700; }
.cal-telat .cal-num {
  background: #22A06B; color: #fff; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
/* Lingkaran kuning center berisi angka, dikecilkan */
.cal-badge-telat {
  width: 20px; height: 20px; border-radius: 50%;
  background: #FFD21F; color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* Sakit/Izin/Cuti/Pending: ungu fill */
.cal-izin .cal-num, .cal-sakit .cal-num, .cal-cuti .cal-num,
.cal-pending .cal-num { background: #7C3AED; color: #fff; font-weight: 700; }
/* Alpha: merah fill penuh */
.cal-alpha .cal-num { background: #E53935; color: #fff; font-weight: 700; }
/* Libur mingguan + cabang: biru fill */
.cal-libur .cal-num, .cal-libur-cabang .cal-num { background: #3B82F6; color: #fff; font-weight: 700; }
/* Mendatang: warna angka sama seperti hari biasa */
.cal-mendatang .cal-num { color: #22303F; }
/* Hari ini (belum absen): lingkaran putus-putus oranye seperti tgl 18 di referensi */
.cal-belum .cal-num { background: #fff; border: 1.5px dashed #EE7A1E; color: #C96A12; }
/* Hari terpilih: lingkaran navy solid — fill status dipertahankan */
.cal-day.sel .cal-num { border: 1.5px solid #152B4E; background: #fff; box-shadow: 0 2px 8px rgba(21, 43, 78, .15); }
.cal-hadir.sel .cal-num, .cal-telat.sel .cal-num { background: #22A06B; color: #fff; border: 1.5px solid #152B4E; }
.cal-alpha.sel .cal-num { background: #E53935; color: #fff; border: 1.5px solid #152B4E; }
.cal-izin.sel .cal-num, .cal-sakit.sel .cal-num,
.cal-cuti.sel .cal-num, .cal-pending.sel .cal-num { background: #7C3AED; color: #fff; border: 1.5px solid #152B4E; }
.cal-libur.sel .cal-num, .cal-libur-cabang.sel .cal-num { background: #3B82F6; color: #fff; border: 1.5px solid #152B4E; }
/* Hari ini: ring putus-putus di LUAR fill (radius lebih besar agar terlihat) — fill status dipertahankan */
.cal-day.is-today .cal-num { outline: 1.5px dashed #EE7A1E; outline-offset: 3px; }
/* BelumAbsen sudah punya border putus-putus sendiri, tak perlu ring luar */
.cal-belum.is-today .cal-num { outline: none; }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid #F3EAD6;
}
.cal-lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #7A6F59; font-weight: 500; }
.cal-lg .cal-dot { width: 7px; height: 7px; }
/* Sampel legenda sesuai skema fill (kosong, tanpa angka) */
.cal-sample {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; line-height: 0;
}
.cal-sample-hadir { background: #22A06B; }
.cal-sample-telat { background: #22A06B; display: grid; place-items: center; }
.cal-sample-telat i { width: 8px; height: 8px; border-radius: 50%; background: #FFD21F; display: block; }
.cal-sample-ungu { background: #7C3AED; }
.cal-sample-biru { background: #3B82F6; }
.cal-sample-alpha { background: #E53935; }
/* Sampel lama (kompatibilitas) */
.cal-sample-libur {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: #F6EFDD; display: inline-grid; place-items: center;
}
.cal-sample-libur i { width: 5px; height: 5px; border-radius: 50%; background: #E53935; display: block; }
.cal-next {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  border: 1.5px solid transparent; background: #fff; display: inline-block;
  outline: 1.5px dashed #EE7A1E; outline-offset: 2px;
}

.cal-detail {
  margin-top: 10px; background: #FDF9F0; border: 1px solid #F3EAD6;
  border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
}
.cal-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-detail-pills { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-detail-ket { margin: 8px 0 0; line-height: 1.55; }
.cal-detail-rows { margin-top: 8px; display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.cal-detail-rows b { color: var(--ink); }
.cal-libur-list { margin-top: 12px; font-size: 13px; }
.cal-libur-list ul { margin: 6px 0 0; padding-left: 20px; }
.cal-libur-list li { margin-bottom: 3px; }

/* Hero slider pengumuman — 1 slide tampil, geser/otomatis bila >1. Nav + dots di dalam card biru. */
.hero-slider-card { padding: 0; overflow: hidden; }
.hs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 12px; }
.hs-viewport {
  position: relative; margin: 0 12px 12px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hs-viewport::after {
  content: ""; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,193,92,.35), transparent 65%);
  pointer-events: none;
}
.hs-slide {
  display: none;
  color: #fff; padding: 16px 16px 4px; min-height: 108px;
  position: relative; z-index: 1;
}
.hs-slide.active { display: block; animation: fadeIn .3s ease; }
.hs-slide-title { font-family: 'Baloo 2', sans-serif; font-size: 16.5px; font-weight: 700; color: var(--orange-1); margin-bottom: 6px; position: relative; z-index: 1; }
.hs-slide-body { font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,.92); position: relative; z-index: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hs-slide-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11.5px; color: rgba(255,255,255,.65); position: relative; z-index: 1; }
.hs-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 12px; position: relative; z-index: 1; }
.hs-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.16); color: #fff; font-size: 18px; font-weight: 800; line-height: 1; cursor: pointer; }
.hs-arrow:active { transform: scale(.95); background: rgba(255,255,255,.28); }
.hs-dots { display: flex; gap: 6px; align-items: center; }
.hs-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.35); padding: 0; cursor: pointer; }
.hs-dot.active { background: var(--orange-1); width: 22px; border-radius: 999px; }

/* Strip notifikasi belum dibaca di home */
.notif-strip, .notif-strip:visited {
  display: flex; align-items: center; gap: 10px;
  background: #FFF8EA; border: 1px solid #F5D9A8; border-radius: 14px;
  padding: 11px 12px; margin-bottom: 14px; text-decoration: none; color: inherit;
}
.notif-dot {
  min-width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-3));
}
.notif-txt { flex: 1; min-width: 0; font-size: 13.5px; }
.notif-txt b { color: var(--navy); display: block; }
.notif-txt small { color: var(--muted); }

/* Badge angka di tombol Notifikasi */
.btn-notif { position: relative; }
.notif-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  border-radius: 999px; padding: 0 5px; margin-left: 6px;
  background: var(--orange-1); color: var(--navy); font-size: 11.5px; font-weight: 800;
}

/* Popup crop foto profil — dibuka dari ikon kamera avatar */
.crop-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 20px;
  background: rgba(21, 43, 78, .5);
  animation: fadeIn .2s ease;
}
.crop-overlay[hidden] { display: none; }
.crop-popup {
  background: #fff; border-radius: 20px; border: 1px solid var(--line);
  padding: 18px 16px 16px; max-width: 330px; width: 100%;
  text-align: center; box-shadow: var(--shadow);
  animation: popIn .22s ease;
}
.crop-popup .muted { margin: 2px 0 12px; }
.crop-viewport {
  width: 260px; height: 260px; margin: 0 auto;
  border-radius: 50%; overflow: hidden;
  border: 1.5px solid var(--line); background: #FFF8EA;
  touch-action: none; cursor: grab;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport canvas { display: block; width: 260px; height: 260px; border-radius: 50%; }
#cropZoom { width: 100%; margin: 12px 0 4px; accent-color: var(--orange-3); min-height: 32px; }
.crop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.crop-actions .btn { min-height: 48px; }
.crop-actions .btn-outline-secondary {
  background: #fff; border: 1.5px solid var(--line); color: var(--muted);
}
.crop-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-style: italic; }

/* Popup kamera absensi — dibuka dari tombol Ambil Foto */
.cam-empty {
  text-align: center; padding: 18px 14px;
  background: var(--cream-2); border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
}
.cam-empty-ico {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 8px;
  display: grid; place-items: center; color: var(--navy);
  background: linear-gradient(135deg, var(--orange-1), var(--orange-3));
}
.cam-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 0;
  background: rgba(0, 0, 0, .92);
  animation: fadeIn .2s ease;
}
.cam-overlay[hidden] { display: none; }
.cam-popup {
  background: #000; color: #fff; border: none;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
  max-width: 480px; width: 100%; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  text-align: center; box-shadow: var(--shadow);
  animation: popIn .22s ease;
  overflow-y: auto;
}
.cam-popup h5 { flex: none; color: #fff; }
.cam-popup .hint { flex: none; color: rgba(255, 255, 255, .75); }
/* Tampilkan SELURUH frame sensor (contain) di atas hitam — tidak di-crop,
   jadi tidak terlihat zoom dan hasil jepretan sama persis dengan preview. */
.cam-modal-video {
  width: 100%; border-radius: 12px; background: #000;
  object-fit: contain; display: block;
  flex: 1; min-height: 0; min-height: 220px;
}
.cam-modal-actions { display: grid; gap: 8px; margin-top: 12px; flex: none; }
.cam-modal-actions .btn { min-height: 48px; }
.cam-modal-actions .btn-outline-secondary {
  background: #fff; border: 1.5px solid var(--line); color: var(--muted);
}
/* Kamera depan = mode cermin: preview di-mirror agar gerakan kiri-kanan natural.
   Hasil snapshot di-canvas juga di-mirror (lihat snapFoto) → WYSIWYG. */
.cam-modal-video.mirrored { transform: scaleX(-1); }

/* Overlay loading saat stempel dikirim ke server */
.stamp-loading-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 24px;
  background: rgba(21, 43, 78, .55);
  animation: fadeIn .2s ease;
}
.stamp-loading-overlay[hidden] { display: none; }
.stamp-loading-popup {
  background: #fff; border-radius: 22px;
  padding: 28px 26px 24px; max-width: 300px; width: 100%;
  text-align: center; box-shadow: var(--shadow);
  animation: popIn .25s ease;
  border: 1px solid var(--line);
}
.stamp-loading-popup .spinner {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  border: 5px solid #EDEFF5; border-top-color: var(--orange-3, #F5A623);
  animation: stampSpin 0.9s linear infinite;
}
.stamp-loading-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.stamp-loading-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
@keyframes stampSpin { to { transform: rotate(360deg); } }
