/* Absensi v2 worker app */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* Rexline palette, sampled from the company logo: navy + red.
   --teal/--teal-d keep their names so every existing rule follows along. */
:root {
  --teal: #1F497E; --teal-d: #16385F; --teal-l: #2E5FA3;
  --accent: #EB1B36; --accent-d: #C4102A;
  --bg: #eef2f7; --card: #fff;
  --ink: #1f2937; --mut: #6b7280; --line: #e5e7eb;
  --ok: #16a34a; --warn: #d97706; --err: #dc2626;
  --grad: linear-gradient(135deg, #2E5FA3 0%, #1F497E 55%, #16385F 100%);
  --glass: rgba(255,255,255,.74); --glass-brd: rgba(255,255,255,.6);
}
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
  background-image:
    radial-gradient(620px 300px at 6% -6%, rgba(31,73,126,.15), transparent 62%),
    radial-gradient(520px 260px at 104% 2%, rgba(235,27,54,.10), transparent 64%);
  background-attachment: fixed;
}
.logo { width: 44px; height: 44px; border-radius: 13px; background: #fff; padding: 3px;
  box-shadow: 0 4px 14px rgba(31,73,126,.20); border: 1px solid rgba(31,73,126,.10);
  object-fit: contain; flex-shrink: 0; }
.card, .tabs, .me-bar { backdrop-filter: blur(12px) saturate(1.25); -webkit-backdrop-filter: blur(12px) saturate(1.25); }
.wrap { max-width: 480px; margin: 0 auto; padding: 12px 14px 40px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.app-name { font-weight: 700; font-size: 17px; }
.clock-line { font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; }
.clock-line #clock { font-weight: 600; color: var(--teal-d); }
.lang-btn { border: 1.5px solid var(--teal); background: #fff; color: var(--teal); font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; }


/* logged-in user bar */
.me-bar { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.me-ava { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); box-shadow: 0 3px 10px rgba(31,73,126,.28); color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.me-info { flex: 1; min-width: 0; }
.me-info b { display: block; font-size: 14.5px; }
.me-info small { color: var(--mut); font-size: 12px; }
.icon-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 11px; font-size: 15px; cursor: pointer; color: var(--err); }

/* tabs */
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; margin-bottom: 10px; }
.tab-btn { padding: 10px 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--mut); cursor: pointer; }
.tab-btn.sel { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(31,73,126,.26); }

