/* ===================== Base ===================== */
:root {
  --cream: #f4f1e8;
  --cream-2: #efece0;
  --ink: #1c2b22;
  --green-dark: #1f5c3f;
  --green: #2f8a5a;
  --green-light: #7fc79a;
  --green-soft: #eaf5ee;
  --blue: #3f6fb3;
  --red: #d64550;
  --amber: #e8a33d;
  --amber-soft: #fdf1de;
  --grey-text: #6b7a71;
  --border: #e2ded0;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 10px 24px rgba(31, 92, 63, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===================== Page wrapper (halaman web biasa) ===================== */
.site {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
}

.card {
  width: 100%;
  min-height: 100vh;
  background: var(--cream);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 48px 24px;
}

.page.hidden { display: none; }

/* Kartu putih di layar lebar supaya konten tidak melebar penuh */
@media (min-width: 640px) {
  body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 20px;
    background: var(--cream-2);
  }

  .site {
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(31, 92, 63, 0.1);
    min-height: 0;
    overflow: hidden;
  }

  .card {
    min-height: 0;
  }

  .page {
    min-height: 0;
    padding: 56px 44px;
  }
}

/* ===================== Screen 1: Welcome ===================== */
.welcome-wrap {
  width: 100%;
  text-align: center;
}

.logo-badge {
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--green-light), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  padding: 10px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
}

.eyebrow {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green);
  line-height: 1.5;
}

.eyebrow-sub {
  color: var(--grey-text);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

.welcome-title {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--ink);
}

.welcome-subtitle {
  margin: 2px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--green-dark);
}

.welcome-desc {
  margin: 0 auto 22px;
  max-width: 320px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--grey-text);
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}

.dot {
  width: 26px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}

.dot.active { background: var(--amber); width: 26px; }

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.feature-icon { font-size: 22px; }

.feature-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* ===================== Buttons ===================== */
.btn-primary {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 17px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  width: 100%;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  padding: 15px;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--green-dark);
  background: #fff;
  cursor: pointer;
}

.hint-text {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--grey-text);
}

/* ===================== Screen 2: Form ===================== */
.form-wrap { width: 100%; }

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  font-size: 13.5px;
  color: var(--grey-text);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 22px;
  overflow: hidden;
}

.progress-fill {
  width: 66%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  border-radius: 3px;
}

.form-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  margin: 0 0 4px;
  color: var(--ink);
}

.form-subtitle {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--grey-text);
}

.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 14px 0 6px;
}

.req { color: var(--red); }

.field-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  font-size: 14.5px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

.field-input::placeholder { color: #b7c1ba; }
.field-input:focus { border-color: var(--green); }

/* ===================== Summary box ===================== */
.summary-box {
  margin-top: 20px;
  padding: 16px;
  background: var(--green-soft);
  border-radius: var(--radius-md);
}

.summary-box.hidden { display: none; }

.summary-title {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.summary-item {
  background: #fff;
  border-radius: 10px;
  padding: 12px 4px;
  text-align: center;
}

.summary-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.summary-value.sum-green { color: var(--green); }
.summary-value.sum-blue { color: var(--blue); }

.summary-label {
  display: block;
  font-size: 11.5px;
  color: var(--grey-text);
  margin-top: 2px;
}

#absensi-form .btn-primary { margin-top: 24px; }

/* ===================== Screen 3: Success ===================== */
.success-wrap {
  width: 100%;
  text-align: center;
}

.success-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.success-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.success-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--ink);
}

.success-desc {
  margin: 0 auto 20px;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey-text);
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 60px;
  background: var(--border);
}

.divider-icon { font-size: 18px; }

.info-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  margin-bottom: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.info-heading {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--amber);
}

.info-text {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.info-note {
  background: var(--amber-soft);
  border: 1px dashed var(--amber);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12.5px;
  color: #8a5e1c;
}

.tracker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}

.tracker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tracker-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.tracker-circle.done { background: var(--green); }

.tracker-label {
  font-size: 11px;
  color: var(--grey-text);
  font-weight: 600;
}

.tracker-line {
  width: 26px;
  height: 1.5px;
  background: var(--border);
  margin-bottom: 20px;
}

.admin-link {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
}

.admin-link:hover { text-decoration: underline; }

/* (media query lama untuk bezel HP sudah tidak diperlukan — dihapus) */
