/* =====================================================================
   skin-auth.css — GAYA CERIA HALAMAN LOGIN & REGISTER (hanya tampilan)
   =====================================================================
   • Dipakai bersama themes.css + js/tema-harian.js, jadi Login & Daftar
     ikut berganti tema tiap hari (15 tema) sama seperti dashboard siswa.
   • Tidak ada elemen/tombol/field yang ditambah, dihapus, atau dipindah;
     alur login & pendaftaran (JS) tidak disentuh.
   • Semua aturan diawali  html[data-tema]  — tanpa atribut itu (atau tanpa
     file ini) halaman tampil seperti desain awal.
   • Cara menonaktifkan: hapus <link ... skin-auth.css> dan <link ... themes.css>
     dari login.html / register.html.
   ===================================================================== */

html[data-tema] {
  --font-display: 'Fredoka', 'Quicksand', 'Be Vietnam Pro', system-ui, sans-serif;
}

/* ---------- Latar: gradasi tema + pola + dua hiasan emoji tema ---------- */
html[data-tema] body {
  background-color: rgb(var(--bg-rgb));
  background-image:
    var(--pola),
    linear-gradient(135deg, rgb(var(--p-fixed-rgb)) 0%, rgb(var(--bg-rgb)) 55%, rgb(var(--s-rgb)) 100%);
  background-size: 140px 140px, 100% 100%;
}
html[data-tema] body::before,
html[data-tema] body::after {
  content: var(--tema-emoji);
  position: fixed;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
  filter: drop-shadow(0 6px 8px rgb(0 0 0 / 0.12));
}
html[data-tema] body::before { left: 6%; top: 10%; font-size: 4.5rem; rotate: -12deg; animation: skinAuthBob 4s ease-in-out infinite; }
html[data-tema] body::after  { right: 6%; bottom: 8%; font-size: 5.5rem; rotate: 10deg; animation: skinAuthBob 5s ease-in-out infinite reverse; }

/* ---------- Huruf judul/label ---------- */
html[data-tema] .font-label-bold,
html[data-tema] .font-display-lg-mobile,
html[data-tema] .font-display-lg,
html[data-tema] .font-headline-md,
html[data-tema] [style*="Quicksand"] {
  font-family: var(--font-display) !important;
}

/* =====================================================================
   LOGIN
   ===================================================================== */
/* kartu utama */
html[data-tema] body > main > div {
  border: 4px solid rgb(var(--p-fixed-dim-rgb));
  border-bottom-width: 8px;
  border-radius: 2.25rem;
  box-shadow: 0 26px 54px rgb(var(--p-rgb) / 0.18);
  /* pola dipudarkan supaya teks di dalam kartu tetap jelas */
  background-image: linear-gradient(rgb(var(--bg-rgb) / 0.6), rgb(var(--bg-rgb) / 0.6)), var(--pola);
  background-size: 100% 100%, 140px 140px;
  animation: skinAuthIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

/* maskot: Roboo dalam lingkaran bercincin tema */
html[data-tema] body > main .group > img {
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px rgb(var(--p-cont-rgb)), 0 12px 24px rgb(var(--p-rgb) / 0.3);
}

/* judul & sorotan kata "Arduino!" */
html[data-tema] body > main h1 { font-size: 2rem; line-height: 2.4rem; }

/* pilihan Siswa / Guru */
html[data-tema] #tab-siswa,
html[data-tema] #tab-guru { font-size: 1rem; border: 3px solid transparent; }
html[data-tema] #tab-siswa[class*="bg-primary"],
html[data-tema] #tab-guru[class*="bg-primary"] { border-color: rgb(255 255 255 / 0.35); }

/* kartu formulir */
html[data-tema] #form-siswa > form,
html[data-tema] #form-guru > form {
  border: 3px solid rgb(var(--p-fixed-dim-rgb) / 0.85);
  border-bottom-width: 6px;
  border-radius: 1.75rem;
  box-shadow: 0 12px 28px rgb(var(--p-rgb) / 0.1);
  animation: skinAuthIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
html[data-tema] #form-siswa label,
html[data-tema] #form-guru label { font-size: 1.02rem; }

/* kolom isian */
html[data-tema] #kelas-select,
html[data-tema] #nama-select,
html[data-tema] #passcode-siswa,
html[data-tema] #passcode-guru {
  border-width: 3px;
  border-radius: 1.3rem;
  font-family: var(--font-display);
}
html[data-tema] #kelas-select:focus,
html[data-tema] #nama-select:focus,
html[data-tema] #passcode-siswa:focus,
html[data-tema] #passcode-guru:focus { border-color: rgb(var(--p-rgb)); }

