/* =========================================================
   Absensi Wajah — sistem desain (Modern SaaS, terang & gelap)
   ========================================================= */

/* ---------- Token ---------- */
:root,
[data-bs-theme="light"] {
  --app-bg: #f4f5f9;
  --app-surface: #ffffff;
  --app-surface-2: #f7f8fb;
  --app-border: #e6e8ef;
  --app-border-strong: #d7dae4;
  --app-text: #0f172a;
  --app-muted: #64748b;
  --app-primary: #4f46e5;
  --app-primary-rgb: 79, 70, 229;
  --app-primary-hover: #4338ca;
  --app-primary-soft: #eef0ff;
  --app-primary-text: #4338ca;
  --app-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.04);
  --app-shadow-lg: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
  --app-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  --bs-body-bg: var(--app-surface);
  --bs-body-color: var(--app-text);
  --bs-secondary-color: var(--app-muted);
  --bs-tertiary-bg: var(--app-surface-2);
  --bs-border-color: var(--app-border);
  --bs-primary: var(--app-primary);
  --bs-primary-rgb: var(--app-primary-rgb);
  --bs-primary-bg-subtle: var(--app-primary-soft);
  --bs-primary-text-emphasis: var(--app-primary-text);
  --bs-primary-border-subtle: #c7cbff;
  --bs-link-color: var(--app-primary);
  --bs-link-color-rgb: var(--app-primary-rgb);
  --bs-link-hover-color: var(--app-primary-hover);
  --bs-link-hover-color-rgb: 67, 56, 202;
}

[data-bs-theme="dark"] {
  --app-bg: #0a0d16;
  --app-surface: #111522;
  --app-surface-2: #161b2b;
  --app-border: #232a3d;
  --app-border-strong: #2e3650;
  --app-text: #e6e8f0;
  --app-muted: #8c94aa;
  --app-primary: #6366f1;
  --app-primary-rgb: 99, 102, 241;
  --app-primary-hover: #7c7ff5;
  --app-primary-soft: rgba(99, 102, 241, 0.16);
  --app-primary-text: #a5b4fc;
  --app-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --app-shadow-lg: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  --app-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  --bs-body-bg: var(--app-surface);
  --bs-body-color: var(--app-text);
  --bs-secondary-color: var(--app-muted);
  --bs-tertiary-bg: var(--app-surface-2);
  --bs-border-color: var(--app-border);
  --bs-primary: var(--app-primary);
  --bs-primary-rgb: var(--app-primary-rgb);
  --bs-primary-bg-subtle: var(--app-primary-soft);
  --bs-primary-text-emphasis: var(--app-primary-text);
  --bs-primary-border-subtle: #3b3f8f;
  --bs-link-color: var(--app-primary-text);
  --bs-link-color-rgb: 165, 180, 252;
  --bs-link-hover-color: #c7d2fe;
  --bs-link-hover-color-rgb: 199, 210, 254;
}

:root {
  --bs-font-sans-serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 0.925rem;
  --bs-border-radius: 0.625rem;
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius-lg: 0.875rem;
  --bs-border-radius-xl: 1.125rem;
  --sidebar-w: 248px;
}

/* ---------- Dasar ---------- */
body {
  background: var(--app-bg);
  color: var(--app-text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 700; letter-spacing: -0.015em; }
.h4 { font-size: 1.35rem; }
.text-secondary { color: var(--app-muted) !important; }
.fw-medium { font-weight: 500; }
.tabular { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 3px; }
::selection { background: rgba(var(--app-primary-rgb), 0.2); }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.75rem; margin-bottom: 1.5rem; }
.page-head .eyebrow { font-size: 0.8rem; color: var(--app-muted); font-weight: 500; }
.page-head h1 { margin: 0; }

.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-bottom: 0.75rem;
}

