/* Design System AbsenPMF - MyXL Theme (Clean White & Vibrant Royal Blue + Fresh Green Accent) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  /* MyXL Inspired Color Palette */
  --bg-primary: #f0f4f9;
  --bg-app: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  
  --border-color: #e2e8f0;
  --border-highlight: #bfdbfe;

  --myxl-blue: #0052cc;
  --myxl-blue-gradient: linear-gradient(135deg, #003db3 0%, #0052cc 60%, #0066ff 100%);
  --myxl-blue-light: #eff6ff;
  --myxl-blue-glow: rgba(0, 82, 204, 0.2);

  --accent-green: #00c853;
  --accent-green-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --accent-green-light: #ecfdf5;

  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 4px 20px rgba(0, 82, 204, 0.08);
  --shadow-glow: 0 8px 25px rgba(0, 82, 204, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 82, 204, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(0, 200, 83, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 90px;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

@media (min-width: 481px) {
  .app-container {
    min-height: 92vh;
    margin-top: 2vh;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
  }
}

/* Header styling - MyXL Royal Blue */
.header-bar {
  background: var(--myxl-blue-gradient);
  padding: 16px 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 61, 179, 0.2);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--myxl-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 11px;
  color: #e0f2fe;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-login-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.admin-login-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.admin-login-btn.logged-in {
  background: var(--accent-green);
  border-color: #00e676;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 200, 83, 0.4);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 10px 4px 14px 4px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

@media (min-width: 481px) {
  .bottom-nav {
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
  }
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  flex: 1;
  position: relative;
}

.nav-item i {
  font-size: 19px;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--myxl-blue);
  background: var(--myxl-blue-light);
}

.nav-item.active i {
  transform: translateY(-2px);
  color: var(--myxl-blue);
}

.nav-item.admin-only {
  display: none; /* Controlled by JS depending on Admin status */
}

.nav-item.admin-only.show-admin {
  display: flex;
}

/* Main Content Area */
.app-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

/* Cards & Components */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.glass-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--myxl-blue);
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.form-control {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230052cc'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-control:focus {
  border-color: var(--myxl-blue);
  box-shadow: 0 0 0 4px var(--myxl-blue-glow);
}

/* Password Input Wrapper & Eye Toggle Button */
.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper .form-control {
  padding-right: 44px;
}

.btn-toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-toggle-password:hover {
  color: var(--myxl-blue);
  background: #f1f5f9;
}

/* Employee Select Box */
.karyawan-select-box {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1.5px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 4px 15px rgba(0, 82, 204, 0.05);
}

/* Segmented Toggle Switch (Dinas Kantor vs Dinas Luar) */
.dinas-toggle-container {
  display: flex;
  background: #e2e8f0;
  background: linear-gradient(180deg, #e6ecf5 0%, #dae3f0 100%);
  border-radius: 50px;
  padding: 5px;
  margin-bottom: 16px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(255, 255, 255, 0.8);
}

.dinas-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 8px;
  border-radius: 40px;
  font-family: var(--font-primary);
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  z-index: 2;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dinas-toggle-btn:hover:not(.active) {
  color: var(--myxl-blue);
}

.dinas-toggle-btn.active {
  background: var(--myxl-blue);
  background: linear-gradient(135deg, #0052cc 0%, #0066ff 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 82, 204, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
}

.dinas-toggle-btn.dinas-luar.active {
  background: var(--myxl-blue);
  background: linear-gradient(135deg, #0052cc 0%, #0066ff 100%);
  box-shadow: 0 6px 18px rgba(0, 82, 204, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* GPS Info Card Banner */
.gps-banner {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--myxl-blue);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.gps-banner.valid {
  border-left-color: var(--accent-green);
  background: #f0fdf4;
}

.gps-banner.invalid {
  border-left-color: var(--accent-rose);
  background: #fff1f2;
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: var(--myxl-blue-gradient);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: var(--accent-green-gradient);
  color: white;
  box-shadow: 0 8px 25px rgba(0, 200, 83, 0.25);
}

.btn-rose {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.25);
}

.btn-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* Camera Modal & Viewfinder */
.camera-modal-content {
  background: #ffffff;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.camera-viewport-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--myxl-blue);
}

#camera-video, #canvas-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#camera-video.rear-camera {
  transform: scaleX(1);
}

#canvas-preview {
  transform: none;
  display: none;
}

.camera-overlay-box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4), transparent);
  padding: 16px 14px;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overlay-stamp-time {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8;
}

.overlay-stamp-gps {
  font-size: 11px;
  color: #fbbf24;
  font-weight: 600;
}

.overlay-stamp-address {
  font-size: 11px;
  color: #e2e8f0;
  line-height: 1.3;
}

/* Clock & Location Card (Fixed / Sticky position when scrolling) */
.clock-display-card {
  text-align: center;
  padding: 18px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: sticky;
  top: 72px;
  z-index: 80;
  box-shadow: 0 4px 20px rgba(0, 82, 204, 0.1);
}

.big-clock {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--myxl-blue);
  margin: 6px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.clock-segment {
  display: inline-block;
  position: relative;
  overflow: hidden;
  height: 46px;
  line-height: 46px;
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.clock-segment .clock-val {
  display: block;
  width: 100%;
  text-align: center;
  position: relative;
  will-change: transform, opacity;
}

.clock-segment .clock-val.slide-out {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  animation: clockSlideOut 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.clock-segment .clock-val.slide-in {
  position: relative;
  width: 100%;
  animation: clockSlideIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes clockSlideOut {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes clockSlideIn {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.clock-sep {
  display: inline-block;
  line-height: 42px;
  height: 46px;
  font-weight: 800;
  color: var(--myxl-blue);
  opacity: 0.8;
  margin: 0 1px;
  vertical-align: middle;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-green-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #047857;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.location-badge.invalid {
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.3);
  color: #be123c;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
}

.stat-title {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Attendance Records List Layout (Scrollable container) */
.attendance-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.attendance-list::-webkit-scrollbar {
  width: 5px;
}

.attendance-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.attendance-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.attendance-list::-webkit-scrollbar-thumb:hover {
  background: var(--myxl-blue);
}

.attendance-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.attendance-item.clickable {
  cursor: pointer;
}

.attendance-item.clickable:hover {
  border-color: var(--myxl-blue);
  background: var(--myxl-blue-light);
  transform: translateY(-1px);
}

/* Detail Modal Styles */
.detail-info-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.detail-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
}

.detail-info-row:last-child {
  margin-bottom: 0;
}

.detail-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.detail-photo-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.detail-photo-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--myxl-blue);
}

.detail-photo-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.detail-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #f1f5f9;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 11px;
  padding: 10px;
  gap: 6px;
}

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

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--myxl-blue-light);
  color: var(--myxl-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.item-icon.dinas-kantor-icon {
  background: #eff6ff;
  color: #0052cc;
  border: 1px solid #bfdbfe;
}

.item-icon.dinas-luar-icon {
  background: #f5f3ff;
  color: #8b5cf6;
  border: 1px solid #ddd6fe;
}

.item-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-lokasi {
  font-size: 11px;
  color: var(--myxl-blue);
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-right {
  text-align: right;
}

/* Status Badges */
.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.status-badge.hadir {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-badge.terlambat, .status-badge.hadir.terlambat {
  background: #ffe4e6 !important;
  color: #be123c !important;
  border: 1px solid #fca5a5 !important;
}

.status-badge.tidak-hadir, .status-badge.tidak {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fca5a5;
}

/* Modal Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Toast Container & Centered Notifications */
.toast-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2999;
  animation: fadeIn 0.25s ease-out;
}

.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3000;
  width: 90%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border: 1.5px solid var(--border-highlight);
  color: var(--text-main);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  width: 100%;
}

.toast.error {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border: 2px solid #fecdd3;
  color: #ffffff;
  box-shadow: 0 20px 50px rgba(225, 29, 72, 0.55);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.45;
  padding: 20px 22px;
  border-radius: 20px;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@media print {
  body { background: white !important; color: black !important; }
  .app-container { max-width: 100% !important; box-shadow: none !important; border: none !important; }
  .bottom-nav, .header-bar, .no-print { display: none !important; }
  .glass-card { background: white !important; border: 1px solid #ccc !important; color: black !important; }
}

/* Settings Submenu List Styles */
.settings-menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.settings-menu-item:hover, .settings-menu-item:active {
  background: #f8fafc;
  border-color: var(--myxl-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 82, 204, 0.1);
}

.settings-menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.settings-menu-content {
  flex: 1;
}

.settings-menu-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.settings-menu-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.settings-menu-arrow {
  color: #94a3b8;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.settings-menu-item:hover .settings-menu-arrow {
  color: var(--myxl-blue);
  transform: translateX(3px);
}

/* Camera Video Blur & Transition Rules */
#camera-video {
  transition: filter 0.4s ease;
}

#camera-video.camera-unselected-blur {
  filter: blur(14px) brightness(0.9);
}

/* Semi-Transparent Stationary Dinas Selector Box in Camera Viewport */
.floating-dinas-box {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 92%;
  max-width: 360px;
  z-index: 25;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 10px 14px 20px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-dinas-box.collapsed {
  /* Geser naik sepenuhnya keatas viewport, HANYA menyisakan tag biru saja di paling atas */
  transform: translateX(-50%) translateY(calc(-100% - 14px));
}

.floating-dinas-box .dinas-toggle-container {
  background: rgba(218, 227, 240, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Bookmark Pull-Tab Tag Biru (Hanya lambang naik / turun) */
.floating-dinas-pulltab {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0052cc 0%, #0066ff 100%);
  color: #ffffff;
  width: 46px;
  height: 22px;
  border-radius: 0 0 14px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.45), 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-top: none;
  z-index: 30;
  transition: all 0.3s ease;
  user-select: none;
}

.floating-dinas-pulltab:hover {
  background: linear-gradient(135deg, #0043a8 0%, #0052cc 100%);
  transform: translateX(-50%) scale(1.1);
}

.floating-dinas-pulltab .pulltab-notch {
  width: 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
}

/* Sharp Appearing & Disappearing Blinking Notice Text Animation */
.blinking-notice-text {
  animation: sharpBlinkText 0.8s steps(1, start) infinite;
}

@keyframes sharpBlinkText {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.12;
  }
}

/* Hold-to-Confirm Button & Running Loading Bar Effect */
.confirm-hold-btn {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.confirm-hold-btn.confirm-btn-holding {
  transform: scale(0.97);
  box-shadow: 0 2px 12px rgba(225, 29, 72, 0.5) !important;
}

.confirm-hold-btn.confirm-btn-success-flash {
  animation: confirmSuccessFlash 0.35s ease-in-out;
}

@keyframes confirmSuccessFlash {
  0% {
    transform: scale(0.97);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.02);
    filter: brightness(1.35);
    box-shadow: 0 0 22px rgba(225, 29, 72, 0.7);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.confirm-btn-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(136, 19, 55, 0.7) 0%, rgba(159, 18, 57, 0.92) 100%);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  transition: width 0s linear;
}

/* Glowing leading edge / scanner laser line when progress is moving */
.confirm-btn-progress::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3.5px;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff, 0 0 4px rgba(255, 255, 255, 0.95);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.confirm-btn-holding .confirm-btn-progress::after {
  opacity: 1;
}

/* Subtle shake animation when user just taps instead of holding */
@keyframes shakeSoft {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.shake-hint {
  animation: shakeSoft 0.35s ease-in-out;
}

/* Hint text highlight animation */
@keyframes hintPulse {
  0%, 100% { color: var(--text-muted); font-weight: normal; }
  30%, 70% { color: var(--accent-rose); font-weight: 600; }
}

.hint-highlight {
  animation: hintPulse 0.8s ease-in-out;
}
