:root {
  --ink: #1f1b3a;
  --muted: #635f82;
  --line: rgba(99, 95, 130, 0.15);
  --indigo: #4f46e5;
  --violet: #8b5cf6;
  --glass: rgba(255, 255, 255, 0.44);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --radius: 20px;
  --shadow: 0 24px 56px -34px rgba(79, 70, 229, 0.55);
  --glow-border: rgba(255, 255, 255, 0.7);
  --glow: 0 0 30px -8px rgba(139, 92, 246, 0.45);
  --blur: blur(26px) saturate(185%);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #f3f0ff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 4%, rgba(139, 92, 246, 0.42), transparent 44%),
    radial-gradient(circle at 92% 8%, rgba(56, 189, 248, 0.34), transparent 42%),
    radial-gradient(circle at 76% 94%, rgba(244, 114, 182, 0.3), transparent 46%),
    radial-gradient(circle at 22% 78%, rgba(99, 102, 241, 0.22), transparent 44%),
    linear-gradient(160deg, #f7f3ff, #ece5ff 52%, #f4efff);
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; letter-spacing: 0.01em; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7c74b8;
}

/* ---------------------------------------------------------------- brand */
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  box-shadow: 0 12px 24px -14px rgba(79, 70, 229, 0.9);
  flex: 0 0 auto;
}
.brand-mark.large { width: 56px; height: 56px; border-radius: 18px; font-size: 18px; }

/* ---------------------------------------------------------------- glass */
.card {
  position: relative;
  background: linear-gradient(152deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
  border: 1px solid var(--glow-border);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow),
    var(--glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 22px;
}
/* garis cahaya tipis di tepi atas card */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(139, 92, 246, 0.35) 45%, rgba(56, 189, 248, 0.28) 75%, rgba(255, 255, 255, 0.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}
.card > * { position: relative; z-index: 1; }
.card.tight { padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }

/* ---------------------------------------------------------------- login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 18px;
  padding: 28px;
}
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-demo {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.chip:hover { color: var(--indigo); border-color: rgba(79, 70, 229, 0.35); }
.hint { font-size: 12.5px; color: #b91c1c; min-height: 1px; }

/* --------------------------------------------------------------- layout */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 24px;
  padding: 24px;
  max-width: 1460px;
  margin: 0 auto;
  align-items: start;
}
.content { min-width: 0; }

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.topbar h1 { font-size: 26px; }
.topbar-title { display: grid; gap: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* -------------------------------------------------------------- sidebar */
.sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.38));
  border: 1px solid var(--glow-border);
  border-radius: 24px;
  box-shadow: var(--shadow), var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  overflow: auto;
}
.sidebar-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 14px; border-bottom: 1px dashed var(--line); }
.sidebar-head strong { display: block; font-size: 14.5px; }
.sidebar-head span { display: block; }

.nav { display: grid; gap: 4px; }
.nav-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #8b84bd;
  padding: 4px 10px 8px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #4a466b;
  font-size: 13.5px;
  font-weight: 550;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.nav a svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: 0.75; }
.nav a:hover { background: rgba(255, 255, 255, 0.75); color: var(--indigo); }
.nav a.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(139, 92, 246, 0.95));
  color: #fff;
  box-shadow: 0 14px 24px -16px rgba(79, 70, 229, 0.95);
}
.nav a.active svg { opacity: 1; }

.sidebar-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line); }
.me-box { display: flex; align-items: center; gap: 10px; }
.me-box .who { display: grid; min-width: 0; }
.me-box .who strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-box .who span { font-size: 11.5px; color: var(--muted); }

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 58, 0.32);
  backdrop-filter: blur(2px);
  z-index: 50;
}
.backdrop.show { display: block; }

.only-mobile { display: none; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}

/* ------------------------------------------------------------- controls */
.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  flex-wrap: wrap;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.segmented button.active {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  box-shadow: 0 10px 20px -14px rgba(79, 70, 229, 0.95);
}