.pending-bar[hidden] { display: none; }
.pending-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.pending-bar button { background: #d97706; color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }

.card { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.field { display: block; margin-bottom: 14px; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--mut); margin-bottom: 6px; }
.req { color: var(--err); font-style: normal; }

/* type-ahead search */
.search-wrap { position: relative; }
.search-input { width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 15px; background: #fff; color: var(--ink); }
.search-input:focus { outline: none; border-color: var(--teal); }
.search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 20; max-height: 260px; overflow-y: auto; }
.search-item { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; }
.search-item:last-child { border-bottom: 0; }
.search-item:hover { background: #eef4fb; }
.search-item b { display: block; font-size: 14px; }
.search-item small { color: var(--mut); font-size: 12px; }

.picked-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; background: #eef4fb; border: 1.5px solid var(--teal); color: var(--teal-d); border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 14px; }
.picked-chip[hidden] { display: none; }   /* display:flex above would otherwise beat the hidden attribute */
.picked-chip.other { background: #eef2ff; border-color: #6366f1; color: #3730a3; }
.chip-x { border: 0; background: none; font-size: 14px; cursor: pointer; color: inherit; }

/* for-other */
.for-other-bar { margin-bottom: 12px; }
.for-other-btn { width: 100%; padding: 11px; border: 1.5px solid #c7d2fe; background: linear-gradient(135deg,#eef2ff,#e0e7ff); color: #3730a3; border-radius: 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.for-other-btn.on { border-style: solid; }
.other-picker { margin-bottom: 14px; }
.other-picker[hidden] { display: none; }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.type-btn .t-ico { font-size: 22px; }
.type-btn.sel { border-color: var(--teal); background: linear-gradient(135deg,#eef4fb,#dfeaf7); color: var(--teal-d); box-shadow: 0 0 0 2px rgba(31,73,126,.16); }

.profile-chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.p-chip { background: #eef4fb; border: 1px solid #cfe0f3; color: var(--teal-d); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; }

.selfie-row { display: flex; align-items: center; gap: 12px; }
.photo-btn { flex: 1; padding: 13px; border: 1.5px solid #c2d4ea; background: linear-gradient(135deg,#eef4fb,#e2ecf8); color: var(--teal-d); border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }

/* after the shot: the photo itself, stamped, with a retake button over it */
.selfie-shot { position: relative; margin: 0; border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 22px rgba(31,73,126,.24); border: 2px solid var(--teal);
  animation: shotIn .22s ease-out; }
.selfie-shot[hidden] { display: none; }
/* contain, not cover: the timestamp is burned along the bottom edge and a
   cropping fit would cut exactly that off */
#photoPreview { display: block; width: 100%; max-height: 60vh; object-fit: contain;
  background: #0f172a; }
.shot-retake { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--teal-d); font-size: 12.5px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,.28); backdrop-filter: blur(6px); }
.shot-retake:active { background: #fff; }
@keyframes shotIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

.loc-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; }
.loc-line { font-size: 13px; color: var(--mut); flex: 1; min-width: 160px; }
.loc-line.ok { color: var(--ok); }
.loc-line.fail { color: var(--warn); }
.gps-btn { border: 1.5px solid var(--teal); background: #eef4fb; color: var(--teal-d); border-radius: 10px; padding: 9px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.gps-btn[hidden] { display: none; }
.gps-btn:active { background: #dbe7f5; }

.submit-btn { width: 100%; padding: 15px; background: var(--grad); color: #fff; border: 0; border-radius: 14px;
  font-size: 16.5px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(31,73,126,.28);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.submit-btn:active { filter: brightness(.94); }
.submit-btn:disabled { opacity: .6; }

.toast { margin-top: 12px; padding: 12px; border-radius: 10px; font-size: 14px; background: #eef2ff; }
.toast.ok { background: #dcfce7; color: #166534; }
.toast.warn { background: #fef3c7; color: #92400e; }
.toast.err { background: #fee2e2; color: #991b1b; }

/* history */
.hist-head { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.hist-head input { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 14px; flex: 1; }
.mini-btn { padding: 9px 12px; border: 1.5px solid var(--teal); background: #fff; color: var(--teal); border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.scroll-x { overflow-x: auto; }
.hist-table { width: 100%; border-collapse: collapse; }
.hist-table th, .hist-table td { border: 1px solid #e5e7eb; padding: 7px 8px; font-size: 12.5px; white-space: nowrap; }
.hist-table th { background: #e6f2f0; font-size: 11.5px; }
.hist-table .h-date { font-weight: 700; }
.hist-table .h-empty { color: #c2c9c7; text-align: center; }
.hist-table small { color: var(--mut); }
.hist-table a { text-decoration: none; }
.hist-empty { color: var(--mut); font-size: 13.5px; text-align: center; padding: 14px 0; }

.foot { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--mut); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; }
.dot.on { background: var(--ok); }
.dot.off { background: var(--err); }

/* inline SVG icons */
.ico { vertical-align: -0.18em; flex-shrink: 0; }
.photo-btn, .gps-btn, .for-other-btn, .p-chip, .pending-bar span { display: inline-flex; align-items: center; gap: 6px; }
.pending-bar span { gap: 5px; }
.type-btn .t-ico { display: flex; align-items: center; justify-content: center; color: var(--mut); }
.type-btn.sel .t-ico { color: var(--teal); }

/* notification bell + panel */
.icon-btn.notif { position: relative; color: var(--teal-d); }
.notif-dot { position: absolute; top: -5px; right: -5px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 5px; }
.notif-dot[hidden] { display: none; }
.notif-panel[hidden] { display: none; }
.notif-panel { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.notif-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14.5px; }
.notif-body { max-height: 260px; overflow-y: auto; }
.notif-item { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; margin-bottom: 6px; font-size: 12.5px; line-height: 1.4; background: #f9fafb; }
.notif-item.late { background: #fee2e2; color: #991b1b; }
.notif-item.early { background: #ffedd5; color: #9a3412; }
.notif-item.unseen { box-shadow: inset 3px 0 0 currentColor; }
.notif-item .ni-ico { flex-shrink: 0; margin-top: 1px; }

/* ===== on-time celebration ===== */
.ok-burst[hidden] { display: none; }
/* no backdrop-filter: it composites unreliably on older Android WebViews */
.ok-burst { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 78, 71, .55); animation: okFade .25s ease both; }
.ok-card { background: #fff; border-radius: 22px; padding: 30px 34px 26px; text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.22); animation: okPop .45s cubic-bezier(.2,.9,.3,1.3) both; max-width: 86vw; }
.ok-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 14px; }
.ok-svg { width: 120px; height: 120px; }
.ok-circle { fill: none; stroke: #d7e5f5; stroke-width: 8; }
.ok-svg .ok-tick { fill: none; stroke: #16a34a; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; animation: okDraw .5s .18s ease-out forwards; }
.ok-title { font-size: 22px; font-weight: 800; color: #15803d; letter-spacing: .3px; }
.ok-sub { font-size: 13.5px; color: var(--mut); margin-top: 6px; line-height: 1.45; }
/* confetti */
.conf { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-radius: 2px; opacity: 0; }
.conf.c1 { background: #16a34a; animation: confF .9s .25s ease-out forwards; --tx: -70px; --ty: -62px; }
.conf.c2 { background: #1F497E; animation: confF .9s .3s ease-out forwards;  --tx: 68px;  --ty: -58px; }
.conf.c3 { background: #f59e0b; animation: confF .9s .22s ease-out forwards; --tx: -82px; --ty: 26px; }
.conf.c4 { background: #6366f1; animation: confF .9s .34s ease-out forwards; --tx: 80px;  --ty: 34px; }
.conf.c5 { background: #ef4444; animation: confF .9s .28s ease-out forwards; --tx: -18px; --ty: -88px; }
.conf.c6 { background: #EB1B36; animation: confF .9s .36s ease-out forwards; --tx: 24px;  --ty: 84px; }
@keyframes okFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes okPop { 0% { transform: scale(.7); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
@keyframes okDraw { to { stroke-dashoffset: 0 } }
@keyframes confF {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(.4) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(220deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ok-card, .ok-burst { animation: none; }
  .ok-svg .ok-tick { animation: none; stroke-dashoffset: 0; }
  .conf { display: none; }
}

.ph-modal[hidden] { display: none; }
.ph-modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 50; cursor: pointer; }
.ph-modal img { max-width: 90vw; max-height: 85vh; border-radius: 12px; }


/* ===== holiday calendar (read-only for workers) ===== */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cal-nav b { font-size: 15px; }
.cal-nav .mini-btn { min-width: 40px; font-size: 17px; line-height: 1; padding: 7px 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-hd { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--mut); padding: 3px 0; }
.cal-cell { aspect-ratio: 1 / 1; border-radius: 8px; background: #f9fafb; color: var(--ink);
  display: flex; align-items: center; justify-content: center; position: relative;
  font-size: 12.5px; font-weight: 600; }
.cal-cell.blank { background: none; }
.cal-cell.off { background: #fee2e2; color: #dc2626; }
.cal-cell.hol { background: #fca5a5; color: #7f1d1d; font-weight: 800; }
.cal-cell.today { outline: 2px solid var(--teal); outline-offset: -2px; }
.cal-cell.present::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 11.5px; color: var(--mut); }
.cal-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cal-legend .lg-hol { background: #fca5a5; border: 1px solid #ef4444; }
.cal-legend .lg-off { background: #fee2e2; border: 1px solid #fca5a5; }
.cal-legend .lg-pre { background: var(--ok); border-radius: 50%; }
.hol-list { margin-top: 14px; }
.hol-title { font-size: 12.5px; font-weight: 700; color: var(--teal-d); margin-bottom: 6px; }
.hol-item { display: flex; gap: 10px; font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid #f3f4f6; }
.hol-item b { color: #b91c1c; min-width: 44px; }


/* ===== supervisor: team + group selfie ===== */
.team-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tm-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px;
  background: #f9fafb; margin-bottom: 6px; cursor: pointer; }
.tm-row.off { opacity: .55; cursor: default; }
.tm-ck { width: 18px; height: 18px; flex-shrink: 0; }
.tm-name { flex: 1; min-width: 0; }
.tm-name b { display: block; font-size: 13.5px; }
.tm-name small { color: var(--mut); font-size: 11.5px; }
.tm-in { font-size: 13px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.tm-late { color: #b91c1c; font-size: 11px; }
.tm-none { color: #c2c9c7; }
.tm-off { font-size: 11px; color: var(--err); background: #fee2e2; border-radius: 5px; padding: 2px 6px; }
.gs-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.gs-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700;
  color: var(--teal-d); margin-bottom: 10px; }
.gs-types { margin-bottom: 12px; }
#gsPreview { width: 74px; height: 74px; object-fit: cover; border-radius: 12px; border: 2px solid var(--teal); }
.gs-count { font-size: 13px; color: var(--mut); margin: 12px 0; }
.gs-count b { color: var(--teal-d); font-size: 16px; }


/* ===== live camera (only source for punch photos) ===== */
.cam-modal[hidden] { display: none; }
/* full-bleed camera. NOTE: don't centre the box here — `align-items: center`
   collapses it to content height and leaves the bottom half black. */
.cam-modal { position: fixed; inset: 0; z-index: 70; background: #000; display: block; }
.cam-box { position: absolute; inset: 0; display: flex; flex-direction: column; }
#camVideo { flex: 1 1 auto; width: 100%; height: 100%; min-height: 0;
  object-fit: cover; background: #000; display: block; }
.cam-err[hidden] { display: none; }   /* display:flex would beat the hidden attribute */
.cam-err { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fecaca; font-size: 14px; padding: 24px; line-height: 1.5; }
.cam-bar { position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0)); }
.cam-btn { background: none; border: 0; color: #fff; font-size: 14px; font-weight: 700;
  padding: 10px 6px; cursor: pointer; min-width: 64px; }
.cam-shot { width: 68px; height: 68px; border-radius: 50%; background: #fff;
  border: 5px solid rgba(255,255,255,.35); cursor: pointer; flex-shrink: 0; }
.cam-shot:active { transform: scale(.94); }

/* ===== team card on the worker dashboard ===== */
.tc-off { margin-left: auto; font-size: 10.5px; font-weight: 700; color: #b91c1c;
  background: #fee2e2; border-radius: 5px; padding: 2px 7px; }


/* ===== overtime ===== */
.ot-btn { width: 100%; margin-top: 8px; padding: 11px; border: 1.5px solid #fcd9a4;
  background: #fffbeb; color: #92400e; border-radius: 10px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.ot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ot-head b { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: #92400e; }
.ot-hint { font-size: 12px; color: var(--mut); margin-bottom: 12px; line-height: 1.45; }
.ot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ot-slot-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; font-size: 12.5px;
  font-weight: 600; color: var(--ink); cursor: pointer; }
.ot-slot-btn .ot-ic { color: #d97706; }
.ot-slot-btn .ot-time { font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; }
.ot-slot-btn.done { background: #fffbeb; border-color: #fcd34d; }
.ot-slot-btn.done .ot-time { color: #92400e; }
.ot-req { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.ot-req-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700;
  color: #b45309; margin-bottom: 4px; }
.ot-req-list { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.ot-rq { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 7px 10px;
  border-radius: 8px; background: #f9fafb; }
.ot-rq b { min-width: 82px; }
.ot-rq span { flex: 1; font-weight: 700; }
.ot-rq i { font-style: normal; font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }
.ot-rq.pending i { background: #fef3c7; color: #92400e; }
.ot-rq.approved i { background: #dcfce7; color: #166534; }
.ot-rq.rejected i { background: #fee2e2; color: #991b1b; }

.ver-tag { margin-left: 8px; font-size: 11px; opacity: .55; }


/* random location check banner */
.loc-check[hidden] { display: none; }
.loc-check { display: flex; align-items: center; gap: 10px; background: #eef2ff;
  border: 1.5px solid #6366f1; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.lc-txt { flex: 1; min-width: 0; }
.lc-txt b { display: block; font-size: 13.5px; color: #3730a3; }
.lc-txt small { color: #4f46e5; font-size: 11.5px; }
.lc-btn { background: #4f46e5; color: #fff; border: 0; border-radius: 9px; padding: 9px 13px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.lc-btn:disabled { opacity: .6; }


/* team / department report + select-all */
.tm-all { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--teal-d); background: #eef4fb; border: 1.5px solid #cfe0f3; border-radius: 10px;
  padding: 9px 11px; margin-bottom: 8px; cursor: pointer; }
.tm-all input { width: 18px; height: 18px; }
.rep-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rep-head b { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--teal-d); }
.rep-scope { font-size: 11px; color: var(--mut); }
.rep-dates { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.rep-dates input { flex: 1; min-width: 120px; padding: 8px 10px; border: 1.5px solid var(--line);
  border-radius: 9px; font-size: 13px; }
.rep-dates span { color: var(--mut); }

/* ============================================================
   v2.70 — login hero, iconed inputs, department card
   ============================================================ */

/* login header: icon tile + title, replaces the plain heading */
.login-card { padding-top: 18px; }
.login-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lh-ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(31,73,126,.30); }
.lh-title { font-size: 18px; line-height: 1.2; }
.lh-sub { font-size: 12.5px; color: var(--mut); margin-top: 2px; }

/* inputs with a leading glyph */
.in-wrap { position: relative; }
.in-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--teal-l); pointer-events: none; display: flex; }
.search-wrap > .in-ico { z-index: 1; }
.search-input.has-ico { padding-left: 40px; }
.lbl { display: flex; align-items: center; gap: 6px; }
.lbl .ico { color: var(--teal-l); }

/* "sign in by name / by ID" switch */
.login-alt { margin-top: 14px; text-align: center; }
.login-alt a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  color: var(--teal); font-size: 13.5px; font-weight: 700;
  padding: 9px 16px; border-radius: 999px; background: #eef4fb; border: 1.5px solid #cfe0f3; }
.login-alt a:active { background: #dbe7f5; }

/* who you are: department, head of department, position */
.prof-card { border: 1px solid #dbe4ef; border-radius: 14px; background: #fff;
  padding: 4px 13px; margin-bottom: 12px; }
.pc-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.pc-row + .pc-row { border-top: 1px solid #eef2f7; }
.pc-row[hidden] { display: none; }   /* flex would otherwise beat the hidden attribute */
.pc-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #fff; }
.pc-ic.dept { background: var(--grad); }
.pc-ic.head { background: linear-gradient(135deg,#F0324B,#C4102A); }
.pc-ic.pos  { background: linear-gradient(135deg,#5B7FB5,#2E5FA3); }
.pc-txt { min-width: 0; display: flex; flex-direction: column; }
.pc-txt small { font-size: 11px; color: var(--mut); letter-spacing: .2px; }
.pc-txt b { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }

/* extra rows on the merged profile card */
.pc-ic.team { background: linear-gradient(135deg,#7C93B8,#42618F); }
.pc-ic.time { background: linear-gradient(135deg,#3E6FB0,#1F497E); }
.pc-ic.cal  { background: linear-gradient(135deg,#8FA6C4,#5B7FB5); }
.tc-off { margin-left: auto; flex-shrink: 0; font-size: 10.5px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg,#F0324B,#C4102A);
  border-radius: 999px; padding: 3px 9px; }
.tc-off[hidden] { display: none; }

/* profile picture = the most recent selfie */
.me-ava { position: relative; overflow: hidden; }
.me-ava img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; }
.me-ava img[hidden] { display: none; }
.me-ava.has-img { color: transparent; }

/* device location is switched off — in-app prompts cannot fix that */
.gps-help { margin: -4px 0 14px; padding: 11px 13px; border-radius: 12px;
  background: #fff7ed; border: 1px solid #fed7aa; }
.gps-help[hidden] { display: none; }
.gh-head { display: flex; align-items: center; gap: 7px; color: #9a3412;
  font-size: 13px; margin-bottom: 5px; }
.gh-steps { font-size: 12.5px; color: #7c2d12; line-height: 1.5; }

/* team list: the member's latest selfie */
.tm-ava { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; }
.tm-ava img { width: 100%; height: 100%; object-fit: cover; }

/* punching for a colleague: scope note + application form */
.for-other-btn[hidden], .ask-perm-btn[hidden], .perm-req[hidden], .scope-note[hidden] { display: none; }
.scope-note { margin-top: 6px; font-size: 12px; color: var(--mut);
  display: flex; align-items: center; gap: 6px; }
.scope-note .ico { color: var(--teal-l); }
.scope-note b { color: var(--ink); }
.ask-perm-btn { width: 100%; padding: 11px; border: 1.5px solid #d7dee8; background: #fff;
  color: var(--teal-d); border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.perm-req { margin-top: 10px; padding: 12px; border-radius: 12px;
  background: #f6f9fd; border: 1px solid #dbe4ef; }
.pr-hint { font-size: 12.5px; color: var(--mut); margin-bottom: 8px; }
.pr-actions { display: flex; gap: 8px; margin-top: 8px; }
.mini-btn.ghost { background: #fff; }
.pr-status { margin-top: 8px; font-size: 12.5px; }
.pr-pending { color: #92400e; font-weight: 600; }
.pr-no { color: var(--err); font-weight: 600; }

/* approval queue */
.tab-dot { display: inline-block; margin-left: 5px; min-width: 17px; padding: 1px 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; }
.tab-dot[hidden] { display: none; }
.appr-pic { margin-left: auto; color: var(--teal); text-decoration: none; padding: 4px; }

/* requests (transfer / missed punch) + team editing */
.te-lbl { display: block; margin: 10px 0; font-size: 13px; font-weight: 700; color: var(--mut); }
.te-lbl[hidden] { display: none; }   /* display:block above would otherwise beat the hidden attribute */
.te-lbl select, .te-lbl input, .te-lbl textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 11px;
  border: 1.5px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.te-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.te-h { font-size: 12px; font-weight: 800; color: var(--mut); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.te-search { width: 100%; margin-bottom: 6px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 9px; font: inherit; }
.te-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.te-item { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.te-item + .te-item { border-top: 1px solid var(--line); }
.te-item i { display: block; color: var(--mut); font-size: 11.5px; font-style: normal; }
.te-item.in { background: rgba(16, 160, 110, .1); }
.te-item.out { background: rgba(235, 27, 54, .09); text-decoration: line-through; }
.rq-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rq-row:last-child { border-bottom: 0; }
.rq-main { flex: 1; min-width: 0; }
.rq-note { color: var(--mut); font-size: 12.5px; margin-top: 3px; word-break: break-word; }
.rq-badge { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.rq-badge.ok { background: rgba(16, 160, 110, .14); color: #0b7a52; }
.rq-badge.err { background: rgba(235, 27, 54, .12); color: var(--accent); }
.rq-badge.wait { background: rgba(31, 73, 126, .12); color: var(--teal); }
.rq-acts { flex: none; display: flex; flex-direction: column; gap: 5px; }
.rq-acts .mini-btn { padding: 6px 10px; font-size: 12px; }
@media (max-width: 430px) { .te-cols { grid-template-columns: 1fr; } }

/* countdown tag on each punch button */
.type-btn { position: relative; }
.t-left { display: block; min-height: 15px; margin-top: 2px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .2px; color: var(--mut); }
.t-left:empty { display: none; }
.type-btn.is-next .t-left { color: var(--teal); }
.type-btn.is-late .t-left { color: var(--accent); }
.type-btn.is-done { border-color: rgba(16, 160, 110, .45); }
.type-btn.is-done .t-left { color: #0b7a52; }
.type-btn.is-next { box-shadow: 0 0 0 2px rgba(31, 73, 126, .12); }
.type-btn.is-late { border-color: var(--accent); }
