/* ============================================================
   Portal Peserta — Demo
   Mobile-first, ringan (tanpa framework), navy / putih / biru muda
   ============================================================ */

:root {
  --navy-900: #071a30;
  --navy: #0a2540;
  --navy-700: #123a63;
  --navy-600: #1b4a7d;
  --blue: #1d7fd1;
  --sky: #38bdf8;
  --sky-soft: #e0f2fe;
  --bg: #eef3f9;
  --card: #ffffff;
  --text: #10233c;
  --muted: #5d6f88;
  --line: #e2eaf4;
  --success: #15803d;
  --success-bg: #e7f6ec;
  --danger: #dc2626;
  --danger-bg: #fdecec;
  --info-bg: #e8f4fd;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(10, 37, 64, 0.07);
  --shadow-lg: 0 8px 28px rgba(10, 37, 64, 0.14);
  --app-width: 480px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
}

/* Kolom aplikasi: penuh di HP, kartu terpusat di layar besar */
.app {
  max-width: var(--app-width);
  margin: 0 auto;
  min-height: 100dvh;
  background: #fff;
  position: relative;
  padding-bottom: 84px; /* ruang navigasi bawah */
}

@media (min-width: 560px) {
  body {
    background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
    padding: 28px 16px;
  }
  .app {
    min-height: calc(100dvh - 56px);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
  }
  .bottomnav {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: min(var(--app-width), calc(100% - 32px)) !important;
    bottom: 28px !important;
    border-radius: 22px;
  }
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; }

/* ---------- Bilah atas ---------- */
.topbar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}
.topbar-logo {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.topbar-text strong { display: block; font-size: 17px; }
.topbar-text span { font-size: 13px; color: var(--sky); }
.topbar-admin .topbar-text span { color: #fbbf24; }

/* ---------- Halaman ---------- */
.page { padding: 18px 16px 8px; }
.page-admin { padding-top: 20px; }

.landing { padding-bottom: 8px; }

.landing-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 70%, var(--navy-600) 100%);
  color: #fff;
  text-align: center;
  padding: 34px 22px 74px;
  border-radius: 0 0 28px 28px;
  position: relative;
  overflow: hidden;
}
.landing-hero::after {
  content: "";
  position: absolute;
  right: -70px; top: -70px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 70%);
}
.logo-placeholder {
  width: 84px; height: 84px;
  margin: 6px auto 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.landing-hero h1 { font-size: 24px; margin: 0 0 8px; position: relative; z-index: 1; }
.landing-desc { margin: 0; color: #c9dcf0; font-size: 15px; position: relative; z-index: 1; }

.demo-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy);
  background: #fde68a;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.demo-badge-light { background: rgba(255, 255, 255, 0.92); margin-bottom: 10px; }

/* ---------- Kartu ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { font-size: 18px; }

.form-card { margin: 0 16px 16px; position: relative; z-index: 2; }
.landing .form-card { margin-top: -52px; } /* kartu menindih hero hanya di landing */
.form-card h2 { text-align: center; margin-bottom: 16px; }

/* ---------- Form ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 14px; font-weight: 600;
  margin-bottom: 6px;
}
.input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* cegah zoom otomatis di iOS */
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  color: var(--text);
}
.input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
  background: #fff;
}
select.input { appearance: auto; }
.field-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field-error { display: none; font-size: 13px; color: var(--danger); margin-top: 5px; font-weight: 500; }
.field-error.show { display: block; }
.input.invalid { border-color: var(--danger); }

.form-note { font-size: 13px; color: var(--muted); text-align: center; margin: 14px 0 4px; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 16px; font-weight: 700;
  padding: 14px 22px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 52px;
}
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-600) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 37, 64, 0.28);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(10, 37, 64, 0.36); }
.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--line);
}
.btn-outline-danger {
  background: #fff;
  color: var(--danger);
  border: 1.5px solid #f3c1c1;
}
.btn-wa {
  background: #16a34a;
  color: #fff;
  font-size: 14px;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
}

