/* =====================================================================
   Partner-Backend (Plugin-Admin) · UI-Prototyp · spec/backend.md
   Desktop ab 1024 px; darunter klappt die Seitenleiste in ein Burger-Menü, Inhalte untereinander (Pascal, Step 4).
   Nutzt die Tokens aus tokens.css; eigene Klassen mit Präfix .rt-p-
   ===================================================================== */
.rt-partner-body { background: var(--c-bg); }
.rt-p { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--c-ink) 260px, var(--c-bg) 260px); }
.rt-p__side { background: var(--c-ink); color: #fff; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rt-p__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 0 8px; min-height: 44px; }
.rt-p__brand img { height: 26px; width: auto; }
.rt-p__brand span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-on-navy-2); }
.rt-p__hotel { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.08); border: 0; color: #fff; text-align: left; font: inherit; cursor: pointer; }
.rt-p__hotel img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.rt-p__hotel b { display: block; font-size: 14px; color: #fff; }
.rt-p__hotel small { font-size: 12px; color: var(--c-on-navy-2); }
.rt-p__nav { display: flex; flex-direction: column; gap: 2px; }
.rt-p__nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: #DCE6F0; text-decoration: none; font-weight: 600; font-size: 15px; }
.rt-p__nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.rt-p__nav a[aria-current="page"] { background: #fff; color: var(--c-ink); }
.rt-p__nav .rt-p__badge { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.12); color: #DCE6F0; }
.rt-p__nav a[aria-current="page"] .rt-p__badge { background: var(--c-surface-2); color: var(--c-muted); }
.rt-p__nav .rt-p__badge.is-new { background: #7BD3A0; color: var(--c-ink); }
.rt-p__help { margin-top: auto; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 13px; color: var(--c-on-navy-2); line-height: 1.5; }
.rt-p__help b { display: block; color: #fff; }
.rt-p__help a { color: #fff; }
.rt-p__main { min-width: 0; display: flex; flex-direction: column; }
.rt-p__top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 32px; background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.rt-p__search { flex: 1; max-width: 420px; position: relative; }
.rt-p__search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-muted); }
.rt-p__search input { width: 100%; min-height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--c-line-strong); border-radius: 10px; font: inherit; font-size: 14px; background: var(--c-bg); }
.rt-p__sync { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; font: inherit; font-weight: 600; font-size: 13px; background: var(--c-success-bg); color: var(--c-success-text); cursor: pointer; }
.rt-p__sync::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-success); }
.rt-p__sync[aria-busy="true"]::before { animation: rt-pulse 1s ease-in-out infinite; }
.rt-p__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c-navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.rt-p__burger { display: none; }
.rt-p__content { padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 24px; max-width: 1240px; width: 100%; }
.rt-p__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rt-p__head h1 { font-size: 36px; }
.rt-p-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--sh-1); min-width: 0; }
.rt-p-card > h2, .rt-p-card__head h2 { font-size: 20px; }
.rt-p-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.rt-p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rt-p-kpis--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rt-p-kpi { display: flex; flex-direction: column; gap: 6px; }
.rt-p-kpi > span:first-child { font-size: 14px; color: var(--c-muted); font-weight: 600; }
.rt-p-kpi strong { font-family: var(--ff-head); font-size: 30px; font-weight: 600; }
.rt-p-kpi .is-up { color: var(--c-success-text); font-weight: 700; font-size: 14px; margin-left: 8px; }
.rt-p-kpi .is-down { color: var(--c-error-text); font-weight: 700; font-size: 14px; margin-left: 8px; }
.rt-p-kpi small { font-size: 13px; color: var(--c-muted); }
.rt-p-chip { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.rt-p-chip--good { background: var(--c-success-bg); color: var(--c-success-text); }
.rt-p-chip--bad { background: var(--c-warning-bg); color: var(--c-warning-text); }
.rt-p-grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rt-p-grid-2--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rt-p-checks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.rt-p-checks li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--c-line); }
.rt-p-checks .rt-p-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.rt-p-checks b { display: block; font-size: 15px; }
.rt-p-checks span span { font-size: 13px; color: var(--c-muted); }
.rt-p-bar { display: block; height: 10px; border-radius: 5px; background: var(--c-surface-2); overflow: hidden; }
.rt-p-bar > span { display: block; height: 100%; background: var(--c-navy); border-radius: 5px; }
.rt-p-dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.rt-p-dl dt { color: var(--c-muted); }
.rt-p-dl dd { margin: 0; font-weight: 600; }
.rt-p-premium { background: var(--c-navy); color: #fff; border-radius: var(--r-lg); padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.rt-p-premium h2 { color: #fff; font-size: 22px; max-width: 46ch; margin: 6px 0; }
.rt-p-premium span { color: var(--c-on-navy-2); font-size: 14px; }
/* Tabelle */
.rt-p-table-wrap { overflow-x: auto; position: relative; }
.rt-p-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rt-p-table caption { text-align: left; }
.rt-p-table td { white-space: nowrap; }
.rt-p-table th, .rt-p-table td { padding: 12px 10px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: middle; }
.rt-p-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); font-weight: 700; background: var(--c-bg); }
.rt-p-table tbody tr:hover { background: #FAFBFC; }
.rt-p-table tbody tr.is-sel { background: var(--c-navy-tint); }
.rt-p-room { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; min-width: 240px; }
.rt-p-room img, .rt-p-room .rt-p-noimg { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; }
.rt-p-noimg { display: grid; place-items: center; background: var(--c-surface-2); color: var(--c-muted); }
.rt-p-room b { display: block; }
.rt-p-room small { color: var(--c-muted); font-size: 13px; display: block; max-width: 38ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-p-langs { display: inline-flex; gap: 3px; }
.rt-p-langs span { font-size: 11px; font-weight: 700; padding: 2px 5px; border-radius: 5px; background: var(--c-surface-2); color: var(--c-disabled-text, #8A97A5); }
.rt-p-langs span.is-on { background: var(--c-navy-tint); color: var(--c-navy); }
.rt-p-cst { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; background: var(--c-surface-2); color: var(--c-muted); }
.rt-p-cst--manual { background: var(--c-warning-bg); color: var(--c-warning-text); }
.rt-p-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--c-navy); color: #fff; }
.rt-p-selbar b { color: #fff; margin-right: auto; }
.rt-p-cbx { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--c-line-field); background: var(--c-surface); display: grid; place-items: center; color: #fff; cursor: pointer; padding: 0; }
.rt-p-cbx[aria-checked="true"] { background: var(--c-navy); border-color: var(--c-navy); }
/* Editor */
.rt-p-edit { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.rt-p-edit__aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.rt-p-fieldhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rt-p-fieldhead code { margin-left: auto; font-size: 12px; color: var(--c-muted); }
.rt-p-rte { border: 1px solid var(--c-line-field); border-radius: 12px; overflow: hidden; background: var(--c-surface); }
.rt-p-rte[data-readonly="true"] { background: var(--c-bg); border-style: dashed; }
.rt-p-rte__bar { display: flex; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--c-line); background: var(--c-bg); flex-wrap: wrap; }
.rt-p-rte__bar button { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--c-ink); cursor: pointer; }
.rt-p-rte__bar button:hover { background: var(--c-surface-2); }
.rt-p-rte__bar button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.rt-p-rte__bar .rt-seg { margin-left: auto; }
.rt-p-rte__area { min-height: 72px; padding: 14px 16px; outline: none; color: var(--c-text-2); line-height: 1.6; }
.rt-p-rte__area--desc { min-height: 180px; }
.rt-p-rte__area h3 { font-size: 18px; margin: 0 0 6px; color: var(--c-ink); }
.rt-p-rte__area p { margin: 0 0 8px; }
.rt-p-rte__area:empty::before { content: attr(data-placeholder); color: var(--c-placeholder); }
.rt-p-rte__html { margin: 0; padding: 14px 16px; min-height: 120px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; background: #0F1B2B; color: #DCE6F0; white-space: pre-wrap; border: 0; width: 100%; box-sizing: border-box; resize: vertical; }
.rt-p-langtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: 16px; overflow-x: auto; }
.rt-p-langtabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; font: inherit; font-weight: 600; font-size: 15px; color: var(--c-text-2); cursor: pointer; }
.rt-p-langtabs button[aria-selected="true"] { border-bottom-color: var(--c-navy); color: var(--c-ink); font-weight: 700; }
.rt-p-langtabs i { width: 8px; height: 8px; border-radius: 50%; }
.rt-p-datagrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rt-p-unit { display: flex; align-items: center; gap: 8px; }
.rt-p-unit span { color: var(--c-muted); font-size: 14px; white-space: nowrap; }
.rt-p-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rt-p-img { display: flex; flex-direction: column; gap: 8px; }
.rt-p-img figure { position: relative; margin: 0; }
.rt-p-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.rt-p-img .rt-badge { position: absolute; left: 8px; top: 8px; }
.rt-p-img .rt-p-rights { position: absolute; right: 8px; bottom: 8px; }
.rt-p-terms { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-p-terms button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--c-line-strong); background: var(--c-surface); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.rt-p-terms button[aria-pressed="true"] { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.rt-p-savebar { position: sticky; bottom: 0; z-index: 25; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 32px; background: var(--c-surface); border-top: 1px solid var(--c-line); box-shadow: 0 -8px 24px rgba(20,36,58,.06); }
.rt-p-savebar span { margin-right: auto; font-size: 14px; color: var(--c-muted); }
.rt-p-savebar span.is-dirty { color: var(--c-warning-text); font-weight: 700; }
.rt-p-mode { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
/* Statistik */
.rt-p-filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rt-p-chart { position: relative; }
.rt-p-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.rt-p-chart .rt-p-tip { position: absolute; top: 8px; pointer-events: none; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--sh-3); font-size: 13px; min-width: 150px; }
.rt-p-legend { display: flex; align-items: center; gap: 16px; font-size: 13px; flex-wrap: wrap; }
.rt-p-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.rt-p-hbar { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 54px; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; }
.rt-p-hbar > span:nth-child(2) { height: 10px; background: var(--c-surface-2); border-radius: 0 5px 5px 0; position: relative; }
.rt-p-hbar > span:nth-child(2) > i { display: block; height: 100%; background: var(--c-link); border-radius: 0 5px 5px 0; }
.rt-p-hbar > span:nth-child(2) > em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--c-muted); }
.rt-p-hbar strong { text-align: right; }
.rt-p-insight { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--c-line); }
/* Bericht A4 */
.rt-p-report { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 16px 64px; background: #DDE3E9; min-height: 100vh; }
.rt-p-a4 { width: 210mm; min-height: 297mm; background: #fff; box-shadow: 0 10px 40px rgba(20,36,58,.18); padding: 16mm 16mm 14mm; box-sizing: border-box; display: flex; flex-direction: column; gap: 6mm; font-size: 10.5pt; color: var(--c-ink); }
.rt-p-a4 header, .rt-p-a4 footer { display: flex; align-items: center; justify-content: space-between; font-size: 9pt; color: var(--c-muted); }
.rt-p-a4 h1 { font-size: 26pt; }
.rt-p-a4 h2 { font-size: 13pt; margin-bottom: 3mm; }
.rt-p-a4 .rt-p-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4mm; }
.rt-p-a4 .rt-p-kpi strong { font-size: 18pt; }
.rt-p-a4 .rt-p-table { font-size: 9.5pt; }
.rt-p-a4 .rt-p-table th, .rt-p-a4 .rt-p-table td { padding: 5px 6px; }
.rt-p-a4 footer { margin-top: auto; border-top: 1px solid var(--c-line); padding-top: 3mm; }
.rt-p-report__bar { width: 210mm; max-width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media print { .rt-p-report { background: #fff; padding: 0; gap: 0; } .rt-p-report__bar, .rt-proto-bar { display: none !important; } .rt-p-a4 { box-shadow: none; page-break-after: always; } }
/* < 1024: Seitenleiste als Burger-Menü */
@media (max-width: 1023px) {
  .rt-p { grid-template-columns: minmax(0, 1fr); background: var(--c-bg); }
  .rt-p__side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 60; transform: translateX(-100%); transition: transform var(--dur-2) var(--ease); }
  .rt-p.is-open .rt-p__side { transform: none; box-shadow: 0 0 0 100vmax rgba(20,36,58,.5); }
  .rt-p__burger { display: inline-flex; }
  .rt-p__top { padding: 10px 16px; }
  .rt-p__top .rt-p__link { display: none; }
  .rt-p__content { padding: 20px 16px 48px; }
  .rt-p-kpis, .rt-p-kpis--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-p-grid-2, .rt-p-grid-2--even, .rt-p-edit { grid-template-columns: minmax(0, 1fr); }
  .rt-p-edit__aside { position: static; }
  .rt-p-datagrid, .rt-p-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-p-savebar { padding: 10px 16px; }
}
@media (max-width: 599px) { .rt-p-kpis, .rt-p-kpis--6, .rt-p-datagrid, .rt-p-images { grid-template-columns: minmax(0, 1fr); } .rt-p__sync { display: none; } .rt-p-hbar { grid-template-columns: minmax(0, 1fr) 70px 44px; } }
.rt-p__content > * { min-width: 0; max-width: 100%; }
@media (max-width: 860px) { .rt-p-report { align-items: flex-start; overflow-x: auto; } }
