@font-face { font-family: "Plex"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "PlexCond"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "PlexCond"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); }

:root {
  --ink: #10272b; --ink2: #41575c; --mute: #6b7f84;
  --paper: #eef3f2; --card: #fff; --line: #d6e0de; --line2: #e6edec;
  --deep: #0b3a3c; --deep2: #0f4a4b; --teal: #0f766e; --teal-d: #0a5a54;
  --tepat: #0f8a64; --telat: #c27200; --izin: #76589f; --belum: #58696e; --bad: #b3261e; --info: #2f5f9e;
  --tepat-bg: #e3f4ec; --telat-bg: #fbeed6; --izin-bg: #eee8f6; --belum-bg: #e8eeed; --bad-bg: #fde9e7;
  --sans: "Plex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond: "PlexCond", "Plex", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--sans); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
a { color: var(--teal-d); }
img { display: block; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.muted { color: var(--mute); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Navigasi admin ---------- */
.nav { background: var(--deep); color: #fff; }
.nav__in { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav__brand { font-weight: 600; padding: 14px 14px 14px 0; margin-right: 6px; white-space: nowrap; }
.nav a, .nav button.nav__link { color: #cfe3e0; text-decoration: none; padding: 14px 12px; border: 0; background: none; font: inherit; cursor: pointer; border-bottom: 3px solid transparent; }
.nav a:hover, .nav button.nav__link:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: #f2b705; }
.nav__sp { flex: 1; }
.nav form { margin: 0; }
main { max-width: 1280px; margin: 0 auto; padding: 22px 16px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head p { margin: 2px 0 0; }

.flash { max-width: 1280px; margin: 14px auto 0; padding: 0 16px; }
.flash div { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border: 1px solid; }
.flash .ok { background: var(--tepat-bg); border-color: #b9e0cf; color: #0b5b42; }
.flash .error { background: var(--bad-bg); border-color: #f3c1bc; color: #8c1d16; }

/* ---------- Komponen umum ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.btn { display: inline-block; background: var(--teal); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font: 500 15px var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--teal-d); }
.btn.alt { background: #fff; color: var(--teal-d); border: 1px solid var(--teal); }
.btn.alt:hover { background: #eaf4f2; }
.btn.bad { background: #fff; color: var(--bad); border: 1px solid #e6b3ae; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 4px; font-weight: 500; }
input, select, textarea { width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #bccbc8; border-radius: 8px; padding: 9px 11px; }
input[type=checkbox], input[type=radio] { width: auto; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: middle; }
th { font-size: 13px; font-weight: 500; color: var(--mute); background: #f6f9f8; white-space: nowrap; }
td.r, th.r { text-align: right; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--belum-bg); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pill.tepat { background: var(--tepat-bg); color: #0b6a4b; } .pill.terlambat { background: var(--telat-bg); color: #8a5200; }
.pill.izin, .pill.sakit, .pill.cuti { background: var(--izin-bg); color: #5b3f86; } .pill.belum, .pill.netral { background: var(--belum-bg); color: #3f4f54; }
.pill.bad { background: var(--bad-bg); color: #8c1d16; }
.empty { padding: 26px 10px; text-align: center; color: var(--mute); }
.inline { display: inline; margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters > div { min-width: 150px; }

/* ---------- Dasbor ---------- */
.band { background: var(--deep); color: #fff; }
.band__in { max-width: 1280px; margin: 0 auto; padding: 22px 16px 26px; display: grid; grid-template-columns: minmax(230px, 340px) 1fr; gap: 28px 44px; align-items: center; }
.clock { font: 600 76px/0.95 var(--cond); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.clock small { font-size: 22px; font-weight: 500; margin-left: 8px; color: #9fc3bf; letter-spacing: 0; }
.date { margin-top: 8px; color: #bcd6d2; }
.date a { color: #f2d36b; }
.jaga__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.jaga__top b { font: 600 24px var(--cond); }
.bar { display: flex; gap: 3px; height: 22px; }
.bar > i { display: block; min-width: 0; border-radius: 3px; transition: flex-grow .6s ease; }
.bar .s-tepat { background: #38c293; } .bar .s-terlambat { background: #f0a62b; } .bar .s-izin { background: #a78bd0; }
.bar .s-belum { background: repeating-linear-gradient(135deg, #6f8c90 0 5px, #4d6a6e 5px 10px); }
.bar .s-kosong { background: #1e5557; flex: 1; }
.legend { display: flex; gap: 8px 26px; flex-wrap: wrap; margin-top: 12px; }
.legend div { display: flex; align-items: baseline; gap: 8px; }
.legend b { font: 600 26px/1 var(--cond); font-variant-numeric: tabular-nums; }
.legend span { color: #bcd6d2; font-size: 13.5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dot-tepat { background: #38c293; } .dot-terlambat { background: #f0a62b; } .dot-izin { background: #a78bd0; } .dot-belum { background: #6f8c90; }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.sec { margin-bottom: 26px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sec__head p { margin: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid #b8c9c6; background: #fff; border-radius: 99px; padding: 4px 12px; font: 500 13px var(--sans); cursor: pointer; color: var(--ink2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.tag { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.tag::before { content: ""; position: absolute; top: 7px; left: 50%; width: 30px; height: 6px; margin-left: -15px; border-radius: 3px; background: rgba(255,255,255,.85); z-index: 2; box-shadow: inset 0 0 0 1px rgba(16,39,43,.18); }
.tag__foto { aspect-ratio: 1 / 1; background: var(--belum-bg); overflow: hidden; }
.tag__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.tag__ini { width: 100%; height: 100%; display: grid; place-items: center; font: 600 40px var(--cond); color: #8da0a4; }
.tag__body { padding: 9px 11px 10px; flex: 1; }
.tag__nama { font-weight: 600; line-height: 1.25; }
.tag__jab { font-size: 13px; color: var(--mute); }
.tag__jam { margin-top: 6px; font-size: 13.5px; color: var(--ink2); }
.tag__jam b { font: 600 20px var(--cond); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.tag__strip { padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: #fff; }
.tag--tepat .tag__strip { background: var(--tepat); } .tag--terlambat .tag__strip { background: var(--telat); }
.tag--izin .tag__strip, .tag--sakit .tag__strip, .tag--cuti .tag__strip { background: var(--izin); }
.tag--belum { background: transparent; border: 1.5px dashed #9fb3b0; }
.tag--belum .tag__foto { background: transparent; } .tag--belum .tag__foto img { filter: grayscale(1); opacity: .55; }
.tag--belum .tag__strip { background: var(--belum-bg); color: var(--ink2); }
.tag--belum.lewat { border-color: #d49a2e; } .tag--belum.lewat .tag__strip { background: var(--telat-bg); color: #7a4800; }
.tag--pulang { opacity: .82; }
.tag details { margin-top: 8px; } .tag summary { cursor: pointer; font-size: 12.5px; color: var(--teal-d); }
.tag details form { display: grid; gap: 6px; margin-top: 6px; } .tag details select, .tag details input { padding: 5px 8px; font-size: 13px; }
.tag__foto a { display: block; width: 100%; height: 100%; }
.side .card { padding: 16px; }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin-top: 10px; }
.trend > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.trend i { display: block; } .trend .t1 { background: var(--tepat); } .trend .t2 { background: var(--telat); border-radius: 2px 2px 0 0; }
.trend .hr { background: #c3d1ce; height: 3px; }
.trend__lbl { display: flex; gap: 4px; margin-top: 5px; } .trend__lbl span { flex: 1; text-align: center; font-size: 10.5px; color: var(--mute); }
.trend__lbl .now { color: var(--ink); font-weight: 600; }
.tol { list-style: none; margin: 8px 0 0; padding: 0; } .tol li { display: flex; gap: 9px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line2); font-size: 13.5px; }
.tol li:first-child { border-top: 0; } .tol img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: var(--belum-bg); }
.tol b { font-variant-numeric: tabular-nums; }
.peringatan { background: var(--telat-bg); border: 1px solid #ecc888; color: #6b4300; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; }

/* ---------- Halaman absen & rekam wajah ---------- */
body.absen { background: #e4ecea; min-height: 100vh; }
.stage-wrap { max-width: 520px; margin: 0 auto; padding: 14px 14px 30px; }
.stage-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 2px 12px; }
.stage-top b { font-weight: 600; } .stage-top .jam { font: 600 26px var(--cond); font-variant-numeric: tabular-nums; }
.stage { position: relative; aspect-ratio: 3 / 4; max-height: 74vh; width: 100%; background: #0c1d1f; border-radius: 26px; overflow: hidden; margin: 0 auto; }
.stage video, .stage canvas.snap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.stage .guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage .guide ellipse { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 3; stroke-dasharray: 10 9; transition: stroke .2s; }
.stage.ok .guide ellipse { stroke: #4fe3ae; stroke-dasharray: none; } .stage.bad .guide ellipse { stroke: #ff8a80; }
.lok { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 3; }
.lok span { background: rgba(12,29,31,.72); color: #fff; padding: 5px 11px; border-radius: 99px; font-size: 13px; backdrop-filter: blur(4px); }
.lok .good::before, .lok .nope::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.lok .good::before { background: #4fe3ae; } .lok .nope::before { background: #ff8a80; }
.instr { margin: 16px 4px 4px; text-align: center; }
.instr b { display: block; font: 600 24px/1.25 var(--sans); } .instr span { color: var(--ink2); }
.hasil { position: absolute; inset: 0; z-index: 5; display: none; flex-direction: column; justify-content: flex-end; padding: 22px; background: linear-gradient(to top, rgba(8,24,26,.94) 55%, rgba(8,24,26,.15)); color: #fff; }
.hasil.show { display: flex; }
.hasil__ikon { font: 600 15px var(--sans); display: inline-block; padding: 4px 12px; border-radius: 99px; margin-bottom: 10px; align-self: flex-start; }
.hasil__ikon.tepat { background: #38c293; color: #04281c; } .hasil__ikon.terlambat { background: #f0a62b; color: #3b2400; } .hasil__ikon.gagal { background: #ff8a80; color: #4a0b06; } .hasil__ikon.info { background: #9fc3bf; color: #072a2b; }
.hasil__nama { font: 600 34px/1.1 var(--cond); } .hasil__jab { color: #b9d3cf; margin-top: 2px; }
.hasil__jam { font: 600 56px/1 var(--cond); margin: 12px 0 4px; font-variant-numeric: tabular-nums; } .hasil__ket { color: #d8e8e5; }
.hasil__pesan { font-size: 20px; font-weight: 500; line-height: 1.35; }
.foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink2); }
.progress { display: flex; gap: 6px; justify-content: center; margin: 12px 0 0; }
.progress i { width: 12px; height: 12px; border-radius: 50%; background: #b9c9c6; } .progress i.on { background: var(--tepat); }

/* ---------- Login & pesan ---------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; }
.login h1 { margin-bottom: 4px; } .login .card { padding: 24px; } .login form > div { margin-bottom: 14px; }
.galat { color: var(--bad); background: var(--bad-bg); border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; }

@media (max-width: 980px) {
  .band__in { grid-template-columns: 1fr; gap: 20px; } .dash { grid-template-columns: 1fr; }
  .clock { font-size: 64px; }
}
@media (max-width: 560px) {
  .tags { grid-template-columns: repeat(2, 1fr); gap: 10px; } .nav a, .nav button.nav__link { padding: 11px 8px; font-size: 14px; }
  main { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .nav, .noprint, .flash { display: none !important; } body { background: #fff; } .card { border: 0; padding: 0; } }

.linkbtn{background:none;border:0;padding:0;font:inherit;color:inherit;text-decoration:underline;cursor:pointer}
.me{max-width:560px;margin:0 auto;padding:20px 16px 40px}
.me h1{font-size:22px;margin:4px 0 2px}
.me .row{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--line, #d9e2e0)}
.me .row:last-child{border-bottom:0}
