/* ============================================================
   Sigma Nursery — Pages (Auth, Dashboard, generic page styles)
   ============================================================ */

/* ---------- Login ---------- */
.login-page {
  flex: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--white);
  position: relative;
  overflow-y: auto;
  padding: 16px 20px calc(16px + var(--safe-bottom));
}

.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 16px;
  position: relative;
  z-index: 2;
}

.vpn-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vpn-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #18181b;
}

.vpn-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #d4d4d8;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s var(--ease);
}

.vpn-switch.is-on {
  background: var(--primary);
}

.vpn-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease);
}

.vpn-switch.is-on .vpn-thumb {
  transform: translateX(20px);
}

.status-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #18181b;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s var(--ease);
}

.status-badge.is-disconnected {
  background: #8c7b7b;
  color: #ffffff;
}

.status-badge.is-connected {
  background: var(--primary);
  color: #ffffff;
}

.login-hero {
  text-align: center;
  margin: 36px 0 32px;
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 260px;
  max-width: 86%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.login-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.login-card {
  background: transparent;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.login-card .field {
  margin-bottom: 18px;
}

.login-card .field-label {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #09090b;
  margin-bottom: 8px;
}

.login-card .field-control {
  width: 100%;
  height: 50px;
  padding: 12px 14px;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  background: var(--white);
  font-size: 0.95rem;
  color: #09090b;
  transition: border-color 0.15s var(--ease);
}

.login-card .field-control::placeholder {
  color: #a1a1aa;
  font-size: 0.95rem;
}

.login-card .field-control:focus {
  outline: none;
  border-color: var(--primary);
}

.password-wrap {
  position: relative;
}

.password-wrap .field-control {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #71717a;
  padding: 0;
  border-radius: 4px;
  transition: color 0.15s var(--ease);
}

.password-toggle:hover {
  color: #3f3f46;
}

.login-error {
  margin: -4px 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--danger);
}

.btn-login-submit {
  margin-top: 14px;
  height: 50px;
  font-size: 1.02rem;
  font-weight: 700;
  background: var(--primary);
  color: var(--white);
  border-radius: 6px;
}

.role-switch-trigger {
  margin-top: 12px;
  min-height: 42px;
  border: 1px dashed var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.15s var(--ease);
}

.role-switch-trigger:hover,
.role-switch-trigger:active {
  background: var(--primary-light);
}

.login-footer {
  margin-top: auto;
  padding-top: 36px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-help {
  font-size: 0.92rem;
  font-weight: 500;
  color: #18181b;
  margin-bottom: 24px;
}

.login-version {
  font-size: 0.82rem;
  color: #27272a;
  margin-bottom: 6px;
}

/* ---------- Placeholder sukses login (milestone ini) ---------- */
.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 24px;
}

.success-card {
  width: 100%;
  max-width: 360px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
}

.success-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.success-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ---------- Role Picker (modal, demo) ---------- */
.role-pick-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.role-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.role-pick:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.role-pick input {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.role-pick-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.role-pick.persona-pick {
  align-items: flex-start;
  padding: 10px 12px;
}

.role-pick.persona-pick input {
  margin-top: 3px;
  flex-shrink: 0;
}

.role-pick-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.role-pick-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.25;
}

.role-pick-meta {
  font-size: 0.78rem;
  color: var(--muted, #475569);
  font-weight: 500;
}

.role-pick-location {
  font-size: 0.72rem;
  color: #166534;
  font-weight: 600;
  margin-top: 1px;
}

.demo-estate-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-estate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.demo-estate-name {
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-estate-count {
  font-size: 0.68rem;
  padding: 2px 6px;
  background: #f1f5f9;
  border-radius: 4px;
  color: #475569;
}

/* ---------- Splash (setelah Login berhasil) ---------- */
.splash-page {
  position: relative;
  flex: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--white);
  overflow: hidden;
}

.splash-bg-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 104, 52, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

.splash-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.splash-emblem-wrap {
  position: relative;
  width: 136px;
  height: 136px;
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-pulse-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid rgba(17, 104, 52, 0.28);
  animation: pulse-ring 2.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

.splash-pulse-ring.delay {
  animation-delay: 1.3s;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.85);
    opacity: 0.85;
  }

  50% {
    opacity: 0.35;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.splash-emblem {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 14px 34px rgba(17, 104, 52, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(17, 104, 52, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float-badge 3.8s ease-in-out infinite;
}

.splash-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

@keyframes float-badge {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

.splash-text-block {
  margin-bottom: 32px;
}

.splash-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #09090b;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.splash-sub {
  font-size: 1rem;
  font-weight: 600;
  color: #52525b;
  margin-top: 6px;
}

.splash-action-area {
  width: 100%;
  min-height: 105px;
}

.splash-ready-btn {
  height: 52px;
  font-size: 1.02rem;
  font-weight: 700;
  background: #116834;
  color: #ffffff;
  border-radius: 6px;
  border: none;
  box-shadow: 0 4px 14px rgba(17, 104, 52, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.splash-ready-btn:hover {
  background: #0d5529;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(17, 104, 52, 0.35);
}

.splash-ready-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(17, 104, 52, 0.2);
}

.splash-motto {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 12px;
  font-weight: 500;
}

.splash-progress-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.splash-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.splash-progress-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
}

.splash-progress-pct {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.splash-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}

.splash-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #116834, #22c55e);
  transition: width 60ms linear;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.fade-out {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fade-in {
  animation: splash-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes splash-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Sinkronisasi (/sync) ---------- */
.sync-page {
  flex: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #fbfcfc;
}

.sync-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border-bottom: 1px solid #e4e4e7;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sync-header-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #18181b;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.sync-header-title {
  flex: 1;
  font-size: 1.12rem;
  font-weight: 700;
  color: #09090b;
}

.sync-header-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}

.sync-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
}

.sync-section {
  margin-bottom: 22px;
}

.sync-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sync-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #09090b;
}

.sync-help-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #d4d4d8;
  background: var(--white);
  color: #71717a;
  font-size: 0.76rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sync-dropdown-wrap {
  position: relative;
  width: 100%;
}

.sync-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  user-select: none;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong, #d4d4d8);
  border-radius: var(--radius-sm, 6px);
  background: var(--white, #fff);
  font-size: 0.95rem;
  color: #18181b;
  transition: border-color var(--dur, 0.15s) var(--ease, ease), box-shadow var(--dur, 0.15s) var(--ease, ease);
}

.sync-dropdown-trigger:focus,
.sync-dropdown-trigger:hover {
  outline: none;
  border-color: var(--primary, #059669);
}

.sync-dropdown-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.92rem;
  color: #18181b;
}

.sync-dropdown-arrow {
  font-size: 0.72rem;
  color: #71717a;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.sync-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white, #fff);
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
}

.sync-dropdown-estate-header {
  padding: 8px 14px;
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sync-dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}

.sync-dropdown-item:last-child {
  border-bottom: none;
}

.sync-dropdown-item:hover {
  background: #f8fafc;
}

.sync-dropdown-checkbox {
  width: 17px;
  height: 17px;
  margin-right: 12px;
  accent-color: var(--primary, #059669);
  cursor: pointer;
}

.sync-dropdown-item-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sync-dropdown-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #18181b;
}

.sync-dropdown-item-sub {
  font-size: 0.75rem;
  color: #71717a;
  margin-top: 1px;
}

.sync-notice {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.sync-notice-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
}

.sync-notice-time {
  font-size: 0.78rem;
  color: var(--primary-600);
  margin-top: 3px;
}

.sync-list-card {
  background: var(--white);
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.sync-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.sync-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 11px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.sync-item:last-child {
  border-bottom: none;
}

.sync-item:hover {
  background: #f8fafc;
}

.sync-item-name {
  font-size: 0.94rem;
  font-weight: 500;
  color: #1e293b;
}

.sync-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 1;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.sync-status.warn {
  background: #e53935;
  color: #ffffff;
}

.sync-status.pending {
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.85rem;
}

.sync-status.ok {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
}

.sync-bottom {
  padding: 14px 18px calc(14px + var(--safe-bottom));
  border-top: 1px solid #e4e4e7;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sync-bottom .btn {
  height: 48px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
}

.sync-bottom .btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.sync-bottom .btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.sync-bottom .btn:disabled {
  background: var(--disabled);
  color: var(--white);
  border-color: var(--disabled);
  opacity: 1;
}

/* ============================================================
   Beranda (Dashboard Mantri Bibitan)
   ============================================================ */
.beranda-page {
  flex: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  padding: 0;
}

.beranda-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.beranda-menu-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
}

.beranda-menu-btn:hover {
  background: #f1f5f9;
}

.beranda-header-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.beranda-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 14px;
  display: flex;
  flex-direction: column;
}

.beranda-grid {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  justify-content: center;
  gap: 8px;
  margin-bottom: auto;
}

.beranda-menu-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 96px;
  height: 115px;
  padding: 8px 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.beranda-menu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(17, 104, 52, 0.1);
  border-color: var(--primary);
}

.beranda-menu-card:active {
  transform: scale(0.97);
}

.beranda-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.beranda-card-icon svg {
  width: 56px;
  height: 56px;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.beranda-card-title {
  font-size: 0.77rem;
  font-weight: 700;
  color: #116834;
  line-height: 1.22;
  letter-spacing: -0.015em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  text-align: center;
}

.beranda-footer {
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: var(--white);
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.beranda-action-btn {
  width: 100%;
  height: 48px;
  background: var(--white);
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.beranda-action-btn:hover {
  background: #f8fafc;
  border-color: #a1a1aa;
}

.beranda-action-btn:active {
  background: #f1f5f9;
}

.beranda-action-btn .action-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #a1a1aa;
}

.beranda-action-btn .action-arrow {
  font-size: 1.35rem;
  font-weight: 400;
  color: #a1a1aa;
  line-height: 1;
}

/* ============================================================
   Drawer Sidebar
   ============================================================ */
.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 400;
  display: flex;
  border-radius: 32px;
  overflow: hidden;
  animation: drawer-fade-in 0.2s ease;
}

.drawer-panel {
  width: 295px;
  max-width: 85%;
  height: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.16);
  animation: drawer-slide-right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

@keyframes drawer-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes drawer-slide-right {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

.drawer-profile-section {
  padding: 44px 22px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border-bottom: 1px solid #f1f5f9;
}

.drawer-avatar-wrap {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.drawer-avatar-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.drawer-profile-info {
  flex: 1;
  min-width: 0;
}

.drawer-profile-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #09090b;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.drawer-profile-role {
  font-size: 0.95rem;
  font-weight: 500;
  color: #a1a1aa;
  margin-top: 4px;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.drawer-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  width: 100%;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  position: relative;
}

.drawer-nav-row:hover {
  background: #f8fafc;
}

.drawer-nav-row.is-active {
  border-left: 5px solid #116834;
  padding-left: 15px;
}

.drawer-nav-row.is-active .drawer-row-label {
  color: #116834;
  font-weight: 700;
}

.drawer-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drawer-row-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-row-label {
  font-size: 0.98rem;
  font-weight: 600;
  color: #18181b;
}

.drawer-row-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-sync-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-demo-switch {
  margin: 14px 14px 0;
  padding: 12px 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.drawer-demo-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.drawer-demo-head-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-demo-badge {
  font-size: 0.60rem;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1.5px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drawer-demo-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.02em;
}

.drawer-estate-group {
  margin-bottom: 12px;
}

.drawer-estate-group:last-child {
  margin-bottom: 0;
}

.drawer-estate-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  color: #116834;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  padding: 0 2px;
}

.drawer-estate-name {
  display: flex;
  align-items: center;
  gap: 4px;
}

.drawer-estate-count {
  font-size: 0.58rem;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  padding: 1px 5px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.drawer-persona-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.persona-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.persona-card:hover {
  border-color: #116834;
  background: #f0fdf4;
}

.persona-card.active {
  background: #f0fdf4;
  border-color: #116834;
  box-shadow: 0 0 0 1px #116834;
}

.persona-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 18px;
}

.persona-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.persona-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #116834;
  color: #ffffff;
  font-size: 0.56rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.persona-card-meta {
  display: flex;
  align-items: center;
  font-size: 0.69rem;
  color: #475569;
  line-height: 1.2;
}

.persona-card-role {
  font-weight: 500;
  color: #334155;
  white-space: normal;
  word-break: break-word;
}

.persona-card-footer {
  display: flex;
  align-items: center;
  margin-top: 1px;
}

.persona-card-scope {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.persona-card-scope.scope-division {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}

.persona-card-scope.scope-estate {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.drawer-demo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-pill {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: var(--white);
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-pill:hover {
  border-color: #116834;
  color: #116834;
}

.demo-pill.active {
  background: #116834;
  color: var(--white);
  border-color: #116834;
}

.drawer-bottom-version {
  margin-top: auto;
  padding: 32px 20px calc(24px + var(--safe-bottom));
  text-align: center;
  font-size: 0.88rem;
  color: #a1a1aa;
  font-weight: 500;
}

/* ---------- Attendance (Presensi) ---------- */
.attendance-landing-page {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  padding: 0;
  overflow: hidden;
}

.attendance-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.attendance-icon-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #1e293b;
  transition: all 0.15s ease;
}

.attendance-icon-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

.attendance-icon-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.attendance-icon-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.attendance-cloud-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.attendance-cloud-btn-ready svg {
  fill: #116834;
}

.attendance-cloud-btn-ready:hover {
  background: #f0fdf4;
}

.attendance-cloud-btn-idle svg {
  fill: #475569;
}

.attendance-cloud-btn-idle:hover {
  background: #f8fafc;
}

@keyframes cloudPulseRotate {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.22) rotate(12deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
}

.attendance-cloud-animating svg,
svg.attendance-cloud-animating {
  animation: cloudPulseRotate 0.75s ease-in-out infinite;
}

.attendance-page-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  flex: 1;
  margin-left: 12px;
  letter-spacing: -0.01em;
}

.attendance-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 14px 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.attendance-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 6px;
}

.attendance-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.attendance-summary-header:hover {
  background: #f8fafc;
}

.attendance-summary-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.attendance-summary-date {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 500;
}

.attendance-summary-stat {
  display: flex;
  align-items: center;
  gap: 8px;
}

.attendance-total-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.attendance-total-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.attendance-total-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

.attendance-chevron {
  font-size: 1.5rem;
  font-weight: 400;
  color: #334155;
  line-height: 1;
  margin-left: 4px;
}

.attendance-divider {
  height: 1px;
  background: #edf2f7;
  margin: 0;
  border: none;
}

.attendance-section-group {
  padding: 12px 16px;
}

.attendance-group-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  line-height: 1.25;
}

.attendance-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.attendance-row-label {
  color: #334155;
  font-weight: 500;
}

.attendance-row-val {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
}

.attendance-clickable-group {
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 6px;
}

.attendance-clickable-group:hover {
  background: #f8fafc;
}

.attendance-group-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attendance-section-arrow {
  font-size: 1.25rem;
  color: #64748b;
  font-weight: 700;
  line-height: 1;
}

.attendance-cloud-status {
  font-size: 0.78rem;
  font-style: italic;
  color: #64748b;
  text-align: right;
  padding-right: 4px;
  margin-top: 6px;
  margin-bottom: 8px;
  line-height: 1.35;
  word-break: break-word;
  user-select: none;
}

/* Attendance Summary Page & Photo Evidence Styles */
.summary-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding: 2px 0 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.summary-filter-tabs::-webkit-scrollbar {
  display: none;
}

.summary-tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.80rem;
  font-weight: 600;
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #CBD5E1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.summary-tab-btn.is-active {
  background: #116834;
  color: #FFFFFF;
  border-color: #116834;
  box-shadow: 0 1px 3px rgba(17, 104, 52, 0.2);
}

.summary-tx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.summary-tx-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.summary-tx-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.summary-tx-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.tx-photo-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #cbd5e1;
  flex-shrink: 0;
  background: #f8fafc;
  cursor: pointer;
}

