@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .sidebar-nav-wrapper {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 999;
    transition: all 0.3s ease;
    overflow-y: auto;
  }

  .sidebar-nav-wrapper.active {
    left: 0;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.2);
  }

  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background: #4a6cf7;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(74, 108, 247, 0.3);
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

  .main-wrapper {
    margin-left: 0 !important;
    padding: 20px 15px !important;
    margin-top: 60px;
  }

  .header {
    padding: 15px;
    margin-left: 0 !important;
  }

  .header .header-left {
    display: none;
  }

  .container-fluid, .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .card, .card-style {
    margin-bottom: 20px;
    padding: 20px 15px;
  }

  .card-header {
    padding: 12px 15px;
    font-size: 16px;
  }

  .card-body {
    padding: 15px;
  }

  .title-style {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .table-wrapper, .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
  }

  table {
    min-width: 600px;
    font-size: 13px;
  }

  table th, table td {
    padding: 8px;
    white-space: nowrap;
  }

  .dataTables_wrapper {
    font-size: 13px;
  }

  .dataTables_length, .dataTables_filter {
    margin-bottom: 15px;
  }

  .dataTables_filter input {
    width: 100%;
    max-width: 200px;
  }

  .button-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .button-group .btn {
    width: 100%;
    margin: 0;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-control, .form-select {
    font-size: 14px;
    padding: 10px 15px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }

  .modal-content {
    border-radius: 12px;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-footer {
    padding: 12px 15px;
  }

  .row {
    margin-left: -10px;
    margin-right: -10px;
  }

  .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 15px;
  }

  .avatar-preview {
    width: 100px;
    height: 100px;
  }

  #map {
    height: 300px !important;
    width: 100% !important;
  }

  .webcam-container {
    width: 100%;
    max-width: 100%;
  }

  #my_camera video, #my_camera_keluar video {
    width: 100% !important;
    height: auto !important;
    max-height: 400px;
  }

  #results, #results_keluar {
    width: 100%;
  }

  #results img, #results_keluar img {
    width: 100%;
    height: auto;
  }

  .presensi-card {
    padding: 15px;
  }

  .time-display {
    font-size: 32px;
  }

  .date-display {
    font-size: 16px;
  }

  img.img-fluid {
    max-width: 100%;
    height: auto;
  }

  .alert {
    font-size: 14px;
    padding: 12px 15px;
  }

  .breadcrumb {
    font-size: 13px;
    padding: 10px 15px;
  }

  .pagination {
    font-size: 13px;
  }

  .pagination .page-link {
    padding: 6px 12px;
  }
}

@media screen and (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .mobile-menu-toggle {
    padding: 8px 12px;
    font-size: 14px;
  }

  .main-wrapper {
    padding: 15px 10px !important;
  }

  .card, .card-style {
    padding: 15px 10px;
  }

  .card-header {
    padding: 10px 12px;
    font-size: 15px;
  }

  .card-body {
    padding: 12px;
  }

  .title-style {
    font-size: 18px;
  }

  table {
    font-size: 12px;
  }

  table th, table td {
    padding: 6px;
    font-size: 12px;
  }

  .btn {
    padding: 8px 15px;
    font-size: 13px;
  }

  .btn-sm {
    padding: 5px 10px;
    font-size: 12px;
  }

  .form-control, .form-select {
    font-size: 13px;
    padding: 8px 12px;
  }

  .form-label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .time-display {
    font-size: 24px;
  }

  .date-display {
    font-size: 14px;
  }

  .modal-header h5 {
    font-size: 16px;
  }

  .modal-body {
    padding: 12px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 20px;
  }

  h4 {
    font-size: 18px;
  }

  h5 {
    font-size: 16px;
  }

  .navbar-logo img {
    width: 70% !important;
  }

  #map {
    height: 250px !important;
  }

  #my_camera video, #my_camera_keluar video {
    max-height: 300px;
  }
}

.mobile-menu-toggle {
  display: none;
}

@media screen and (max-width: 1024px) {
  .sidebar-nav-wrapper {
    position: fixed;
    left: -280px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .header {
    margin-left: 0;
  }
}

.touch-action-none {
  touch-action: none;
}

.user-select-none {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="file"],
textarea,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: 16px;
}

button, .btn, a {
  -webkit-tap-highlight-color: transparent;
}

* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

select::-ms-expand {
  display: none;
}

.card img, .card-body img {
  max-width: 100%;
  height: auto;
}

@media screen and (max-width: 768px) {
  .d-md-flex {
    display: block !important;
  }

  .justify-content-between > * {
    margin-bottom: 10px;
  }
}
