/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --primary: #2D6A4F;
  --primary-light: #52B788;
  --primary-dark: #1B4332;
  --secondary: #F4A261;
  --accent: #E9C46A;
  --bg: #F0F4F1;
  --card: #FFFFFF;
  --text: #1A2E1A;
  --text-muted: #5A7A5A;
  --border: #D4E6D4;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(45,106,79,0.10);
  --shadow-lg: 0 8px 32px rgba(45,106,79,0.16);
  --header-h: 60px;
  --nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overscroll-behavior: none;
}
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Loading Screen ─────────────────────────────────────────────────────────── */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; z-index: 1000;
  color: white;
}
#loading-screen svg { width: 80px; height: 80px; }
#loading-screen p { font-size: 1.1rem; opacity: 0.85; }
.loading-dots span {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
  margin: 0 3px; animation: bounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Onboarding ─────────────────────────────────────────────────────────────── */
#onboarding {
  min-height: 100dvh;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 48px 24px calc(24px + var(--safe-bottom));
  color: white;
}
.onboarding-logo {
  width: 100px; height: 100px; margin-bottom: 20px;
}
.onboarding-title {
  font-size: 2rem; font-weight: 700;
  text-align: center; margin-bottom: 6px;
}
.onboarding-subtitle {
  font-size: 1rem; opacity: 0.8;
  text-align: center; margin-bottom: 40px;
}
.onboarding-card {
  background: white; color: var(--text);
  border-radius: var(--radius); padding: 28px 24px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.onboarding-card h2 {
  font-size: 1.2rem; font-weight: 600;
  margin-bottom: 20px; text-align: center;
  color: var(--primary-dark);
}
.identity-tabs {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 4px; margin-bottom: 20px; gap: 4px;
}
.identity-tab {
  padding: 8px 4px; border-radius: 6px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); transition: all 0.2s;
  text-align: center;
}
.identity-tab.active {
  background: white; color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.search-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); font-size: 0.95rem;
  margin-bottom: 12px; outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--primary-light); }
