* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

.view { height: 100%; }
.hidden { display: none !important; }

#auth-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  background: #1e293b;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
}

.card h1 { font-size: 22px; margin: 0 0 16px; text-align: center; }
.card h2 { font-size: 18px; margin: 0 0 12px; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tab-btn {
  flex: 1;
  padding: 8px;
  background: #334155;
  border: none;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
}
.tab-btn.active { background: #2563eb; color: white; }

.tab-panel { display: none; flex-direction: column; gap: 10px; }
.tab-panel.active { display: flex; }

input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 15px;
}

button[type="submit"], #generate-invite-btn {
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.ghost {
  background: transparent;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.error { color: #f87171; font-size: 13px; min-height: 18px; margin-top: 8px; }

.link-btn {
  color: #60a5fa;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  margin: 8px 0 0;
}
.link-btn:hover { text-decoration: underline; }

#app-view.view { display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #1e293b;
}
.topbar span { flex: 1; font-size: 14px; }

#map { flex: 1; }

#status-bar {
  padding: 8px 14px;
  background: #1e293b;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

#invite-result { font-size: 20px; font-weight: 700; letter-spacing: 2px; text-align: center; color: #4ade80; }

.leaflet-popup-content { font-size: 13px; }

#install-btn { margin-top: 12px; width: 100%; }

.platform-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.platform-buttons a, .platform-buttons button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  padding: 10px;
}

.ios-steps { padding-left: 20px; font-size: 14px; line-height: 1.6; }
.ios-steps li { margin-bottom: 6px; }
.hint { font-size: 12px; color: #94a3b8; margin-top: 12px; }

#update-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  background: #1d4ed8;
  color: white;
  font-size: 13px;
}
#update-banner .ghost { border-color: rgba(255,255,255,0.6); color: white; }
