/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ===== VARIABLES ===== */
:root {
  --green-dark:  #0f2d26;
  --green:       #1a4a3a;
  --green-mid:   #2d6a55;
  --green-light: #e8f2ee;
  --amber:       #e8a020;
  --amber-light: #fef3dc;
  --cream:       #faf8f4;
  --white:       #ffffff;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-400:    #9ca3af;
  --gray-600:    #4b5563;
  --gray-800:    #1f2937;
  --red:         #dc2626;
  --red-light:   #fee2e2;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 2px 12px rgba(15,45,38,.08);
  --shadow-md:   0 4px 24px rgba(15,45,38,.12);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== LAYOUT ===== */
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header {
  background: var(--green-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-logo span { color: var(--amber); }
.header-nav { display: flex; align-items: center; gap: 16px; }
.header-nav a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.header-nav a:hover { color: var(--white); }

/* ===== HERO ===== */
.event-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, var(--green-mid) 100%);
  color: var(--white);
  padding: 56px 20px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.event-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.event-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
  position: relative;
}
.event-hero .subtitle {
  opacity: .8;
  font-size: 1.05rem;
  position: relative;
  max-width: 560px;
  margin: 0 auto 20px;
}
.event-meta {
  display: inline-flex;
  gap: 24px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 10px 24px;
  font-size: .9rem;
  position: relative;
}
.event-meta span { display: flex; align-items: center; gap: 6px; }

/* ===== MAIN CONTENT ===== */
.main-content { padding: 40px 0 80px; }

/* ===== DAY SECTION ===== */
.day-section { margin-bottom: 48px; }
.day-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.day-badge {
  background: var(--amber);
  color: var(--green-dark);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
}
.day-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--green-dark);
}
.day-divider {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ===== SHIFT CARD ===== */
.shift-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.shift-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--green-light);
  border-bottom: 1px solid var(--gray-200);
}
.shift-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.shift-time {
  font-size: .85rem;
  color: var(--green-mid);
  font-weight: 500;
  background: var(--white);
  padding: 3px 12px;
  border-radius: 50px;
  border: 1px solid var(--green-light);
}

.stands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}

/* ===== STAND CARD ===== */
.stand-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.stand-card:hover { border-color: var(--green-mid); box-shadow: var(--shadow); }
.stand-card.full { border-color: var(--gray-200); background: var(--gray-50); }

.stand-name {
  font-weight: 600;
  font-size: .95rem;
  color: var(--gray-800);
  margin-bottom: 8px;
}
.stand-capacity-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.stand-capacity-fill {
  height: 100%;
  background: var(--green-mid);
  border-radius: 3px;
  transition: width .4s ease;
}
.stand-capacity-fill.full { background: var(--amber); }
.stand-slots-text {
  font-size: .8rem;
  color: var(--gray-600);
  margin-bottom: 12px;
}
.stand-helpers { margin-bottom: 12px; }
.helper-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 160px;
  box-sizing: border-box;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 8px;
  margin: 3px 3px 3px 0;
  border: 1px solid rgba(0,0,0,.06);
  vertical-align: top;
}
.helper-chip-icon { flex-shrink: 0; line-height: 1; }
.helper-chip-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.helper-chip .cancel-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .55;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
  flex-shrink: 0;
  transition: opacity .2s;
}
.helper-chip .cancel-btn:hover { opacity: 1; }

/* ===== SIGNUP FORM ===== */
.signup-form { display: flex; gap: 8px; flex-wrap: wrap; }
.signup-input {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: .85rem;
  font-family: inherit;
  transition: border-color .2s;
}
.signup-input:focus { outline: none; border-color: var(--green-mid); }
.signup-btn {
  padding: 8px 14px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.signup-btn:hover { background: var(--green-dark); }
.signup-btn:disabled { background: var(--gray-400); cursor: not-allowed; }

.full-badge {
  text-align: center;
  font-size: .82rem;
  color: var(--gray-400);
  font-weight: 500;
  padding: 8px;
  border: 1.5px dashed var(--gray-200);
  border-radius: 6px;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--green-dark);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn .3s ease;
  max-width: 320px;
}
.toast.error { background: var(--red); }
@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
}
.empty-state svg { margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--gray-600); }

/* ===== ADMIN HEADER ===== */
.admin-topbar {
  background: var(--green-dark);
  color: var(--white);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-topbar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-topbar-logo span { color: var(--amber); }
.admin-topbar nav a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .88rem;
  margin-left: 16px;
  font-weight: 500;
  transition: color .2s;
}
.admin-topbar nav a:hover { color: var(--white); }

