@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gold);
  z-index: 9999;
  opacity: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px var(--gold);
  pointer-events: none;
}

/* ---------- Light theme (default) ---------- */
:root {
  --cream: #F7F3EC;
  --card: #FFFFFF;
  --navy: #2C4468;
  --navy-dark: #1E3050;
  --gold: #F0A93B;
  --gold-light: #F7DDA0;
  --text: #26313F;
  --text-muted: #7A8494;
  --border: #E7E1D6;
  --input-bg: #FCFAF6;
  --btn-secondary-bg: #EDE7DA;
  --btn-secondary-hover: #E2DACB;
  --bubble-ai-bg: #EFEAF9;
  --bubble-ai-text: #26313F;
  --danger: #C25450;
  --shadow: rgba(44, 68, 104, 0.08);
  --shadow-card: rgba(44, 68, 104, 0.06);
  --radius: 16px;
  --font-brand: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --cream: #181C27;
  --card: #1F2636;
  --navy: #3B5E96;
  --navy-dark: #7AAAE0;
  --gold: #F0A93B;
  --gold-light: #4A3A12;
  --text: #DDD8CF;
  --text-muted: #8895A8;
  --border: #2C3549;
  --input-bg: #161A26;
  --btn-secondary-bg: #2A3449;
  --btn-secondary-hover: #323E57;
  --bubble-ai-bg: #252D42;
  --bubble-ai-text: #DDD8CF;
  --danger: #E06B67;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-card: rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-brand);
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* ---------- Brand wordmark: "selah." ---------- */

.brand-wordmark {
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand-wordmark .dot { color: var(--gold); }

.brand-small {
  font-size: 20px;
  text-align: center;
  margin: 0 0 4px;
  color: var(--navy-dark);
}

.brand-hero {
  font-size: 52px;
  text-align: center;
  margin: 0 0 8px;
  color: var(--navy-dark);
  line-height: 1;
}

.brand-mark-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

a { color: inherit; text-decoration: none; }

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 20px 100px;
  position: relative;
}


/* ---------- Auth (login) ---------- */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #1E3050;
  margin: 0;
  padding: 0;
}

.auth-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 44px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.auth-brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--gold);
  color: #1E3050;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-wordmark {
  font-size: 38px;
  font-weight: 800;
  color: white;
  margin: 0;
  letter-spacing: -0.02em;
}

.auth-dot { color: var(--gold); }

.auth-tagline {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  margin: 0;
  letter-spacing: 0.01em;
}

.auth-sheet {
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 32px 28px max(48px, env(safe-area-inset-bottom));
}

.auth-sheet-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 24px;
}

.auth-form-new {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}

.auth-field input { margin: 0; }
.auth-field-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}
.password-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-field-wrap input { flex: 1; padding-right: 44px; margin: 0; }
.btn-show-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.auth-btn {
  margin-top: 6px;
  padding: 15px;
  border-radius: 14px;
  border: none;
  background: var(--navy);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.auth-btn:hover { background: var(--navy-dark); }

.auth-form { text-align: left; display: flex; flex-direction: column; gap: 6px; }

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
}
.form-info {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 8px 12px;
}
.danger-section h3 { color: var(--danger); }
.danger-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }
.modal-card input[type="password"] {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
}
.auth-switch a { color: var(--navy); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- Shared form elements ---------- */

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-dark);
  margin-top: 12px;
}

