body {
  background-color: #fff;
  color: $000;
  font-family: sans-serif;
  overflow-y: hidden;
  scrollbar-width: none;
  max-width: 640px;
  margin: 0 auto;
  height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 640px;
}

body::-webkit-scrollbar {
  display: none;
}

.dark-mode {
  background-color: #303030;
  color: #ffffff;
}

.light-mode {
  background-color: #c5c5c5;
  color: #000000;
}

@media (prefers-color-scheme: light) {
  body {
    background-color: #c5c5c5;
    color: #000;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #303030;
    color: #fff;
  }
}

#rotate-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  text-align: center;
  padding-top: 100px;
  font-size: 20px;
  font-weight: bold;
}

#splash {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  z-index: 9999;
}

:root {
  --theme-bottom: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --theme-bottom: #121212;
  }
}

#form-section {
  display: none;
  height: 100vh;           /* Atur tinggi ke tinggi layar penuh */
  overflow-y: auto;        /* Aktifkan scroll vertikal jika kontennya lebih tinggi dari layar */
  position: relative;      /* Pastikan posisi tidak menyebabkan masalah scroll */
  max-width: 640px;
  margin: 0 auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE dan Edge lama */
}

#dashboard {
  display: none;
  height: 100vh;           /* Atur tinggi ke tinggi layar penuh */
  overflow-y: auto;        /* Aktifkan scroll vertikal jika kontennya lebih tinggi dari layar */
  position: relative;      /* Pastikan posisi tidak menyebabkan masalah scroll */
  max-width: 640px;
  margin: 0 auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE dan Edge lama */
}

#dashboard::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

#bgdashboard {
  min-height: 100vh;
  position: relative;
  padding-top: 0;
  overflow: hidden;
}

.bgtop {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 55vh;
  background-image:
    linear-gradient(to top, var(--gradient-color, rgba(0,0,0,0.8)) 0px, transparent 150px),
    url('glass1.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
  cursor: pointer;
      transition: filter 0.3s ease;
      filter: none; /* default no blur */
      user-select: none;
}

.bgtop-content {
  position: relative;
  top: 0;
  z-index: 1;
  margin-top: -55vh; /* "menarik" ke atas agar berada di atas background */
  height: 40vh;
  padding: 1.5rem;
}

.status-bar {
  top: -10vh;
  margin-top: 1rem;
  padding: 1rem;
  background-color: inherit;
  border-radius: 0.5rem;
  text-align: center;
}

#map {
  position: relative;
  opacity: 1;
  top: -5vh;
  margin: -50px 25px 1rem 25px; /* tarik ke atas agar sedikit overlap bgtop */
  height: 23vh;
  border-radius: 15px;
  z-index: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  background-color: #fff;
}

.main-content.pt-map {
  position: relative;
  margin-top: -5vh;
  z-index: 0;
  padding: 10px;
}

.btn-disabled {
  pointer-events: none;
  opacity: 0.6;
}

.leaflet-routing-container {
  display: none !important;
}

.bawah {
  font-weight: bold;
  font-size: 12px;
}

#loadingSpinner,
#loadingSpinner2 {
  margin-right: 8px;
}

.modal-backdrop.show {
  background-color: #000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion {
  color: black !important;
}

#calendar + .legend {
  margin-top: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 4px;
}

.focus-merah:focus {
  border-color: #444;
  box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.25);
}

.modal-content {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

#notif_absen {
  display: block;
  border-left: 4px solid orange;
  background-color: #fff8e1;
}

#statusContainer {
  width: 100%;
  overflow: hidden;
  background: inherit;
  padding: 10px;
  box-sizing: border-box;
}

#statusabsensi {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: marquee 15s linear infinite;
  font-weight: bold;
  color: #fff;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

body.modal-open {
  overflow: hidden;
}

#modalCamera .modal-dialog {
  max-width: 100%;
  margin: 0;
  height: 100vh;
}

#modalCamera .modal-content {
  border: none;
  border-radius: 0;
  height: 100vh;
  background-color: black;
}

#modalCamera .modal-body {
  padding: 0;
  height: calc(100vh - 70px);
  display: flex;
  justify-content: center;
  align-items: center;
}

#video,
#canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#canvas {
  max-height: 100vh;
  position: relative;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
}

#bgmodalRiwayat {
  border-radius: 0.5rem !important; /* Atau sesuai preferensi */
}

.camera-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: white;
  text-shadow: 0 0 10px black;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.modal-footer,