/* ---------- Alert ---------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: var(--danger-bg); border-color: #f3c1c1; color: #991b1b; }
.alert-success { background: var(--success-bg); border-color: #bfe6c9; color: #14532d; }
.alert-info { background: var(--info-bg); border-color: #bfe3fa; color: var(--navy-700); }

/* ---------- Sapaan & banner ---------- */
.greeting { font-size: 19px; margin: 4px 2px 14px; }

.banner {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  min-height: 190px;
  display: flex;
  align-items: flex-end;
}
.banner-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.banner-body {
  position: relative;
  padding: 16px 18px;
  color: #fff;
  width: 100%;
  background: linear-gradient(transparent, rgba(7, 26, 48, 0.72));
}
.banner-body h2 { font-size: 21px; margin: 0 0 2px; }
.banner-sub { margin: 0 0 10px; font-size: 13.5px; color: #d7e7f8; }

.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--success);
  font-size: 13px; font-weight: 700;
  border-radius: 999px;
  padding: 6px 13px;
}
.status-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.18);
}

/* ---------- Ringkasan ---------- */
.summary-row {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 11px 0;
}
.summary-row + .summary-row { border-top: 1px solid var(--line); }
.summary-icon {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 12px;
  background: var(--sky-soft);
  color: var(--navy-700);
  display: flex; align-items: center; justify-content: center;
}
.summary-row strong { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.summary-row span:last-child { font-size: 15px; font-weight: 600; }

/* ---------- Kartu menu cepat ---------- */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.quick-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 14px;
  text-decoration: none;
  color: var(--text);
}
.quick-card strong { display: block; font-size: 14.5px; margin: 10px 0 2px; }
.quick-card span:last-child { font-size: 12.5px; color: var(--muted); }
.quick-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--navy-600));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Timeline itinerary ---------- */
.day { margin-bottom: 22px; }
.day-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding: 0 2px; }
.day-num {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  font-weight: 800; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(29, 127, 209, 0.35);
}
.day-head h2 { font-size: 17px; margin: 0; }
.day-head p { margin: 0; font-size: 13px; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 53px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--sky), var(--line));
  border-radius: 2px;
}
.timeline-item {
  display: flex; gap: 22px;
  padding: 0 0 12px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 2px; }
.timeline-time {
  flex: 0 0 46px;
  font-size: 13px; font-weight: 700;
  color: var(--navy-700);
  padding-top: 13px;
  text-align: right;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 48px; top: 16px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--sky);
  z-index: 1;
}
.timeline-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}
.timeline-card h3 { font-size: 14.5px; margin: 0 0 3px; }
.timeline-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Halaman informasi ---------- */
.section-title { font-size: 17px; margin-bottom: 12px; }
.section-title-outside { padding: 0 2px; }

.detail-list { margin: 0; }
.detail-list > div {
  display: flex; gap: 12px;
  padding: 10px 0;
  font-size: 14.5px;
}
.detail-list > div + div { border-top: 1px solid var(--line); }
.detail-list dt { flex: 0 0 118px; color: var(--muted); font-weight: 500; }
.detail-list dd { margin: 0; font-weight: 600; }
.detail-list-profile dt { flex-basis: 132px; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex; gap: 11px; align-items: center;
  padding: 9px 0;
  font-size: 14.5px; font-weight: 500;
}
.checklist li + li { border-top: 1px solid var(--line); }
.check-icon {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
}

.announcement h3 { font-size: 15.5px; margin: 8px 0 4px; }
.announcement p { margin: 0; font-size: 14px; color: var(--muted); }
.announcement-head { display: flex; justify-content: space-between; align-items: center; }
.announcement-head time { font-size: 12.5px; color: var(--muted); }
.tag {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 11px;
}
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--info-bg); color: var(--blue); }

