:root {
  --kg-red: #d11317;
  --kg-red-dark: #a90e12;

  --text: #111111;
  --muted: #6f6f75;
  --muted-light: #9a9aa0;

  --page-bg: #f6f6f8;
  --card-bg: #ffffff;
  --soft-bg: #f3f3f5;

  --border: #e1e1e6;
  --border-strong: #cfcfd6;

  --success-bg: #f3fbf6;
  --success-border: #bfe6cc;
  --success-text: #14743a;

  --error-bg: #fff2f2;
  --error-border: #efb8b8;
  --error-text: #9b1111;

  --shadow: 0 14px 35px rgba(0, 0, 0, 0.07);
  --shadow-soft: 0 7px 20px rgba(0, 0, 0, 0.045);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

/* RESET */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #fbfbfd 0%, var(--page-bg) 100%);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  color: var(--text) !important;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button *,
a,
a * {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

#app,
#adminApp {
  width: 100%;
}

/* EMBED MODUS FÜR WORDPRESS IFRAME */

html.kgbs-embed-mode,
html.kgbs-embed-mode body {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
}

html.kgbs-embed-mode #app {
  background: transparent !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

html.kgbs-embed-mode .booking-shell {
  background: transparent !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 8px 22px 42px 22px !important;
}

html.kgbs-embed-mode .wizard-card,
html.kgbs-embed-mode .blocked-card,
html.kgbs-embed-mode .success-page {
  background: #ffffff !important;
}

/* PUBLIC LAYOUT */

.booking-shell {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 22px;
}

.wizard-card,
.blocked-card,
.success-page {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px;
}

.wizard-head {
  margin-bottom: 24px;
}

.wizard-head h1,
.blocked-card h1,
.success-page h1 {
  margin: 0 0 12px 0;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 760;
  color: var(--text);
}

.wizard-head p,
.blocked-card p,
.success-page p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.48;
}

/* PROGRESS */

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.wizard-progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  text-align: left;
}

button.wizard-progress-step {
  cursor: pointer;
}

button.wizard-progress-step:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.wizard-progress-step.active {
  border-color: rgba(209, 19, 23, 0.55);
  box-shadow: 0 0 0 3px rgba(209, 19, 23, 0.07);
  color: var(--text);
}

.wizard-progress-step.done {
  border-color: var(--success-border);
  color: var(--success-text);
}

.wizard-progress-number {
  width: 29px;
  height: 29px;
  min-width: 29px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.wizard-progress-step.active .wizard-progress-number {
  background: var(--kg-red);
  color: #ffffff;
}

.wizard-progress-step.done .wizard-progress-number {
  background: var(--success-bg);
  color: var(--success-text);
}

.wizard-progress-label {
  font-size: 14px;
  font-weight: 650;
}

/* STEP 1 */

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.choice-card {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text) !important;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.choice-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.choice-card.active {
  border-color: var(--kg-red);
  box-shadow: 0 0 0 3px rgba(209, 19, 23, 0.08);
}

.choice-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text) !important;
  font-size: 19px;
  line-height: 1.18;
  font-weight: 720;
  letter-spacing: -0.015em;
}

.choice-card span {
  display: block;
  color: var(--muted) !important;
  font-size: 15px;
  line-height: 1.42;
  font-weight: 450;
}

/* WARTEBEREICH */

.queue-box {
  display: grid;
  gap: 16px;
}

.queue-badge {
  display: inline-flex;
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  font-size: 13px;
  font-weight: 760;
}

.queue-head {
  margin-bottom: 4px;
}

.queue-status-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--soft-bg);
}

.queue-status-card strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 750;
}

.queue-status-card span {
  display: block;
  color: var(--muted);
  line-height: 1.42;
}

.queue-position {
  min-width: 96px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border);
  text-align: center;
}

.queue-position span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.queue-position strong {
  margin: 2px 0 0 0;
  color: var(--kg-red);
  font-size: 28px;
  line-height: 1;
}

.queue-loader {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 18px;
}

.queue-loader span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--kg-red);
  opacity: .35;
  animation: queuePulse 1.2s infinite ease-in-out;
}

.queue-loader span:nth-child(2) {
  animation-delay: .15s;
}

.queue-loader span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes queuePulse {
  0%, 100% {
    transform: translateY(0);
    opacity: .35;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* FORM BASICS */

.reservation-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--soft-bg);
}

