/*
 * PATCH CSS STATIS — TIDAK PERLU NPM / NODE / BUILD APAPUN.
 * -----------------------------------------------------------------
 * File ini murni CSS biasa (bukan Tailwind source), berisi hanya
 * class-class BARU yang dipakai di perbaikan layout responsif tapi
 * belum ada di CSS Tailwind yang sudah ter-compile di public/build.
 * Cukup upload file ini apa adanya lalu di-<link> dari <head> —
 * browser langsung memakainya, tidak ada proses compile.
 *
 * Begitu suatu saat kamu berhasil menjalankan `npm run build`,
 * class-class ini akan otomatis ikut ter-compile ke app.css versi
 * Tailwind juga — file ini tidak akan bertabrakan/konflik, aman
 * dibiarkan tetap terpasang atau dihapus, terserah.
 */

/* ---- jaga-jaga: kunci supaya halaman TIDAK PERNAH bisa di-scroll ke
   samping di HP. Beberapa elemen (canvas chart, tabel lebar) bisa saja
   sedikit meleber di layar sempit; alih-alih membuat seluruh body ikut
   bisa digeser ke kanan (bikin teks di kartu-kartu jadi "kepotong" saat
   ke-scroll), overflow ekstra itu sekarang otomatis disembunyikan. ---- */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ---- 2 komponen kustom (dipakai admin/payments & semua halaman tabel) ---- */
.admin-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.admin-toolbar > * {
  width: 100%;
}

/* ---- lebar minimum tabel, supaya kolom tidak diperas ---- */
.min-w-\[420px\] { min-width: 420px; }
.min-w-\[560px\] { min-width: 560px; }
.min-w-\[640px\] { min-width: 640px; }
.min-w-\[820px\] { min-width: 820px; }

/* ---- lebar maksimum nama user di header, biar truncate rapi ---- */
.max-w-\[110px\] { max-width: 110px; }
.max-w-\[160px\] { max-width: 160px; }

/* ---- ukuran teks dasar (fallback bila belum ter-compile) ---- */
.text-base { font-size: 1rem; line-height: 1.5rem; }