.contact-card { display: flex; gap: 12px; align-items: center; }
.contact-avatar {
  width: 48px; height: 48px; flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.contact-info { flex: 1; min-width: 0; }
.contact-info strong { display: block; font-size: 15px; }
.contact-info span { font-size: 13px; color: var(--muted); }
.contact-note { font-size: 13px; color: var(--muted); text-align: center; padding: 0 8px; }

/* ---------- Profil ---------- */
.profile-card { text-align: center; }
.profile-avatar {
  width: 76px; height: 76px;
  margin: 2px auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff; font-size: 30px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(10, 37, 64, 0.25);
}
.profile-card h2 { font-size: 19px; margin-bottom: 8px; }
.profile-card .status-badge { margin-bottom: 6px; }
.detail-list-profile { text-align: left; margin: 8px 0 18px; }
.about-card p { font-size: 14.5px; color: var(--muted); margin-top: 0; }
.about-list { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.about-list li { margin-bottom: 4px; }

/* ---------- Navigasi bawah ---------- */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(10, 37, 64, 0.08);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.bottomnav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 7px 0 5px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11.5px; font-weight: 600;
  border-radius: 12px;
  min-height: 56px;
  justify-content: center;
}
.bottomnav-item.active { color: var(--navy); }
.bottomnav-item.active svg { color: var(--blue); }
.bottomnav-item:active { background: var(--bg); }

/* ---------- Catatan demo & footer ---------- */
.demo-note {
  font-size: 12.5px; color: var(--muted);
  text-align: center;
  background: #fff8e1;
  border: 1px dashed #e6c84a;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 4px 0 12px;
}
.demo-note-top { text-align: left; }
.demo-note-top .demo-badge { margin: 0 6px 0 0; }

.page-footer {
  text-align: center;
  font-size: 13px; color: var(--muted);
  padding: 18px 16px 6px;
}
.page-footer a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ---------- Admin ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-600));
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-number { display: block; font-size: 40px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 13.5px; color: #bcd6ef; }

.search-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.search-bar .input { flex: 1; }
.search-bar .btn { min-height: 50px; padding: 10px 18px; font-size: 15px; }

.result-count { font-size: 13.5px; color: var(--muted); margin: 0 2px 10px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  background: #fff;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.data-table th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:nth-child(even) { background: #f7fafd; }
.nowrap { white-space: nowrap; }
.admin-logout { margin-top: 4px; }

.demo-creds {
  margin-top: 16px;
  background: #fff8e1;
  border: 1px dashed #e6c84a;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: #6b5b12;
}
.demo-creds code {
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 13px;
}

/* ---------- Tablet ---------- */
@media (min-width: 560px) {
  .quick-grid { gap: 14px; }
  .page { padding-left: 22px; padding-right: 22px; }
}

/* ---------- Tab Daftar / Masuk ---------- */
.tabs {
  display: flex; gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 18px;
}
.tab-btn {
  flex: 1;
  font: inherit;
  font-size: 15px; font-weight: 700;
  padding: 10px 0;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tab-btn.active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 3px 10px rgba(10, 37, 64, 0.25);
}
.tab-panel.hidden { display: none; }

/* ---------- Navigasi & form admin (CMS) ---------- */
.admin-nav {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-bottom: 14px;
}
.admin-nav a {
  padding: 8px 13px;
  border-radius: 999px;
  background: #eef3f9;
  border: 1px solid var(--line);
  color: var(--navy-700);
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
}
.admin-nav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.admin-nav .admin-nav-logout {
  margin-left: auto;
  background: #fdf1f1;
  border-color: #f3c1c1;
  color: var(--danger);
}

textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }

.btn-sm { padding: 8px 14px; min-height: 38px; font-size: 13.5px; border-radius: 10px; }
.btn-danger { background: var(--danger); color: #fff; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-table th, .mini-table td {
  padding: 9px 8px;
  border-top: 1px solid var(--line);
  text-align: left; vertical-align: top;
}
.mini-table th {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mini-table .row-actions { white-space: nowrap; }
.data-table .row-actions { display: flex; gap: 4px; align-items: center; }
.link-btn {
  background: none; border: 0;
  font: inherit;
  font-size: 13.5px; font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: none;
}
.link-btn.danger { color: var(--danger); }
.inline-form { display: inline; }