/* ===== ADMIN PAGE ===== */
.admin-page { padding: 40px 0 80px; }
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.page-subtitle { color: var(--gray-600); margin-bottom: 32px; }

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}
.card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

/* ===== EVENT LIST ===== */
.event-list { display: grid; gap: 16px; }
.event-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
  gap: 16px;
  flex-wrap: wrap;
}
.event-item:hover { box-shadow: var(--shadow-md); }
.event-item-name { font-weight: 700; font-size: 1.1rem; color: var(--green-dark); }
.event-item-dates { font-size: .85rem; color: var(--gray-600); margin-top: 4px; }
.event-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .2s, transform .1s;
  font-family: inherit;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-800); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-amber { background: var(--amber); color: var(--green-dark); }
.btn-amber:hover { filter: brightness(.92); }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-danger:hover { background: var(--red); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-outline {
  background: transparent;
  border: 1.5px solid currentColor;
  color: var(--green);
}
.btn-outline:hover { background: var(--green-light); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  color: var(--gray-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  font-size: .95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,106,85,.12);
}
.form-hint { font-size: .8rem; color: var(--gray-400); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ===== ALERTS ===== */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: .9rem;
  font-weight: 500;
}
.alert-success { background: var(--green-light); color: var(--green-dark); border-left: 3px solid var(--green-mid); }
.alert-error { background: var(--red-light); color: var(--red); border-left: 3px solid var(--red); }
.alert-info { background: var(--amber-light); color: #92400e; border-left: 3px solid var(--amber); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left;
  padding: 10px 16px;
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  border-bottom: 1px solid var(--gray-200);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

/* ===== STATUS BADGE ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-green { background: var(--green-light); color: var(--green-dark); }
.badge-amber { background: var(--amber-light); color: #92400e; }
.badge-gray  { background: var(--gray-100);    color: var(--gray-600); }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-box {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.login-box h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--green-dark);
  margin-bottom: 6px;
}
.login-box .tagline { color: var(--gray-400); font-size: .9rem; margin-bottom: 32px; }

/* ===== COPY LINK ===== */
.copy-field {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
}
.copy-field input {
  flex: 1;
  border: none;
  background: none;
  font-size: .85rem;
  color: var(--gray-800);
  font-family: monospace;
}
.copy-field input:focus { outline: none; }

/* ===== MANAGE PAGE ===== */
.manage-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .manage-grid { grid-template-columns: 1fr; } }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 70px;
}
.sidebar-card-header {
  background: var(--green-light);
  padding: 14px 18px;
  font-weight: 700;
  font-size: .88rem;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sidebar-card-body { padding: 16px; }

.shift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 7px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .15s;
  border: 1.5px solid transparent;
}
.shift-item:hover { background: var(--green-light); }
.shift-item.active { background: var(--green-light); border-color: var(--green-mid); }
.shift-item-name { font-weight: 600; font-size: .88rem; color: var(--green-dark); }
.shift-item-date { font-size: .75rem; color: var(--gray-600); }

/* ===== PROGRESS ===== */
.progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.progress-bar { flex: 1; height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green-mid); border-radius: 4px; }
.progress-fill.warn { background: var(--amber); }
.progress-text { font-size: .78rem; color: var(--gray-600); white-space: nowrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .stands-grid { grid-template-columns: 1fr; }
  .event-hero { padding: 36px 20px 28px; }
  .event-meta { flex-direction: column; gap: 10px; border-radius: 12px; }
}

/* ===== ROLE ELEMENTS ===== */
.signup-role {
  flex: 0 0 auto;
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  background: var(--white);
  color: var(--gray-800);
  cursor: pointer;
  transition: border-color .2s;
}
.signup-role:focus { outline: none; border-color: var(--green-mid); }

/* Emoji-Symbol neben dem Helfernamen (öffentliche Seite) */
.helper-role-emoji {
  display: inline-block;
  font-size: 1rem;
  margin-right: 1px;
  vertical-align: middle;
  line-height: 1;
}

/* Legacy – Textbadge bleibt als Fallback vorhanden */
.helper-role {
  display: inline-block;
  background: var(--green-mid);
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 50px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: .02em;
}

/* admin topbar logo */
.topbar-logo-img { vertical-align: middle; }

/* ===== ROLE LEGEND (public page) ===== */
.role-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 40px;
  padding: 14px 20px;
  background: var(--green-light);
  border: 1.5px solid #c8e3d8;
  border-radius: var(--radius);
  font-size: .88rem;
  color: var(--gray-600);
}
.role-legend-title {
  font-weight: 600;
  color: var(--green-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.role-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gray-800);
  font-weight: 500;
}
.role-legend-emoji {
  font-size: 1.15rem;
  line-height: 1;
}