/* ---- mulai breakpoint tablet/desktop (>= 640px, sama seperti Tailwind sm:) ---- */
@media (min-width: 640px) {
  .admin-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .admin-toolbar > * { width: auto; }

  .sm\:flex-initial { flex: 0 1 auto; }
  .sm\:max-w-none { max-width: none; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
  .sm\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:w-40 { width: 10rem; }
  .sm\:w-48 { width: 12rem; }
  .sm\:w-56 { width: 14rem; }
  .sm\:w-64 { width: 16rem; }
  .sm\:w-auto { width: auto; }
}

/* ---------------------------------------------------------------------
 * Halaman Presensi (Ruang Pengajar) — resep khusus supaya rapi di HP:
 * kartu per-murid yang ditumpuk (bukan tabel yang dipaksa muat) di layar
 * sempit, baru berubah jadi tabel biasa mulai breakpoint tablet/desktop.
 * Semua di bawah ini murni CSS biasa, tidak butuh build apapun.
 * ------------------------------------------------------------------- */

/* Info kelas + filter tanggal di kartu paling atas */
.attn-panel-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.attn-filter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.attn-filter-form .admin-input { width: 100%; }
.attn-recap-link { width: 100%; text-align: center; }

/* Baris keterangan + tombol aksi cepat, di atas daftar murid */
.attn-note-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.attn-note-text { flex: 1 1 auto; }

/* Grup tombol (2 tombol aksi cepat / 1 tombol simpan): tumpuk penuh-lebar
   di HP, sejajar mulai tablet/desktop. */
.admin-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.admin-btn-group > * { width: 100%; }

/* Pasangan tampil/sembunyi generik: dipakai untuk baris judul kolom yang
   cuma relevan di layar lebar — bisa dipakai ulang di halaman lain juga. */
.admin-mobile-only { display: block; }
.admin-desktop-only { display: none; }

/* Daftar murid: SATU set input per murid (bukan diduplikasi), supaya
   "Tandai Semua Hadir" & validasi browser tetap benar. Di HP tampil
   sebagai kartu bertumpuk; mulai tablet/desktop berubah jadi baris rata
   kolom (mirip tabel) lewat CSS Grid saja, tanpa render ulang HTML. */
.attn-list-head { margin-bottom: 0.5rem; }
.attn-row {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.attn-row-name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.attn-row-note input { width: 100%; }
.attn-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.attn-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  border: 1px solid #E2E8F0;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.attn-status-pill input { accent-color: #4C56F0; margin: 0; }
.attn-status-pill:has(input:checked) {
  border-color: #4C56F0;
  background-color: #EEF1FF;
  color: #3A3FD1;
}

.attn-submit-row { display: flex; }
.attn-submit-row .admin-btn-primary { width: 100%; }

@media (min-width: 640px) {
  .attn-panel-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .attn-filter-form { flex-direction: row; align-items: center; width: auto; }
  .attn-filter-form .admin-input { width: 11rem; }
  .attn-recap-link { width: auto; }

  .attn-note-row { flex-direction: row; align-items: center; justify-content: space-between; }

  .admin-btn-group { flex-direction: row; flex-wrap: wrap; width: auto; }
  .admin-btn-group > * { width: auto; }

  .admin-mobile-only { display: none; }
  .admin-desktop-only { display: block; }

  .attn-submit-row { justify-content: flex-end; }
  .attn-submit-row .admin-btn-primary { width: auto; }

  /* Baris jadi grid 3 kolom sejajar (Murid / Status / Catatan), tanpa
     kartu terpisah — persis nuansa tabel tapi lebih fleksibel. */
  .attn-list {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    overflow: hidden;
  }
  .attn-list-head {
    display: grid;
    grid-template-columns: 1.3fr 1.7fr 1fr;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #E2E8F0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #64748B;
  }
  .attn-row {
    display: grid;
    grid-template-columns: 1.3fr 1.7fr 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border: none;
    border-bottom: 1px solid #F1F5F9;
    border-radius: 0;
    margin-bottom: 0;
  }
  .attn-row:last-child { border-bottom: none; }
  .attn-row-name { margin-bottom: 0; }
  .attn-status-group { margin-bottom: 0; }
}

/* ---------------------------------------------------------------------
 * Landing page (halaman depan truetelly.id) — rapikan navbar "Masuk" &
 * "Daftar Sekarang", terutama di HP supaya teks tombol tidak pecah jadi
 * 2 baris dan jaraknya konsisten dengan logo/menu lain. Murni CSS biasa,
 * aman ditimpa langsung tanpa build apapun.
 * ------------------------------------------------------------------- */

.landing-header {
  gap: 0.5rem;
}

.landing-brand {
  min-width: 0;
  flex-shrink: 1;
}

.landing-brand-text {
  white-space: nowrap;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* "Masuk" sekarang dibuat jadi pil outline yang punya bobot visual
   sepadan dengan tombol "Daftar Sekarang" — bukan sekadar teks kecil di
   pojok. Ukuran font dinaikkan cukup jauh supaya jelas terbaca & tidak
   terasa timpang dibanding tombol CTA di sebelahnya. */
.landing-nav-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  padding: 0.6rem 1rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  border-radius: 9999px !important;
  border: 2px solid #f97316 !important;
  background: rgba(249, 115, 22, 0.08) !important;
  box-sizing: border-box !important;
}

.landing-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.6rem 1rem !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.01em !important;
  line-height: 1.1 !important;
  border-radius: 1rem !important;
}

/* HP sangat sempit (< 360px): kecilkan sedikit supaya tetap 1 baris,
   tapi "Masuk" tetap jelas terbaca, tidak dibuat mini lagi */
@media (max-width: 359px) {
  .landing-brand-text { font-size: 1rem; }
  .landing-nav-link { padding: 0.5rem 0.8rem !important; font-size: 0.85rem !important; }
  .landing-nav-cta { padding: 0.55rem 0.8rem !important; font-size: 0.65rem !important; }
}

/* HP standar ke atas (>= 400px) — sedikit lega */
@media (min-width: 400px) {
  .landing-nav-actions { gap: 0.5rem; }
  .landing-nav-link { padding: 0.65rem 1.1rem !important; font-size: 1rem !important; }
  .landing-nav-cta { padding: 0.65rem 1.2rem !important; font-size: 0.8rem !important; }
}

/* Tablet/desktop (>= 640px, sama seperti Tailwind sm:) — kembali ke
   proporsi seperti desain awal tapi dengan alignment lebih presisi,
   dan "Masuk" tetap jadi pil outline yang seimbang dengan CTA */
@media (min-width: 640px) {
  .landing-header { gap: 1rem; }
  .landing-brand-text { font-size: 1.5rem; }
  .landing-nav-actions { gap: 0.75rem; }
  .landing-nav-link {
    padding: 0.7rem 1.25rem !important;
    font-size: 1rem !important;
    border-width: 2px !important;
    border-color: #f97316 !important;
    background: rgba(249, 115, 22, 0.08) !important;
  }
  .landing-nav-cta {
    padding: 0.8rem 1.75rem !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.025em !important;
    border-radius: 1rem !important;
  }
}
