/* ═══════════════════════════════════════════════════
   MOA Event Hub – Haupt-Stylesheet
   Navy #002554 · Orange #f26239 · Maax + Canela-Bold
══════════════════════════════════════════════════════ */

@font-face {
  font-family: "Canela-Bold"; font-display: swap;
  src: url("https://moa.de/wp-content/uploads/et-fonts/Canela-Bold-1.ttf") format("truetype");
}
@font-face {
  font-family: "Maax"; font-display: swap;
  src: url("https://moa.de/wp-content/uploads/et-fonts/maax-regular-205tf-1.ttf") format("truetype");
}

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --navy:       #002554;
  --navy-hover: #001b3d;
  --navy-light: #e6ebf2;
  --orange:     #f26239;
  --green:      #107c41;
  --danger:     #E03030;
  --text:       #585858;
  --text-light: #888888;
  --bg:         #F4F6F9;
  --surface:    #FFFFFF;
  --border:     #E0E5EC;
  --subtle:     #EDF1F6;
  --radius:     8px;
  --shadow:     0 8px 24px rgba(0,37,84,.06);
  --shadow-md:  0 12px 32px rgba(0,37,84,.12);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Maax', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 80px;
}
h1, h2, h3, .canela {
  font-family: 'Canela-Bold', serif;
  color: var(--navy);
  font-weight: normal;
}
a { color: var(--navy); }

/* ── Navigation ─────────────────────────────────────── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  min-height: 60px;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  flex-wrap: wrap;
}
.nav-brand {
  font-family: 'Canela-Bold', serif;
  font-size: 18px;
  color: var(--navy);
  margin-right: 12px;
  white-space: nowrap;
  padding: 8px 0;
  text-decoration: none;
}
.nav-brand span { color: var(--orange); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-links a:hover   { background: var(--subtle); color: var(--navy); }
.nav-links a.active  { background: var(--navy-light); color: var(--navy); font-weight: bold; }
.nav-logout { color: var(--danger) !important; font-weight: bold; }
.nav-spacer { flex: 1; min-width: 8px; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}
.nav-username { font-weight: bold; color: var(--navy); }
.nav-station  { color: var(--text-light); font-size: 11px; margin-right: 4px; }

/* ── Layout ─────────────────────────────────────────── */
.container         { max-width: 920px;  margin: 30px auto; padding: 0 16px; }
.container--wide   { max-width: 1200px; margin: 30px auto; padding: 0 16px; }
.container--narrow { max-width: 480px;  margin: 30px auto; padding: 0 16px; }
.page-title        { font-size: 32px; color: var(--navy); margin-bottom: 24px; }

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.card--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
}