.tx-photo-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tx-photo-zoom-icon {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.tx-no-photo-badge {
  font-size: 0.68rem;
  color: #64748b;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  padding: 4px;
  flex-shrink: 0;
  user-select: none;
}

.summary-tx-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.summary-tx-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-tx-meta {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-tx-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.att-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

.att-type-badge.badge-datang {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.att-type-badge.badge-pulang {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.att-method-badge {
  font-size: 0.68rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* Photo Preview Modal Overlay */
.photo-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.photo-preview-dialog {
  background: #ffffff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.photo-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.photo-preview-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.photo-preview-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
}

.photo-preview-img-wrap {
  width: 100%;
  max-height: 360px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-preview-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.photo-preview-meta {
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attendance-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attendance-btn-primary {
  width: 100%;
  height: 44px;
  background: #2d6a4f;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.attendance-btn-primary:hover {
  background: #22543d;
}

.attendance-btn-primary:active {
  transform: scale(0.985);
}

.btn-primary-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.btn-primary-arrow {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 6px;
}

/* Subpages (Supervisor Camera, Supervisor Result, Workers, Summary) */
/* ---------- Camera Page (Presensi Supervisor Datang) ---------- */
.attendance-camera-page {
  flex: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000000;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.camera-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  background: rgba(20, 20, 20, 0.75);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  backdrop-filter: blur(4px);
}

.camera-icon-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.camera-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  flex: 1;
  margin-left: 12px;
}

.camera-viewport-area {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111111;
}

.camera-video-feed,
.camera-fallback-feed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  padding: 60px 16px 90px;
}

.camera-hint-banner {
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  max-width: 280px;
  margin-bottom: 24px;
  line-height: 1.35;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.camera-face-frame {
  width: 180px;
  height: 180px;
  border: 2.5px dashed rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.22);
}

.camera-identity-badge {
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.camera-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 96px;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding-bottom: var(--safe-bottom);
}

.camera-shutter-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3.5px solid #ffffff;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease;
}

.camera-shutter-btn:active {
  transform: scale(0.92);
}

.shutter-inner-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffffff;
  display: block;
}

/* ---------- Result Page (Presensi Supervisor Datang) ---------- */
.attendance-result-page {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
}

.result-topbar {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 12px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  gap: 6px;
}

.result-back-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #116834;
  border-radius: 6px;
  flex-shrink: 0;
}

.result-page-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-body-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.result-user-header {
  margin-bottom: 16px;
}

.result-user-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.result-user-sub {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 500;
}

.result-photo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.result-photo-card {
  position: relative;
  width: 195px;
  height: 195px;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-photo-watermark {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 0.58rem;
  padding: 3px 6px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: right;
  pointer-events: none;
}

.result-info-summary {
  text-align: center;
  margin-bottom: 18px;
}

.result-att-label {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.result-att-time {
  font-size: 0.96rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

.result-att-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
}

.result-detail-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  margin-bottom: auto;
}

.detail-table-row {
  display: flex;
  align-items: center;
  font-size: 0.92rem;
  color: #1e293b;
}

.detail-label {
  width: 130px;
  color: #334155;
  font-weight: 500;
  flex-shrink: 0;
}

.detail-colon {
  margin-right: 8px;
  color: #64748b;
  font-weight: 700;
}

.detail-value {
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #22c55e;
  color: #ffffff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.result-footer-bar {
  flex-shrink: 0;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.btn-result-save {
  width: 100%;
  height: 48px;
  background: #116834;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-result-save:hover {
  background: #0d5529;
}

.btn-result-save:active {
  transform: scale(0.985);
}

/* ---------- Presensi Pekerja Datang Page ---------- */
.attendance-workers-page {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.workers-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.workers-back-btn,
.workers-add-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #116834;
  border-radius: 6px;
}

.workers-back-btn:hover,
.workers-add-btn:hover {
  background: #f1f5f9;
}

.workers-page-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.workers-body-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
}

.workers-mantri-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 16px;
}

.mantri-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.mantri-sub {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.mantri-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.mantri-total-num {
  font-size: 1.28rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.mantri-total-label {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

.workers-section-header {
  margin-bottom: 8px;
}

.workers-section-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.workers-list-container {
  margin-bottom: 18px;
}

.workers-flat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.worker-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #f1f5f9;
  user-select: none;
  touch-action: pan-y;
}

.worker-row-left {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}

.worker-item-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-item-meta {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 400;
}

.worker-row-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.worker-badge-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  background: #dc2626;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.worker-thumb-wrap {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  overflow: hidden;
  background: #111111;
  flex-shrink: 0;
}

.worker-photo-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.worker-switch-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 14px;
  border: none;
  padding: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.worker-switch-toggle.is-checked {
  background: #116834;
}

.toggle-slider {
  display: block;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
}

.worker-switch-toggle.is-checked .toggle-slider {
  transform: translateX(20px);
}

/* Section: Tidak Hadir */
.not-present-header {
  margin-top: 6px;
  margin-bottom: 8px;
}

.absent-card-container {
  background: #e2e8f0;
  border-radius: 8px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.absent-flat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.absent-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #cbd5e1;
}

.absent-row-item:last-child {
  border-bottom: none;
}

.absent-row-left {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.absent-item-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1px;
}

.absent-item-meta {
  font-size: 0.8rem;
  color: #64748b;
}

.absent-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
}

.absent-code-badge.badge-c {
  background: #3b82f6;
}

.absent-code-badge.badge-p4 {
  background: #c026d3;
}

.workers-footer-bar {
  flex-shrink: 0;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.btn-workers-save {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-workers-save.is-disabled {
  background: #cccccc;
  color: #ffffff;
  cursor: not-allowed;
}

.btn-workers-save.is-active {
  background: #116834;
  color: #ffffff;
  cursor: pointer;
}

.btn-workers-save.is-active:hover {
  background: #0d5529;
}

.btn-workers-save.is-active:active {
  transform: scale(0.985);
}

/* In-Page Worker Camera Overlay */
.worker-camera-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: #000000;
  display: flex;
  flex-direction: column;
}

.worker-cam-fullscreen {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Modal Tambah Pekerja */
.add-worker-modal-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
}

.add-worker-search-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.92rem;
  outline: none;
}

.add-worker-search-input:focus {
  border-color: #116834;
}

.add-worker-list-scroll {
  overflow-y: auto;
  max-height: 260px;
}

.add-worker-results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.add-worker-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  border-radius: 4px;
}

.add-worker-item-btn:hover {
  background: #f8fafc;
}

.add-item-info {
  display: flex;
  flex-direction: column;
}

.add-item-info strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.add-item-info span {
  font-size: 0.8rem;
  color: #64748b;
}

.add-icon-plus {
  font-size: 1.25rem;
  font-weight: 700;
  color: #116834;
}

.no-worker-found {
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.88rem;
}

/* Subpages Generic (Summary) */
.attendance-subpage {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  padding: 0;
  overflow: hidden;
}

.subpage-header {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 12px;
  flex-shrink: 0;
}

.subpage-back-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #1e293b;
}

