/* ============================================================
   Halbzeit EventPlanner – Kunden-CSS (Hell)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #FFFBF5;
  --bg-card:     #FFFFFF;
  --bg-alt:      #FFF8EE;
  --gold:        #C4A46A;
  --gold-dark:   #8B7240;
  --gold-light:  #F0E4C8;
  --text:        #3D2E1C;
  --text-muted:  #7A6A54;
  --border:      #E8DCC8;
  --border-gold: #C4A46A;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(61,46,28,.08);
  --shadow-md:   0 4px 24px rgba(61,46,28,.12);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ── Auth Layout ──────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFF8EE 0%, #F5EDD8 100%);
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.auth-card-wide { max-width: 600px; }
.auth-container:has(.auth-card-wide) { max-width: 600px; }

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  color: var(--gold);
  margin-bottom: 12px;
}

.auth-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text);
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── Forms ────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(196,164,106,.15); }
.form-group textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--gold);
  color: #1a1410;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--gold-dark); color: #fff; }
.btn-primary:active { transform: scale(.98); }

.btn-full { width: 100%; justify-content: center; }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-dark); }

.btn-danger {
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}
.btn-danger:hover { background: #b02a37; }

/* ── Auth Links ───────────────────────────────────────────── */
.auth-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 13px;
}
.auth-links a { color: var(--gold-dark); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.auth-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
}

.auth-seo-text {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.auth-seo-text h2 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}
.auth-seo-text p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
.auth-seo-text p:last-child { margin-bottom: 0; }

.auth-page-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Flash Messages ───────────────────────────────────────── */
.flash {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.flash-close { background: none; border: none; cursor: pointer; font-size: 16px; opacity: .6; padding: 0; line-height: 1; flex-shrink: 0; }

/* ── Site Header ──────────────────────────────────────────── */
.customer-layout { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(61,46,28,.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon { width: 28px; height: 28px; color: var(--gold); }

.logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.mobile-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.mobile-logout-form { display: none; }
.mobile-logout-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  border-radius: 8px;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.site-nav a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.site-nav a:hover { color: var(--gold-dark); }

.btn-nav {
  background: var(--gold);
  color: #1a1410 !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
}
.btn-nav:hover { background: var(--gold-dark); color: #fff !important; }

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s, color .2s;
}
.btn-logout:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 32px 24px;
}

.page-container {
  max-width: 1100px;
  margin: 0 auto;
}
.page-container-narrow { max-width: 800px; }
.page-container-detail { max-width: 860px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ── Site Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
}

.footer-inner a { color: var(--text-muted); text-decoration: none; }
.footer-inner a:hover { color: var(--gold-dark); }

/* ── Status Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.status-new        { background: #dbeafe; color: #1e40af; }
.status-planning   { background: #ede9fe; color: #6d28d9; }
.status-approval   { background: #dbeafe; color: #1d4ed8; }
.status-offer      { background: #fef3c7; color: #92400e; }
.status-accepted   { background: #d1fae5; color: #065f46; }
.status-rejected   { background: #fee2e2; color: #991b1b; }
.status-confirmed  { background: #d1fae5; color: #065f46; }
.status-done       { background: #f3f4f6; color: #374151; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }
.status-cancel-req { background: #fecaca; color: #7f1d1d; }
.status-change     { background: #fef9c3; color: #854d0e; }

/* ── Wizard ───────────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: #fff;
  transition: all .2s;
}

.wizard-step.active .step-num { border-color: var(--gold); background: var(--gold); color: #1a1410; }
.wizard-step.done .step-num   { border-color: #22c55e; background: #22c55e; color: #fff; }

.step-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.wizard-step.active .step-label { color: var(--text); font-weight: 500; }
.wizard-step.done .step-label   { color: #22c55e; }

.step-connector { width: 32px; height: 1px; background: var(--border); margin: 0 8px; flex-shrink: 0; }

/* ── Option Cards (Wizard) ────────────────────────────────── */
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.option-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-3 {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.form-group-compact { margin-bottom: 0; }
.panel-box {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: 8px;
}
.offer-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.offer-table { width: 100%; min-width: 520px; margin-bottom: 16px; border-collapse: collapse; font-size: 13px; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.actions-row-top { margin-bottom: 20px; }
.actions-row-md { margin-top: 16px; }
.actions-row-sm { margin-top: 10px; }
.actions-row-lg {
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.action-grow { flex: 1; }

.option-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  position: relative;
}

.option-card:hover { border-color: var(--gold); }
.option-card.selected { border-color: var(--gold); background: rgba(196,164,106,.08); }

.option-card input[type="checkbox"],
.option-card input[type="radio"] {
  display: none;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state svg {
  width: 56px; height: 56px;
  color: var(--border-gold);
  margin-bottom: 20px;
}
.empty-state h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 10px;
}
.empty-state p { margin-bottom: 24px; }

/* ── Event Grid / Cards ───────────────────────────────────── */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.event-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .2s, border-color .2s;
}
.event-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-gold); }

.event-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.event-date { font-size: 13px; color: var(--text-muted); }

.event-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.event-card-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.event-card-action {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-dark);
}

