/**
 * Timeline lab styles — FrOdo Family Hub palette, vertical timeline.
 */

:root {
  --primary: #2d2a26;
  --accent: #d4af37;
  --bg: #f5f2eb;
  --card: #fff;
  --text: #333;
  --soft-orange: #f4b251;
  --danger: #a33;
  --muted: #777;
  --line: #d4c9b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 0 0 14px;
  font-family: inherit;
  background: #fff;
  font-size: 1rem;
}

label {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--primary);
}

button { font-family: Arial, sans-serif; cursor: pointer; }

.hidden { display: none !important; }
.muted { color: var(--muted); }

#lock-screen {
  position: fixed;
  inset: 0;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  color: #fff;
  padding: 20px;
}

.lock-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 34px;
  border-radius: 14px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lock-box h1 { margin-bottom: 8px; }
.lock-box p { color: #ddd; margin-bottom: 16px; font-size: 0.95rem; }

.lock-box button {
  padding: 12px 20px;
  border: 0;
  border-radius: 30px;
  background: var(--soft-orange);
  color: var(--primary);
  font-weight: bold;
  width: 100%;
}

.site-header {
  background: var(--card);
  padding: 16px 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.lab-badge {
  background: #fff3d6;
  color: #8a6d1a;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.site-header h1 { font-size: 1.75rem; color: var(--primary); margin-bottom: 4px; }
.tagline { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }

.top-nav { display: flex; gap: 8px; width: 100%; }

.btn-nav {
  flex: 1;
  min-height: 44px;
  padding: 10px 8px;
  border: 0;
  border-radius: 999px;
  background: #eee;
  color: var(--primary);
  font-weight: bold;
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#app-shell { max-width: 900px; margin: 0 auto; padding: 18px; }

.status {
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 10px;
  background: #fff8df;
  border: 1px solid #ead28c;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

.panel {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px dashed #ddd;
}

.panel-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--primary);
  font-weight: bold;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}

.section-head h2 { font-size: 1.35rem; color: var(--primary); }
.user-line { font-family: Arial, sans-serif; font-size: 0.85rem; color: var(--muted); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid #eee;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--primary);
  font-family: Arial, sans-serif;
}

.stat-label {
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
}

.timeline-track {
  position: relative;
  padding-left: 28px;
}

.timeline-track::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(var(--line), var(--accent));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 22px;
}

.timeline-marker {
  position: absolute;
  left: -22px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--card);
  box-shadow: 0 0 0 2px var(--line);
}

.timeline-card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #eee;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.timeline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.timeline-date {
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--primary);
}

.timeline-title {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
  margin-bottom: 8px;
}

.timeline-people {
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.timeline-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: bold;
  background: #f0ebe3;
  color: var(--primary);
}

.btn {
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.9rem;
  min-height: 44px;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-gold { background: var(--soft-orange); color: var(--primary); }
.btn-ghost { background: #eee; color: var(--primary); }
.btn-danger { background: #f4dddd; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; min-height: 36px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.field-hint {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  margin: -8px 0 12px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-note {
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 24px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}

.modal-panel {
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
  max-width: 420px;
  width: 100%;
}

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  #app-shell { padding: 12px; }
  .timeline-track { padding-left: 24px; }
}
