: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%; border: 1px solid rgba(255,255,255,0.2); }
.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); font-size: 0.95rem; 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; 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; }
.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); }

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 16px;
  background: var(--card);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #eee;
}

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--card); border-radius: 12px; padding: 14px; text-align: center; border: 1px solid #eee; }
.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; }

.contact-grid { display: grid; gap: 14px; }
.contact-card { background: var(--card); border-radius: 14px; padding: 16px; border: 1px solid #eee; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.contact-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.contact-name { font-size: 1.1rem; color: var(--primary); }
.contact-details { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f5f0e8;
  color: var(--primary);
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: bold;
  text-decoration: none;
}
.contact-link:active { background: #ebe4d8; }
.contact-meta, .contact-notes { font-family: Arial, sans-serif; font-size: 0.88rem; color: #555; line-height: 1.45; }
.contact-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; }
.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-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.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) {
  .filter-bar { grid-template-columns: 1fr; }
}