input, textarea {
  font: inherit;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.15s, background 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.stacked-form { display: flex; flex-direction: column; gap: 4px; }

.btn-primary, .btn-secondary, .btn-danger {
  margin-top: 16px;
  padding: 13px 18px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-gold { background: var(--gold); box-shadow: 0 4px 14px rgba(240,169,59,0.4); }
.btn-gold:hover { background: var(--gold); filter: brightness(0.93); }

.btn-secondary { background: var(--btn-secondary-bg); color: var(--navy-dark); }
.btn-secondary:hover { background: var(--btn-secondary-hover); }

.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: #E07B20; color: white; }

/* ---------- Page header ---------- */

.page-header { margin-bottom: 20px; }

.page-header h1 { font-size: 20px; margin: 6px 0; color: var(--navy-dark); }

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.page-header-row .back-link { margin-bottom: 0; }

.btn-icon-trash {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.btn-icon-trash:hover { color: var(--danger); background: rgba(194,84,80,0.08); }

/* ---------- Delete modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 24px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--navy-dark); margin: 0 0 8px; }
.modal-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 22px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; }
.modal-btn-cancel {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-btn-cancel:hover { background: var(--btn-secondary-bg); }
.modal-btn-delete {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: var(--danger);
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.modal-btn-delete:hover { opacity: 0.9; }

.greeting-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 8px 0 2px;
}
.greeting {
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--navy-dark);
}

.page-sub { color: var(--text-muted); font-size: 13px; margin: 0; }

.eyebrow {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.eyebrow strong, .eyebrow b { color: var(--navy-dark); }

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.section-title-row { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px; }
.section-title-row h2 { font-size: 16px; color: var(--navy-dark); margin: 0; }

/* ---------- Journal list search ---------- */

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  margin-bottom: 20px;
}
.search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-input {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 13px;
  color: var(--text);
  flex: 1;
  margin: 0;
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.date-filter-btn {
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 0 0 12px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.date-filter-btn:hover { color: var(--navy); }
.date-filter-btn.active { color: var(--navy); }
.date-filter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-top: -10px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.date-filter-row {
  display: flex;
  gap: 10px;
}
.date-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.date-filter-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.date-filter-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  background: var(--cream);
  color: var(--text);
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}
.date-filter-input:focus { border-color: var(--navy); }
.date-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.date-filter-apply {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  flex: 1;
  font-weight: 500;
}
.date-filter-apply:hover { filter: brightness(1.1); }
.date-filter-reset {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* ---------- Month divider ---------- */

/* ---------- Entry cards (dashboard / journal list) ---------- */

.entry-list { display: flex; flex-direction: column; gap: 12px; }

.entry-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 4px 14px var(--shadow-card);
  transition: background 0.2s;
}

.entry-card-title { font-weight: 700; color: var(--navy-dark); font-size: 15px; }
.entry-card-day { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.entry-card-snippet { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }

.empty-state { color: var(--text-muted); font-size: 14px; text-align: center; padding: 40px 0; }

/* ---------- Verse & discussion ---------- */

.verse-box {
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 8px;
  position: sticky;
  top: 12px;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.verse-ref { font-weight: 700; font-size: 11px; opacity: 0.85; margin-bottom: 4px; }
.verse-text {
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.verse-text.expanded {
  display: block;
  overflow: visible;
}
.verse-expand-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0 0;
  margin-top: 2px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.bubble-label { font-size: 10px; font-weight: 700; text-transform: uppercase; opacity: 0.6; margin-bottom: 3px; }
.bubble-waiting-msg {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.bubble-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; opacity: 0.7; }
.bubble-content { }
.bubble-content p { margin: 0 0 8px; }
.bubble-content p:last-child { margin-bottom: 0; }
.bubble-content h1,.bubble-content h2,.bubble-content h3 { font-size: 14px; margin: 10px 0 4px; }
.bubble-content ul,.bubble-content ol { margin: 4px 0 8px; padding-left: 18px; }
.bubble-content li { margin-bottom: 2px; }
.bubble-content strong { font-weight: 700; }

.bubble-ai {
  background: var(--bubble-ai-bg);
  color: var(--bubble-ai-text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bubble-user {
  background: var(--navy);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.action-box, .summary-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px var(--shadow-card);
  transition: background 0.2s;
}
.action-box h3, .summary-box h3 { font-size: 13px; margin: 0 0 10px; color: var(--navy-dark); }
.action-box p, .summary-box p { font-size: 13px; margin: 0; line-height: 1.6; }

.panel-header-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.panel-actions .btn-ghost { flex: 0 0 auto; }
.panel-actions .btn-primary,
.panel-actions .btn-secondary { flex: 1; }
.panel-actions .btn-primary,
.panel-actions .btn-secondary,
.panel-actions .btn-ghost { margin-top: 0; }
.btn-ghost {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-ghost:hover { background: var(--btn-secondary-bg); }

.step-choice-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-dark);
  margin: 0 0 10px;
}
.step-choice-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-choice-btns .action-btn { width: 100%; }

.badge-done { color: #3E8E5A; font-weight: 600; }

/* ---------- Admin page ---------- */

.admin-hub {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.admin-hub-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 4px 14px var(--shadow-card);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s;
}
.admin-hub-card:hover { box-shadow: 0 6px 20px var(--shadow); }
.admin-hub-icon { color: var(--navy); flex-shrink: 0; }
.admin-hub-label { font-size: 15px; font-weight: 700; color: var(--navy-dark); margin-bottom: 2px; }
.admin-hub-desc { font-size: 12px; color: var(--text-muted); }
.admin-hub-new { color: var(--sage); font-weight: 600; }

.admin-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px var(--shadow-card);
}
.admin-section h3 { font-size: 15px; margin: 0 0 14px; color: var(--navy-dark); }

.flash-ok {
  background: #D4EDDA;
  color: #2E6B44;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.flash-err {
  background: #FDECEA;
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

[data-theme="dark"] .flash-ok { background: #1B3A27; color: #6FCF97; }
[data-theme="dark"] .flash-err { background: #3A1F1F; color: #E06B67; }

/* ---------- Admin user list ---------- */

.admin-user-list { display: flex; flex-direction: column; gap: 10px; }
.admin-user-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.admin-user-card:last-child { border-bottom: none; padding-bottom: 0; }
.admin-user-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.admin-user-name-row { display: flex; align-items: center; gap: 6px; }
.admin-user-name { font-size: 14px; font-weight: 600; color: var(--navy-dark); }
.admin-user-email { font-size: 12px; color: var(--text-muted); word-break: break-all; margin-bottom: 2px; }
.admin-user-meta { font-size: 11px; color: var(--text-muted); }
.admin-badge {
  display: inline-block;
  background: var(--gold);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-bottom: 2px;
  width: fit-content;
}
.admin-user-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.btn-tiny {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.flash-reset { line-height: 1.6; }
.reset-pw-badge {
  display: inline-block;
  margin-top: 6px;
  background: #1B3A27;
  color: #6FCF97;
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 8px;
  user-select: all;
}
[data-theme="light"] .reset-pw-badge { background: #E8F5EE; color: #2E6B44; }

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--navy-dark);
  cursor: pointer;
  margin: 4px 0 8px;
}

/* ---------- Toggle switch (preferensi) ---------- */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  padding: 2px 0;
}
.toggle-label { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.toggle-label-title { font-size: 14px; font-weight: 600; color: var(--navy-dark); }
.toggle-label-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.toggle-checkbox { display: none; }
.toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  transition: background 0.2s;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform 0.2s;
}
.toggle-checkbox:checked + .toggle-switch { background: var(--gold); }
.toggle-checkbox:checked + .toggle-switch::after { transform: translateX(18px); }

/* ---------- Changelog ---------- */

.changelog-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.changelog-badge {
  background: var(--gold);
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.changelog-badge:hover { opacity: 0.85; }
.changelog-badge-muted { background: var(--text-muted); }

.changelog-modal { text-align: left; max-width: 340px; }
.changelog-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.changelog-date { font-size: 11px; color: var(--text-muted); }
.changelog-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.changelog-list li { font-size: 13px; color: var(--text); line-height: 1.5; }

/* ---------- Hint flow (journal new onboarding) ---------- */

.hint-flow { display: flex; flex-direction: column; gap: 0; }
.hint-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hint-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.hint-num-last { background: var(--gold); }
.hint-text { font-size: 13px; color: var(--text); line-height: 1.5; flex: 1; }
.hint-arrow {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 0 3px 6px;
}

/* ---------- About section ---------- */

.about-section {
  text-align: center;
  padding: 28px 18px 24px;
}
.about-icon {
  margin-bottom: 14px;
}
.about-icon img {
  border-radius: 18px;
  box-shadow: 0 6px 20px var(--shadow);
}
.about-wordmark {
  color: var(--navy-dark);
  margin-bottom: 6px;
}
.about-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.about-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.about-version {
  background: var(--gold);
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}
.about-sep { opacity: 0.4; }

/* ---------- Verse ref + fetch button ---------- */

.verse-ref-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.verse-ref-wrap input { flex: 1; margin: 0; }
.btn-fetch-verse {
  flex-shrink: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--btn-secondary-bg);
  color: var(--navy-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-fetch-verse:hover { background: var(--btn-secondary-hover); }
.btn-fetch-verse:disabled { opacity: 0.5; cursor: default; }
.btn-search-verse { color: var(--navy); border-color: var(--navy); }
.btn-search-verse:hover { background: var(--btn-secondary-hover); }

.verse-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.verse-search-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.verse-option-card {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.verse-option-card:hover {
  border-color: var(--navy);
  box-shadow: 0 2px 10px var(--shadow-card);
}
.verse-option-ref {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.verse-option-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fetch-status-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: block;
}
.fetch-status-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
  display: block;
}

/* ---------- Char counter ---------- */

.char-counter {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
  margin-bottom: 6px;
}
.char-counter.over {
  color: var(--danger);
  font-weight: 600;
}

/* ---------- Location tag input ---------- */

.location-tag-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  margin-bottom: 4px;
  transition: border-color 0.15s;
}
.location-tag-wrap:focus-within {
  border-color: var(--navy);
}
.location-pin-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--gold);
  transition: opacity 0.15s;
}
.location-pin-btn:disabled { opacity: 0.4; cursor: default; }

.location-pin-icon {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

.location-spinner {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  animation: spin 0.9s linear infinite;
}
.location-input {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 14px;
  color: var(--text);
  flex: 1;
  margin: 0;
}
.location-input:focus {
  outline: none;
  border: none !important;
}

/* ---------- 2-action buttons (journal view) ---------- */

.action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.action-btn:hover, .action-btn.active {
  border-color: var(--navy);
  box-shadow: 0 2px 10px var(--shadow-card);
}
.action-btn.active { background: var(--cream); }
.action-btn-icon { color: var(--navy); flex-shrink: 0; }
.action-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px var(--shadow-card);
}

/* ---------- Journal list card (date left, verse right) ---------- */

.entry-card-list {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.list-card-left {
  flex-shrink: 0;
  min-width: 36px;
  text-align: left;
  padding-top: 2px;
}
.list-card-month {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
  letter-spacing: 0.03em;
}
.list-card-right { flex: 1; min-width: 0; }
.list-verse-ref {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.list-verse-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: break-word;
}
.list-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
  opacity: 0.8;
}
.meta-done { color: #3E8E5A; opacity: 1; }
.meta-draft { color: var(--gold); font-weight: 600; opacity: 1; }

/* ---------- Progress stepper ---------- */

.progress-stepper { overflow: hidden; margin-bottom: 20px; }
.stepper-step {
  float: left;
  width: 33.33%;
  text-align: center;
  position: relative;
}
.stepper-step::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 0;
  right: 50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.stepper-step::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.stepper-step:first-child::before,
.stepper-step:last-child::after { display: none; }
.stepper-step.done::after { background: var(--gold); }
.stepper-step.done + .stepper-step::before { background: var(--gold); }
.stepper-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--card);
  position: relative;
  z-index: 1;
  margin: 0 auto;
}
.stepper-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  margin-top: 5px;
}
.stepper-step.done .stepper-circle { background: var(--gold); border-color: var(--gold); color: white; }
.stepper-step.done .stepper-label { color: var(--gold); font-weight: 600; }
.stepper-step.active .stepper-circle { border-color: var(--gold); color: var(--gold); }
.stepper-step.active .stepper-label { color: var(--gold); font-weight: 600; }

/* Stepper kecil di dalam verse-box (navy background) */
.verse-stepper {
  overflow: hidden;
  margin-top: 16px;
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.verse-stepper .stepper-step::before,
.verse-stepper .stepper-step::after { top: 9px; height: 2px; background: rgba(255,255,255,0.2); }
.verse-stepper .stepper-step.done::after { background: var(--gold); }
.verse-stepper .stepper-step.done + .stepper-step::before { background: var(--gold); }
.verse-stepper .stepper-circle {
  width: 20px;
  height: 20px;
  font-size: 9px;
  background: var(--navy);
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.5);
}
.verse-stepper .stepper-label { font-size: 9px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.verse-stepper .stepper-step.done .stepper-circle { background: var(--gold); border-color: var(--gold); color: white; }
.verse-stepper .stepper-step.done .stepper-label { color: var(--gold-light); font-weight: 600; }
.verse-stepper .stepper-step.active .stepper-circle { border-color: white; color: white; background: var(--navy); }
.verse-stepper .stepper-step.active .stepper-label { color: white; font-weight: 600; }

/* ---------- Primary action button variant ---------- */

.action-btn-primary { border-color: var(--gold); }
.action-btn-primary .action-btn-icon { color: var(--gold); }
.action-btn-primary:hover, .action-btn-primary.active {
  border-color: var(--gold);
  background: var(--cream);
}
.action-btn-text { display: flex; flex-direction: column; gap: 2px; }
.action-btn-sub { font-size: 11px; color: var(--gold); font-weight: 600; }

/* ---------- Dashboard recent cards ---------- */

.entry-card-recent { padding: 14px 16px; }
.recent-verse-ref { font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.recent-verse-text { font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 6px; }

/* ---------- Floating action button ---------- */

.fab {
  position: fixed;
  right: calc(50% - 240px + 20px);
  bottom: 90px;
  height: 48px;
  border-radius: 24px;
  background: var(--gold);
  color: white;
  padding: 0 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(240, 169, 59, 0.45);
  text-decoration: none;
  font-weight: 700;
}
.fab-plus {
  font-size: 26px;
  line-height: 1;
  margin-top: -2px;
}
.fab-label {
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .fab { right: 16px; }
}

/* ---------- Auth page desktop ---------- */

@media (min-width: 600px) {
  .auth-body {
    align-items: center;
    justify-content: center;
    background: #1E3050;
  }
  .auth-top {
    flex: none;
    padding: 0 0 32px;
    text-align: center;
  }
  .auth-wordmark { font-size: 44px; }
  .auth-tagline { margin-top: 6px; }
  .auth-sheet {
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    padding: 36px 40px 40px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  }
}

/* ---------- Theme toggle (top-right fixed) ---------- */

.theme-toggle-top {
  position: fixed;
  top: 16px;
  right: max(16px, calc(50vw - 240px + 16px));
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  z-index: 200;
  box-shadow: 0 2px 8px var(--shadow);
  transition: background 0.2s, border-color 0.2s, color 0.15s;
}
.theme-toggle-top:hover { color: var(--navy); }

.help-btn-top {
  position: fixed;
  top: 16px;
  right: max(60px, calc(50vw - 240px + 60px));
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  z-index: 200;
  box-shadow: 0 2px 8px var(--shadow);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.15s;
}
.help-btn-top:hover { color: var(--navy); }

/* ---------- Entry meta row (date + delete icon) ---------- */

.entry-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.entry-meta-row .page-sub { margin: 0; flex: 1; }

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  transition: background 0.2s, border-color 0.2s;
}

.nav-item, .nav-item-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.nav-item.active, .nav-item-btn:hover { color: var(--navy); }
.nav-icon { font-size: 18px; }
.nav-icon-svg { width: 18px; height: 18px; }

/* ---------- Typing dots (inline AI loading) ---------- */

.typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 4px 0;
}
.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: typing-bounce 1.1s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

/* ---------- Loading overlay ---------- */

#loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-dark);
  margin: 0;
}
.loading-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Onboarding Tour ---------- */
.tour-tooltip {
  position: fixed;
  z-index: 9001;
  background: var(--card);
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.3);
}
.tour-step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tour-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 8px;
}
.tour-body {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.55;
}
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tour-skip {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.tour-next {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.tour-next:hover { background: var(--navy-dark); }

/* ---------- Hint card (journal new) ---------- */
.hint-card {
  background: var(--bubble-ai-bg);
  border-radius: 14px;
  padding: 14px 16px 14px 14px;
  margin-bottom: 18px;
  position: relative;
}
.hint-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}
.hint-steps { display: flex; flex-direction: column; gap: 12px; }
.hint-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hint-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 3px;
}
.hint-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