/* tombol masuk: berkilau & empuk (posisi/ukuran tetap) */
html[data-tema] #btn-login-siswa,
html[data-tema] #btn-login-guru {
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.26) 0%, rgb(255 255 255 / 0) 55%);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}
html[data-tema] #btn-login-siswa:hover:not(:active):not(:disabled),
html[data-tema] #btn-login-guru:hover:not(:active):not(:disabled) { filter: brightness(1.07); }

/* =====================================================================
   REGISTER
   ===================================================================== */
html[data-tema] .card-soft {
  border: 4px solid rgb(var(--p-fixed-dim-rgb));
  border-bottom-width: 8px;
  border-radius: 2rem;
  box-shadow: 0 24px 48px rgb(var(--p-rgb) / 0.16);
  animation: skinAuthIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
html[data-tema] .logo-maskot {
  width: 5.25rem; height: 5.25rem;
  border-radius: 9999px;
  vertical-align: middle;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px rgb(var(--p-cont-rgb)), 0 12px 24px rgb(var(--p-rgb) / 0.3);
}
html[data-tema] .input-field { border-width: 3px; border-radius: 1.3rem; }
html[data-tema] .input-field:focus { border-color: rgb(var(--p-rgb)); box-shadow: 0 0 0 5px rgb(var(--p-cont-rgb) / 0.25); }
html[data-tema] .btn-primary {
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.26) 0%, rgb(255 255 255 / 0) 55%);
  font-family: var(--font-display);
}
html[data-tema] .btn-primary:hover:not(:active):not(:disabled) { filter: brightness(1.07); }


/* =====================================================================
   TATA LETAK LAYAR LEBAR (hanya susunan; isi, urutan DOM, id, JS tetap)
   =====================================================================
   • Login  (>= 900px): kolom kiri = logo + maskot + judul,
                         kolom kanan = pilihan Siswa/Guru + formulir.
   • Daftar (>= 760px): kolom isian dibuat 2x2 (Nama|Kelas, Passcode|Email),
                         tombol daftar selebar penuh di bawahnya.
   Di HP / layar sempit tetap satu kolom seperti semula.
   ===================================================================== */
@media (min-width: 900px) {
  html[data-tema] body > main { max-width: 60rem; }
  html[data-tema] body > main > div { min-height: 0; }
  html[data-tema] body > main > div > div.flex-1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 3rem;
    row-gap: 0.5rem;
    align-items: start;
    justify-items: center;
    padding: 2.5rem 3rem;
  }
  html[data-tema] #logo-container { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  html[data-tema] body > main > div > div.flex-1 > div.flex.flex-col.items-center { grid-column: 1; grid-row: 2; align-self: center; margin-bottom: 0; }
  html[data-tema] body > main > div > div.flex-1 > div.rounded-full { grid-column: 2; grid-row: 1; max-width: 26rem; margin-bottom: 0; }
  html[data-tema] #form-siswa,
  html[data-tema] #form-guru { grid-column: 2; grid-row: 2; max-width: 26rem; }
}

@media (min-width: 760px) {
  html[data-tema] body > div:first-of-type { max-width: 46rem !important; }
  html[data-tema] #registerForm {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem 1.5rem !important;
    align-items: start;
  }
  html[data-tema] #registerForm > #btn-register { grid-column: 1 / -1; }
}

/* ---------- Layar kecil ---------- */
@media (max-width: 520px) {
  html[data-tema] body::before { font-size: 3rem; opacity: 0.22; }
  html[data-tema] body::after  { font-size: 3.5rem; opacity: 0.22; }
  html[data-tema] body > main h1 { font-size: 1.7rem; line-height: 2.1rem; }
}

/* ---------- Animasi ---------- */
@keyframes skinAuthBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes skinAuthIn  { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html[data-tema] *,
  html[data-tema] *::before,
  html[data-tema] *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
