:root {
  --malkist-red-dark: #991b1b;
  --malkist-red: #dc2626;
  --malkist-red-light: #fef2f2;
  --malkist-white: #ffffff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input,
textarea,
select {
  user-select: text;
}

html,
body {
  font-family: 'Roboto', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f1e4e4;
  color: #1e293b;
  margin: 0;
  padding: 0;
  overscroll-behavior-y: none;
}

/* ===================================================================== */
/* ANDROID NATIVE MOBILE APP SHELL (MOBILE-FIRST 480PX PHONE FRAME)      */
/* ===================================================================== */
.android-app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: #fffafa;
  position: relative;
  box-shadow: 0 0 50px rgba(153, 27, 27, 0.18);
  overflow-x: hidden;
  transition: max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mode Layar Lebar opsional khusus Admin saat buka tabel di Laptop/PC */
.android-app-shell.wide-mode {
  max-width: 1200px;
}

.android-bottom-nav {
  width: 100%;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  box-shadow: 0 -6px 24px rgba(185, 28, 28, 0.12);
  transition: max-width 0.25s ease;
}

.android-app-shell.wide-mode .android-bottom-nav {
  max-width: 1200px;
}

/* Tema Gradasi Merah Putih Khas Roma Malkist */
.malkist-gradient {
  background: linear-gradient(145deg, #991b1b 0%, #dc2626 55%, #b91c1c 100%);
}

.malkist-header-curve {
  background: linear-gradient(145deg, #881313 0%, #dc2626 60%, #b91c1c 100%);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: 0 8px 24px -4px rgba(185, 28, 28, 0.35);
}

.card-shadow {
  box-shadow: 0 4px 16px -2px rgba(185, 28, 28, 0.08), 0 2px 5px -1px rgba(15, 23, 42, 0.04);
}

/* Efek Sentuh Material Design 3 Android */
.android-press {
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.android-press:active {
  transform: scale(0.96);
}

/* Bottom Navigation Bar Android Material 3 */
.bottom-nav-item {
  position: relative;
  color: #64748b;
  transition: all 0.2s ease;
}

.bottom-nav-item.active {
  color: #dc2626;
  font-weight: 800;
}

.bottom-nav-item.active .nav-icon-wrap {
  background-color: #dc2626;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* Animasi Transisi Antar Tab Layaknya Aplikasi Android */
.tab-section {
  animation: androidFadeUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Bottom Sheet Modal Android */
.android-bottom-sheet {
  animation: androidSheetUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes androidSheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 42px;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.45);
  border-radius: 9999px;
  margin: 0 auto 6px auto;
}

/* Badge Status Langkah Gatekeeper */
.step-badge-done {
  background-color: #dc2626;
  color: #ffffff;
  border: 1.5px solid #b91c1c;
}

.step-badge-pending {
  background-color: #ffffff;
  color: #b91c1c;
  border: 1.5px solid #fecaca;
}

.step-badge-locked {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Hilangkan spinner default di input number agar rapi di Android */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
}

/* Custom Scrollbar Merah Putih */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: #fff5f5;
}
::-webkit-scrollbar-thumb {
  background: #fca5a5;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}

/* Digital Receipt Paper Styling */
.receipt-paper {
  background: #ffffff;
  border: 2px dashed #fca5a5;
  position: relative;
}

/* Print Stylesheet untuk Laporan Absensi & Cetak PDF */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  .android-app-shell {
    max-width: 100% !important;
    box-shadow: none !important;
  }
  .no-print,
  .android-bottom-nav,
  #toastContainer,
  button,
  .btn-print-hide {
    display: none !important;
  }
  .print-page-break {
    page-break-after: always;
    break-after: page;
  }
  .print-card {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1px solid #cbd5e1 !important;
    margin-bottom: 12px !important;
  }
}