.subpage-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.subpage-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 16px;
  overflow-y: auto;
}

.subpage-footer {
  flex-shrink: 0;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.attendance-form-card,
.summary-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

.form-group-info .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.92rem;
  border-bottom: 1px dashed #f1f5f9;
}

.camera-preview-box {
  margin: 16px 0;
  min-height: 180px;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  gap: 8px;
  font-size: 0.88rem;
  overflow: hidden;
}

.worker-search-box {
  margin-bottom: 12px;
}

.worker-list-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.worker-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.worker-item-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}

.worker-item-row:last-child {
  border-bottom: none;
}

.worker-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #116834;
  overflow: hidden;
  flex-shrink: 0;
}

.worker-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.worker-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.worker-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.worker-meta {
  font-size: 0.78rem;
  color: #64748b;
}

.worker-toggle-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.worker-toggle-btn.is-present {
  background: #116834;
  border-color: #116834;
  color: #ffffff;
}

.summary-record-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.summary-record-item:last-child {
  border-bottom: none;
}

.record-meta {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

/* ---------- Profil Saya (My Profile) ---------- */
.profile-page-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #f8fafc;
  overflow: hidden;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  background: #116834;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: background-color 0.15s ease;
}

.profile-back-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.profile-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-align: center;
  flex: 1;
}

