/* ==========================================================
   🎨 CLEAN MAROON THEME (FINAL)
========================================================== */
:root {
  --header-height: 80px;

  --white: #ffffff;
  --light-bg: #f9f9f9;

  --text-main: #222222;
  --text-soft: #555555;

  --maroon: #b8003c;
  --maroon-dark: #8a002f;
}

/* ==========================================================
   BASE
========================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--light-bg);
  color: var(--text-main);
}

/* ==========================================================
   HEADER
========================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

/* ==========================================================
   MAIN
========================================================== */
main {
  padding: calc(var(--header-height) + 20px) 16px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================================
   TOP BAR
========================================================== */
.top-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.skip.btn-home,
.btn-soal {
  height: 36px;
  padding: 6px 16px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.skip.btn-home {
  background: var(--text-main);
  color: #fff;
}

.btn-soal {
  background: var(--maroon-dark);
  color: #fff;
}

/* ==========================================================
   TABLE
========================================================== */
.table-wrap {
  width: 100%;
}

.table-wrap table {
  width: 100% !important;
}

/* ==========================================================
   MODAL SYSTEM (ANTI OVERFLOW – FINAL)
========================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  z-index: 9999;
}

.modal-container {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* header modal */
.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-close {
  font-size: 22px;
  cursor: pointer;
  color: #666;
}

/* body modal (SCROLL DI SINI) */
.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

/* ==========================================================
   FORM
========================================================== */
.form-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: var(--text-soft);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font-size: 16px; /* ⛔ auto zoom HP mati */
  border-radius: 8px;
  border: 1px solid #ddd;
}

textarea {
  resize: vertical;
}

/* ==========================================================
   MODAL SUCCESS
========================================================== */
.modal.success {
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.success.show {
  display: flex;
}

.modal.success .modal-container {
  max-width: 420px;
  text-align: center;
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 480px) {
  .modal-container {
    border-radius: 12px;
  }

  .modal-header h3 {
    font-size: 1rem;
  }
}

.form-group small {
  font-size: 0.75rem;
  color: #888;
  margin-top: 3px;
}