:root {
  --rgp-gold: #b9964f;
  --rgp-gold-dark: #856a32;
  --rgp-cream: #f5efe3;
  --rgp-paper: #fcfaf7;
  --rgp-ink: #262626;
  --rgp-muted: #6c685f;
  --rgp-line: #e2dacb;
  --rgp-green: #48734f;
  --rgp-red: #9a4d49;
  --rgp-blue: #4d738f;
}

.rgp-shell { max-width: 1480px; margin: 30px auto; padding: 0 22px; color: var(--rgp-ink); font-family: Lato, Arial, sans-serif; }
.rgp-shell *, .rgp-shell *::before, .rgp-shell *::after { box-sizing: border-box; }
.rgp-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 34px; color: #fff; background: linear-gradient(135deg, #222, #3a3935); border-radius: 18px 18px 0 0; }
.rgp-header h1, .rgp-section-heading h2, .rgp-login-card h1 { margin: 4px 0 0; font-family: Lora, Georgia, serif; }
.rgp-header h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.rgp-eyebrow { display: block; color: var(--rgp-gold); font-size: .75rem; font-weight: 800; letter-spacing: .2em; }
.rgp-user { display: flex; align-items: center; gap: 16px; }
.rgp-user a { color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 8px 14px; border-radius: 999px; text-decoration: none; }
.rgp-user button { color: #fff; background: var(--rgp-gold-dark); border: 1px solid var(--rgp-gold); padding: 8px 14px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.rgp-nav { display: flex; gap: 4px; overflow-x: auto; background: #fff; padding: 0 20px; border: 1px solid var(--rgp-line); border-top: 0; }
.rgp-nav a { flex: 0 0 auto; padding: 17px 14px 14px; color: var(--rgp-muted); text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; }
.rgp-nav-icon { display: none; }
.rgp-nav a:hover, .rgp-nav a.is-active { color: var(--rgp-ink); border-color: var(--rgp-gold); }
.rgp-content { padding: 30px; background: var(--rgp-paper); border: 1px solid var(--rgp-line); border-top: 0; border-radius: 0 0 18px 18px; }
.rgp-section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.rgp-section-heading h2 { font-size: 2rem; }
.rgp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.rgp-kpis a { display: flex; flex-direction: column; min-height: 128px; justify-content: center; padding: 22px; color: var(--rgp-ink); background: #fff; border: 1px solid var(--rgp-line); border-radius: 14px; text-decoration: none; box-shadow: 0 8px 24px rgba(34,34,34,.05); }
.rgp-kpis strong { color: var(--rgp-gold-dark); font-family: Lora, Georgia, serif; font-size: 2.4rem; line-height: 1; }
.rgp-kpis span { margin-top: 9px; color: var(--rgp-muted); font-size: .9rem; }
.rgp-grid-2 { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; }
.rgp-card { padding: 22px; background: #fff; border: 1px solid var(--rgp-line); border-radius: 14px; box-shadow: 0 8px 24px rgba(34,34,34,.04); }
.rgp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rgp-card h3 { margin: 0; font-family: Lora, Georgia, serif; }
.rgp-card a { color: var(--rgp-gold-dark); }
.rgp-system-list { list-style: none; margin: 0; padding: 0; }
.rgp-system-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rgp-line); }
.rgp-system-list li:last-child { border: 0; }
.rgp-system-list strong { font-size: .82rem; }
.rgp-system-list .ok { color: var(--rgp-green); }
.rgp-system-list .bad { color: var(--rgp-red); }
.rgp-filters { display: flex; gap: 10px; margin-bottom: 18px; }
.rgp-filters input, .rgp-filters select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--rgp-line); border-radius: 8px; background: #fff; }
.rgp-filters input { min-width: min(360px, 55vw); }
.rgp-filters button, .rgp-actions button, .rgp-details-toggle, .rgp-login-card input[type=submit] { min-height: 38px; padding: 7px 12px; border: 0; border-radius: 7px; color: #fff; background: var(--rgp-ink); cursor: pointer; font-weight: 700; }
.rgp-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--rgp-line); border-radius: 12px; }
.rgp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rgp-table th, .rgp-table td { padding: 13px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rgp-line); }
.rgp-table th { background: var(--rgp-cream); white-space: nowrap; }
.rgp-table small { display: block; color: var(--rgp-muted); margin-top: 4px; }
.rgp-status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: #eee; }
.rgp-status-offen { color: #6b5420; background: #f6eac8; }
.rgp-status-vorgemerkt { color: #365c78; background: #dceaf4; }
.rgp-status-bestaetigt { color: #315c38; background: #dfeddc; }
.rgp-status-bezahlt { color: #fff; background: var(--rgp-green); }
.rgp-status-abgelehnt { color: #7d3734; background: #f2d9d7; }
.rgp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-width: 290px; }
.rgp-actions form { margin: 0; }
.rgp-actions button { font-size: .76rem; min-height: 30px; padding: 5px 8px; }
.rgp-actions .rgp-action-vormerken { background: #c69e3f; }
.rgp-actions .rgp-action-bestaetigen { background: var(--rgp-green); }
.rgp-actions .rgp-action-bezahlt { background: var(--rgp-blue); }
.rgp-actions .rgp-action-ablehnen { background: var(--rgp-red); }
.rgp-actions .rgp-action-offen { background: #777; }
.rgp-details-row td { background: #f9f6f0; }
.rgp-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.rgp-details div { padding: 10px; background: #fff; border-radius: 8px; }
.rgp-details dt { color: var(--rgp-muted); font-size: .75rem; font-weight: 800; }
.rgp-details dd { margin: 4px 0 0; word-break: break-word; }
.rgp-event-list article { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--rgp-line); }
.rgp-event-list article:last-child { border: 0; }
.rgp-event-list time { color: var(--rgp-gold-dark); font-weight: 800; }
.rgp-event-list h3 { margin: 0; font-size: 1rem; }
.rgp-event-list p { margin: 4px 0 0; color: var(--rgp-muted); font-size: .85rem; }
.rgp-event-list a { color: var(--rgp-ink); font-weight: 700; }
.rgp-alert { margin: 14px 0; padding: 13px 16px; border-radius: 8px; border-left: 4px solid; background: #fff; }
.rgp-alert-success { color: #315c38; border-color: var(--rgp-green); }
.rgp-alert-error { color: #7d3734; border-color: var(--rgp-red); }
.rgp-alert-info { color: #365c78; border-color: var(--rgp-blue); }
.rgp-login-shell { min-height: 65vh; display: grid; place-items: center; }
.rgp-login-card { width: min(480px, 100%); padding: 38px; background: #fff; border: 1px solid var(--rgp-line); border-radius: 16px; box-shadow: 0 20px 50px rgba(34,34,34,.12); }
.rgp-login-card label { display: block; margin: 14px 0 5px; font-weight: 700; }
.rgp-login-card input[type=text], .rgp-login-card input[type=password] { width: 100%; padding: 11px; border: 1px solid var(--rgp-line); border-radius: 8px; }
.rgp-login-card input[type=submit] { background: var(--rgp-gold-dark); }
.rgp-amelia-booking { overflow: hidden; }
.rgp-portal-page .entry-title, .rgp-portal-page .page-title, .rgp-portal-page .entry-header { display: none !important; }
.rgp-primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; color: #fff !important; background: var(--rgp-gold-dark); border: 0; border-radius: 8px; text-decoration: none; font-weight: 800; cursor: pointer; }
.rgp-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px; }
.rgp-subnav a { padding: 8px 13px; color: var(--rgp-muted); background: #fff; border: 1px solid var(--rgp-line); border-radius: 999px; text-decoration: none; font-size: .84rem; font-weight: 800; }
.rgp-subnav a.is-active { color: #fff; background: var(--rgp-ink); border-color: var(--rgp-ink); }
.rgp-event-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.rgp-event-actions form { margin: 0; }
.rgp-event-actions a,
.rgp-event-actions .rgp-link-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px !important;
  border-radius: 8px;
  text-decoration: none !important;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.rgp-event-actions a {
  color: #fff !important;
  background: var(--rgp-gold-dark) !important;
  border: 1px solid var(--rgp-gold-dark) !important;
}
.rgp-event-actions .rgp-link-danger {
  color: #fff !important;
  background: var(--rgp-red) !important;
  border: 1px solid var(--rgp-red) !important;
}
.rgp-event-actions a:hover,
.rgp-event-actions a:focus-visible { color: #fff !important; background: var(--rgp-gold) !important; box-shadow: 0 5px 12px rgba(151,119,48,.22); transform: translateY(-1px); }
.rgp-event-actions .rgp-link-danger:hover,
.rgp-event-actions .rgp-link-danger:focus-visible { color: #fff !important; background: #873c38 !important; box-shadow: 0 5px 12px rgba(125,55,52,.22); transform: translateY(-1px); }
.rgp-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rgp-field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.rgp-field-wide { grid-column: 1 / -1; }
.rgp-field input, .rgp-field select, .rgp-field textarea { width: 100%; padding: 11px 12px; color: var(--rgp-ink); background: #fff; border: 1px solid var(--rgp-line); border-radius: 8px; font: inherit; font-weight: 400; }
.rgp-field textarea { resize: vertical; }
.rgp-field small { color: var(--rgp-muted); font-size: .78rem; font-weight: 400; line-height: 1.45; }
.rgp-all-day-toggle { display: flex; align-items: center; justify-content: flex-start; }
.rgp-all-day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.rgp-all-day-toggle span { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 17px; color: var(--rgp-ink); background: #fff; border: 1px solid var(--rgp-gold-dark); border-radius: 999px; font-weight: 800; cursor: pointer; }
.rgp-all-day-toggle input:checked + span { color: #fff; background: var(--rgp-gold-dark); }
.rgp-all-day-toggle input:focus-visible + span { outline: 3px solid rgba(185,150,79,.35); outline-offset: 2px; }
.rgp-editor-actions { display: flex; align-items: center; gap: 16px; }
.rgp-editor-actions a { color: var(--rgp-muted); }
.rgp-table-action { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 12px; color: #fff !important; background: var(--rgp-gold-dark); border-radius: 7px; text-decoration: none !important; font-weight: 800; white-space: nowrap; }
.rgp-table-action:hover, .rgp-table-action:focus { color: #fff !important; background: var(--rgp-gold); }
.rgp-amelia-status-approved { color: #315c38; background: #dfeddc; }
.rgp-amelia-status-pending, .rgp-amelia-status-waiting { color: #6b5420; background: #f6eac8; }
.rgp-amelia-status-canceled, .rgp-amelia-status-rejected { color: #7d3734; background: #f2d9d7; }
.rgp-amelia-status-no-show { color: #fff; background: #777; }
.rgp-booking-editor { margin-bottom: 24px; }
.rgp-booking-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.rgp-booking-summary div { padding: 12px; background: var(--rgp-cream); border-radius: 8px; }
.rgp-booking-summary dt { color: var(--rgp-muted); font-size: .75rem; font-weight: 800; }
.rgp-booking-summary dd { margin: 4px 0 0; word-break: break-word; }
.rgp-danger-zone { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rgp-line); }
.rgp-danger-zone button { padding: 9px 13px; color: #fff; background: var(--rgp-red); border: 0; border-radius: 7px; cursor: pointer; font-weight: 800; }

@media (max-width: 900px) {
  .rgp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgp-grid-2 { grid-template-columns: 1fr; }
  .rgp-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgp-booking-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  html:has(body.rgp-portal-page) { margin-top: 0 !important; }
  body.rgp-portal-page { width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 0 0 78px !important; overflow-x: hidden; background: var(--rgp-paper); }
  body.rgp-portal-page #wpadminbar,
  body.rgp-portal-page .site-header,
  body.rgp-portal-page #masthead,
  body.rgp-portal-page .site-footer,
  body.rgp-portal-page footer#colophon,
  body.rgp-portal-page #secondary,
  body.rgp-portal-page .widget-area,
  body.rgp-portal-page .elementor-widget-spacer { display: none !important; }
  body.rgp-portal-page .site,
  body.rgp-portal-page .site-content,
  body.rgp-portal-page .site-content > .ast-container,
  body.rgp-portal-page #content,
  body.rgp-portal-page #primary,
  body.rgp-portal-page .content-area,
  body.rgp-portal-page .site-main,
  body.rgp-portal-page article.page,
  body.rgp-portal-page .entry-content,
  body.rgp-portal-page .entry-content > .elementor,
  body.rgp-portal-page .entry-content > .elementor > .elementor-element,
  body.rgp-portal-page .elementor-section-wrap,
  body.rgp-portal-page .elementor-section,
  body.rgp-portal-page .elementor-container,
  body.rgp-portal-page .elementor-column,
  body.rgp-portal-page .elementor-widget-wrap,
  body.rgp-portal-page .elementor-widget,
  body.rgp-portal-page .elementor-widget-container {
    display: block !important;
    float: none !important;
    position: static !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  .rgp-shell { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .rgp-header { align-items: flex-start; padding: 20px 18px; border-radius: 0; }
  .rgp-header h1 { font-size: 1.55rem; }
  .rgp-user { flex-direction: column; align-items: flex-end; gap: 8px; }
  .rgp-user > span { display: none; }
  .rgp-user a, .rgp-user button { padding: 7px 10px; font-size: .75rem; }
  .rgp-nav { position: fixed; z-index: 9999; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left)); border: 0; border-top: 1px solid var(--rgp-line); box-shadow: 0 -8px 24px rgba(34,34,34,.12); }
  .rgp-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 64px; padding: 7px 2px 5px; border: 0; border-top: 3px solid transparent; font-size: .65rem; line-height: 1.15; text-align: center; }
  .rgp-nav a.is-active { color: var(--rgp-gold-dark); border-top-color: var(--rgp-gold); }
  .rgp-nav-icon { display: block; margin-bottom: 4px; font-size: 1.25rem; line-height: 1; }
  .rgp-nav-dashboard .rgp-nav-icon::before { content: '⌂'; }
  .rgp-nav-anfragen .rgp-nav-icon::before { content: '✉'; }
  .rgp-nav-buchungen .rgp-nav-icon::before { content: '✓'; }
  .rgp-nav-kalender .rgp-nav-icon::before { content: '▦'; }
  .rgp-content { padding: 18px 10px; border-left: 0; border-right: 0; border-radius: 0; }
  .rgp-section-heading { align-items: flex-start; gap: 12px; }
  .rgp-section-heading h2 { font-size: 1.55rem; }
  .rgp-section-heading .rgp-primary-button { min-height: 38px; padding: 8px 10px; font-size: .75rem; }
  .rgp-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rgp-kpis a { min-height: 105px; padding: 14px; }
  .rgp-filters { flex-direction: column; }
  .rgp-filters input { min-width: 0; width: 100%; }
  .rgp-details { grid-template-columns: 1fr; }
  .rgp-booking-summary { grid-template-columns: 1fr; }
  .rgp-event-list article { grid-template-columns: 1fr; gap: 5px; }
  .rgp-event-actions { justify-content: flex-start; }
  .rgp-editor { grid-template-columns: 1fr; }
  .rgp-field-wide { grid-column: auto; }
  .rgp-table-wrap { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  .rgp-table, .rgp-table tbody { display: block; width: 100%; }
  .rgp-table thead { display: none; }
  .rgp-table tr { display: block; margin-bottom: 12px; padding: 8px 12px; background: #fff; border: 1px solid var(--rgp-line); border-radius: 12px; box-shadow: 0 5px 16px rgba(34,34,34,.05); }
  .rgp-table td { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 10px; padding: 7px 0; border: 0; }
  .rgp-table td::before { color: var(--rgp-muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
  .rgp-forminator-table td:nth-child(1)::before, .rgp-amelia-table td:nth-child(1)::before { content: 'ID'; }
  .rgp-forminator-table td:nth-child(2)::before { content: 'Art'; }
  .rgp-forminator-table td:nth-child(3)::before { content: 'Kunde'; }
  .rgp-forminator-table td:nth-child(4)::before { content: 'Termin'; }
  .rgp-forminator-table td:nth-child(5)::before, .rgp-amelia-table td:nth-child(5)::before { content: 'Personen'; }
  .rgp-forminator-table td:nth-child(6)::before, .rgp-amelia-table td:nth-child(6)::before { content: 'Status'; }
  .rgp-forminator-table td:nth-child(7)::before, .rgp-amelia-table td:nth-child(7)::before { content: 'Aktionen'; }
  .rgp-amelia-table td:nth-child(2)::before { content: 'Event'; }
  .rgp-amelia-table td:nth-child(3)::before { content: 'Termin'; }
  .rgp-amelia-table td:nth-child(4)::before { content: 'Kunde'; }
  .rgp-details-row { margin-top: -13px !important; border-top: 0 !important; border-radius: 0 0 12px 12px !important; }
  .rgp-details-row[hidden] { display: none !important; }
  .rgp-details-row td { display: block; }
  .rgp-details-row td::before { content: none !important; }
  .rgp-actions { min-width: 0; }
}