/* ── Forms ──────────────────────────────────────────── */
label {
  font-size: 12px; font-weight: bold; color: var(--navy);
  display: block; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .5px;
}
input[type=text], input[type=number], input[type=email], textarea, select {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--navy);
  font-size: 16px; margin-bottom: 16px;
  font-family: 'Maax', sans-serif;
  transition: border .2s, background .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy); background: #fff;
}
textarea { resize: vertical; min-height: 80px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.checkbox-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--navy); }
.checkbox-row label { margin: 0; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: normal; cursor: pointer; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  padding: 12px 20px; border: none; border-radius: 6px;
  font-size: 14px; font-weight: bold; cursor: pointer;
  transition: background .2s, transform .1s; font-family: 'Maax', sans-serif;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; text-transform: uppercase; letter-spacing: .5px;
  text-decoration: none; white-space: nowrap;
}
.btn:active  { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary  { background: var(--navy);   color: #fff; }
.btn-primary:hover  { background: var(--navy-hover); }
.btn-success  { background: var(--green);  color: #fff; }
.btn-success:hover  { background: #0a6234; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover   { background: #b72525; }
.btn-orange   { background: var(--orange); color: #fff; }
.btn-orange:hover   { background: #d8542f; }
.btn-subtle   { background: var(--subtle); color: var(--navy); font-size: 13px; padding: 10px 16px; border: 1px solid var(--border); }
.btn-subtle:hover   { background: var(--border); }
.btn-xl    { padding: 16px 24px; font-size: 16px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-sm    { padding: 6px 10px; font-size: 11px; letter-spacing: 0; }
.row-flex  { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Badges ─────────────────────────────────────────── */
.badge        { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: .3px; }
.badge-admin  { background: var(--navy-light); color: var(--navy); }
.badge-user   { background: var(--subtle); color: var(--text); }
.badge-green  { background: #e6f4ea; color: var(--green); }
.badge-orange { background: #fef0ea; color: var(--orange); }
.badge-danger { background: #fde8e8; color: var(--danger); }

/* ── Flash messages ─────────────────────────────────── */
.flash         { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; font-weight: bold; }
.flash-success { background: #e6f4ea; color: var(--navy);   border-left: 4px solid var(--green); }
.flash-error   { background: #fde8e8; color: var(--danger); border-left: 4px solid var(--danger); }
.flash-info    { background: var(--navy-light); color: var(--navy); border-left: 4px solid var(--navy); }

/* ── Tables ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 400px; }
th { text-align: left; padding: 12px 10px; color: var(--text); font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--border); }
td { padding: 14px 10px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; color: var(--navy); }
tr:last-child td { border-bottom: none; }
.data-row:hover td { background: var(--subtle); }

/* ── UID box ────────────────────────────────────────── */
.uid-box { font-family: monospace; font-size: 12px; color: var(--navy); background: var(--subtle); padding: 4px 8px; border-radius: 4px; display: inline-block; cursor: pointer; border: 1px solid var(--border); }
.uid-box.truncated { max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* ── Points ─────────────────────────────────────────── */
.points-big   { font-family: 'Canela-Bold', serif; font-size: 84px; color: var(--navy); text-align: center; line-height: 1; margin-top: 10px; transition: color .3s; }
.points-label { text-align: center; font-size: 11px; color: var(--text-light); margin: 4px 0 24px; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; }

/* ── Scan pill ──────────────────────────────────────── */
.scan-pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 50px; font-size: 14px; font-weight: bold; background: var(--subtle); color: var(--text); transition: all .3s; border: 1px solid var(--border); }
.scan-pill.active { background: var(--navy-light); color: var(--navy); border-color: var(--navy); }
.scan-pill.error  { background: #fde8e8; color: var(--danger); border-color: var(--danger); }

/* ── Search bar ─────────────────────────────────────── */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-bar input { margin-bottom: 0; flex: 1; }

/* ── Misc ───────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.moa-logo { width: 160px; max-width: 100%; height: auto; }
.error-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; flex-direction: column; text-align: center; gap: 16px; }

/* ── Auth pages ─────────────────────────────────────── */
.auth-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.auth-box  { width: 100%; max-width: 420px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-size: 30px; margin: 16px 0 6px; }
.auth-header p  { color: var(--text-light); font-size: 14px; }

/* ── Undo toast ─────────────────────────────────────── */
#undo-toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: white; padding: 14px 24px;
  border-radius: 50px; box-shadow: var(--shadow-md);
  display: none; align-items: center; gap: 16px; z-index: 1000;
  font-size: 14px; font-weight: bold; width: max-content; max-width: 90vw;
}
#undo-toast button {
  background: white; color: var(--navy); border: none;
  padding: 6px 14px; border-radius: 20px; font-weight: bold; cursor: pointer;
  font-family: 'Maax', sans-serif;
}

/* ── Team dashboard ─────────────────────────────────── */
.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; margin-bottom: 20px; }
.station-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); cursor: pointer; transition: border-color .3s, box-shadow .3s; }
.station-card.free { border-color: var(--green); }
.station-card.busy { border-color: var(--orange); }
.station-card.help { border-color: var(--danger); animation: help-pulse 2s ease-in-out infinite; }
@keyframes help-pulse { 0%,100%{box-shadow:0 0 0 4px rgba(224,48,48,.12)} 50%{box-shadow:0 0 0 8px rgba(224,48,48,.04)} }
.station-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; flex-shrink: 0; }
.station-card.free .station-dot { background: var(--green); }
.station-card.busy .station-dot { background: var(--orange); }
.station-card.help .station-dot { background: var(--danger); }
.station-name    { font-size: 18px; font-weight: bold; color: var(--navy); margin-bottom: 6px; }
.station-meta    { font-size: 12px; color: var(--text-light); }
.station-actions { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.station-actions button { flex: 1; min-width: 60px; }

/* ── Menu public ────────────────────────────────────── */
.menu-category-title {
  font-family: 'Canela-Bold', serif; font-size: 24px; color: var(--navy);
  padding-bottom: 8px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.menu-category-title::after {
  content:''; flex:1; height:2px;
  background: linear-gradient(to right, var(--orange), transparent);
  border-radius: 2px;
}
.menu-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); gap: 16px; }
.menu-item:last-child { border-bottom: none; }
.menu-item-name { font-weight: bold; color: var(--navy); font-size: 16px; }
.menu-item-desc { font-size: 13px; color: var(--text-light); margin-top: 3px; }
.price-chip { background: var(--navy-light); color: var(--navy); font-family: 'Canela-Bold',serif; font-size: 16px; padding: 4px 12px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 700px) {
  .nav       { padding: 10px 12px; }
  .container { margin: 14px auto; padding: 0 10px; }
  .page-title { font-size: 26px; margin-bottom: 14px; }
  .card      { padding: 16px; }
  .points-big { font-size: 70px; }
  .grid-2    { grid-template-columns: 1fr; }
  .perm-grid { grid-template-columns: 1fr; }
  .station-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .station-grid { grid-template-columns: 1fr; } }