.profile-header-spacer {
  width: 36px;
}

@media (min-width: 640px) {
  .profile-header {
    background: #ffffff;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
  }

  .profile-back-btn {
    color: #116834;
  }

  .profile-back-btn:hover {
    background-color: #f1f5f9;
  }

  .profile-header-title {
    color: #0f172a;
    text-align: left;
    margin-left: 8px;
  }
}

.profile-main-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px calc(24px + var(--safe-bottom, 16px));
  min-height: 0;
  box-sizing: border-box;
}

.profile-container {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

.profile-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.profile-summary-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid #bbf7d0;
}

.profile-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-summary-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.profile-summary-code {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.profile-position-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 10px;
  background: #eafaf1;
  color: #15803d;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
}

.profile-status-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 20px;
  flex-shrink: 0;
}

.profile-dot-active {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}

.profile-status-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: #166534;
}

.profile-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}

.profile-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.profile-field-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  padding: 2px 0;
}

.profile-field-label {
  color: #64748b;
  font-weight: 500;
}

.profile-field-value {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
}

.profile-status-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.profile-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-status-circle {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}

.profile-status-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #166534;
}

.profile-status-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

.profile-notice-box {
  border-left: 3px solid #94a3b8;
  background: #f1f5f9;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin-top: 4px;
}

.profile-notice-text {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}