/* Basic reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f6f8fb;
  color: #1f2a44;
  line-height: 1.45;
}

/* Container width similar to dinner choice page */
.container {
  width: min(1100px, 92vw);
  margin: 16px auto 48px auto;
}

/* Header look/feel */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e9f2;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header-inner {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  height: 42px;
  width: auto;
  display: block;
  border-radius: 6px;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand-text { font-weight: 700; color: #1f2a44; }
.site-nav { display: flex; align-items: center; gap: 12px; }
.user-pill {
  background: #eef3ff;
  color: #123;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.btn-link { color: #0b5fff; text-decoration: none; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

/* Card / panel style used throughout (dinner choice form vibe) */
.panel {
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(31,42,68,0.06);
  padding: 18px;
}

/* Centered auth card */
.auth-wrap {
  min-height: calc(100dvh - 140px);
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(480px, 92vw);
}
.auth-title {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 800;
}
.auth-sub {
  margin: 0 0 16px 0;
  color: #4a5675;
  font-size: 14px;
}

.label { display: block; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%;
  border: 1px solid #cdd7e3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  outline: none;
}
.input:focus { border-color: #7aa8ff; box-shadow: 0 0 0 3px rgba(122,168,255,0.25); }

.btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(180deg, #3d7bff, #2358d6);
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.06); }

/* Alerts */
.alert { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.alert-error { background: #ffe9e9; border: 1px solid #f4b4b4; color: #7d1e1e; }

/* Event grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.event-card .title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: #1f2a44;
}
.event-card .meta { color: #4a5675; font-size: 14px; margin-bottom: 12px; }

.site-footer {
  padding: 22px 0 40px;
  border-top: 1px solid #e5e9f2;
  background: #fff;
}
.site-footer-inner {
  width: min(1100px, 92vw);
  margin: 0 auto;
  color: #4a5675;
  font-size: 14px;
  text-align: center;
}
.btn-secondary {
  background: linear-gradient(180deg, #3d7bff, #2358d6);
  color: #fff;
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #3d7bff, #2358d6);
  color: #fff;
}

/* --- Admin dashboard card grid hardening --- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* prevent overflow pushing columns */
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats { grid-template-columns: minmax(0, 1fr); } }

.stat {
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(31,42,68,0.06);
  padding: 14px;
  display: flex;              /* avoid collapsing height if content is short */
  flex-direction: column;
  min-width: 0;               /* critical: allow text to shrink within the grid cell */
  overflow: hidden;           /* clip long content */
}
.stat .label { color:#4a5675; font-size:13px; }
.stat .num   { font-weight:800; font-size:24px; color:#1f2a44; }

/* Tables: prevent long strings (emails/organizations) from blowing out columns */
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; text-align: left; }
.tbl td { word-wrap: break-word; overflow-wrap: anywhere; }

/* Panels should not visually overlap if long content appears */
.panel { overflow: hidden; }  /* keep shadows nice and clip misc overflows */
