/* ==========================================================================
   AuraFace - Luxury Editorial Biometric Attendance System
   Design System: Instrument Serif & Plus Jakarta Sans with Ambient Glow
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f8f6fc;
  --card: rgba(255, 255, 255, 0.82);
  --card-elevated: rgba(255, 255, 255, 0.94);
  --line: rgba(40, 28, 60, 0.09);
  --line-focus: rgba(148, 103, 26, 0.45);
  --ink: #1d1526;
  --ink-secondary: #423850;
  --mute: #6b6178;
  
  --gold: #94671a;
  --gold-light: #b58532;
  --ok: #0d7a58;
  --ok-bg: rgba(13, 122, 88, 0.12);
  --warn: #a65d00;
  --warn-bg: rgba(166, 93, 0, 0.12);
  --bad: #b0324a;
  --bad-bg: rgba(176, 50, 74, 0.12);
  
  --a1: #ffe2b3;
  --a2: #d9ccff;
  --a3: #c5f0de;
  --cta1: #f4d795;
  --cta2: #d6a548;
  
  --sh: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 20px 40px -24px rgba(90, 60, 140, 0.28);
  --sh-sm: 0 1px 2px rgba(40, 28, 60, 0.05), 0 4px 12px rgba(90, 60, 140, 0.06);
  --sh-lg: 0 24px 48px -18px rgba(40, 28, 60, 0.18), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Fira Code', monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --radius-full: 999px;
  
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  height: 100%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  display: flex;
  justify-content: center;
  padding: 16px 14px 64px;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Moving Gradient Background */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(40% 35% at 25% 20%, var(--a1), transparent 70%),
              radial-gradient(45% 40% at 80% 75%, var(--a2), transparent 70%),
              radial-gradient(35% 30% at 85% 12%, var(--a3), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  to {
    transform: translate3d(4%, 3%, 0) rotate(8deg);
  }
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ================= APP SHELL CONTAINER ================= */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: enter 0.9s var(--ease) both;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}

/* ================= TOP BAR ================= */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 0;
}

.who {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.ava {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 21px;
  color: #1d1526;
  background: linear-gradient(140deg, var(--cta1), var(--cta2));
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--line);
  object-fit: cover;
  overflow: hidden;
}

.who b {
  display: block;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.who small {
  display: block;
  color: var(--mute);
  font-size: 12.5px;
  margin-top: 1px;
}

.loc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  color: var(--ink);
}

.loc i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok);
  animation: ping 2.4s infinite;
}

@keyframes ping {
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}

/* ================= TAB NAVIGATION ================= */
.app-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius-full);
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  border-radius: var(--radius-full);
  transition: all 0.25s var(--ease);
}

.tab-btn svg {
  width: 17px;
  height: 17px;
}

.tab-btn.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(40, 28, 60, 0.08);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.35s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= HERO TIME & SHIFT CARD ================= */
.hero {
  border-radius: 34px 34px 34px 12px;
  padding: 22px 22px 20px;
}

.gr {
  font-size: 13.5px;
  color: var(--mute);
  font-weight: 500;
}

.t {
  display: flex;
  align-items: flex-start;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(74px, 22vw, 102px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.t em {
  font-style: normal;
  margin: 0 0.02em;
  color: var(--gold);
  animation: blink 1s steps(2, jump-none) infinite;
}

@keyframes blink {
  50% { opacity: 0.25; }
}

.t small {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--gold);
  margin: 0.55em 0 0 0.45em;
}

.d {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.shift {
  margin-top: 18px;
}

.bar {
  height: 5px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--cta2), var(--cta1));
  transition: width 1.2s var(--ease);
}

.sl {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--mute);
  font-weight: 500;
}

/* ================= SEGMENTED ATTENDANCE SWITCH ================= */
.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  border-radius: var(--radius-full);
  --i: 0;
  --c1: var(--cta1);
  --c2: var(--cta2);
}

.seg[data-m=out] {
  --i: 1;
  --c1: #7fe3bd;
  --c2: #2fae85;
}

.thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 2);
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 20px -10px var(--c2);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 0.55s var(--ease);
}

.seg button {
  position: relative;
  z-index: 1;
  padding: 13px 8px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--mute);
  transition: color 0.35s;
}

.seg button[aria-pressed=true] {
  color: #1d1526;
}

/* ================= CAMERA SCANNER STAGE ================= */
.scan {
  border-radius: 36px;
  padding: 12px 12px 18px;
  --c1: var(--cta1);
  --c2: var(--cta2);
}

.scan[data-m=out] {
  --c1: #7fe3bd;
  --c2: #2fae85;
}

.stage {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 26px;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #ebe5f6);
}

.ph {
  position: absolute;
  inset: 0;
  transition: opacity 0.6s;
  background: radial-gradient(circle at 50% 40%, #dcd3ec 0 15%, transparent 15.5%),
              radial-gradient(ellipse 36% 26% at 50% 86%, #dcd3ec 0 99%, transparent 100%);
}

.stage.cam .ph {
  opacity: 0;
}

video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 0.7s;
  filter: contrast(1.04) saturate(0.95);
}

video.no-mirror {
  transform: scaleX(1);
}

.stage.cam video {
  opacity: 1;
}

canvas#captureCanvas {
  display: none;
}