.reservation-box strong {
  display: inline;
  color: var(--text);
  font-weight: 720;
}

.reservation-box span {
  color: var(--muted);
  line-height: 1.35;
}

.reservation-box .btn {
  min-height: 40px;
  padding: 9px 16px;
}

.form-section {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0 0 7px 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 740;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15.8px;
  line-height: 1.48;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label,
.admin-form label,
.admin-slot-card label,
.admin-login label {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 650;
}

.required-star {
  color: var(--kg-red) !important;
  font-weight: 800;
  display: inline !important;
}

/* INPUTS */

.form-field input,
.form-field textarea,
.admin-form input,
.admin-form textarea,
.admin-slot-card input,
.admin-login input,
.admin-table input,
.admin-table textarea {
  width: 100%;
  min-height: 47px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
}

.form-field input:not([type="checkbox"]) {
  height: 47px;
}

.form-field textarea,
.admin-table textarea {
  min-height: 98px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted-light);
}

.form-field input:focus,
.form-field textarea:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-slot-card input:focus,
.admin-login input:focus,
.admin-table input:focus,
.admin-table textarea:focus {
  outline: none;
  border-color: rgba(209, 19, 23, 0.75);
  box-shadow: 0 0 0 3px rgba(209, 19, 23, 0.09);
}

/* CHECKBOXES / MULTICHOICE */

.checkbox-field {
  gap: 0;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--text);
  line-height: 1.42;
  font-weight: 450 !important;
}

.checkbox-row input {
  width: 24px !important;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  margin-top: 1px;
  accent-color: var(--kg-red);
}

.checkbox-row .checkbox-text {
  display: block;
  color: var(--text);
}

.multi-options {
  display: grid;
  gap: 10px;
}

.multi-options .checkbox-row {
  padding: 4px 0;
}

.other-input {
  margin-top: 6px;
}

/* SLOTS */

.slot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0;
}

.slot-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text) !important;
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.slot-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.slot-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text) !important;
  font-size: 17px;
  font-weight: 720;
  line-height: 1.2;
}

.slot-card span {
  display: block;
  color: var(--muted) !important;
  font-size: 14px;
  line-height: 1.35;
}

.slot-card.selectable {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.slot-card.selectable span {
  color: var(--success-text) !important;
  font-weight: 650;
}

.slot-card.active {
  border-color: var(--kg-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(209, 19, 23, 0.08);
}

.slot-card.locked {
  background: #f0f0f2;
  border-color: var(--border);
  color: var(--muted) !important;
  cursor: not-allowed;
}

.slot-card.full {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text) !important;
  cursor: not-allowed;
}

.slot-card:disabled {
  opacity: 1;
}

/* MESSAGES */

.slot-availability-warning {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #f2b8b8;
  background: #fff2f2;
  color: #9b1111;
  font-size: 15.5px;
  line-height: 1.42;
  font-weight: 750;
}

.selected-info,
.system-message {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--soft-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.42;
}

.system-message.error,
.error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
}

.system-message.success,
.success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.email-match-info {
  min-height: 0;
  margin-top: 0;
  font-size: 14px;
}

.email-match-info.ok {
  color: var(--success-text);
  font-weight: 650;
}

.email-match-info.bad {
  color: var(--error-text);
  font-weight: 650;
}

.email-match-info.checking {
  color: var(--muted);
  font-weight: 650;
}

/* REVIEW */

.review-card {
  display: grid;
  gap: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.review-row:last-child {
  border-bottom: 0;
}

.review-row div {
  color: var(--muted);
  line-height: 1.35;
}

.review-row strong {
  color: var(--text);
  font-weight: 720;
  word-break: break-word;
  line-height: 1.35;
}

/* SUCCESS */

.success-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 28px;
  font-weight: 850;
  margin-bottom: 14px;
}

.summary-box {
  margin-top: 20px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border);
}

.summary-box h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 720;
}

.summary-list {
  display: grid;
  gap: 0;
}

.summary-box dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.summary-box dt {
  color: var(--muted);
  font-weight: 650;
}

.summary-box dd {
  margin: 0;
  font-weight: 650;
}

.small-note {
  font-size: 14px;
  margin-top: 16px;
  margin-bottom: 0;
}

/* BUTTONS */

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.btn,
.submit-button,
.cancel-button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 47px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 720;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary,
.submit-button {
  background: var(--kg-red);
  color: #ffffff !important;
}