/* ---------- Tombol ---------- */
.btn { font-weight: 600; letter-spacing: -0.005em; border-radius: 0.625rem; }
.btn-sm { border-radius: 0.5rem; padding: 0.35rem 0.75rem; }
.btn-lg { border-radius: 0.8rem; padding: 0.7rem 1.4rem; font-size: 1rem; }
.btn-primary {
  --bs-btn-bg: var(--app-primary);
  --bs-btn-border-color: var(--app-primary);
  --bs-btn-hover-bg: var(--app-primary-hover);
  --bs-btn-hover-border-color: var(--app-primary-hover);
  --bs-btn-active-bg: var(--app-primary-hover);
  --bs-btn-active-border-color: var(--app-primary-hover);
  --bs-btn-disabled-bg: var(--app-primary);
  --bs-btn-disabled-border-color: var(--app-primary);
  --bs-btn-focus-shadow-rgb: var(--app-primary-rgb);
  box-shadow: 0 1px 2px rgba(var(--app-primary-rgb), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-outline-primary {
  --bs-btn-color: var(--app-primary-text);
  --bs-btn-border-color: rgba(var(--app-primary-rgb), 0.35);
  --bs-btn-hover-bg: var(--app-primary-soft);
  --bs-btn-hover-color: var(--app-primary-text);
  --bs-btn-hover-border-color: rgba(var(--app-primary-rgb), 0.5);
  --bs-btn-active-bg: var(--app-primary-soft);
  --bs-btn-active-color: var(--app-primary-text);
  --bs-btn-active-border-color: rgba(var(--app-primary-rgb), 0.5);
}
.btn-outline-secondary {
  --bs-btn-color: var(--app-text);
  --bs-btn-bg: var(--app-surface);
  --bs-btn-border-color: var(--app-border-strong);
  --bs-btn-hover-bg: var(--app-surface-2);
  --bs-btn-hover-color: var(--app-text);
  --bs-btn-hover-border-color: var(--app-border-strong);
  --bs-btn-active-bg: var(--app-surface-2);
  --bs-btn-active-color: var(--app-text);
  --bs-btn-active-border-color: var(--app-primary);
  --bs-btn-disabled-color: var(--app-muted);
  --bs-btn-disabled-bg: var(--app-surface);
  --bs-btn-disabled-border-color: var(--app-border);
  box-shadow: var(--app-shadow);
}
.btn-group .btn-outline-secondary.active { background: var(--app-primary-soft); color: var(--app-primary-text); border-color: rgba(var(--app-primary-rgb), 0.35); }
.btn-success { --bs-btn-bg: #16a34a; --bs-btn-border-color: #16a34a; --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border-radius: 0.6rem;
  color: var(--app-muted); background: transparent; border: 1px solid transparent;
}
.btn-icon:hover { color: var(--app-text); background: var(--app-surface-2); border-color: var(--app-border); }

/* ---------- Form ---------- */
.form-control, .form-select {
  border-color: var(--app-border-strong);
  border-radius: 0.6rem;
  padding: 0.55rem 0.8rem;
  background-color: var(--app-surface);
}
.form-control-sm, .form-select-sm { padding: 0.35rem 0.65rem; border-radius: 0.5rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), 0.18);
}
.form-check-input:checked { background-color: var(--app-primary); border-color: var(--app-primary); }
.form-label { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.35rem; }
.form-text { color: var(--app-muted); font-size: 0.8rem; }

/* ---------- Kartu ---------- */
.card {
  --bs-card-border-color: var(--app-border);
  --bs-card-border-radius: 0.95rem;
  --bs-card-inner-border-radius: calc(0.95rem - 1px);
  --bs-card-cap-bg: transparent;
  --bs-card-cap-padding-y: 0.9rem;
  --bs-card-cap-padding-x: 1.15rem;
  box-shadow: var(--app-shadow);
}
.card-header { border-bottom-color: var(--app-border); font-weight: 600; }
.card-header .small, .card-header a.small { font-weight: 500; }
.card-header a { text-decoration: none; }
.min-w-0 { min-width: 0; }
.hari-item { display: flex; align-items: center; gap: 0.9rem; }
.hari-tgl { display: flex; flex-direction: column; align-items: center; width: 40px; flex-shrink: 0; line-height: 1.1; }
.hari-tgl span { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--app-muted); }
.hari-tgl strong { font-size: 1.15rem; font-weight: 800; }
.card-title-sm { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; }
.card-title-sm i { color: var(--app-primary-text); margin-right: 0.35rem; }

/* ---------- Tabel ---------- */
.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--app-surface-2);
  --bs-table-border-color: var(--app-border);
  margin-bottom: 0;
}
.table > thead > tr > th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
  background: var(--app-surface-2);
  border-bottom-width: 1px;
  white-space: nowrap;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.table > :not(caption) > * > * { padding: 0.75rem 0.85rem; }