.ov {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.track {
  fill: none;
  stroke: rgba(40, 28, 60, 0.12);
  stroke-width: 0.6;
}

.ring {
  fill: none;
  stroke: #c8902f;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 2px rgba(200, 144, 47, 0.5));
}

.stage:not(.scan) .ring {
  transition: stroke-dashoffset 0.8s var(--ease);
}

.br {
  fill: none;
  stroke: rgba(40, 28, 60, 0.38);
  stroke-width: 0.9;
  stroke-linecap: round;
  transition: stroke 0.5s;
}

.m {
  opacity: 0;
  transition: opacity 0.5s calc(var(--k) * 45ms);
}

polyline.m {
  fill: none;
  stroke: #c8902f;
  stroke-width: 0.5;
  stroke-linejoin: round;
}

circle.m {
  fill: #c8902f;
}

.mesh .m {
  opacity: 0.95;
}

.ok .ring, .ok polyline.m { stroke: #12a577; }
.ok circle.m { fill: #12a577; }
.ok .br { stroke: #12a577; }

.err .ring, .err polyline.m { stroke: #b0324a; }
.err circle.m { fill: #b0324a; }
.err .br { stroke: #b0324a; }

.sweep {
  position: absolute;
  inset: 0;
  clip-path: ellipse(31% 32% at 50% 48%);
  opacity: 0;
  transition: opacity 0.4s;
}

.scan .sweep {
  opacity: 1;
}

.sweep i {
  position: absolute;
  left: 0;
  right: 0;
  top: -14%;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(200, 144, 47, 0.35));
  border-bottom: 1.5px solid #c8902f;
  box-shadow: 0 6px 18px rgba(200, 144, 47, 0.4);
  animation: beam 1.7s ease-in-out infinite alternate;
}

@keyframes beam {
  to { transform: translateY(213%); }
}

.chip, .badge {
  position: absolute;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(40, 28, 60, 0.08);
  color: var(--ink);
}

.badge { left: 14px; }
.badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12a577;
}

.stage.scan .badge i {
  background: #c8902f;
  animation: ping 1.2s infinite;
  box-shadow: 0 0 0 0 #c8902f;
}

.chip {
  right: 14px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.3s;
}

.scan .chip, .ok .chip {
  opacity: 1;
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 16px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(to top, rgba(248, 246, 252, 0.95), transparent);
}

/* Camera Action Utilities (Flip Camera / Device Selector) */
.camera-toolbar {
  position: absolute;
  bottom: 56px;
  right: 14px;
  z-index: 10;
  display: flex;
  gap: 6px;
}

.btn-cam-tool {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(40, 28, 60, 0.12);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: all 0.2s var(--ease);
}

.btn-cam-tool:hover {
  transform: scale(1.08);
  background: #ffffff;
}

.btn-cam-tool svg {
  width: 19px;
  height: 19px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 14px 4px 0;
}

.steps li {
  position: relative;
  padding-top: 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mute);
  transition: color 0.4s;
  text-align: center;
}

.steps li::before, .steps li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
}

.steps li::after {
  background: linear-gradient(90deg, var(--c2), var(--c1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}

.steps li.on {
  color: var(--ink);
}

.steps li.on::after {
  transform: scaleX(1);
}

.go {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 16px 0 0;
  padding: 17px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 16px;
  color: #1d1526;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 12px 26px -12px var(--c2), 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  transition: transform 0.25s var(--ease), filter 0.3s;
}

.go::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: shine 4.5s ease-in-out infinite;
}

@keyframes shine {
  0%, 70% { left: -60%; }
  100% { left: 130%; }
}

.go:hover { filter: brightness(1.05); }
.go:active { transform: scale(0.975); }

.go:disabled {
  cursor: default;
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  filter: none;
}

.go:disabled::before { display: none; }

.go .fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c2), var(--c1));
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  opacity: 0;
}

.go:disabled .fill { opacity: 1; }
.go span { position: relative; }

.note {
  font-size: 12.5px;
  color: var(--mute);
  text-align: center;
  margin-top: 12px;
}

/* ================= ATTENDANCE TICKET RESULT ================= */
.ticket {
  display: none;
  border-radius: 30px 30px 30px 90px;
  padding: 22px 22px 20px;
}

.ticket.show {
  display: block;
  animation: pop 0.7s var(--ease);
}

@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tk {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chk {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 14%, transparent);
}

.chk circle, .chk path {
  fill: none;
  stroke: var(--ok);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
}

.show .chk circle { animation: dr 0.7s var(--ease) forwards; }
.show .chk path { animation: dr 0.5s 0.45s var(--ease) forwards; }

@keyframes dr {
  to { stroke-dashoffset: 0; }
}

.tk small {
  display: block;
  font-size: 12.5px;
  color: var(--mute);
  font-weight: 500;
}

.tk h3 {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
  color: var(--ink);
}

.big {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 16px 0 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.st {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ok);
  background: color-mix(in srgb, currentColor 13%, transparent);
}

.st.late {
  color: var(--warn);
}

.st.bad {
  color: var(--bad);
}

.row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}

