/* ========== GLOBAL ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  margin: 0;
  background-color: #e9e0cc;
}

/* container umum */
.page,
.onboard-page,
.auth-page {
  max-width: 720px;
  margin: 48px auto;
  padding: 24px 32px;
}

/* heading Jepang & subjudul */
.title-jp {
  color: #8b0000;
  font-size: 28px;
  text-align: center;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  color: #555;
  text-align: center;
  margin-bottom: 24px;
}

/* kartu putih untuk form / konten */
.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* form elements */
label {
  font-size: 13px;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label.checkbox {
  flex-direction: row;
}

input,
select,
textarea {
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 8px 10px;
  font-size: 13px;
}

input:focus:not(input[type="checkbox"], input[type="radio"]),
select:focus,
textarea:focus {
  outline: none;
  border-color: #7b0000;
}

.btn-primary {
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background: #7b0000;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(0.92);
}

.btn-secondary {
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid #7b0000;
  background: transparent;
  color: #7b0000;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(123, 0, 0, 0.05);
}

.helper {
  margin-top: 8px;
  font-size: 12px;
  text-align: center;
}

.helper a {
  color: #7b0000;
  text-decoration: none;
}

.helper a:hover {
  text-decoration: underline;
}

/* ========== SCREEN 1 – SPLASH (MERAH + LOGO) ========== */

.screen-splash {
  min-height: 100vh;
  background: #7b0000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* watermark kanji besar samar */
.screen-splash::before {
  content: "光";
  position: absolute;
  font-size: 260px;
  color: rgba(0, 0, 0, 0.25);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.splash-inner {
  position: relative;
  text-align: center;
  z-index: 1;
}

.splash-logo {
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 2px;
}

/* ========== SCREEN 2 – ONBOARDING KUCING ========== */

.screen-onboard {
  min-height: 100vh;
  background: #f6f0de;
}

.onboard-page {
  max-width: 800px;
  margin: 48px auto;
  padding: 24px;
}

.onboard-illustration {
  text-align: center;
  margin-bottom: 24px;
}

.onboard-illustration img {
  width: 100%;
  /* max-width: 450px; */
  height: auto;
}

.onboard-text-main {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 4px;
}

.onboard-text-sub {
  font-size: 30px;
  font-weight: 600;
}

/* bulat tombol panah kanan */
.onboard-next-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

.round-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

/* ========== SCREEN 3 & 4 – LOGIN & REGISTER ========== */

.screen-auth {
  min-height: 100vh;
  background: #f6f0de;
}

.auth-card {
  margin-top: 12px;
}

/* ======= STUDENT FORM ============ */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 4px;
  color: #5a2b2b;
}

.section-divider {
  height: 16px;
  border-bottom: 1px solid #eee;
  margin: 8px 0 4px;
}

.subsection {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #faf7ef;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subsection-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.btn-small {
  align-self: flex-start;
  padding: 6px 10px;
  font-size: 12px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 600px) {
  .page,
  .onboard-page,
  .auth-page {
    margin: 24px auto;
    padding: 16px;
  }
}

/* ===================== */
/* DASHBOARD STUDENT UI  */
/* ===================== */

/* khusus halaman dashboard pakai .page */
.page {
  background: #e9e0cc;
  min-height: 100vh;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* CARD override utk dashboard */
.page .card {
  background: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  margin: 14px 16px 0;
}

/* COVER AREA */
.cover {
  height: 120px;
  border-radius: 0 0 24px 24px;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* AVATAR */
.avatar-wrapper {
  position: absolute;
  left: 50%;
  bottom: -40px;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #e9e0cc;
  overflow: hidden;
  background: #fff;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* HEADER BLOCK */
.header-block {
  text-align: center;
  padding-top: 52px;
  padding-bottom: 12px;
}

.student-name {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 0;
}

/* TOP CONTAINER */
.top-section {
  background: #e9e0cc;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
}

/* QR + PROGRESS ROW */
.status-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.qr-box,
.progress-box {
  background: #f8f5ed;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.qr-box img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

/* PROGRESS CIRCLE */
.progress-box svg {
  width: 128px;
  height: 128px;
}
.progress-box p {
  font-size: 14px;
}

.progress-text {
  position: relative;
  text-align: center;
  margin-top: -70px;
  font-weight: 700;
  font-size: 18px;
}

/* FILE INPUT LABEL */
.file-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-top: 10px;
}

/* BUTTONS khusus dashboard */
.page .btn-secondary {
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background: #8b0000;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-disabled {
  background: #b7b3aa !important;
  cursor: not-allowed;
}

/* IZIN FOOTER */
.izin-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

/* EXAM PANEL (versi di dashboard kalau dipakai) */
.exam-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f8f5ed;
}

.exam-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.exam-desc {
  font-size: 12px;
  color: #777;
  margin-bottom: 10px;
}

.question {
  font-size: 14px;
  margin-bottom: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 4px;
}

.hidden {
  display: none;
}

.payment-status {
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  width: fit-content;
  margin-top: 6px;
}

.payment-status.confirmed {
  background: #d6f3d6;
  color: #0b7a0b;
}

.payment-status.pending {
  background: #fff4cc;
  color: #8a6d00;
}

.payment-status.rejected {
  background: #ffd6d6;
  color: #a30000;
}

/* ====== PANEL UJIAN SISWA (HALAMAN student-exams) ====== */

.exam-header {
  margin-bottom: 12px;
}

.exam-question {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.exam-options {
  display: flex;
  flex-direction: column;
  gap: 10px; /* jarak antar pilihan */
  margin-bottom: 16px;
}

.exam-option {
  display: flex;
  align-items: center;
  gap: 10px; /* jarak radio dengan teks */
  font-size: 14px;
  color: #333;
}

/* styling radio supaya lebih rapi & sesuai tema */
.exam-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #7b0000;
}

/* ===== PILIHAN UJIAN (FIX INLINE) ===== */

.choice-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.choice-item input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #7b0000;
}

.choice-item label {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

a[role="button"], button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 4px;
  border: none;
  background: #8b0000;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  width: fit-content;
  transition: 0.3s;
}
a[role="button"]:hover {
  opacity: 0.95;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}
.user-details span {
  font-weight: 600;
}
.user-details p {
  margin: 4px 0;
  background-color: #fff;
  padding: 8px;
  border-radius: 8px;
}
p.empty {
  color: #999;
  font-style: italic;
  margin: 4px 0;
  background-color: #fff;
  padding: 8px;
  border-radius: 8px;;
}
.details-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  padding-bottom: 24px;
}
.details-group > div {
  background-color: lightgray;
  padding: 12px;
  border-radius: 8px;
}
.details-group > .user-details {
  margin-top: 0;
}
.details-title {
  display: block;
  font-size: 20pt;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 4px;
  color: #5a2b2b;
}
.err-messages {
  background-color: #ffd6d6;
  border: 1px solid #a30000;
  color: #a30000;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  align-self: center;
  width: 100%;
}
.header {
  padding: 24px;
  background-color: white;
  border-radius: 8px;
}
.header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #7b0000;
}
.header p {
  margin: 4px 0 0 0;
  color: #555;
  font-size: 14px;
}
.qbox {
  margin-top: 16px;
  padding: 24px;
  background-color: white;
  border-radius: 8px;
}
.choices label {
  display: flex;
  align-items: center;
  padding: 8px;
}
.nav-buttons {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.nav-buttons button {
  background-color: #7b0000;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
}
.qnav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 4px;
  margin-top: 24px;
  background-color: white;
  padding: 16px 36px;
  border-radius: 8px;
}
.qnav button {
  background-color: #7b0000;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px;
  width: 36px;
  cursor: pointer;
  margin: auto;
}
.col-center {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.student-exam-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-top: 16px;
  background-color: white;
  border-radius: 8px;
}
details {
  background-color: snow;
  padding: 12px;
  border-radius: 8px;
}
summary {
  display: flex;
  align-items: center;
}
summary div {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
summary svg {
  margin-right: 8px;
  transition: 0.2s;
}
details[open] summary svg {
  transform: rotate(-90deg);
}
details>div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 8px;
}
.btn-group {
  display: flex;
  gap: 10px;
}
.btn-group button, .btn-group a[role="button"], .btn-group form {
  flex: 1;
}
form button[type="submit"] {
  width: 100%;
}
.success-msg {
  background-color: #d7ffd6;
  border: 1px solid #00a30e;
  color: #00a30e;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  align-self: center;
  width: min(100%, 90vw);
  margin: 16px auto;
  animation: fadeout 0.5s;
  animation-delay: 1.0s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}
@keyframes fadeout {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    display: none;
  }
}
a {
  text-decoration: none;
}
.search-box {
  margin-bottom: 16px;
}
.search-box input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
}
dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  padding: 20px;
  border-radius: 8px;
  border: none;
  background-color: white;
}
dialog::backdrop {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.25);
}
dialog>* {
  width: 100%;
  margin-top: 12px;
}

#groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 8px;
  box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}
#groups>div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  background-color: white;
  border-radius: 8px;
}
#groups>div>div>span {
  display: block;
  font-weight: 600;
  font-size: 16px;
}
#groups>div>div>p {
  display: block;
  font-size: 12px;
}

.users {
  width: 100%;
  min-height: 100px;
  max-height: 350px;
  overflow-y: auto;
  padding: 8px;
  box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}
.users>div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.users>div>img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.users>div>div {
  flex-grow: 1;
}
.users>div>div>span {
  font-weight: 600;
  font-size: 13px;
}
.users>div>div>p {
  font-size: 12px;
  color: #333;
}
.users>div>input {
  width: 20px;
  height: 20px;
  margin: 8px;
}
hr {
  border: none;
  height: 1px;
  width: 100%;
  background-color: #333;
  margin: 4px 0;
}
.hbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: white;
  border-radius: 8px;
}
.hbox img {
  border-radius: 50%;
  width: 64px;
  height: 64px;
  object-fit: cover;
}
.hbox div span {
  font-weight: 600;
  font-size: 16px;
}
.hbox div p {
  font-size: 12px;
}