.table > :not(caption) > * > *:first-child { padding-left: 1.15rem; }
.table > :not(caption) > * > *:last-child { padding-right: 1.15rem; }
.table-sm > :not(caption) > * > * { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.table > tbody > tr:last-child > * { border-bottom: 0; }
.card > .table-responsive:first-child > .table > thead > tr:first-child > th:first-child { border-top-left-radius: calc(0.95rem - 1px); }
.card > .table-responsive:first-child > .table > thead > tr:first-child > th:last-child { border-top-right-radius: calc(0.95rem - 1px); }
.table .muted-row td { color: var(--app-muted); background: var(--app-surface-2); }
.table-nowrap > :not(caption) > * > * { white-space: nowrap; }
.table-nowrap .wrap { white-space: normal; min-width: 180px; }
a.text-body { text-decoration: none; }
a.text-body:hover { color: var(--app-primary-text) !important; }
.nama-sel { font-weight: 600; }

/* ---------- Badge & chip ---------- */
.badge {
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.35em 0.65em;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.badge-dot::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; margin-right: 0.4em; vertical-align: 0.12em;
}
.status-menunggu { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.status-disetujui { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.status-ditolak { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.status-dibatalkan { background: var(--bs-secondary-bg-subtle); color: var(--bs-secondary-text-emphasis); }

/* ---------- Alert, nav, dropdown, pagination ---------- */
.alert { border-radius: 0.8rem; font-size: 0.9rem; }
.alert-link-row { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; transition: transform 0.15s; }
.alert-link-row:hover { transform: translateX(2px); }
.alert-link-row .bi-arrow-right { margin-left: auto; }

.nav-tabs { border-bottom-color: var(--app-border); gap: 0.25rem; }
.nav-tabs .nav-link {
  border: 0; border-bottom: 2px solid transparent; color: var(--app-muted); font-weight: 600;
  padding: 0.6rem 0.9rem; border-radius: 0;
}
.nav-tabs .nav-link:hover { color: var(--app-text); border-bottom-color: var(--app-border-strong); }
.nav-tabs .nav-link.active { color: var(--app-primary-text); background: transparent; border-bottom-color: var(--app-primary); }

.nav-pills .nav-link { color: var(--app-muted); font-weight: 600; border-radius: 999px; padding: 0.4rem 0.9rem; }
.nav-pills .nav-link:hover { color: var(--app-text); background: var(--app-surface); }
.nav-pills .nav-link.active { background: var(--app-text); color: var(--app-surface); }

.dropdown-menu {
  --bs-dropdown-border-color: var(--app-border);
  --bs-dropdown-border-radius: 0.8rem;
  --bs-dropdown-link-active-bg: var(--app-primary-soft);
  --bs-dropdown-link-active-color: var(--app-primary-text);
  --bs-dropdown-link-hover-bg: var(--app-surface-2);
  box-shadow: var(--app-shadow-lg);
  padding: 0.4rem;
  font-size: 0.9rem;
}
.dropdown-item { border-radius: 0.5rem; padding: 0.45rem 0.7rem; }
.dropdown-header { font-size: 0.85rem; color: var(--app-text); font-weight: 700; }

.pagination { --bs-pagination-border-radius: 0.5rem; --bs-pagination-color: var(--app-text); --bs-pagination-border-color: var(--app-border); gap: 0.25rem; }
.pagination .page-link { border-radius: 0.5rem !important; }

.breadcrumb { --bs-breadcrumb-divider-color: var(--app-muted); font-size: 0.82rem; margin-bottom: 0.6rem; }
.breadcrumb a { color: var(--app-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--app-primary-text); }

.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--app-border); }
.list-group-item { padding: 0.8rem 1.15rem; }

/* ---------- Logo & avatar ---------- */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; color: #fff; font-size: 1.05rem;
  background: var(--app-gradient);
  box-shadow: 0 4px 12px -4px rgba(79, 70, 229, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.logo-text { font-weight: 800; letter-spacing: -0.02em; color: var(--app-text); }
.logo-text small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--app-muted); letter-spacing: 0.02em; margin-top: -2px; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--app-primary-soft); color: var(--app-primary-text);
  font-weight: 700; font-size: 0.8rem; flex-shrink: 0; border: 0; padding: 0;
}
button.avatar:hover { box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), 0.18); }
.avatar-sm { width: 30px; height: 30px; font-size: 0.7rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.25rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; background: var(--app-gradient); color: #fff; }

/* ---------- Stat tile ---------- */
.stat {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 0.95rem;
  padding: 1.05rem 1.15rem;
  box-shadow: var(--app-shadow);
  height: 100%;
}
.stat-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.65rem; }
.stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; font-size: 1rem; flex-shrink: 0;
  background: var(--app-primary-soft); color: var(--app-primary-text);
}
.stat-icon.ic-success { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.stat-icon.ic-warning { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.stat-icon.ic-danger { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.stat-icon.ic-info { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.stat-icon.ic-muted { background: var(--app-surface-2); color: var(--app-muted); box-shadow: inset 0 0 0 1px var(--app-border); }
.stat-flat { box-shadow: none; background: var(--app-surface-2); border-color: transparent; padding: 0.85rem 1rem; }
.stat-flat .stat-value { font-size: 1.35rem; }

/* Daftar info label/nilai */
.info-list { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 0.55rem 1rem; margin: 0; font-size: 0.875rem; }
.info-list dt { font-weight: 500; color: var(--app-muted); }
.info-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Kartu filter */
.filter-card { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 0.95rem; padding: 0.9rem 1rem; box-shadow: var(--app-shadow); margin-bottom: 1rem; }
.filter-card .form-label { font-size: 0.75rem; color: var(--app-muted); margin-bottom: 0.25rem; }
.stat-label { font-size: 0.8rem; font-weight: 600; color: var(--app-muted); }
.stat-value { font-size: 1.65rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 0.95rem; font-weight: 600; color: var(--app-muted); letter-spacing: 0; }
.stat-sub { font-size: 0.78rem; color: var(--app-muted); margin-top: 0.2rem; }
.stat-progress { height: 4px; background: var(--app-surface-2); border-radius: 4px; margin-top: 0.7rem; overflow: hidden; }
.stat-progress > span { display: block; height: 100%; background: var(--app-primary); border-radius: 4px; }

/* ---------- Foto & kosong ---------- */
.foto-bukti { width: 40px; height: 40px; object-fit: cover; object-position: left center; border-radius: 9px; border: 1px solid var(--app-border); }
.foto-kosong {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--app-surface-2); color: var(--app-muted); border: 1px dashed var(--app-border-strong);
}
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--app-muted); }
.empty i { display: block; font-size: 1.8rem; margin-bottom: 0.4rem; opacity: 0.6; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(40rem 28rem at 10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(36rem 26rem at 110% 110%, rgba(124, 58, 237, 0.16), transparent 60%),
    var(--app-bg);
}
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card { border-radius: 1.25rem; box-shadow: var(--app-shadow-lg); }
.login-logo { width: 56px; height: 56px; border-radius: 16px; font-size: 1.7rem; }
.login-foot { font-size: 0.8rem; color: var(--app-muted); }

/* ---------- Karyawan ---------- */
.app-navbar {
  background: color-mix(in srgb, var(--app-surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--app-border);
  padding-top: 0.6rem; padding-bottom: 0.6rem;
}
.app-navbar .nav-link {
  color: var(--app-muted); font-weight: 600; border-radius: 0.55rem; padding: 0.4rem 0.8rem !important;
}
.app-navbar .nav-link:hover { color: var(--app-text); background: var(--app-surface-2); }
.app-navbar .nav-link.active { color: var(--app-primary-text); background: var(--app-primary-soft); }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: 1.6rem;
  color: #fff;
  background: var(--app-gradient);
  box-shadow: 0 18px 40px -20px rgba(79, 70, 229, 0.7);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
}
.hero::before { width: 320px; height: 320px; right: -90px; top: -140px; }
.hero::after { width: 220px; height: 220px; left: 35%; bottom: -150px; opacity: 0.6; }
.hero > * { position: relative; }
.hero .hero-label { font-size: 0.78rem; font-weight: 600; opacity: 0.8; }
.hero .hero-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hero .hero-note { font-size: 0.78rem; opacity: 0.85; }
.hero .hero-pill {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.25rem 0.7rem; border-radius: 999px;
}
.hero .btn-hero {
  background: #fff; color: #4338ca; border: 0; font-weight: 700;
  box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.5);
}
.hero .btn-hero:hover { background: #f5f5ff; color: #3730a3; transform: translateY(-1px); }
.hero .hero-divider { border-left: 1px solid rgba(255, 255, 255, 0.22); }
.hero-done { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; background: rgba(255, 255, 255, 0.16); padding: 0.6rem 1rem; border-radius: 0.8rem; }

.minggu { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.minggu-hari {
  background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 0.85rem;
  padding: 0.7rem 0.25rem 0.6rem; text-align: center; box-shadow: var(--app-shadow);
}
.minggu-hari .hari { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--app-muted); }
.minggu-hari .tgl { font-size: 1.05rem; font-weight: 800; }
.minggu-hari.hari-ini { border-color: var(--app-primary); box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), 0.15); }
.minggu-hari.hari-ini .hari { color: var(--app-primary-text); }
.minggu-jam { font-size: 0.68rem; color: var(--app-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.titik { display: block; width: 8px; height: 8px; border-radius: 50%; margin: 0.4rem auto 0.3rem; background: var(--app-border-strong); }
.titik-hadir { background: #22c55e; }
.titik-telat { background: #f59e0b; }
.titik-alpha { background: #ef4444; }
.titik-cuti, .titik-sakit, .titik-izin, .titik-dinas { background: #06b6d4; }
.titik-belum { background: var(--app-muted); }
.titik-libur, .titik-mendatang { background: transparent; box-shadow: inset 0 0 0 1.5px var(--app-border-strong); }

.riwayat-item { display: flex; align-items: center; gap: 0.85rem; }
.riwayat-ikon {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.riwayat-ikon.masuk { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.riwayat-ikon.pulang { background: var(--app-primary-soft); color: var(--app-primary-text); }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030;
  display: flex; justify-content: space-around; align-items: flex-end;
  background: color-mix(in srgb, var(--app-surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--app-border);
  padding: 0.4rem 0 calc(0.45rem + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 0.68rem; font-weight: 600; color: var(--app-muted); text-decoration: none;
}
.bottom-nav a i { font-size: 1.25rem; line-height: 1; }
.bottom-nav a.active { color: var(--app-primary-text); }
.bottom-nav a.absen-btn i {
  display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--app-gradient); color: #fff; margin-top: -1.6rem;
  box-shadow: 0 10px 20px -8px rgba(79, 70, 229, 0.7); border: 3px solid var(--app-bg);
}
@media (max-width: 767.98px) {
  .karyawan-main { padding-bottom: 6.5rem !important; }
}
@media (min-width: 768px) {
  .w-md-auto { width: auto !important; }
}

/* ---------- Panel admin ---------- */
.panel-layout { display: flex; min-height: 100vh; }
.panel-sidebar {
  background: var(--app-surface);
  border-right: 1px solid var(--app-border);
}
@media (min-width: 992px) {
  .panel-sidebar { width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
}
.panel-sidebar .brand {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 1.2rem 1.25rem 1.1rem; text-decoration: none;
}
.panel-sidebar .nav-link {
  color: var(--app-muted); border-radius: 0.6rem; padding: 0.55rem 0.8rem; margin-bottom: 2px;
  display: flex; align-items: center; gap: 0.7rem; font-weight: 600; font-size: 0.9rem; position: relative;
}
.panel-sidebar .nav-link i { font-size: 1.05rem; }
.panel-sidebar .nav-link:hover { color: var(--app-text); background: var(--app-surface-2); }
.panel-sidebar .nav-link.active { color: var(--app-primary-text); background: var(--app-primary-soft); }
.panel-sidebar .nav-link .nav-count {
  margin-left: auto; font-size: 0.68rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px;
  background: var(--app-primary); color: #fff;
}
.panel-sidebar .nav-section {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700;
  color: var(--app-muted); opacity: 0.8; padding: 1.1rem 0.8rem 0.4rem;
}
.sidebar-user {
  margin: 0.75rem; padding: 0.75rem; border-radius: 0.85rem;
  background: var(--app-surface-2); border: 1px solid var(--app-border);
}
.sidebar-user .nama { font-weight: 700; font-size: 0.85rem; line-height: 1.2; }
.sidebar-user .peran { font-size: 0.72rem; color: var(--app-muted); }
.sidebar-user .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; white-space: nowrap; font-size: 0.78rem; padding: 0.35rem 0.5rem; box-shadow: none; }
.panel-main { flex: 1; min-width: 0; }
.panel-topbar {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem;
  background: color-mix(in srgb, var(--app-surface) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--app-border); position: sticky; top: 0; z-index: 1020;
}
.panel-content { padding: 1.25rem; max-width: 1400px; }
@media (min-width: 992px) { .panel-content { padding: 2rem 2.25rem; } }

/* Grafik batang horizontal (kehadiran 7 hari) */
.bar-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 0.7rem; padding: 0.35rem 0; font-size: 0.82rem; }
.bar-label { color: var(--app-muted); font-weight: 600; }
.bar-track { height: 8px; background: var(--app-surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--app-primary); border-radius: 0 4px 4px 0; transition: filter 0.15s; }
.bar-value { font-variant-numeric: tabular-nums; min-width: 2.5rem; text-align: right; font-weight: 700; }
.bar-row:hover .bar-fill { filter: brightness(1.15); }
.bar-row.libur .bar-label { opacity: 0.6; }

/* ---------- Kamera (daftar wajah & absen) ---------- */
.kamera-card { padding: 1rem; }
.kamera-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  background: #0b0d14;
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid var(--app-border);
}
.kamera-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* pratinjau dicermin agar terasa seperti cermin */
}
.kamera-wrap .oval {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44%;
  height: 74%;
  transform: translate(-50%, -50%);
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(8, 10, 20, 0.42);
  pointer-events: none;
  transition: border-color 0.2s;
}
.kamera-wrap.aktif .oval { border-color: #a5b4fc; }
.kamera-wrap .hitung {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.kamera-wrap.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0.6;
}
.kamera-wrap .instruksi {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  max-width: calc(100% - 28px); text-align: center;
  font-size: 1rem; font-weight: 700; color: #fff;
  background: rgba(12, 14, 26, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 0.55rem 1.1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14);
}
.kamera-wrap .instruksi:empty { display: none; }
.kamera-wrap .placeholder-kamera {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; color: rgba(255, 255, 255, 0.55); font-size: 0.85rem; font-weight: 500;
}
.kamera-wrap .placeholder-kamera i { font-size: 2rem; }
.kamera-wrap video { position: relative; z-index: 1; }
.kamera-wrap video:not([data-aktif]) { opacity: 0; }
.kamera-wrap .oval, .kamera-wrap .hitung, .kamera-wrap .instruksi, .kamera-wrap .cahaya { z-index: 2; }
/* indikator cahaya langsung di atas video */
.kamera-wrap .cahaya {
  position: absolute; top: 0.75rem; left: 50%; transform: translateX(-50%); max-width: calc(100% - 1.5rem);
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background-color 0.2s;
}
.kamera-wrap .cahaya[hidden] { display: none; }
.kamera-wrap .cahaya span { overflow: hidden; text-overflow: ellipsis; }
.kamera-wrap .cahaya[data-status="ok"] i { color: #4ade80; }
.kamera-wrap .cahaya:not([data-status="ok"]) { background: rgba(180, 83, 9, 0.85); }
.tips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.tips span {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 600;
  color: var(--app-muted); background: var(--app-surface-2); border: 1px solid var(--app-border);
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.thumbs img {
  height: 64px;
  border-radius: 10px;
  transform: scaleX(-1);
  border: 2px solid var(--app-surface);
  box-shadow: var(--app-shadow);
}

/* ---------- Lokasi & peta ---------- */
.lokasi-box {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 0.9rem;
  padding: 0.7rem 0.8rem; box-shadow: var(--app-shadow);
}
.lokasi-ikon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
  background: var(--app-surface-2); color: var(--app-muted);
}
.lokasi-judul { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lokasi-sub { font-size: 0.78rem; color: var(--app-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lokasi-box[data-status="cari"] .lokasi-ikon i { animation: denyut 1.2s ease-in-out infinite; }
.lokasi-box[data-status="ok"] .lokasi-ikon { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.lokasi-box[data-status="jauh"] .lokasi-ikon { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.lokasi-box[data-status="jauh"] { border-color: var(--bs-warning-border-subtle); }
.lokasi-box[data-status="gagal"] .lokasi-ikon { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.lokasi-box[data-status="gagal"] { border-color: var(--bs-danger-border-subtle); }
@keyframes denyut { 50% { opacity: 0.35; } }

.lokasi-link {
  display: inline-flex; align-items: center; gap: 0.3rem; max-width: 240px;
  background: none; border: 0; padding: 0; color: var(--app-primary-text); font-weight: 500; text-align: left;
}
.lokasi-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lokasi-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.sel-lokasi { max-width: 260px; }

.pin {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); background: #22c55e;
}
.leaflet-marker-icon .pin { width: 22px; height: 22px; border-width: 3px; }
.pin-masuk { background: #22c55e; }
.pin-pulang { background: #6366f1; }
.pin-telat { background: #f59e0b; }
.pin-kantor { background: #0f172a; border-radius: 6px; }
[data-bs-theme="dark"] .pin-kantor { background: #e6e8f0; border-color: #111522; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 500;
  background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 999px; padding: 0.3rem 0.75rem;
}
.chip .pin { width: 11px; height: 11px; border-width: 2px; }
.chip-warning { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-border-subtle); }

.peta-besar { height: 600px; background: var(--app-surface-2); }
@media (max-width: 767.98px) { .peta-besar { height: 420px; } }
.peta-modal { height: 420px; background: var(--app-surface-2); }
.peta-daftar { max-height: 545px; overflow-y: auto; }
.peta-item { display: flex; align-items: center; gap: 0.7rem; width: 100%; background: none; border: 0; padding: 0; color: inherit; }
.peta-item:hover strong { color: var(--app-primary-text); }
.leaflet-container { font-family: var(--bs-font-sans-serif); }
.leaflet-popup-content { font-size: 0.82rem; line-height: 1.45; }
[data-bs-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9); }
.modal-content { border-radius: 1rem; border-color: var(--app-border); overflow: hidden; }

/* ---------- Header perusahaan di halaman login ---------- */
.login-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.5rem;
}
.perusahaan { display: inline-flex; align-items: center; gap: 0.65rem; min-width: 0; }
.perusahaan-ikon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
  background: var(--app-surface); border: 1px solid var(--app-border); color: var(--app-text);
  box-shadow: var(--app-shadow);
}
.perusahaan-nama { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-page { position: relative; }

/* ---------- Wizard instalasi ---------- */
.stepper { display: flex; list-style: none; padding: 0; margin: 0; gap: 0.25rem; counter-reset: langkah; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; position: relative; min-width: 0; }
.stepper li::before {
  content: ''; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px);
  height: 2px; background: var(--app-border);
}
.stepper li:first-child::before { display: none; }
.stepper li.selesai::before, .stepper li.aktif::before { background: var(--app-primary); }
.stepper-no {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; background: var(--app-surface); border: 2px solid var(--app-border-strong);
  color: var(--app-muted); position: relative; z-index: 1;
}
.stepper li.aktif .stepper-no { border-color: var(--app-primary); color: var(--app-primary-text); box-shadow: 0 0 0 4px rgba(var(--app-primary-rgb), 0.15); }
.stepper li.selesai .stepper-no { background: var(--app-primary); border-color: var(--app-primary); color: #fff; }
.stepper-label { font-size: 0.72rem; font-weight: 600; color: var(--app-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stepper li.aktif .stepper-label { color: var(--app-text); }
@media (max-width: 575.98px) { .stepper-label { display: none; } .stepper li.aktif .stepper-label { display: block; } }

.cek-ikon {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
}
.cek-ok { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.cek-warn { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.cek-error { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }

/* ---------- Login: layout terbelah (foto + form) ---------- */
.login-split-page { background: var(--app-bg); }
.login-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100vh; }
.login-visual {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 2.5rem 3rem; color: #fff; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 10, 38, 0.25) 0%, rgba(12, 10, 38, 0.15) 40%, rgba(12, 10, 38, 0.75) 100%),
    var(--latar) center / cover no-repeat, #1e1b4b;
}
.perusahaan-terang .perusahaan-ikon {
  background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.22); color: #fff; box-shadow: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.perusahaan-terang .perusahaan-nama { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
.login-tagline { max-width: 34rem; }
.login-tagline h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 0.9rem; }
.login-tagline p { font-size: 1.05rem; color: rgba(255, 255, 255, 0.82); margin-bottom: 1.6rem; }
.login-fitur { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.login-fitur li {
  display: flex; align-items: center; gap: 0.75rem; font-weight: 500; font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 0.7rem 0.95rem; border-radius: 0.85rem; width: fit-content;
}
.login-fitur li i {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.16); font-size: 0.95rem;
}
.login-visual-kaki { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }

.login-form-side { display: flex; flex-direction: column; padding: 1.25rem 1.5rem 2rem; }
.login-form-top { display: flex; justify-content: flex-end; }
.login-form-box { width: 100%; max-width: 400px; margin: auto; padding: 1rem 0; }
.input-ikon { position: relative; }
.input-ikon > i { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--app-muted); pointer-events: none; }
.input-ikon > .form-control { padding-left: 2.6rem; }
.lihat-password {
  position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--app-muted); padding: 0.35rem 0.55rem; border-radius: 0.5rem;
}
.lihat-password:hover { color: var(--app-text); background: var(--app-surface-2); }
.input-ikon > input[type="password"], .input-ikon > input#id_password { padding-right: 2.8rem; }

@media (max-width: 991.98px) {
  .login-split { grid-template-columns: 1fr; }
  .login-visual { min-height: 250px; padding: 1.5rem 1.25rem 1.75rem; gap: 1rem; }
  .login-tagline h2 { font-size: 1.65rem; margin-bottom: 0; }
  .login-tagline p, .login-fitur, .login-visual-kaki { display: none; }
  .login-form-side { padding-top: 0.5rem; }
  .login-form-top { position: absolute; top: 1.1rem; right: 1rem; }
  .login-form-top .btn-icon { color: #fff; background: rgba(255, 255, 255, 0.14); }
  .login-form-box { margin-top: 0; }
}

/* ---------- Sampul beranda (gambar sama dengan login) ---------- */
.sampul {
  position: relative;
  /* lebar penuh layar walau berada di dalam .container */
  margin: 0 calc(50% - 50vw) 1.75rem;
  padding: 2rem calc(50vw - 50%) 3.25rem;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(12, 10, 38, 0.45) 0%, rgba(12, 10, 38, 0.3) 55%, rgba(12, 10, 38, 0.5) 100%),
    var(--latar) center / cover no-repeat, #1e1b4b;
}
.sampul::after {  /* pudar halus ke latar halaman */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--app-bg)); pointer-events: none;
}
.sampul .page-head .eyebrow { color: rgba(255, 255, 255, 0.75); }
.sampul .page-head h1 { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.sampul .hero {
  position: relative; z-index: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.7);
}
.sampul .hero::before, .sampul .hero::after { opacity: 0.35; }
body:has(.sampul) { overflow-x: clip; }
@media (max-width: 767.98px) { .sampul { padding-top: 1.5rem; padding-bottom: 2.75rem; } }
@media (max-width: 575.98px) {
  .hero .hero-value { font-size: 1.35rem; white-space: nowrap; }
  .hero .hero-label, .hero .hero-note { font-size: 0.72rem; }
}

/* Kartu hasil absen berhasil (menggantikan area kamera) */
.sukses-absen {
  text-align: center; padding: 2.25rem 1.5rem 1.5rem; border-radius: 1.1rem;
  background: var(--app-surface); border: 1px solid var(--app-border);
  box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.45);
}
.sukses-absen[hidden] { display: none; }
.sukses-ikon {
  display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px;
  margin-bottom: 1rem; border-radius: 50%; font-size: 2.4rem; color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.15);
  animation: sukses-muncul 0.45s cubic-bezier(.2, .9, .3, 1.3);
}
.sukses-waktu { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0.5rem 0 0.6rem; font-variant-numeric: tabular-nums; }
.sukses-absen .badge { font-size: 0.8rem; padding: 0.4em 0.85em; }
.sukses-alamat { margin: 1rem auto 0; max-width: 28rem; color: var(--app-muted); font-size: 0.9rem; }
.sukses-alamat i { margin-right: 0.3rem; }
.sukses-alamat[hidden] { display: none; }
@keyframes sukses-muncul { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sukses-ikon { animation: none; } }

/* Lampu layar: layar putih penuh menerangi wajah, pratinjau kamera mengecil di atas */
.lampu-saklar { padding-left: 0; font-size: 0.875rem; color: var(--app-muted); }
.lampu-saklar .form-check-input { margin: 0; float: none; }
body.lampu-layar { overflow: hidden; }
body.lampu-layar::before {
  content: ''; position: fixed; inset: 0; z-index: 1080; background: #fff;
  animation: lampu-nyala 0.2s ease-out;
}
body.lampu-layar::after {
  content: 'Naikkan kecerahan layar untuk hasil terbaik';
  position: fixed; left: 0; right: 0; bottom: max(1.5rem, env(safe-area-inset-bottom)); z-index: 1081;
  text-align: center; font-size: 0.85rem; color: #64748b;
}
body.lampu-layar .kamera-wrap {
  position: fixed; z-index: 1081; top: max(1.5rem, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: min(76vw, 360px); max-width: none; margin: 0; overflow: visible;
  border-color: transparent; box-shadow: 0 14px 34px -12px rgba(15, 23, 42, 0.45);
}
body.lampu-layar .kamera-wrap video, body.lampu-layar .kamera-wrap .placeholder-kamera { border-radius: inherit; }
body.lampu-layar .kamera-wrap.flash::after { border-radius: inherit; }
body.lampu-layar .kamera-wrap .cahaya { display: none; }
/* Wrap tidak lagi overflow:hidden (agar instruksi bisa di luar pratinjau), jadi bayangan 9999px oval
   dipotong tepat seukuran pratinjau: oval 44%×74% di tengah -> sisa 63,64% lebar & 17,57% tinggi oval. */
body.lampu-layar .kamera-wrap .oval { clip-path: inset(-17.57% -63.64% round 1.1rem); }
body.lampu-layar .kamera-wrap .instruksi {
  top: calc(100% + 1.5rem); bottom: auto; max-width: 90vw; width: max-content;
  background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0;
  color: #0f172a; font-size: 1.4rem;
}
@keyframes lampu-nyala { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.lampu-layar::before { animation: none; } }

/* Pop-up foto bukti (foto.js) */
.foto-modal .modal-header { gap: 1rem; }
.foto-modal-bingkai {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 300px; background: #0b0d14;
}
.foto-modal-bingkai img { display: block; width: auto; height: min(70vh, 480px); max-width: 100%; object-fit: contain; }
.foto-modal-bingkai [data-muat] { position: absolute; display: none; }
.foto-modal.memuat .foto-modal-bingkai [data-muat] { display: block; }
.foto-modal.memuat .foto-modal-bingkai img { opacity: 0.25; }
.foto-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.55); color: #fff; font-size: 1.1rem; backdrop-filter: blur(6px);
}
.foto-nav:hover { background: rgba(15, 23, 42, 0.8); }
.foto-nav[hidden] { display: none; }
.foto-nav-kiri { left: 0.75rem; }
.foto-nav-kanan { right: 0.75rem; }
a[data-foto] { cursor: zoom-in; }

/* Pengajuan absen manual (absen wajah terus gagal) */
.sukses-ikon.menunggu { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.15); }
.bantuan-ikon {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; background: rgba(var(--app-primary-rgb), 0.1); color: var(--app-primary-text); font-size: 1.15rem;
}

/* Galeri foto percobaan gagal di detail pengajuan */
.galeri { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.galeri-item { margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.galeri-item img, .galeri-kosong {
  width: 100%; height: 200px; object-fit: cover; object-position: left center; border-radius: 0.75rem;
  border: 1px solid var(--app-border); background: #0b0d14;
}
.galeri-kosong {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  color: var(--app-muted); font-size: 0.8rem; background: var(--app-surface-2); border-style: dashed;
}
.galeri-kosong i { font-size: 1.4rem; }
.galeri-item figcaption { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.8rem; line-height: 1.35; }
