/* MeetMap shared stylesheet.
 *
 * Contains the design-system rules duplicated across every page template:
 * palette tokens, page chrome (body background, nav, layout primitives),
 * the button/input system, and the centered-card layout used by the
 * status/error pages. Page-specific rules (Leaflet map, owner toolbar,
 * QR scanner overrides, landing hero, etc.) stay inline in their template.
 *
 * Served at /static/css/app.css. Each template loads it via a single
 * <link rel="stylesheet" href="/static/css/app.css"> in <head>.
 */

/* --- Palette tokens ----------------------------------------------------- */
:root {
  --bg: #0f172a;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --accent: #f97316;
  --accent-2: #38bdf8;
  --danger: #ef4444;
  --line: rgba(255,255,255,0.08);
  --panel: #111827;
}

/* --- Reset + body background ------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(56,189,248,0.25), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(249,115,22,0.25), transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* The .centered modifier (applied on <body>) is used by the small status
 * pages (expired, invalid_token, rejoin, removed) that want their single
 * card centered in the viewport. */
body.centered {
  display: grid;
  place-items: center;
  padding: 20px;
}

/* --- Top navigation ---------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  font-weight: 700;
}
.nav .logo, .nav a.logo { color: var(--ink); text-decoration: none; font-size: 22px; }
.nav .logo span, .nav a.logo span { color: var(--accent); }
.nav .links a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 14px; }
.nav .links a:hover { color: var(--ink); }

/* --- Layout primitives ------------------------------------------------- */
.wrap { max-width: 760px; margin: 20px auto 60px; padding: 0 20px; }
.wrap.wide { max-width: 1100px; }

h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 4px; }
.lead { color: var(--muted); margin: 0 0 24px; }

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}

/* Larger, more padded card variant used by the centered status pages. */
.card.centered { max-width: 560px; border-radius: 18px; padding: 36px; text-align: center; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.muted { color: var(--muted); font-size: 13px; }

/* --- Forms ------------------------------------------------------------- */
input {
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder { color: rgba(148,163,184,0.7); }
input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(56,189,248,0.18); }

/* --- Button system ----------------------------------------------------- */
button {
  font: inherit; font-weight: 700;
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 18px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.15s ease;
}
button:hover { background: rgba(255,255,255,0.1); }
button:active { transform: translateY(1px); }
button.primary {
  background: var(--accent); color: #0b1220;
  box-shadow: 0 10px 30px -10px rgba(249,115,22,0.7);
}
button.primary:hover { box-shadow: 0 14px 40px -10px rgba(249,115,22,0.9); }
button.ghost {
  background: rgba(255,255,255,0.06); color: var(--ink);
  border-color: rgba(255,255,255,0.15);
}
button.ghost:hover { background: rgba(255,255,255,0.1); }
button.danger {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #fecaca;
}
button.danger:hover { background: rgba(239,68,68,0.25); }

/* Anchor-as-button mirrors so links can wear the same suit. */
a.btn, a.primary, a.ghost {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 700;
  border-radius: 12px; padding: 12px 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
}
a.btn:hover, a.primary:hover, a.ghost:hover { background: rgba(255,255,255,0.1); }
a.btn.primary, a.primary {
  background: var(--accent); color: #0b1220; border-color: transparent;
  box-shadow: 0 10px 30px -10px rgba(249,115,22,0.7);
}
a.btn.primary:hover, a.primary:hover { box-shadow: 0 14px 40px -10px rgba(249,115,22,0.9); }
a.btn.ghost {
  background: rgba(255,255,255,0.06); color: var(--ink);
  border-color: rgba(255,255,255,0.15);
}
a.btn.ghost:hover { background: rgba(255,255,255,0.1); }

a { color: var(--accent-2); }

/* --- Status-page helpers ----------------------------------------------- */
.emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* --- Mobile ------------------------------------------------------------ */
@media (max-width: 560px) {
  .nav { padding: 14px 16px; }
  .nav .links a { margin-left: 12px; }
  .wrap { padding: 0 16px; }
  .row { gap: 8px; }
  .row button { flex: 1 1 100%; }
}