/* ── Wizard Panels ────────────────────────────────────────── */
.wizard-panel-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.option-icon { font-size: 24px; margin-bottom: 6px; }
.option-name { font-size: 14px; font-weight: 500; color: var(--text); }
.option-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.option-price { font-size: 12px; color: var(--gold-dark); margin-top: 4px; font-weight: 600; }

.time-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.time-range input { flex: 1; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--gold); }

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}
.switch-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-ui {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d1d5db;
  border: 1px solid #bfc4cc;
  transition: background .2s ease, border-color .2s ease;
  flex-shrink: 0;
}
.switch-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.switch-label input:checked + .switch-ui {
  background: var(--gold);
  border-color: var(--gold-dark);
}
.switch-label input:checked + .switch-ui::after {
  transform: translateX(18px);
}
.switch-label input:focus-visible + .switch-ui {
  box-shadow: 0 0 0 3px rgba(212,151,78,.25);
}

.req { color: #e53e3e; }

/* ── Event Detail ─────────────────────────────────────────── */
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 20px;
}
.back-link:hover { color: var(--gold-dark); }

.event-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.event-detail-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
}
.event-detail-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Info-List (dl) */
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.info-list dt { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.info-list dd { color: var(--text); }

/* Selection List */
.selection-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.selection-list li { display: flex; flex-direction: column; gap: 2px; }
.sel-name { font-size: 14px; font-weight: 500; }
.sel-desc { font-size: 12px; color: var(--text-muted); }

/* Angebot-Card */
.angebot-card { border-color: var(--gold-light); background: linear-gradient(135deg, #fffbf5 0%, #fff8ee 100%); }
.angebot-card.accepted { border-color: #bbf7d0; background: #f0fdf4; }
.angebot-preis { margin-bottom: 16px; }
.preis-gesamt { font-family: 'Playfair Display', Georgia, serif; font-size: 32px; font-weight: 700; color: var(--text); }
.preis-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.preis-gueltig { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.angebot-notiz { font-size: 14px; color: var(--text); margin-top: 12px; padding: 10px; background: rgba(196,164,106,.1); border-radius: 6px; }
.angebot-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Messages */
.messages-card { position: sticky; top: 84px; }
.messages-thread { max-height: 380px; overflow-y: auto; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.no-messages { font-size: 13px; color: var(--text-muted); text-align: center; padding: 24px 0; }

.message-item { padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.message-item.from-customer { background: var(--bg-alt); border: 1px solid var(--border); }
.message-item.from-admin    { background: rgba(196,164,106,.1); border: 1px solid var(--gold-light); }

.msg-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.msg-author { font-weight: 600; font-size: 12px; color: var(--text); }
.msg-time   { font-size: 11px; color: var(--text-muted); }
.msg-body   { color: var(--text); line-height: 1.5; }
.message-form textarea { width: 100%; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .site-nav {
    width: 100%;
    gap: 10px;
    flex-wrap: wrap;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .messages-card { position: static; }
  .form-grid-3,
  .option-grid-3 { grid-template-columns: 1fr; }
  .actions-row { flex-direction: column; align-items: stretch; }
  .action-grow { flex: initial; }
  .offer-table { min-width: 460px; }
}
@media (max-width: 640px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .mobile-nav-toggle { display: inline-flex; }
  .mobile-logout-form { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }
  .site-header.nav-open .header-inner { align-items: flex-start; flex-wrap: wrap; }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav .btn-nav,
  .site-nav .btn-logout { width: 100%; justify-content: center; text-align: center; }
  .site-nav form { width: 100%; }
  .header-inner { padding: 10px 16px; }
  .auth-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .event-detail-header { flex-direction: column; }
  .event-grid { grid-template-columns: 1fr; }
  .main-content { padding: 20px 14px; }
  .card { padding: 16px; }
  .logo-sub { display: none; }
  .offer-table { min-width: 420px; }
}
