:root {
  --ink: #10241c;
  --muted: #4d665a;
  --paper: #f3efe4;
  --panel: rgba(255, 251, 243, 0.88);
  --line: rgba(16, 36, 28, 0.12);
  --green: #0b3d2e;
  --green-2: #1a6b4f;
  --amber: #c47a1a;
  --rose: #a33b2d;
  --sky: #1f5f8b;
  --ok: #1f7a4d;
  --shadow: 0 18px 50px rgba(11, 61, 46, 0.18);
  --radius: 22px;
  --font-display: "Figtree", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(165deg, #dfe8d8 0%, var(--paper) 42%, #e7dcc8 100%);
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}
.bg-orb-a {
  width: 280px; height: 280px;
  background: #9fc9b0;
  top: -60px; right: -40px;
}
.bg-orb-b {
  width: 220px; height: 220px;
  background: #e2c48a;
  bottom: 10%; left: -70px;
  animation-delay: -4s;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(12px, 18px, 0) scale(1.08); }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.brand { margin-bottom: 22px; animation: rise 0.55s ease both; }
.brand-mark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--green);
}
.brand h1 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 2.8rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.brand-sub { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise 0.6s ease both;
}
.hidden { display: none !important; }

.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: #fffdf8;
  color: var(--ink);
}
input:focus {
  outline: 2px solid rgba(26, 107, 79, 0.35);
  border-color: var(--green-2);
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #f7fff9;
  box-shadow: 0 10px 24px rgba(11, 61, 46, 0.28);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 0.85rem;
}
.btn-masuk { background: var(--green); color: #fff; }
.btn-pulang { background: var(--sky); color: #fff; }
.btn-lembur_mulai, .btn-lembur_pulang { background: var(--amber); color: #fff; }
.btn-libur { background: #5c6b63; color: #fff; }
.btn-sakit { background: var(--rose); color: #fff; }

.who {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.who-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
}
.who-meta { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 36, 28, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.chip.ok { background: rgba(31, 122, 77, 0.12); color: var(--ok); }
.chip.bad { background: rgba(163, 59, 45, 0.12); color: var(--rose); }

.actions {
  display: grid;
  gap: 10px;
}
.actions .btn { min-height: 56px; font-size: 1.05rem; }

.locked {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 36, 28, 0.06);
  color: var(--muted);
}

.timeline {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}
.timeline:empty { display: none; }
.tl-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}
.tl-item strong { text-transform: capitalize; }
.tl-sah { color: var(--ok); }
.tl-ditolak { color: var(--rose); }
.tl-perlu_review { color: var(--amber); }

.emp-btn {
  text-align: left;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  cursor: pointer;
}
.emp-btn:hover { border-color: var(--green-2); }
.hint { margin: 0 0 10px; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  background: var(--ink);
  color: #f7fff9;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 20;
  animation: rise 0.25s ease both;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--rose); }

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

.toast.hidden { display: none !important; }
