:root {
  color-scheme: dark;
  --bg: #14171c;
  --panel: #1c2028;
  --border: #2b303a;
  --text: #e6e8eb;
  --muted: #9aa2af;
  --accent: #7fa6ff;
  --accent-soft: rgba(127, 166, 255, 0.15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

h1, h2, h3 { font-weight: 600; margin: 0 0 12px; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; color: var(--muted); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 16px 0 6px;
}
label:first-child { margin-top: 0; }

textarea, input[type="text"], input[type="password"], input[type="date"] {
  width: 100%;
  background: #10131a;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}
textarea { min-height: 70px; }

button {
  background: var(--accent);
  color: #0c1120;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}
.tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.stat-row { display: flex; gap: 12px; margin-bottom: 16px; }
.stat {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.stat .num { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.stat .label { font-size: 0.8rem; color: var(--muted); }

.scripture {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 16px;
}
.scripture cite { display: block; font-style: normal; font-size: 0.8rem; margin-top: 4px; }

.history-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  cursor: pointer;
}
.history-item:last-child { border-bottom: none; }
.history-item .date { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.history-item .preview { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.hidden { display: none !important; }

#login-view { max-width: 320px; margin: 15vh auto 0; }

.saved-flash {
  color: #8ee6a1;
  font-size: 0.85rem;
  margin-top: 8px;
  height: 1.2em;
}