.field { display: grid; gap: 6px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 550; color: var(--ink); cursor: pointer; }
.checkbox input { width: auto; accent-color: var(--indigo); }
.field > span, .field > label { font-size: 12px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(99, 95, 130, 0.18);
  border-radius: 12px;
  padding: 11px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7c74b8 50%), linear-gradient(135deg, #7c74b8 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { resize: vertical; min-height: 44px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  box-shadow: 0 14px 26px -16px rgba(79, 70, 229, 0.95);
}
.btn.primary:hover { box-shadow: 0 18px 30px -16px rgba(79, 70, 229, 0.95); }
.btn.ghost { background: rgba(255, 255, 255, 0.78); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: rgba(79, 70, 229, 0.4); color: var(--indigo); }
.btn.danger { background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.28); color: #be123c; }
.btn.danger:hover { background: rgba(244, 63, 94, 0.16); }
.btn.small { padding: 8px 13px; font-size: 12.5px; border-radius: 10px; }
.btn.tiny { padding: 6px 10px; font-size: 11.5px; border-radius: 9px; }

/* ------------------------------------------------------------------ kpi */
.flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 16px;
}
.flow-step {
  flex: 1 0 120px;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.flow-step span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.flow-step strong { font-size: 20px; letter-spacing: -0.02em; }
.flow-step.done { background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(79, 70, 229, 0.1)); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(292px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.kpi { display: grid; gap: 10px; padding: 20px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(79, 70, 229, 0.1);
  color: var(--indigo);
}
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-value { font-size: 32px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.kpi-value small { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.kpi-sub { font-size: 12px; color: var(--muted); line-height: 1.45; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

.section { margin-top: 34px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 17px; }
.section-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.4);
}
tbody td { padding: 12px 16px; border-bottom: 1px solid rgba(99, 95, 130, 0.09); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.45); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cell-main { font-weight: 650; }
.cell-sub { font-size: 11.5px; color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
  white-space: nowrap;
}
.badge[data-stage="desain"] { background: rgba(139, 92, 246, 0.14); color: #6d28d9; }
.badge[data-stage="produksi"] { background: rgba(79, 70, 229, 0.12); color: #4338ca; }
.badge[data-stage="operator"] { background: rgba(14, 165, 233, 0.14); color: #0369a1; }
.badge[data-stage="qc"] { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.badge[data-stage="packing"] { background: rgba(236, 72, 153, 0.14); color: #be185d; }
.badge[data-stage="done"] { background: rgba(16, 185, 129, 0.15); color: #047857; }
.badge.soft { background: rgba(99, 95, 130, 0.1); color: var(--muted); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 750;
  color: var(--indigo);
  background: rgba(79, 70, 229, 0.12);
  flex: 0 0 auto;
}
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .who { display: grid; min-width: 0; }
.person .who strong { font-size: 13px; font-weight: 650; }
.person .who span { font-size: 11px; color: var(--muted); }

.empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed rgba(99, 95, 130, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
}
.empty strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-tile {
  padding: 16px 18px; border-radius: 15px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 22px -12px rgba(139, 92, 246, 0.5);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.stat-tile span { display: block; font-size: 11.5px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.stat-tile strong { font-size: 24px; letter-spacing: -0.02em; }
.stat-tile em { font-style: normal; font-size: 11.5px; color: var(--muted); display: block; margin-top: 3px; }

.staff-list { display: grid; gap: 2px; }
.staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px dashed rgba(99, 95, 130, 0.14);
}
.staff-row:last-child { border-bottom: 0; }
.staff-row .val { text-align: right; }
.staff-row .val strong { font-size: 15px; letter-spacing: -0.02em; }
.staff-row .val span { display: block; font-size: 11px; color: var(--muted); }

.div-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.div-card-head h3 { font-size: 14.5px; }
.div-card-head .totals { font-size: 11.5px; color: var(--muted); text-align: right; }

.mini { padding: 7px 9px; border-radius: 9px; font-size: 12.5px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .field { min-width: 130px; flex: 1 1 120px; }
.inline-form .btn { flex: 0 0 auto; }

.scan-box {
  display: grid;
  gap: 14px;
  background: linear-gradient(140deg, rgba(79, 70, 229, 0.1), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  padding: 18px;
}
.scan-input {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
}
.scan-note { font-size: 11.5px; color: var(--muted); }

.thumb {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(99, 95, 130, 0.18);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty { font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; color: #8b84bd; }
.upload-cell { display: flex; align-items: center; gap: 8px; }
.upload-cell .js-jpeg { width: 132px; font-size: 11px; padding: 4px; }
.upload-cell.busy { opacity: 0.6; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; }
.detail-item { display: grid; gap: 3px; min-width: 0; }
.detail-item > span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8b84bd; }
.detail-item > strong { font-size: 13.5px; font-weight: 620; word-break: break-word; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  padding: 13px 20px;
  border-radius: 14px;
  background: rgba(31, 27, 58, 0.94);
  color: #fff;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: 0 22px 40px -22px rgba(31, 27, 58, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(190, 18, 60, 0.96); }
.toast.ok { background: rgba(5, 150, 105, 0.96); }

/* ---------------------------------------------------------------- modal */
/* Modal: overlay & kartu harus SELALU bisa di-scroll.
   Sebelumnya kartu tanpa max-height/overflow → form panjang (mis. Bahan Baru di
   Sistem HPP) terpotong dan tombol Simpan tidak terjangkau di layar HP. */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 58, 0.36);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 150;
}
.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.74));
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 28px 60px -30px rgba(31, 27, 58, 0.7);
  padding: 22px;
  display: grid;
  gap: 16px;
  margin: auto; /* aman: saat kartu lebih tinggi dari layar, margin jadi 0 */
  flex: 0 0 auto;
}
.modal-card h3 { font-size: 17px; }
/* aksi modal menempel di bawah kartu supaya tombol Simpan selalu terlihat */
.modal-card .modal-actions {
  position: sticky;
  bottom: -22px;
  z-index: 2;
  margin: 0 -22px -22px;
  padding: 13px 22px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.97) 55%, rgba(255, 255, 255, 0.82));
  border-top: 1px solid rgba(99, 95, 130, 0.14);
  border-radius: 0 0 19px 19px;
  backdrop-filter: blur(8px);
}
body.modal-open { overflow: hidden; }
/* form lebar di dalam modal (Sistem HPP) */
.modal-card:has(.sys-form) { max-width: 720px; }
.modal-card:has(.sys-form) .form-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.two-col { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }

.notice {
  padding: 13px 16px;
  border-radius: 13px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.18);
  font-size: 12.5px;
  color: #4338ca;
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; padding: 16px; gap: 0; }
  .only-mobile { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 286px;
    border-radius: 22px 0 0 22px;
    transform: translateX(105%);
    transition: transform 0.24s ease;
    z-index: 60;
  }
  .sidebar.open { transform: none; }
  .topbar h1 { font-size: 22px; }
  .kpi-grid { gap: 14px; }
  .card { padding: 18px; }
}
@media (max-width: 560px) {
  .modal-overlay { padding: 10px; }
  .modal-card {
    max-width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
    border-radius: 18px;
    margin: auto 0 0; /* sheet menempel di bawah */
  }
  .modal-card .modal-actions {
    bottom: -16px;
    margin: 0 -16px -16px;
    padding: 11px 16px;
    border-radius: 0 0 17px 17px;
  }
  .modal-card .modal-actions .btn { flex: 1 1 auto; justify-content: center; }
  .modal-card :is(input, select, textarea) { font-size: 16px; } /* cegah zoom otomatis iOS */
  .topbar-actions { width: 100%; justify-content: space-between; }
  .segmented { width: 100%; justify-content: space-between; }
  .segmented button { flex: 1; padding: 8px 6px; font-size: 11.5px; }
  .kpi-value { font-size: 28px; }
  .two-col { grid-template-columns: 1fr; }
  h1 { font-size: 21px !important; }
}

/* grid khusus daftar pilihan di Pengaturan System */
.form-grid.lists { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.form-grid.lists textarea { min-height: 96px; font-size: 13px; line-height: 1.5; }

/* ---- ambil kerjaan / hak akses / realtime ---- */
.row-mine { background: rgba(79, 70, 229, 0.05); }
.row-mine td:first-child { box-shadow: inset 3px 0 0 var(--indigo); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 6px; }
.perm-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(99, 95, 130, 0.16);
  font-size: 12.5px; font-weight: 550; color: var(--ink); cursor: pointer;
}
.perm-item input { width: auto; accent-color: var(--indigo); }
.perm-item:has(input:checked) { border-color: rgba(79, 70, 229, 0.45); background: rgba(79, 70, 229, 0.08); }
.chip-static { cursor: default; background: rgba(79, 70, 229, 0.09); color: #4338ca; border-color: transparent; }
/* Sistem HPP: filter kategori aktif + daftar angka ringkas */
.chip-active {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 20px -14px rgba(79, 70, 229, 0.95);
}
.stats-rows { display: grid; gap: 8px; font-size: 13px; }
.stats-rows .flex-between { padding: 6px 0; border-bottom: 1px dashed rgba(99, 95, 130, 0.18); }
#sys-body .item-row { align-items: end; }
#sys-body .card { margin-bottom: 0; }
#sys-body > * + * { margin-top: 20px; }
.subcard {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.42);
}
#sys-body .notice { border-radius: 12px; }

.sync-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(79, 70, 229, 0.35);
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca; font-family: inherit; font-size: 12px; font-weight: 650;
  padding: 8px 13px; border-radius: 999px; cursor: pointer;
  animation: pulse-soft 1.8s ease-in-out infinite;
}
.sync-chip svg { width: 14px; height: 14px; }
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.62; } }
@media (max-width: 560px) { .perm-grid { grid-template-columns: 1fr; } }

/* ---- tombol salin ---- */
.copyable { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.copy-btn {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; flex: 0 0 auto;
  padding: 0; border-radius: 7px; cursor: pointer;
  border: 1px solid rgba(99, 95, 130, 0.22);
  background: rgba(255, 255, 255, 0.8);
  color: #7c74b8;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.copy-btn svg { width: 12px; height: 12px; }
.copy-btn:hover { color: var(--indigo); border-color: rgba(79, 70, 229, 0.45); background: rgba(79, 70, 229, 0.08); }
.copy-btn.copied { color: #047857; border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.12); }
.file-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }

/* ---- revisi ---- */
.badge-revisi { background: rgba(245, 158, 11, 0.18); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.35); }
.btn.warn { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.38); color: #b45309; }
.btn.warn:hover { background: rgba(245, 158, 11, 0.22); }
.revisi-notice {
  display: grid; gap: 10px; margin-bottom: 20px; padding: 16px 18px;
  border-radius: 15px;
  background: linear-gradient(140deg, rgba(245, 158, 11, 0.13), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.32);
}
.revisi-notice-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.revisi-notice-head strong { font-size: 13.5px; }
.revisi-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.revisi-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 9px 12px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
}

/* ---- QC kamera scan ---- */
.qc-scan-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qc-cam { position: relative; border-radius: 15px; overflow: hidden; background: #1f1b3a; max-width: 460px; }
.qc-cam video { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; }
.qc-cam-frame {
  position: absolute; inset: 18% 10%; border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 999px rgba(31, 27, 58, 0.28);
  pointer-events: none;
}
.qc-result { border-top: 1px dashed var(--line); padding-top: 16px; }
.qc-result-grid { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 20px; align-items: start; }
.qc-file { display: grid; gap: 10px; }
.qc-file img {
  width: 100%; height: auto; border-radius: 12px; display: block;
  border: 1px solid rgba(99, 95, 130, 0.18);
  background: rgba(255, 255, 255, 0.7);
}
@media (max-width: 900px) { .qc-result-grid { grid-template-columns: 1fr; } }

/* ---- Data Di WA ---- */
.cell-wa { max-width: 220px; }
.wa-text {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

/* ---- kamera QC (Code 128) ---- */
#qc-cam-wrap.qc-cam { max-width: 560px; width: 100%; }
#qc-cam-wrap video { max-height: 62vh; }
.qc-live-badge {
  position: absolute; left: 10px; top: 10px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(15, 12, 40, 0.72); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
}
.qc-live-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: live-dot 1.6s infinite;
}
@keyframes live-dot {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.qc-lastscan {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: 12px; font-size: 13px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(99, 95, 130, 0.2);
}
.qc-lastscan.tone-ok { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.09); }
.qc-lastscan.tone-err { border-color: rgba(244, 63, 94, 0.45); background: rgba(244, 63, 94, 0.09); }
#qc-cam-status.tone-ok { color: #047857; font-weight: 600; }
#qc-cam-status.tone-err { color: #be123c; font-weight: 600; }
.qc-recent { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qc-result:empty { display: none; }
.qc-notice {
  padding: 11px 14px; border-radius: 12px; font-size: 13px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 95, 130, 0.2);
}
.qc-notice.tone-err { border-color: rgba(244, 63, 94, 0.45); background: rgba(244, 63, 94, 0.09); color: #9f1239; }
.qc-notice.tone-ok { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.09); color: #047857; }

/* kamera QC: penuh di layar HP supaya leluasa saat memindai */
@media (max-width: 640px) {
  #qc-cam-wrap.qc-cam { max-width: 100%; width: 100%; border-radius: 14px; }
  #qc-cam-wrap video { max-height: 52vh; }
  .scan-box { padding: 14px; }
  .qc-live-badge { font-size: 10.5px; padding: 5px 9px; }
}

/* ---- kolom nomor resi (Divisi QC) ---- */
.resi-cell { display: grid; gap: 4px; }
.js-no-resi {
  width: 150px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.js-no-resi::placeholder { text-transform: none; letter-spacing: 0; font-family: Inter, system-ui, sans-serif; }
.js-no-resi.is-error { border-color: rgba(244, 63, 94, 0.75); background: rgba(244, 63, 94, 0.05); }
.resi-state { font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); min-height: 12px; }
.resi-state.is-saved { color: #047857; }
.resi-state.is-busy { color: #7c74b8; }
.resi-state.is-error { color: #be123c; }
@media (max-width: 560px) { .js-no-resi { width: 116px; } }

/* ---- multi item pesanan ---- */
.item-list { display: grid; gap: 14px; }
.item-row {
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(99, 95, 130, 0.16);
}
.item-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.item-detail { display: grid; gap: 6px; }
.item-detail-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(99, 95, 130, 0.12);
}
.item-no {
  width: 20px; height: 20px; flex: 0 0 auto; border-radius: 6px;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  background: rgba(79, 70, 229, 0.12); color: var(--indigo);
}
.item-main { flex: 1 1 auto; min-width: 0; display: grid; font-size: 12.5px; }
.item-qty { flex: 0 0 auto; font-size: 13px; }

/* ---- operator: item bold ---- */
.op-items { display: grid; gap: 8px; }
.op-item { display: grid; gap: 3px; padding-bottom: 6px; border-bottom: 1px dashed rgba(99, 95, 130, 0.14); }
.op-item:last-child { border-bottom: 0; padding-bottom: 0; }
.op-item-produk { font-weight: 400; font-size: 13px; }
.op-item-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.op-strong { font-weight: 750; font-size: 13px; letter-spacing: -0.01em; }
.op-normal { font-weight: 400; font-size: 13.5px; }

/* ---- tempel JPEG ---- */
.upload-actions { display: grid; gap: 5px; }
.upload-cell { padding: 6px; border-radius: 12px; border: 1px dashed transparent; }
.upload-cell.is-paste-active { border-color: rgba(79, 70, 229, 0.55); background: rgba(79, 70, 229, 0.06); }
.upload-cell.busy { opacity: 0.65; }
@media (max-width: 640px) { .upload-actions .js-jpeg { width: 112px; } }

/* ---- operator: kolom item dipisah, satu baris per item ---- */
.op-cell-produk { min-width: 130px; }
.op-produk { font-weight: 400; font-size: 13px; }
table td[rowspan] { vertical-align: top; }
tr.op-row-more > td { background: rgba(79, 70, 229, 0.03); }
tr.op-row-more > td:first-child { box-shadow: inset 2px 0 0 rgba(79, 70, 229, 0.16); }

/* operator: kolom produk bold & jpeg rapi */
.op-produk-bold { font-weight: 750 !important; font-size: 13px; }
.op-cell-jpeg { width: 70px; }

/* ================= overview: grafik tren & leaderboard ================= */
.grid-trend { grid-template-columns: 1fr; }
.trend-wrap { margin-top: 6px; }
.trend-chart { width: 100%; height: clamp(190px, 26vh, 280px); display: block; overflow: visible; }
.chart-axis { font-size: 9.5px; fill: #8b84bd; font-family: Inter, system-ui, sans-serif; }
.chart-dot { stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.2; }
.chart-dot.is-created { fill: #4f46e5; }
.chart-dot.is-done { fill: #10b981; }
.chart-dot:hover { r: 5; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.dot-line { width: 18px; height: 0; border-top-width: 3px; border-top-style: solid; border-radius: 3px; }
.dot-line.created { border-color: #4f46e5; }
.dot-line.done { border-color: #10b981; border-top-style: dashed; }
.trend-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.trend-stat {
  padding: 12px 15px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.72);
}
.trend-stat span { display: block; font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: #8b84bd; }
.trend-stat strong { font-size: 21px; letter-spacing: -0.02em; }
.trend-stat em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 5px; }

.leaderboard-grid { align-items: start; }
.rank-list { display: grid; gap: 12px; }
.rank-row { display: flex; align-items: flex-start; gap: 12px; }
.rank-no {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center; font-size: 12px; font-weight: 750;
  background: rgba(99, 95, 130, 0.12); color: var(--muted);
}
.rank-no.rank-1 { background: linear-gradient(135deg, #4f46e5, #8b5cf6); color: #fff; box-shadow: 0 6px 14px -8px rgba(79, 70, 229, 0.9); }
.rank-no.rank-2 { background: rgba(139, 92, 246, 0.2); color: #6d28d9; }
.rank-no.rank-3 { background: rgba(56, 189, 248, 0.2); color: #0369a1; }
.rank-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 5px; }
.rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rank-top strong { font-size: 13.5px; }
.rank-val { font-size: 12.5px; font-weight: 650; color: var(--indigo); white-space: nowrap; }
.rank-val em { font-style: normal; color: var(--muted); font-weight: 500; }
.rank-bar { height: 7px; border-radius: 999px; background: rgba(99, 95, 130, 0.12); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4f46e5, #8b5cf6); }
.rank-cell { width: 40px; }
@media (max-width: 640px) {
  .trend-chart { height: 190px; }
  .rank-top { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ================= laporan & preview dokumen ================= */
.report-filters {
  display: grid; grid-template-columns: minmax(180px, 220px) minmax(200px, 1fr) auto;
  gap: 14px; align-items: end;
}
@media (max-width: 720px) { .report-filters { grid-template-columns: 1fr; } }

.doc-modal { display: grid; gap: 8px; min-width: 0; }
.modal-card.modal-wide { max-width: min(1040px, 96vw); }
.doc-view {
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(99, 95, 130, 0.18);
  background: rgba(255, 255, 255, 0.6);
}
.doc-frame { width: 100%; height: min(70vh, 720px); border: 0; display: block; background: #fff; }
.doc-image { display: grid; place-items: center; padding: 10px; max-height: 74vh; overflow: auto; }
.doc-image img { max-width: 100%; height: auto; border-radius: 10px; display: block; }

.doc-pick { position: relative; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.doc-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.doc-pick.busy { opacity: 0.6; pointer-events: none; }
.doc-pick svg { width: 13px; height: 13px; }

.doc-chip { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.doc-chip-name {
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt-8 { margin-top: 8px; }

/* ================= modul HPP & Biaya ================= */
.hpp-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.hpp-kpi {
  padding: 14px 16px; border-radius: 15px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 0 22px -14px rgba(139, 92, 246, 0.55);
}
.hpp-kpi span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #8b84bd; }
.hpp-kpi strong { display: block; font-size: 22px; letter-spacing: -0.02em; margin-top: 2px; }
.hpp-kpi em { font-style: normal; font-size: 11px; color: var(--muted); }
.hpp-warn {
  margin-top: 14px; padding: 12px 15px; border-radius: 13px; font-size: 12.5px;
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); color: #92400e;
  display: grid; gap: 4px;
}
tr.row-off td { opacity: 0.45; }
tr.row-off td:first-child { text-decoration: line-through; }
.tinta-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18); vertical-align: middle; margin-right: 3px;
}
.tinta-dot[data-warna="cyan"] { background: #06b6d4; }
.tinta-dot[data-warna="magenta"] { background: #ec4899; }
.tinta-dot[data-warna="yellow"] { background: #facc15; }
.tinta-dot[data-warna="black"] { background: #1f2937; }
.tinta-dot[data-warna="custom"] { background: linear-gradient(135deg, #f59e0b, #8b5cf6); }

.donut-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.hpp-donut { width: 100%; max-width: 200px; height: auto; }
.donut-label { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; fill: #8b84bd; }
.donut-value { font-size: 12.5px; font-weight: 750; fill: var(--ink); }
.legend-list { display: grid; gap: 6px; }
.legend-row { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 8px; font-size: 12px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-name { color: var(--ink); }
.legend-val { font-weight: 650; font-variant-numeric: tabular-nums; }
.legend-pct { color: var(--muted); font-size: 11px; min-width: 42px; text-align: right; }
@media (max-width: 900px) { .donut-wrap { grid-template-columns: 1fr; } .hpp-donut { margin: 0 auto; } }

/* ================= stok bahan & daftar produk ================= */
tr.row-low td { background: rgba(244, 63, 94, 0.05); }
tr.row-low td:nth-child(3) { box-shadow: inset 3px 0 0 #f43f5e; }
#stock-body .stat-tiles { gap: 14px; }
.produk-bahan-box { margin-top: 10px; }

/* ================= deadline ================= */
.badge-late { background: rgba(244, 63, 94, 0.16); color: #be123c; border: 1px solid rgba(244, 63, 94, 0.4); font-weight: 700; }
.badge-today { background: rgba(245, 158, 11, 0.18); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.4); font-weight: 700; }
.badge-done { background: rgba(16, 185, 129, 0.15); color: #047857; }
.badge-soft { background: rgba(99, 95, 130, 0.12); color: var(--muted); }
.card-late { border-color: rgba(244, 63, 94, 0.45) !important; box-shadow: var(--shadow), 0 0 34px -12px rgba(244, 63, 94, 0.5) !important; }
.card-late::before {
  background: linear-gradient(140deg, rgba(244, 63, 94, 0.75), rgba(255, 255, 255, 0.9) 45%, rgba(251, 146, 60, 0.6)) !important;
}
tr.row-late td { background: rgba(244, 63, 94, 0.055); }
tr.row-late td:first-child { box-shadow: inset 3px 0 0 #f43f5e; }

/* ================= multi baris (pesanan >1 item) ================= */
tr.item-first td { border-bottom: 0 !important; vertical-align: top; }
tr.item-first td[rowspan] { border-bottom: 1px solid rgba(99, 95, 130, 0.09) !important; }
tr.item-more > td { background: rgba(79, 70, 229, 0.03); }
tr.item-more > td:first-child { box-shadow: inset 2px 0 0 rgba(79, 70, 229, 0.22); }
tr.item-more td { border-bottom: 0 !important; }
tr.item-more.item-last td { border-bottom: 1px solid rgba(99, 95, 130, 0.14) !important; }

/* operator: baris per item (pengambilan kerja dipisah) */
tr.op-item-row td { vertical-align: top; }
tr.op-item-row + tr.op-item-row td { border-top: 1px dashed rgba(99, 95, 130, 0.14); }

/* ================= Kepegawaian: kartu pegawai & kamera wajah ================= */
.hrm-card-preview { display: grid; place-items: center; padding: 18px 0; }
.hrm-kartu {
  width: 100%; max-width: 360px; padding: 16px 18px;
  border-radius: 16px; background: linear-gradient(150deg, #fff, #f3f0ff);
  border: 1px solid rgba(99, 95, 130, 0.22);
  box-shadow: 0 18px 40px -28px rgba(31, 27, 58, 0.55);
}
.hrm-kartu-head { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(99, 95, 130, 0.18); padding-bottom: 8px; }
.hrm-kartu-head span { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #4f46e5; }
.hrm-kartu-head b { font-size: 9px; letter-spacing: 0.14em; color: #6b6785; }
.hrm-kartu-body { display: flex; gap: 12px; margin-top: 12px; }
.hrm-kartu-body img, .hrm-kartu-photo {
  width: 62px; height: 78px; border-radius: 10px; object-fit: cover;
  border: 1px solid rgba(99, 95, 130, 0.2); background: #f4f2fb;
}
.hrm-kartu-photo { display: grid; place-items: center; font-size: 9px; color: #8b84bd; }
.hrm-kartu-name { font-size: 15px; font-weight: 750; margin-bottom: 6px; }
.hrm-kartu-line { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #4b4763; padding: 1px 0; }
.hrm-kartu-line span { color: #6b6785; }
.hrm-kartu-code { margin-top: 12px; text-align: center; }
.hrm-kartu-code img { max-width: 100%; height: 54px; }
.hrm-kartu-code .mono { font-size: 11px; letter-spacing: 0.12em; margin-top: 2px; }

#hrm-cam-wrap video, #hrm-reg-video, #hrm-verify-video { width: 100%; border-radius: 14px; display: block; }
#hrm-face-cue { font-size: 12px; font-weight: 650; }
#hrm-face-cue.tone-ok, #hrm-reg-status.tone-ok, #hrm-verify-status.tone-ok { color: #047857; }
#hrm-face-cue.tone-err, #hrm-reg-status.tone-err, #hrm-verify-status.tone-err { color: #be123c; }
#hrm-reg-wrap, #hrm-verify-video { max-height: 62vh; overflow: hidden; }
#hrm-reg-wrap video { max-height: 60vh; object-fit: cover; }