.btn-primary:hover,
.submit-button:hover {
  background: var(--kg-red-dark);
}

.btn-secondary,
.cancel-button {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text) !important;
}

.btn-secondary:hover,
.cancel-button:hover {
  background: var(--soft-bg);
}

.btn:disabled,
.submit-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.small-button {
  display: block;
  width: 100%;
  min-height: 38px;
  margin: 4px 0;
  padding: 8px 10px;
  font-size: 13px;
}

/* ADMIN */

body:has(#adminApp) {
  background: #f6f6f8;
}

#adminApp,
#adminMain,
#adminLogin {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.admin-header h1 {
  margin: 0 0 8px 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 760;
}

.admin-header p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.admin-tab {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--text) !important;
  font-weight: 650;
  cursor: pointer;
}

.admin-tab.active {
  border-color: var(--kg-red);
  background: #ffffff;
  color: var(--kg-red) !important;
  box-shadow: 0 0 0 3px rgba(209, 19, 23, 0.08);
}

.admin-panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-panel h2 {
  margin: 0 0 10px 0;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 740;
}

.admin-panel p {
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.admin-login {
  max-width: 460px;
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-login label {
  display: block;
  margin-bottom: 8px;
}

.admin-login input {
  display: block;
  width: 100%;
  margin-bottom: 12px;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 860px;
  margin-top: 16px;
}

.admin-form label {
  display: block;
  margin-top: 8px;
}

.admin-form .checkbox-row,
.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-form .checkbox-row input,
.admin-check input {
  width: 24px !important;
  height: 24px;
  min-height: 24px;
  min-width: 24px;
  margin: 0;
}

.admin-form input,
.admin-form textarea {
  display: block;
  width: 100%;
}

.admin-form textarea {
  min-height: 110px;
}

.mail-template {
  min-height: 230px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 14px !important;
}

.json-editor {
  display: block;
  width: 100%;
  min-height: 540px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  resize: vertical;
}

.admin-slot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.admin-slot-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.admin-slot-card h3 {
  margin: 0 0 12px 0;
  font-weight: 720;
}

.admin-slot-card label {
  display: block;
  margin: 10px 0 6px 0;
}

.admin-slot-card input {
  display: block;
  width: 100%;
}

.admin-slot-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.admin-table {
  width: 100%;
  min-width: 1250px;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: var(--soft-bg);
  color: var(--text);
  font-weight: 720;
}

.admin-table input,
.admin-table textarea {
  width: 100%;
  min-width: 160px;
}

.admin-export-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* MOBILE */

@media (max-width: 900px) {
  .booking-shell,
  #adminApp,
  #adminMain,
  #adminLogin {
    padding: 14px;
  }

  html.kgbs-embed-mode .booking-shell {
    padding: 8px 14px 38px 14px !important;
  }

  .choice-grid,
  .slot-list,
  .form-grid,
  .admin-slot-list {
    grid-template-columns: 1fr;
  }

  .wizard-card,
  .blocked-card,
  .success-page,
  .admin-panel,
  .admin-header {
    padding: 20px;
    border-radius: 22px;
  }

  .reservation-box,
  .queue-status-card {
    display: grid;
  }

  .queue-position {
    width: 100%;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-header {
    display: grid;
  }

  .admin-header .cancel-button {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .booking-shell,
  #adminApp,
  #adminMain,
  #adminLogin {
    padding: 12px;
  }

  html.kgbs-embed-mode .booking-shell {
    padding: 8px 12px 36px 12px !important;
  }

  .wizard-progress {
    gap: 7px;
  }

  .wizard-progress-step {
    justify-content: center;
    min-height: 46px;
    padding: 8px;
  }

  .wizard-progress-label {
    display: none;
  }

  .wizard-card,
  .blocked-card,
  .success-page {
    padding: 18px;
  }

  .choice-card {
    min-height: auto;
    padding: 18px;
  }

  .choice-card strong {
    font-size: 18px;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .wizard-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wizard-actions .btn,
  .wizard-actions button {
    width: 100%;
  }

  .summary-box dl {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    gap: 7px;
  }

  .admin-tab {
    font-size: 14px;
    padding: 8px 12px;
  }

  .admin-panel h2 {
    font-size: 28px;
  }

  .admin-table {
    min-width: 1150px;
  }
}

.portal-entry-box {
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff8eb;
  display: grid;
  gap: 5px;
}
.portal-entry-box strong { color: var(--text); font-weight: 800; }
.portal-entry-box span { color: var(--muted); line-height: 1.4; }
.portal-entry-box a { width: max-content; margin-top: 6px; display: inline-flex; align-items:center; min-height: 40px; padding: 9px 13px; border-radius: 12px; background: var(--kg-red); color: #fff !important; font-weight: 800; text-decoration: none; }
@media (max-width:650px){ .portal-entry-box a { width: 100%; justify-content:center; } }

.admin-communication-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-chat-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}
.admin-chat-list.compact { max-height: 360px; }
.admin-chat-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  color: var(--text) !important;
}
.admin-chat-item:hover { border-color: var(--kg-red); box-shadow: 0 0 0 3px rgba(209,19,23,.08); }
.admin-chat-item span, .admin-chat-item em { color: var(--muted); font-size: 13px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-chat-item b { width: max-content; padding: 4px 8px; border-radius: 999px; background: var(--error-bg); color: var(--error-text); font-size: 12px; }
.admin-chat-messages {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fafafa;
}
.admin-chat-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.admin-chat-bubble.admin { justify-self: end; background: #fff7f7; border-color: #f0c4c4; }
.admin-chat-bubble.customer { justify-self: start; background: #f3fbf6; border-color: #bfe6cc; }
.admin-chat-bubble div { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.admin-chat-bubble p { margin: 0; white-space: pre-wrap; color: var(--text); }
.admin-chat-compose { display: grid; gap: 8px; margin-top: 14px; font-weight: 800; }
.admin-chat-compose textarea { width: 100%; min-height: 130px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; resize: vertical; }
@media (max-width: 1050px) { .admin-communication-grid { grid-template-columns: 1fr; } .admin-chat-bubble { max-width: 94%; } }

/* V2.3 Kommunikation */
.admin-chat-item.active {
  border-color: var(--kg-red);
  box-shadow: 0 0 0 3px rgba(209,19,23,.10);
  background: #fff7f7;
}

.live-public-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}.live-public-box{padding:20px;border:1px solid var(--border);border-radius:20px;background:#fff}.live-public-box span{display:block;color:var(--muted);font-weight:800;text-transform:uppercase;font-size:12px;letter-spacing:.08em}.live-public-box strong{display:block;margin-top:10px;font-size:clamp(24px,4vw,42px);line-height:1.08}.live-public-box.current{background:var(--success-bg);border-color:var(--success-border)}.live-public-box.muted{opacity:.7}.live-public-delay{display:inline-block;margin-top:4px;padding:12px 16px;border-radius:999px;font-weight:900;background:var(--soft-bg)}.live-public-delay.ok{background:var(--success-bg);color:var(--success-text)}.live-public-delay.late{background:var(--error-bg);color:var(--error-text)}.live-public-delay.early{background:#eef5ff;color:#245a9b}@media(max-width:800px){.live-public-grid{grid-template-columns:1fr}}

/* V3.2 Floating Admin-Meldungen */
.admin-toast-stack{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:99999;
  display:flex;
  flex-direction:column-reverse;
  gap:10px;
  max-width:min(460px, calc(100vw - 36px));
  pointer-events:none;
}
.admin-toast{
  opacity:0;
  transform:translateY(12px);
  transition:opacity .22s ease, transform .22s ease;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid #dedee4;
  background:#111;
  color:#fff;
  box-shadow:0 16px 42px rgba(0,0,0,.25);
  font-weight:750;
  line-height:1.35;
  pointer-events:auto;
}
.admin-toast.visible{opacity:1;transform:translateY(0)}
.admin-toast-success{background:#0f6b37;border-color:#79d89a;color:#fff}
.admin-toast-error{background:#9b1111;border-color:#f2a1a1;color:#fff}
.admin-toast-info{background:#111;border-color:#333;color:#fff}

.slot-admin-toggle{margin-top:12px;padding:10px;border:1px solid var(--border);border-radius:14px;background:#fafafa;}
.slot-admin-toggle .checkbox-row{align-items:center;}
.choice-card.disabled,
.choice-card:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none!important;
}
.choice-card.disabled small{
  display:inline-block;
  margin-top:10px;
  color:#9b1111;
  font-weight:900;
}

/* V3.4.1 Chat-Lesestatus */
.admin-chat-receipt {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  text-align: right;
}

/* v4.17.8 Form-Builder Layoutspalten aus Admin */
.form-grid.form-grid-cols-1 { grid-template-columns: 1fr; }
.form-grid.form-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.form-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-layout-empty { min-height: 1px; }
@media (max-width: 760px) {
  .form-grid.form-grid-cols-2,
  .form-grid.form-grid-cols-3 { grid-template-columns: 1fr; }
  .form-layout-empty { display: none !important; }
}

/* v4.17.8 Checkbox-Titel optional + Hilfetext */
.field-description {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}
.checkbox-field {
  gap: 8px;
}
.checkbox-field > label:not(.checkbox-row) {
  margin-bottom: 2px;
}

/* v4.18 normal input weight */
input,textarea,select{font-weight:400!important;} input::placeholder,textarea::placeholder{font-weight:400!important;}

/* v4.22.1 – Admin-Chat-Auswahl kompakter */
.admin-chat-list{margin-top:14px!important}
.admin-chat-item{padding:11px 13px!important;gap:3px!important}
.admin-chat-item strong{font-size:15px!important;line-height:1.2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admin-chat-item span{font-size:12px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.admin-chat-item em{font-size:12px!important;line-height:1.3!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important;white-space:normal!important}

/* v4.22.1 – Slotfarben Frontend nach finaler Logik */
.slot-card.selectable {
  border-color: var(--border) !important;
  background: #ffffff !important;
}
.slot-card.selectable span {
  color: var(--success-text) !important;
  font-weight: 650 !important;
}
.slot-card.active {
  border-color: var(--success-border) !important;
  background: var(--success-bg) !important;
  box-shadow: 0 0 0 3px rgba(20, 108, 54, 0.10) !important;
}
.slot-card.active strong { color: var(--text) !important; }
.slot-card.active span { color: var(--success-text) !important; }
.slot-card.full {
  background: var(--error-bg) !important;
  border-color: var(--error-border) !important;
  color: var(--error-text) !important;
}
.slot-card.full strong,
.slot-card.full span { color: var(--error-text) !important; }
.slot-card.locked {
  background: #f0f0f2 !important;
  border-color: var(--border) !important;
  color: var(--muted) !important;
}
.slot-card.locked strong,
.slot-card.locked span { color: var(--muted) !important; }


/* v4.22.1 – Veranstaltungsinfos im Buchungsfrontend */
.event-info-box{margin:0 0 16px 0;padding:18px;border:1px solid var(--border);border-radius:var(--radius-lg);background:#fff;box-shadow:var(--shadow-soft)}
.event-info-title{font-size:clamp(22px,3vw,32px);font-weight:900;line-height:1.1;letter-spacing:-.035em;margin:0 0 13px;color:var(--text)}
.event-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch}
.event-info-grid>div{padding:12px 13px;border:1px solid var(--border);border-radius:16px;background:#f7f7f9;min-width:0}
.event-info-grid span{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:900;margin-bottom:5px}
.event-info-grid strong{display:block;font-size:16px;line-height:1.25;color:var(--text);font-weight:900;overflow-wrap:anywhere}
.event-info-nav{display:inline-flex;margin-top:12px;min-height:40px;align-items:center;justify-content:center;padding:9px 13px;border-radius:999px;background:#b3261e;color:#fff!important;text-decoration:none;font-weight:900}
@media(max-width:760px){.event-info-box{padding:14px;margin-bottom:12px}.event-info-grid{grid-template-columns:1fr}.event-info-title{font-size:24px}.event-info-nav{width:100%}}

/* v4.22.1 – Slotstatus final */
.slot-card.selectable{background:#fff!important;border-color:var(--border)!important;color:var(--text)!important;box-shadow:none!important}
.slot-card.selectable strong{color:var(--text)!important}.slot-card.selectable span{color:var(--success-text)!important;font-weight:750!important}
.slot-card.active{background:var(--success-bg)!important;border-color:var(--success-border)!important;box-shadow:0 0 0 3px rgba(20,108,54,.12)!important}
.slot-card.active strong{color:var(--text)!important}.slot-card.active span{color:var(--success-text)!important}
.slot-card.full{background:var(--error-bg)!important;border-color:var(--error-border)!important;color:var(--error-text)!important}.slot-card.full strong,.slot-card.full span{color:var(--error-text)!important}
.slot-card.locked{background:#f0f0f2!important;border-color:var(--border)!important;color:var(--muted)!important}.slot-card.locked strong,.slot-card.locked span{color:var(--muted)!important}
