:root {
  --bg: #F8F9FA;
  --surface: #ffffff;
  --text: #1A1A2E;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #0A2463;
  --primary-light: #1E3A8A;
  --accent: #C8A951;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(10, 36, 99, 0.08);
  --nav-h: 56px;
  --footer-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  padding-bottom: calc(var(--nav-h) + var(--footer-h) + var(--safe-bottom) + 16px);
}
#app-root { max-width: 640px; margin: 0 auto; }
#app-main { padding: 12px 14px 20px; }
.muted { color: var(--text-muted); font-size: 0.9rem; }
.page-title, .section-title { font-size: 1.15rem; margin: 0 0 12px; }
.section { margin: 18px 0; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 999px; padding: 10px 18px; font-size: 0.95rem; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #eef2ff; color: var(--primary); }
.btn-accent { background: var(--accent); color: #1A1A2E; font-weight: 600; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; margin-bottom: 8px; }
.btn:disabled { opacity: 0.5; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; background: #eef2ff; color: var(--primary); }
.badge-active { background: #dcfce7; color: #166534; }
.badge-ended { background: #f1f5f9; color: #64748b; }
.form-stack label { display: block; margin-bottom: 10px; font-size: 0.9rem; }
.form-stack input, .form-stack textarea, .form-stack select { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.search-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-brand { font-weight: 600; font-size: 0.95rem; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-actions select { font-size: 0.8rem; padding: 4px 8px; border-radius: 6px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: calc(var(--footer-h) + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--border); z-index: 30; }
.bottom-nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.bottom-nav li { flex: 1; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; text-decoration: none; color: var(--text-muted); font-size: 0.72rem; }
.bottom-nav a.active { color: var(--primary); font-weight: 600; }
.contact-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--border); padding: 8px 12px calc(8px + var(--safe-bottom)); }
.contact-footer__btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.contact-footer__cta, .contact-footer__btn { padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; text-decoration: none; border: none; cursor: pointer; }
.contact-footer__cta { background: var(--primary); color: #fff; }
.contact-footer__btn { background: #f1f5f9; color: var(--text); }
.contact-footer__brand { text-align: center; font-size: 0.7rem; color: var(--text-muted); margin: 6px 0 0; }
.toast-container { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 9999; }
.toast { padding: 10px 18px; border-radius: 8px; margin-bottom: 8px; color: #fff; font-size: 0.9rem; }
.toast-success { background: #059669; } .toast-error { background: #dc2626; } .toast-info { background: #334155; }
.modal-root { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-root.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.5); }
.modal-box { position: relative; width: 100%; max-width: 400px; max-height: 85vh; overflow-y: auto; z-index: 1; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.sk-block { height: 80px; background: linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; margin-bottom: 8px; }
@keyframes shimmer { 0%{background-position:200% 0}100%{background-position:-200% 0} }
@keyframes fadeIn { from{opacity:0}to{opacity:1} }
body.fade-in { animation: fadeIn 0.35s ease; }