.modal-footer2 {
  position: absolute;
  width: 100%;
  background: transparent;
  border: none;
  justify-content: center;
  gap: 1rem;
}

.modal-footer {
  bottom: 8vh;
}

.modal-footer2 {
  bottom: 0;
}

.camera-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50vh;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
  z-index: 5;
  pointer-events: none;
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 1), transparent);
  z-index: 5;
  pointer-events: none;
}

#bgtop {
  border: none !important;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

#bgtop::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--bgtop-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  z-index: -1;
}

#bgtop > * {
  position: relative;
  z-index: 1;
}

#ucapan,
#nomorhp,
#hariTanggal,
#jamSekarang {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.text-shadow {
  text-shadow: 0 0 5px #000, 0 0 10px #000;
}

/* Wrapper utama */
.halamanKehadiran {
  height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;
  background-color: var(--bs-body-bg);
  overflow: hidden;
}

/* Header tidak sticky, tetap terlihat */
.header-kehadiran {
  flex-shrink: 0;
  padding: 10px 10px;
  background-color: var(--bs-body-bg);
  z-index: 1000;
}

/* Konten bisa scroll */
.konten-kehadiran {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Detail mode (tabel) container */
#konten-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Buat tabel bisa scroll di dalam */
.table-responsive {
  flex: 1;
  overflow-y: auto;
}

/* Sticky header untuk tabel */
thead.sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: white;
}


#konten-galeri {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 0;
  padding-bottom: 1rem;
  margin: 0;
}

.k-gallery-item {
  width: calc((100% - 2px) / 3);
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.k-gallery-item::before {
  content: '';
  display: block;
  padding-top: calc(640 / 480 * 100%);
}

.k-gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay jam masuk */
.k-gallery-jam {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 2px 0;
}

.kehadiran-viewer img {
  cursor: zoom-in;
}


.halamanGallery {
  height: 100vh; /* Tinggi penuh layar */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0;
  margin-top: 0px;
}

.header-gallery {
  position: absolute;
  top: 0;
  left: 50%; /* titik tengah layar */
  transform: translateX(-50%); /* geser balik setengah lebar */
  width: 100%;
  max-width: 640px;
  padding: 10px 10px;
  z-index: 1000;
}


.halaman {
  height: 100vh; /* Tinggi penuh layar */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 1rem;
  margin-top: 0px;
}

.header-kinerja {
  z-index: 10;
}

#hasil-kinerja {
  flex: 1; /* Ambil ruang sisa */
  overflow-y: auto; /* Scroll vertikal jika perlu */
  padding-bottom: 5rem;
}

.object-fit-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
	
[data-theme="dark"] .card {
  background-color: #111 !important;
  color: #fff !important;
  border-color: #555 !important;
}
[data-theme="light"] .card {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #ccc !important;
}


#gallery-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1px; /* jarak antar foto */
  padding: 0;
  overflow-y: auto; /* Scroll vertikal jika perlu */
  padding-bottom: 1rem;
  margin: 0;
}

#hasil-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1px; /* jarak antar foto */
  padding: 0;
  overflow-y: auto; /* Scroll vertikal jika perlu */
  padding-bottom: 1rem;
  margin: 0;
}

.gallery-item {
  width: calc((100% - 2px) / 3); /* 3 kolom, 2px gap total */
  position: relative;
  overflow: hidden;
}

/* Elemen "dummy" untuk bikin rasio 3:4 secara manual */
.gallery-item::before {
  content: '';
  display: block;
  padding-top: calc(640 / 480 * 100%); /* = 133.33% dari lebar */
}

/* Posisi gambar mengisi penuh item */
.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay tanggal */
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.1);
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

#atas {
  background: linear-gradient(to bottom, var(--theme-color, #333) 0%, rgba(255,255,255,0) 100%);
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: 100px;
  z-index: 999;
  padding: 25px;
  box-sizing: border-box;
  pointer-events: auto;
}


/* Kelas ini bikin blur */
.blur-bg {
  filter: blur(4px);
}

.foto-thumbnail {
  width: 50px;
  height: 66px;
  object-fit: cover;
  margin-right: 15px;
  border-radius: 5px;
}
.absensi-detail {
  font-size: 14px;
}
.card-title {
  font-size: 17px;
}

.absensi-detail ol,
.absensi-detail ul {
  margin-top: 0.25em;
  margin-bottom: 0.25em;
  padding-left: 1.2em;
}

.absensi-detail {
  white-space: normal; /* atau pre-wrap jika ingin pertahankan \n */
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }
  .logo-dark {
    display: inline;
  }
}