.identity-list {
  max-height: 240px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 20px;
}
.identity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all 0.15s; background: white;
}
.identity-item:hover { border-color: var(--primary-light); background: #F0FFF4; }
.identity-item.selected { border-color: var(--primary); background: #F0FFF4; }
.identity-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0;
}
.identity-name { font-size: 0.95rem; font-weight: 500; flex: 1; }
.identity-meta { font-size: 0.8rem; color: var(--text-muted); }
.search-hint {
  text-align: center; font-size: 0.88rem;
  color: var(--text-muted); padding: 16px 0 8px;
}
.btn-primary {
  width: 100%; padding: 14px;
  background: var(--primary); color: white;
  border-radius: var(--radius-sm); font-size: 1rem;
  font-weight: 600; transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── App Shell ──────────────────────────────────────────────────────────────── */
#app {
  display: flex; flex-direction: column;
  min-height: 100dvh;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--primary-dark);
  display: flex; align-items: center;
  padding: 0 16px; gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-logo { width: 32px; height: 32px; flex-shrink: 0; }
.header-title { color: white; font-size: 1.1rem; font-weight: 700; flex: 1; }
.header-identity {
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  background: rgba(255,255,255,0.15);
  padding: 4px 10px; border-radius: 20px;
  max-width: 140px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.offline-banner {
  background: #92400E; color: #FDE68A;
  text-align: center; font-size: 0.8rem;
  padding: 6px 16px; letter-spacing: 0.02em;
}

/* ── Bottom Nav ─────────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: white; border-top: 1px solid var(--border);
  display: flex; align-items: flex-start;
  padding-top: 4px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 4px; gap: 4px;
  color: var(--text-muted); transition: color 0.15s;
  font-size: 0.7rem; font-weight: 500;
}
.nav-btn.active { color: var(--primary); }
.nav-btn svg { width: 22px; height: 22px; }

/* ── Main Content ───────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 16px);
  overflow-y: auto;
}

/* ── View Sections ──────────────────────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ── Schedule View ──────────────────────────────────────────────────────────── */
.day-group { margin-bottom: 24px; }
.day-header {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 0 4px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.day-header::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}
.day-header.today-header { color: var(--primary); }

.event-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  margin-bottom: 10px; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border-left: 4px solid var(--primary-light);
  display: flex; align-items: stretch;
}
.event-card:active { transform: scale(0.98); }
.event-card-accent { width: 4px; flex-shrink: 0; }
.event-card-body { flex: 1; padding: 14px 14px 14px 0; margin-left: 14px; }
.event-time {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 4px;
}
.event-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.event-location {
  font-size: 0.82rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.event-location svg { width: 13px; height: 13px; flex-shrink: 0; }
.event-groups {
  margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px;
}
.group-chip {
  font-size: 0.7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  color: white; white-space: nowrap;
}
.event-map-thumb {
  width: 72px; height: 72px; object-fit: cover;
  align-self: center; margin-right: 12px;
  border-radius: var(--radius-sm); flex-shrink: 0;
}

.empty-state {
  text-align: center; padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.35; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

/* ── Event Detail Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  width: 100%; background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 90dvh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: var(--safe-bottom);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 12px auto 0;
}
.modal-header {
  display: flex; align-items: flex-start;
  gap: 12px; padding: 16px 20px 12px;
}
.modal-title-wrap { flex: 1; }
.modal-event-time { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }
.modal-event-title { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 0 20px 24px; }
.modal-section { margin-bottom: 20px; }
.modal-section-label {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 6px;
}
.modal-section-value { font-size: 0.95rem; line-height: 1.6; }
.modal-map-img {
  width: 100%; border-radius: var(--radius-sm);
  cursor: zoom-in;
}
.modal-groups { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Settings View ──────────────────────────────────────────────────────────── */
.settings-section {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.settings-section-title {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 16px 16px 8px;
}
.settings-row {
  display: flex; align-items: center;
  padding: 14px 16px; gap: 14px;
  border-top: 1px solid var(--border);
}
.settings-row:first-of-type { border-top: none; }
.settings-row-icon { width: 36px; height: 36px; border-radius: 8px;
  background: var(--primary); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.settings-row-icon svg { width: 18px; height: 18px; color: white; }
.settings-row-text { flex: 1; }
.settings-row-text strong { display: block; font-size: 0.95rem; }
.settings-row-text span { font-size: 0.82rem; color: var(--text-muted); }
.settings-row-action {
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--bg); font-size: 0.85rem;
  font-weight: 600; color: var(--primary);
  transition: background 0.15s;
}
.settings-row-action:hover { background: var(--border); }
.toggle-switch {
  position: relative; width: 48px; height: 28px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 14px;
  background: var(--border); transition: background 0.2s; cursor: pointer;
}
.toggle-track::after {
  content: ''; position: absolute;
  left: 3px; top: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: white; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-track { background: var(--primary); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }

/* ── Install Banner ─────────────────────────────────────────────────────────── */
.install-banner {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  left: 16px; right: 16px; z-index: 150;
  background: var(--primary-dark); color: white;
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.install-banner p { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.install-banner .btn-install {
  background: var(--accent); color: var(--primary-dark);
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 700; white-space: nowrap;
}
.install-banner .btn-dismiss {
  color: rgba(255,255,255,0.6); font-size: 1.2rem; padding: 4px;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Image Lightbox ─────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox img { max-width: 100%; max-height: 90dvh; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  color: white; font-size: 1.4rem; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15); border-radius: 50%;
}

/* ── Access Screen ──────────────────────────────────────────────────────────── */
#access-screen {
  min-height: 100dvh; display: flex;
  align-items: center; justify-content: center;
  background: var(--primary-dark); padding: 24px;
}
.access-card {
  background: white; border-radius: var(--radius);
  padding: 36px 28px; width: 100%; max-width: 360px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.access-card img { width: 72px; margin: 0 auto 16px; }
.access-card h1 { font-size: 1.4rem; margin-bottom: 6px; }
.access-card p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.9rem; }
.access-error {
  color: var(--danger); font-size: 0.85rem;
  margin-bottom: 10px; min-height: 20px;
}

/* ── Admin Styles ───────────────────────────────────────────────────────────── */
.admin-body {
  background: var(--bg);
  min-height: 100dvh;
}
.admin-header {
  background: var(--primary-dark); color: white;
  padding: 0 20px;
  height: 60px; display: flex; align-items: center;
  gap: 14px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.admin-header h1 { font-size: 1.1rem; font-weight: 700; flex: 1; }
.admin-header .btn-logout {
  background: rgba(255,255,255,0.15); color: white;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
}
.admin-header .btn-print-view {
  background: rgba(255,255,255,0.15); color: white;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none;
}
.admin-tabs {
  display: flex; background: white;
  border-bottom: 2px solid var(--border);
  position: sticky; top: 60px; z-index: 90;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.admin-tab {
  padding: 14px 20px; font-size: 0.9rem; font-weight: 600;
  color: var(--text-muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-panel { display: none; padding: 20px; max-width: 800px; margin: 0 auto; }
.admin-panel.active { display: block; }

.admin-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.admin-section-header h2 { font-size: 1.1rem; font-weight: 700; }
.section-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-secondary {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg); color: var(--text-muted);
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600;
  border: 1.5px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover { background: var(--border); color: var(--text); }
.btn-add {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary); color: white;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  transition: background 0.15s;
}
.btn-add:hover { background: var(--primary-dark); }
.btn-add svg { width: 16px; height: 16px; }

/* Admin form */
.admin-form-card {
  background: white; border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.admin-form-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.form-row { margin-bottom: 14px; }
.form-row label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; outline: none;
  transition: border-color 0.2s; background: white;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary-light);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row-2 { grid-template-columns: 1fr; } }

.form-checkbox-group {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px; background: var(--bg);
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
}
.form-checkbox-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 20px;
  border: 1.5px solid var(--border); background: white;
  cursor: pointer; font-size: 0.85rem;
  transition: all 0.15s;
}
.form-checkbox-item input { display: none; }
.form-checkbox-item.checked {
  border-color: var(--primary); background: #F0FFF4;
  color: var(--primary); font-weight: 600;
}
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.btn-save {
  background: var(--primary); color: white;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; transition: background 0.15s;
}
.btn-save:hover { background: var(--primary-dark); }
.btn-cancel {
  background: var(--bg); color: var(--text-muted);
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
}

/* Image upload */
.image-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.image-upload-area:hover, .image-upload-area.dragover {
  border-color: var(--primary-light); background: #F0FFF4;
}
.image-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.image-upload-area svg { width: 32px; height: 32px; color: var(--text-muted); margin: 0 auto 8px; }
.image-upload-area p { font-size: 0.88rem; color: var(--text-muted); }
.image-preview-wrap { position: relative; display: inline-block; margin-top: 10px; }
.image-preview-wrap img { max-height: 160px; border-radius: var(--radius-sm); }
.btn-remove-img {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--danger); color: white;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Admin list items */
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-list-item {
  background: white; border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center;
  gap: 12px; box-shadow: var(--shadow);
}
.admin-list-item-info { flex: 1; min-width: 0; }
.admin-list-item-info strong { display: block; font-size: 0.95rem; font-weight: 600; }
.admin-list-item-info span { font-size: 0.82rem; color: var(--text-muted); }
.admin-list-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-edit {
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--bg); font-size: 0.82rem; font-weight: 600;
  color: var(--primary); transition: background 0.15s;
}
.btn-edit:hover { background: var(--border); }
.btn-delete {
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--danger-light); font-size: 0.82rem; font-weight: 600;
  color: var(--danger); transition: background 0.15s;
}
.btn-delete:hover { background: #FECACA; }

/* Admin login */
.admin-login-wrap {
  min-height: 100dvh; display: flex;
  align-items: center; justify-content: center;
  background: var(--primary-dark); padding: 24px;
}
.admin-login-card {
  background: white; border-radius: var(--radius);
  padding: 36px 28px; width: 100%; max-width: 360px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.admin-login-card img { width: 64px; margin: 0 auto 16px; }
.admin-login-card h1 { font-size: 1.4rem; margin-bottom: 4px; }
.admin-login-card p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.admin-login-card .form-input { margin-bottom: 14px; }
.btn-back-login {
  display: block; width: 100%;
  margin-top: 10px; padding: 8px;
  font-size: 0.82rem; color: var(--text-muted);
  background: none; text-align: center;
}
.btn-back-login:hover { color: var(--primary); }
.login-error {
  color: var(--danger); font-size: 0.85rem;
  margin-bottom: 10px; min-height: 20px;
}

/* Toast notification */
.toast {
  position: fixed; bottom: calc(var(--nav-h, 0px) + var(--safe-bottom) + 16px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--primary-dark); color: white;
  padding: 10px 20px; border-radius: 20px;
  font-size: 0.88rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 500;
  opacity: 0; transition: all 0.25s; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

/* Admin toast (fixed at top-right on desktop) */
.admin-body .toast {
  bottom: auto; top: 80px; right: 20px;
  left: auto; transform: translateY(-10px);
}
.admin-body .toast.show { transform: translateY(0); }
