/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.light-style .menu .app-brand.demo {
  height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo {
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  display: -ms-flexbox;
  display: flex;
  width: 34px;
  height: 24px;
}

.app-brand-logo.demo svg {
  width: 35px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 78px !important;
}
/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 254px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

#perBagian {
  white-space: pre-line;
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
}
.belum-lapor {
  color: red;
  font-weight: bold;
}
.progress-header {
  font-weight: bold;
  margin-top: 10px;
}

.fc-event, .fc-event-dot {
  color: white !important;
}

#leaflet2 {
  height: 400px; /* Set a fixed height */
  width: 100%; /* Ensure it takes up the full width */
}

.swal2-container {
  z-index: 9999 !important;
}

#loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 999999; /* pastikan di atas modal / elemen lain */
}

/* Kontainer loading */
.loading-wrapper {
  text-align: center;
  color: #fff;
}

/* Spinner animasi modern */
.loading-spinner {
  width: 70px;
  height: 70px;
  border: 6px solid rgba(255,255,255,0.2);
  border-top: 6px solid #00c8ff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 15px auto;
}

/* Teks di bawah spinner */
.loading-text {
  font-family: 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  animation: fadePulse 1.5s ease-in-out infinite;
}

/* Animasi putar */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Animasi teks berdenyut */
@keyframes fadePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.timeline img:hover {
  transform: scale(1.05);
  transition: .2s;
}

.row-hijau {
  background-color: #d4edda !important;
  color: #155724 !important;
}

.row-merah {
  background-color: #f8d7da !important;
  color: #721c24 !important;
}

@media (min-width: 992px) {
  .custom-preview-modal {
      max-width: 700px;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
  .custom-preview-modal {
      max-width: 600px;
  }
}

/* Mobile tetap full */
@media (max-width: 767px) {
  .custom-preview-modal {
      margin: 10px;
  }
}

#container_cam{
  position:relative;
  width:720px;
  margin:auto;
}

video{
  width:100%;
  height:auto;
  border-radius:10px;
}

canvas{
  position:absolute;
  left:0;
  top:0;
}


#status{
  margin-top:10px;
  font-size:18px;
}

#camera-container{
  width:100%;
  max-width:480px;
  margin:auto;
  position:relative;
}

.sidebar-scroll-sticky {
  position: sticky;
  top: 100px; /* Adjust sesuai navbar height */
  z-index: 1;
}
.sidebar .toc {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.sidebar .toc .section1 {
  background-color: #f8f9fa; /* Abu-abu muda */
  padding: 10px;
  margin-bottom: 20px; /* Jarak ke section2 */
}
.sidebar .toc .section2 {
  text-align: center;
  font-weight: bold;
  margin-bottom: 20px; /* Jarak ke section3 */
}
.sidebar .toc .section3 {
  text-align: center;
  margin-bottom: 20px; /* Jarak ke section4 */
}
.sidebar .toc .section3 .btn {
  background-color: #004080; /* Biru BRI */
  color: white;
}
.sidebar .toc .section4 {
  text-align: center;
  color: #6c757d; /* Abu-abu */
  margin-bottom: 0;
}
.floating-sidebar {
  display: none; /* Hidden di desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%; /* Full-width */
  background-color: #fff;
  padding: 10px 0; /* Kurangi padding vertikal */
  border-top: 1px solid #dee2e6;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  text-align: center;
}
.floating-sidebar .container {
  max-width: 90%; /* Batasi lebar agar nggak nempel tepi */
  margin: 0 auto; /* Center container */
}
.floating-sidebar .section3 {
  margin-bottom: 10px;
}
.floating-sidebar .section3 .btn {
  background-color: #004080; /* Biru BRI */
  color: rgb(6, 251, 67);
  width: 100%;
  max-width: 150px; /* Batasi lebar button */
  margin: 0 auto; /* Center button */
}
.floating-sidebar .section4 {
  color: #6c757d; /* Abu-abu */
}

@media (max-width: 991.98px) {
  .sidebar-scroll-sticky {
      display: none; /* Sembunyikan sidebar di mobile */
  }
  .floating-sidebar {
      display: block; /* Tampilkan floating di mobile */
  }

  .section3{
      display:flex;
      justify-content:center;
      align-items:center;
      gap:10px;
      margin-top:10px;
  }

  .menu-icon{
    text-decoration:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
  }

/* tombol utama */
  .menu-icon.main{
      width:75px;
      height:75px;
      background:#0d6efd;
      color:#fff;
      border-radius:50%;

      border:5px solid #ffffff;
      outline:2px solid #0d6efd;

      font-size:10px;
      box-shadow:0 8px 20px rgba(0,0,0,0.2);
  }

  .menu-icon.main span{
      font-size:10px;
      margin-top:5px;
  }

  /* tombol kecil */
  .menu-icon.small{
      width:35px;
      height:35px;
      background:#ffc107;
      color:#333;
      border-radius:50%;

      border:3px solid #ffffff;
      outline:2px solid #ffc107;

      font-size:8px;
      box-shadow:0 5px 12px rgba(0,0,0,0.15);
  }

  /* hover effect */
  .menu-icon:hover{
      transform:scale(1.05);
      transition:0.2s;
  }

}

#dtPivot td{
  text-align:center;
  font-weight:bold;
}