.row:first-of-type { margin-top: 14px; }
.row span:first-child { color: var(--mute); }
.row span:last-child { font-weight: 700; color: var(--ink); }

/* ================= SECTION STATS & LOGS ================= */
.sec h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 6px 2px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--ink);
}

.sec h2 small {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--mute);
  font-weight: 500;
  letter-spacing: 0;
}

.sum {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.sum div {
  padding: 14px 14px 15px;
}

.sum div:nth-child(1) { border-radius: 24px 24px 24px 8px; color: var(--ok); }
.sum div:nth-child(2) { border-radius: 24px 24px 8px 24px; color: var(--warn); }
.sum div:nth-child(3) { border-radius: 8px 24px 24px 24px; color: var(--gold); }

.sum span {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mute);
}

.sum b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.05;
  margin: 4px 0 8px;
  color: var(--ink);
}

.sum b.bump {
  animation: bump 0.6s var(--ease);
}

@keyframes bump {
  40% { transform: scale(1.22); color: currentColor; }
}

.sum i {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.sum i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w, 0%);
  background: currentColor;
  border-radius: 4px;
  transition: width 1s var(--ease);
}

.log {
  list-style: none;
  padding: 6px 16px;
  border-radius: 28px;
}

.log li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.log li:last-child {
  border: 0;
}

.ic {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--ok);
  background: color-mix(in srgb, currentColor 13%, transparent);
}

.ic.out { color: var(--gold); }
.ic.late { color: var(--warn); }

.ic svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.log b {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.log small {
  display: block;
  color: var(--mute);
  font-size: 12.5px;
  margin-top: 2px;
}

.log time {
  font-family: var(--serif);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.log li.new {
  animation: hl 1.6s var(--ease);
}

@keyframes hl {
  from { background: color-mix(in srgb, var(--gold) 18%, transparent); transform: translateX(-6px); }
}

/* ================= TAB 2: RIWAYAT LENGKAP ================= */
.filter-card {
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-row {
  display: flex;
  gap: 8px;
}

.input-box, .select-box {
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.input-box:focus, .select-box:focus {
  border-color: var(--gold);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s var(--ease);
}

.btn-pill-primary {
  background: linear-gradient(135deg, var(--cta1), var(--cta2));
  color: #1d1526;
  box-shadow: 0 4px 14px rgba(214, 165, 72, 0.25);
}

.btn-pill-secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.history-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hist-card {
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hist-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hist-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hist-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--line);
}

.hist-name {
  font-weight: 700;
  font-size: 14.5px;
}

.hist-meta {
  font-size: 12px;
  color: var(--mute);
}

.hist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.hist-grid small {
  display: block;
  color: var(--mute);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.hist-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  font-size: 12px;
}

/* ================= TAB 3: KARYAWAN ================= */
.users-hero {
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.emp-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emp-card {
  border-radius: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.emp-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.emp-left img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(40, 28, 60, 0.1);
}

.emp-name {
  font-weight: 700;
  font-size: 15px;
}

.emp-dept {
  font-size: 12px;
  color: var(--mute);
  margin-top: 2px;
}

/* ================= TAB 4: PENGATURAN ================= */
.settings-card {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
}

.setting-desc {
  font-size: 12px;
  color: var(--mute);
  margin-top: -2px;
}

/* ================= MODAL & TOAST ================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(29, 21, 38, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 16px;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: enter 0.3s var(--ease);
}

.modal-box {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-head {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 800;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg);
}

.toast-container {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: rgba(29, 21, 38, 0.9);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(29, 21, 38, 0.2);
  animation: pop 0.3s var(--ease);
}

/* ================= ADMIN & RE-ENROLLMENT UI ================= */
.admin-lock-card {
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lock-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cta1), var(--cta2));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(214, 165, 72, 0.35);
  color: #1d1526;
}

.lock-icon-circle svg {
  width: 28px;
  height: 28px;
}

.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
}

.subtabs-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: rgba(40, 28, 60, 0.05);
  border-radius: var(--radius-full);
}

.subtab-btn {
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mute);
  border-radius: var(--radius-full);
  text-align: center;
  transition: all 0.2s var(--ease);
}

.subtab-btn.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(40, 28, 60, 0.08);
}

.alert-warning-box {
  background: rgba(166, 93, 0, 0.1);
  border: 1px solid rgba(166, 93, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: #783d00;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.alert-warning-box svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--warn);
}

.recreate-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(214, 165, 72, 0.12);
  border: 1px dashed var(--cta2);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.recreate-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .chk circle, .chk path {
    stroke-dashoffset: 0;
  }
}
