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

* { 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-size: 1rem; background: #fff; }
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; }

#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%; }
.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); }
.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: 8px 0 4px; }
.tagline { color: var(--muted); margin-bottom: 14px; }
.top-nav { display: flex; gap: 8px; }
.btn-nav { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: #eee; color: var(--primary); font-weight: bold; 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; }
.panel { background: var(--card); border-radius: 16px; padding: 18px; margin-bottom: 20px; border: 1px dashed #ddd; }
.panel-toggle { width: 100%; display: flex; justify-content: space-between; background: transparent; border: 0; font: inherit; font-weight: bold; color: var(--primary); }
.section-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 8px 0 16px; }
.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-highlight { border-color: var(--accent); background: #fffdf5; }
.stat-num { display: block; font-size: 1.5rem; font-weight: bold; font-family: Arial, sans-serif; color: var(--primary); }
.stat-label { font-family: Arial, sans-serif; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; }

.dashboard-section { margin-bottom: 24px; }
.section-title { font-size: 1.05rem; color: var(--primary); margin-bottom: 12px; font-family: Arial, sans-serif; }
.section-count { background: #eee; padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; }
.section-empty { color: var(--muted); font-size: 0.9rem; padding: 8px 0; }

.date-grid { display: grid; gap: 14px; }
.date-card { background: var(--card); border-radius: 14px; padding: 16px; border: 1px solid #eee; }
.date-card-upcoming { border-color: #ead28c; box-shadow: 0 2px 14px rgba(212, 175, 55, 0.12); }
.date-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.date-countdown { font-family: Arial, sans-serif; font-size: 0.82rem; font-weight: bold; color: var(--soft-orange); text-transform: uppercase; letter-spacing: 0.03em; }
.date-title { font-size: 1.15rem; color: var(--primary); }
.date-when { font-family: Arial, sans-serif; font-size: 0.88rem; margin-bottom: 8px; }
.date-notes, .date-people { font-size: 0.9rem; color: #555; margin: 6px 0; line-height: 1.45; }
.date-actions { display: flex; gap: 8px; margin-top: 12px; 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; margin-bottom: 8px; }
.badge-milestone { background: #e8f4e8; color: #2d5a2d; }
.badge-type { flex-shrink: 0; }

.btn { padding: 11px 18px; border: 0; border-radius: 999px; font-weight: bold; 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 { 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) { .form-row { grid-template-columns: 1fr; } }