/* Hadir */
.absen-hadir{
  background:#c8f7c5;
  color:#1e7e34;
}

/* Terlambat */
.absen-terlambat{
  background:#ffe8a1;
  color:#856404;
}

/* Ijin */
.absen-ijin{
  background:#cfe2ff;
  color:#084298;
}

/* Alpha */
.absen-alpha{
  background:#f8d7da;
  color:#842029;
}

/* Weekend */
.absen-weekend{
  background:#d72004;
  color:#6c757d;
}

.timeline-wrapper {
  width: 100%;
  overflow-x: auto;   /* 🔥 scroll ke samping */
  overflow-y: auto;   /* 🔥 scroll ke bawah */
  max-height: 500px;  /* 🔥 biar gak kepanjangan */
  border: 1px solid #ddd;
  border-radius: 6px;
}


.timeline-day {
  margin-bottom: 20px;
}

.timeline-title {
  font-weight: bold;
  margin: 10px;
}

.timeline-row {
  display: flex;
  border-bottom: 1px solid #eee;
  height: 40px;
}

.timeline-label {
  width: 150px;
  font-size: 12px;
  padding: 10px 5px;
  background: #fafafa;
  border-right: 1px solid #eee;
}

.timeline-bars {
  position: relative;
  flex: 1;
}

.bar {
  position: absolute;
  height: 26px;
  top: 7px;
  border-radius: 5px;
  font-size: 11px;
  padding: 2px 6px;
  color: #fff;
  white-space: nowrap;
}

/* warna */
.jadwal { background: #2196F3; }
.absen  { background: #4CAF50; }
.alpha  { background: #F44336; }

#gantt-container {
  /*position: relative;*/
  /*border: 1px solid #ccc;*/
  /*width: 100%;*/
  overflow: hidden;
  /*font-family: Arial;*/
}

.gantt-header {
  display: flex;
  /*position: sticky; */
  /*top: 0;*/
  background: #f5f5f5;
  /*z-index: 2;*/
}

.gantt-header div {
  border-right: 1px solid #ddd;
  padding: 5px;
  font-size: 12px;
  min-width: 80px;
  text-align: center;
}

.gantt-row {
  display: flex;
  border-bottom: 1px solid #eee;
}

.task-name {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
}


.bar {
  position: absolute;
  height: 20px;
  top: 10px;
  border-radius: 4px;
  cursor: move;
}

.progress {
  height: 100%;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

.tooltip {
  position: absolute;
  background: black;
  color: white;
  padding: 5px;
  font-size: 12px;
  display: none;
  z-index: 999;
}

#gantt-svg {
  position: absolute;
  top: 0;
  left: 250px;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gantt-header-wrapper {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f5f5f5;
}



.header-left {
  width: 250px;
  min-width: 250px;
  border-right: 1px solid #ddd;
}

.header-right {
  flex-direction: column;
  display: flex;
  overflow: hidden;
}

.gantt-body {
  overflow: auto;
  height: 400px;
}

.header-right div {
  min-width: 80px;
  border-right: 1px solid #ddd;
  text-align: center;
  font-size: 12px;
}

.progress {
  position: relative;
}

.progress-label {
  position: absolute;
  right: 5px;
  top: 0;
  font-size: 10px;
  color: white;
  font-weight: bold;
}

.header-date-row,
.header-hour-row {
    display: flex;
}

.header-date {
    text-align: center;
    font-weight: bold;
    border-right: 1px solid #ccc;
}

.header-hour {
    text-align: center;
    border-right: 1px solid #eee;
}

