@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/public/fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/public/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* RapidTools Admin-Oberfläche */

:root {
  --rt-accent: #2563eb;
  --rt-accent-dark: #1d4ed8;
  --rt-bg: #f7f9fd;
  --rt-sidebar: #101f35;
  --rt-sidebar-hover: #334155;
  --rt-text: #17263e;
  --rt-muted: #52647c;
  --rt-border: #d7e0ed;
  --rt-danger: #dc2626;
  --rt-danger-dark: #b91c1c;
  --rt-radius: 0 36px 0 0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--rt-bg);
  color: var(--rt-text);
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

code {
  background: #eef1f5;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

a { color: var(--rt-accent); }

/* ── Icons (SVG, ersetzen die früheren Emojis) ──────────────────────────────
   Inline-SVGs sitzen ohne Korrektur zu hoch auf der Textgrundlinie. */
svg { vertical-align: -0.125em; }

/* ── Shell / Sidebar ─────────────────────────────────────────────────────── */

.rt-shell {
  display: flex;
  min-height: 100vh;
}

.rt-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--rt-sidebar);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
}

.rt-brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px 18px;
  letter-spacing: -0.2px;
}

.rt-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.rt-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.rt-nav-link:hover {
  background: var(--rt-sidebar-hover);
  color: #fff;
}

.rt-nav-icon { width: 1.3em; text-align: center; display: inline-flex; align-items: center; justify-content: center; }

.rt-logout-form { margin-top: 16px; }
.rt-logout-btn { width: 100%; }

/* ── Content ─────────────────────────────────────────────────────────────── */

.rt-content {
  flex: 1;
  min-width: 0;
  padding: 32px 36px 64px;
  max-width: 1100px;
}

.rt-content h1 {
  margin: 0 0 18px;
  font-size: 1.6rem;
  letter-spacing: -0.3px;
}

.rt-content h2 { font-size: 1.15rem; margin: 0 0 6px; }
.rt-content h3 { font-size: 1rem; margin: 18px 0 8px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.rt-card {
  background: #fff;
  border-radius: var(--rt-radius);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--rt-border);
  padding: 20px 22px;
  margin: 0 0 20px;
}

.rt-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.rt-card-head h2 { margin: 0; }
.rt-card-head p { margin: 2px 0 0; }

.rt-card-icon {
  font-size: 1.7rem;
  line-height: 1;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.rt-btn {
  display: inline-block;
  background: var(--rt-accent);
  color: #fff;
  border: 1px solid var(--rt-accent);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  font-family: inherit;
}

.rt-btn:hover { background: var(--rt-accent-dark); border-color: var(--rt-accent-dark); }

.rt-btn-secondary {
  background: #fff;
  color: var(--rt-text);
  border: 1px solid #d1d5db;
}

.rt-btn-secondary:hover { background: #f3f4f6; border-color: #9ca3af; }

.rt-btn-danger {
  background: #fff;
  color: var(--rt-danger);
  border: 1px solid #fca5a5;
}

.rt-btn-danger:hover { background: var(--rt-danger); border-color: var(--rt-danger); color: #fff; }

.rt-btn-sm { padding: 5px 10px; font-size: 0.82rem; }

.rt-btn-block { width: 100%; }

/* ── Tabellen ────────────────────────────────────────────────────────────── */

.rt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 8px 0 16px;
}

.rt-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rt-muted);
  padding: 8px 10px;
  border-bottom: 2px solid var(--rt-border);
}

.rt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
}

.rt-table tbody tr:nth-child(even) { background: #fafbfc; }
.rt-table tbody tr:hover { background: #f2f6ff; }

.rt-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.rt-actions form { margin: 0; display: inline; }

/* ── Formulare ───────────────────────────────────────────────────────────── */

.rt-form { max-width: 640px; }

.rt-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.rt-field label { font-weight: 600; font-size: 0.88rem; }

.rt-field input,
.rt-field select,
.rt-field textarea,
.rt-form-inline input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: var(--rt-text);
}

.rt-field textarea { min-height: 110px; resize: vertical; }

.rt-field input:focus,
.rt-field select:focus,
.rt-field textarea:focus,
.rt-form-inline input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 0;
  border-color: var(--rt-accent);
}

.rt-form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 560px;
  margin-top: 12px;
}

.rt-form-inline input[type="text"] { flex: 1; }
.rt-form-inline .rt-btn { flex-shrink: 0; white-space: nowrap; }

.rt-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

/* ── Alerts / Badges / Sonstiges ─────────────────────────────────────────── */

.rt-alert {
  border-radius: 8px;
  padding: 11px 14px;
  margin: 0 0 16px;
  font-size: 0.92rem;
  border: 1px solid var(--rt-border);
  background: #f9fafb;
}

.rt-alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.rt-alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.rt-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #eef1f5;
  color: var(--rt-muted);
}

.rt-badge-green { background: #d1fae5; color: #065f46; }
.rt-badge-gray { background: #e5e7eb; color: #4b5563; }

.rt-muted { color: var(--rt-muted); }

/* ── Embed-Seite ─────────────────────────────────────────────────────────── */

.rt-snippet-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 12px;
}

.rt-snippet {
  min-width: 0; max-width: 100%;
  flex: 1;
  background: #0f172a;
  color: #bae6fd;
  border-radius: 8px;
  padding: 13px 16px;
  overflow-x: auto;
  margin: 0;
  font-size: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rt-snippet code { background: transparent; color: inherit; padding: 0; }

/* ── Login-Seite ─────────────────────────────────────────────────────────── */

.rt-login-page {
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rt-login-wrap { width: 100%; max-width: 400px; }

.rt-login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 34px 32px 24px;
}

.rt-login-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  text-align: center;
  margin-bottom: 4px;
}

.rt-login-sub {
  text-align: center;
  color: var(--rt-muted);
  margin: 0 0 22px;
  font-size: 0.92rem;
}

.rt-login-card .rt-form { max-width: none; }

.rt-login-footer {
  text-align: center;
  font-size: 0.8rem;
  margin: 18px 0 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .rt-shell { flex-direction: column; }

  .rt-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
  }

  .rt-brand { padding: 4px 8px; }

  .rt-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
  }

  .rt-nav-link { padding: 6px 9px; font-size: 0.88rem; }

  .rt-logout-form { margin: 0; }
  .rt-logout-btn { width: auto; padding: 6px 12px; font-size: 0.85rem; }

  .rt-content { padding: 20px 16px 48px; }

  .rt-grid2 { grid-template-columns: 1fr; }

  .rt-form-inline { flex-direction: column; align-items: stretch; }

  .rt-snippet-row { flex-direction: column; }
}

/* ── Self-Service-Erweiterung (Abo, Onboarding, Banner) ──────────── */

.rt-topbanner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 12px 18px; border-radius: 10px; margin-bottom: 18px;
  font-size: 0.95rem;
}
.rt-topbanner form { margin: 0; }
.rt-topbanner-trial { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.rt-topbanner-info { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.rt-topbanner-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.rt-nav-sep { height: 1px; background: rgba(255,255,255,0.12); margin: 10px 12px; }

.rt-badge-blue { background: #dbeafe; color: #1e40af; }
.rt-badge-orange { background: #ffedd5; color: #9a3412; }

.rt-welcome { border: 2px solid #bfdbfe; background: #f8fbff; }
.rt-welcome-steps { margin: 10px 0 4px; padding-left: 22px; }
.rt-welcome-steps li { margin-bottom: 8px; }

.rt-locked-hint {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px;
}

.rt-inline-form { display: inline-block; margin: 0; }

.rt-small { font-size: 0.85rem; }

.rt-consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 0.9rem; }
.rt-consent input { margin-top: 3px; }

.rt-login-links { text-align: center; margin: 14px 0 0; font-size: 0.9rem; }
.rt-cancel-card { max-width: 560px; }

.rt-admin-footer {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid #e2e8f0;
  font-size: 0.82rem; color: #94a3b8;
}
.rt-admin-footer a { color: #64748b; }
.rt-login-legal { text-align: center; font-size: 0.8rem; margin: 16px 0 0; }

/* ── Design-Editor ───────────────────────────────────────────────── */

.rt-design-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 44%); gap: 20px; align-items: start; }
@media (max-width: 980px) { .rt-design-grid { grid-template-columns: 1fr; } }

.rt-preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 18px; }
@media (max-width: 640px) { .rt-preset-grid { grid-template-columns: repeat(2, 1fr); } }
.rt-preset-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 10px;
  border: 2px solid #e2e8f0; border-radius: 10px; cursor: pointer; text-align: left;
}
.rt-preset-tile:has(input:checked) { border-color: #2563eb; background: #f8fbff; }
.rt-preset-tile input { position: absolute; opacity: 0; }
.rt-preset-tile small { font-size: 0.75rem; line-height: 1.35; }
.rt-preset-preview {
  display: block; padding: 10px; border-radius: 6px;
  background: repeating-linear-gradient(45deg, #f1f5f9 0 8px, #f8fafc 8px 16px);
}
.rt-pp-card {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--rt-bg, #fff);
  border: var(--rt-border-width, 1px) solid var(--rt-border, #e5e7eb);
  border-radius: var(--rt-radius, 10px);
  box-shadow: var(--rt-shadow, 0 1px 3px rgba(15,23,42,0.07));
  padding: 10px;
}
.rt-pp-title {
  font-family: var(--rt-font-head, inherit);
  font-weight: var(--rt-title-weight, 700);
  text-transform: var(--rt-title-transform, none);
  color: var(--rt-text, #1f2937); font-size: 13px; line-height: 1;
}
.rt-pp-line { height: 5px; width: 70%; border-radius: 3px; background: var(--rt-surface, rgba(0,0,0,0.06)); }
.rt-pp-btn { height: 12px; width: 46%; border-radius: var(--rt-radius-sm, 8px); background: var(--rt-primary, #2563eb); }

.rt-color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 4px; }
.rt-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; }
.rt-swatch:hover { transform: scale(1.12); }
.rt-color-row input[type="color"] { width: 38px; height: 34px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }

.rt-radio-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 4px; }
.rt-radio-row label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

.rt-design-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.rt-design-preview-card { position: sticky; top: 16px; }
.rt-preview-bg-toggle { display: flex; gap: 14px; margin-bottom: 10px; font-size: 0.9rem; }
.rt-design-preview-stage {
  padding: 18px; border-radius: 10px; border: 1px dashed #cbd5e1; background: #fff;
  transition: background 0.2s ease;
}
.rt-design-preview-stage.rt-stage-dark { background: #0f172a; border-color: #334155; }
.rt-design-preview-stage iframe { width: 100%; border: 0; display: block; min-height: 200px; background: transparent; }

/* Shared editor, extending the incumbent administrative design. */
.rt-content { max-width: 1560px; width: 100%; }
.rt-lead { font-size: 1.05rem; max-width: 65ch; color: #475569; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
::selection { background: #dbeafe; color: #172554; }
.rt-editor-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.rt-editor-heading span { color: #475569; }
.rt-editor-tabs { display: flex; gap: 24px; border-bottom: 1px solid #cbd5e1; margin-bottom: 28px; }
.rt-editor-tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 0 14px; text-decoration: none; font-weight: 600; color: #475569; }
.rt-editor-tabs a span { font-size: .8rem; font-variant-numeric: tabular-nums; }
.rt-editor-tabs a[aria-current] { color: #1d4ed8; border-bottom: 3px solid #2563eb; margin-bottom: -1px; }
.rt-editor-grid { display: grid; grid-template-columns: minmax(350px, 1fr) minmax(320px, 1fr); gap: 32px; align-items: start; }
.rt-editor-controls { background: #fff; border: 1px solid #d7dde5; border-radius: 12px; padding: 24px; min-width: 0; }
.rt-editor-controls > p { max-width: 65ch; }
.rt-editor-section { border: 0; padding: 20px 0 0; margin: 20px 0 0; border-top: 1px solid #e2e8f0; min-width: 0; }
.rt-editor-section legend { font-weight: 650; padding: 0 12px 0 0; }
.rt-editor-controls .rt-field { font-weight: 550; }
.rt-editor-controls .rt-field input, .rt-editor-controls .rt-field select { min-height: 44px; }
.rt-design-color { display: flex; gap: 8px; min-width: 0; }
.rt-design-color input[type=color] { width: 48px; flex: 0 0 48px; padding: 4px; cursor: pointer; }
.rt-design-color input[type=text] { min-width: 0; }
.rt-editor-details { border-top: 1px solid #e2e8f0; margin-top: 24px; }
.rt-editor-details summary { cursor: pointer; padding: 18px 0; font-weight: 650; }
.rt-editor-details .rt-editor-section { border-top: 0; padding: 0; margin: 0; }
.rt-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid #e2e8f0; margin-top: 24px; padding-top: 20px; }
.rt-editor-actions .rt-btn { min-height: 44px; }
.rt-editor-preview { position: sticky; top: 20px; min-width: 0; }
.rt-preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.rt-preview-toolbar [aria-pressed=true] { background: #e8efff; border-color: #2563eb; color: #1d4ed8; }
.rt-preview-toolbar button { min-height: 40px; }
.rt-preview-context { display: flex; justify-content: flex-end; margin-bottom: 12px; font-size: .85rem; }
.rt-preview-context select { font: inherit; padding: 6px; border: 1px solid #cbd5e1; border-radius: 6px; color: #334155; background: #fff; }
.rt-editor-stage { background: #fff; border: 1px solid #d7dde5; padding: 22px; border-radius: 12px; overflow: hidden; }
.rt-editor-stage iframe { display: block; border: 0; width: 100%; min-height: 220px; margin: 0 auto; background: transparent; transition: max-width 160ms ease-out; }
.rt-editor-stage.rt-preview-mobile iframe { max-width: 390px; }
.rt-editor-stage.rt-preview-mobile { padding: 16px 4px; }
.rt-site-list { margin: 28px 0; }
.rt-site-row { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid #d7dde5; text-decoration: none; color: #1f2937; }
.rt-site-row > span:nth-child(2) { flex: 1; min-width: 0; }
.rt-site-row small { display: block; color: #475569; overflow-wrap: anywhere; }
.rt-site-swatch { width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px; border: 1px solid rgba(0,0,0,.15); }
.rt-module-editor-body { min-width: 0; }
.rt-module-editor-body .rt-form { max-width: none; }
.rt-module-editor-body .rt-card { box-shadow: none; padding: 20px; }
.rt-module-editor-body .rt-grid2 { grid-template-columns: 1fr; }
.rt-install-steps { padding-left: 22px; max-width: 65ch; }
.rt-install-steps li { margin: 12px 0; }
.rt-install-status { min-height: 1.5em; }
.rt-agent-templates { margin: 28px 0; padding-top: 24px; border-top: 1px solid #d7dde5; }
.rt-agent-template { border-bottom: 1px solid #e2e8f0; }
.rt-agent-template summary { padding: 16px 0; cursor: pointer; font-weight: 650; }
.rt-agent-prompt { display: block; width: 100%; max-width: 100%; min-height: 220px; padding: 12px; margin: 8px 0 14px; border: 1px solid #94a3b8; border-radius: 8px; background: #f8fafc; color: #1f2937; font-family: inherit; font-size: 16px; line-height: 1.55; resize: vertical; }
.rt-agent-template .rt-btn { white-space: normal; text-align: left; min-height: 44px; }
.rt-mobile-nav { display: contents; }
@media (max-width: 1160px) {
  .rt-editor-grid { grid-template-columns: 1fr; }
  .rt-editor-preview { position: static; }
  .rt-editor-stage iframe { max-width: 800px; }
}
@media (max-width: 820px) {
  .rt-nav { flex-basis: 100%; }
  .rt-nav-link { min-height: 40px; }
  .rt-editor-controls { padding: 18px; }
  .rt-editor-tabs { gap: 20px; }
  .rt-editor-grid { gap: 24px; }
  .rt-site-row { gap: 10px; flex-wrap: wrap; }
  .rt-table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.rt-create-tool { margin-top: 20px; border-top: 1px solid var(--line, #dfe3ea); padding-top: 16px; }
.rt-create-tool summary { cursor: pointer; font-weight: 650; color: #2948cf; }
.rt-create-tool[open] summary { margin-bottom: 20px; }
.rt-mobile-menu, .rt-preview-jump { display: none; }
@media (max-width: 1160px) {
  .rt-preview-jump { display: inline-block; margin-bottom: 16px; min-height: 28px; }
}
@media (max-width: 820px) {
  .rt-mobile-menu { display: inline-flex; min-height: 44px; margin-left: auto; }
  .rt-sidebar:not(.rt-menu-open) .rt-nav, .rt-sidebar:not(.rt-menu-open) .rt-logout-form { display: none; }
  .rt-sidebar { align-items: center; }
  .rt-brand { margin-bottom: 0; }
}

/* Portal: shared RapidTools brand, quiet working surfaces. */
::selection { background: #c9dbff; color: #17263e; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
input, textarea { caret-color: var(--rt-accent); }
a { text-underline-offset: 3px; }
.rt-skip { position: absolute; left: -9999px; z-index: 100; padding: 12px 20px; background: #fff; }
.rt-skip:focus { left: 16px; top: 16px; }
.rt-sidebar { width: 248px; margin: 16px 0 16px 16px; padding: 20px 12px 14px; border-radius: 0 36px 0 0; position: sticky; top: 16px; height: calc(100dvh - 32px); }
.rt-sidebar .rt-nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #52647c #101f35; }
.rt-brand { padding: 4px 10px 22px; }
.rt-nav-link { min-height: 44px; padding: 6px 10px; border-radius: 0 16px 0 0; font-size: .9rem; }
.rt-nav-link[aria-current="page"] { background: #263e60; color: #fff; font-weight: 650; }
.rt-nav-icon { width: 32px; height: 32px; flex-shrink: 0; }
.rt-module-art { display: block; object-fit: contain; flex-shrink: 0; }
.rt-sidebar .rt-logout-btn, .rt-sidebar .rt-mobile-menu { background: #1b304d; border-color: #415673; color: #f4f7fc; }
.rt-sidebar .rt-logout-btn:hover, .rt-sidebar .rt-mobile-menu:hover { background: #2a4263; }
.rt-content { padding: 32px 32px 56px; max-width: 1500px; }
.rt-content h1 { font-size: clamp(1.7rem, 2.4vw, 2.2rem); font-weight: 650; letter-spacing: -.035em; margin-bottom: 24px; line-height: 1.15; }
.rt-content h2 { font-weight: 650; letter-spacing: -.02em; }
.rt-card { box-shadow: none; padding: 24px; }
.rt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 0 20px 0 0; }
.rt-mobile-menu { display: none; }
.rt-btn-sm { min-height: 36px; border-radius: 0 14px 0 0; }
.rt-btn-secondary { border-color: #bbc9dc; }
.rt-portal-intro { position: relative; isolation: isolate; overflow: hidden; border-radius: 0 64px 0 0; background: #101f35; color: #d0dbea; padding: 32px; }
.rt-portal-intro::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #101f35 0%, rgba(16,31,53,.96) 38%, rgba(16,31,53,.3) 100%), url('/public/brand/login-atmosphere-v1.png') center 57% / cover; }
.rt-portal-intro > div { max-width: 540px; }
.rt-portal-intro h2 { color: #f4f7fc; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 14px; }
.rt-portal-intro p { max-width: 43ch; margin: 0 0 24px; }
.rt-design-guide { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 24px 0 30px; color: var(--rt-muted); }
.rt-design-guide strong { color: var(--rt-text); }
.rt-design-guide p { margin: 0; max-width: 75ch; }
.rt-design-explainer { max-width: 75ch; color: var(--rt-muted); margin-bottom: 28px; }
.rt-tool-section { scroll-margin-top: 24px; }
.rt-tool-section .rt-card-head { align-items: center; gap: 18px; margin-bottom: 20px; }
.rt-tool-section .rt-card-head h2 { font-size: 1.3rem; }
.rt-tool-section .rt-card-head p { max-width: 70ch; }
.rt-tool-name { min-width: 210px; }
.rt-tool-name strong, .rt-tool-name small { display: block; }
.rt-tool-name small { margin-top: 6px; color: var(--rt-muted); font-size: .75rem; }
.rt-tool-name code { font-size: .95em; padding: 0; background: none; }
.rt-tool-table td { padding: 16px 8px; }
.rt-tool-table th { padding-left: 8px; border-bottom-width: 1px; }
.rt-tool-table td:nth-child(2) { white-space: nowrap; }
.rt-tool-table .rt-actions { gap: 8px; }
.rt-tool-table td:last-child { width: 45%; }
.rt-tool-more { flex-basis: 100%; font-size: .8rem; color: var(--rt-muted); }
.rt-tool-more summary { cursor: pointer; width: fit-content; padding: 6px 0; }
.rt-tool-more[open] > .rt-actions { padding: 6px 0; }
.rt-table { font-variant-numeric: tabular-nums; }
.rt-editor-controls, .rt-editor-preview { border-radius: 0 36px 0 0; border-color: var(--rt-border); }
.rt-admin-footer { color: var(--rt-muted); }
@media (max-width: 1100px) {
  .rt-sidebar { width: 224px; }
  .rt-content { padding: 28px 24px 48px; }
  .rt-design-guide { grid-template-columns: 1fr; gap: 6px; }
  .rt-tool-table td:last-child { width: auto; }
}
@media (max-width: 820px) {
  .rt-sidebar { position: relative; top: auto; width: auto; height: auto; margin: 10px 12px 0; padding: 12px 14px; border-radius: 0 28px 0 0; }
  .rt-mobile-menu { display: inline-flex; }
  .rt-brand { padding: 0; }
  .rt-brand svg { width: 160px; }
  .rt-sidebar .rt-nav { overflow: visible; flex-direction: column; }
  .rt-content { padding: 24px 16px 40px; }
  .rt-content h1 { margin-bottom: 18px; }
  .rt-portal-intro { padding: 26px 24px; border-radius: 0 48px 0 0; }
  .rt-portal-intro::before { background: linear-gradient(90deg, rgba(16,31,53,.98), rgba(16,31,53,.78)), url('/public/brand/login-atmosphere-v1.png') center / cover; }
  .rt-card { padding: 20px; }
  .rt-tool-table, .rt-tool-table tbody, .rt-tool-table tr, .rt-tool-table td { display: block; }
  .rt-tool-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rt-tool-table tr { padding: 14px 0; border-bottom: 1px solid var(--rt-border); }
  .rt-tool-table td { border: 0; padding: 5px 0; }
  .rt-tool-table .rt-btn-sm { min-height: 44px; }
  .rt-tool-table tbody tr:hover, .rt-tool-table tbody tr:nth-child(even) { background: transparent; }
  .rt-tool-section .rt-card-head { gap: 12px; align-items: flex-start; }
  .rt-tool-section .rt-card-icon img { width: 52px; height: 52px; }
  .rt-tool-section .rt-card-head h2 { font-size: 1.2rem; }
  .rt-tool-section .rt-card-head p { font-size: .9rem; }
}

/* ── Abo & Rechnung (Go-Live 10/2026) ─────────────────────────────────────────
   Auswahl links über die volle Breite, Zusammenfassung rechts. Deckende Flächen,
   Markenrundung oben rechts; im Komplettpaket stehen alle Module als „enthalten“. */
.rt-abo-status h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.rt-abo-status p { margin: 6px 0 0; max-width: 72ch; }
.rt-abo-status .rt-inline-form { margin-top: 16px; }
.rt-abo-book-head { margin-bottom: 22px; }
.rt-abo-book-head h2 { font-size: 1.3rem; }
.rt-abo-book-head p { margin: 0; }
.rt-abo-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 32px; align-items: start; }
.rt-abo-choice { display: grid; gap: 28px; min-width: 0; }
.rt-abo-plans, .rt-abo-modules { border: 0; margin: 0; padding: 0; min-width: 0; }
.rt-abo-legend { padding: 0; margin-bottom: 12px; font-size: 1rem; font-weight: 650; color: var(--rt-text); }
.rt-abo-legend-note { font-weight: 400; color: var(--rt-muted); }
.rt-abo-form[data-plan="select"] .rt-abo-legend-note { display: none; }
.rt-abo-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rt-abo-plan {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 18px; background: #fff; border: 1px solid var(--rt-border); border-radius: 0 20px 0 0; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.rt-abo-plan:hover { border-color: #bbc9dc; }
.rt-abo-plan:has(input:checked) { border-color: var(--rt-accent); background: #f3f7ff; box-shadow: inset 0 0 0 1px var(--rt-accent); }
.rt-abo-plan input, .rt-abo-module input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--rt-accent); }
.rt-abo-plan-body { display: grid; gap: 4px; }
.rt-abo-plan-title { font-weight: 650; }
.rt-abo-plan-text { color: var(--rt-muted); font-size: .88rem; line-height: 1.45; }
.rt-abo-plan-price { display: grid; justify-items: end; text-align: right; }
.rt-abo-plan-price strong { font-size: 1.15rem; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-abo-plan-price small { color: var(--rt-muted); font-size: .75rem; white-space: nowrap; }
.rt-abo-module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rt-abo-module {
  display: grid; grid-template-columns: auto 32px minmax(0, 1fr); gap: 10px; align-items: center;
  min-height: 58px; padding: 10px 14px 10px 12px; background: #fff; border: 1px solid var(--rt-border); border-radius: 0 14px 0 0; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.rt-abo-module:hover { border-color: #bbc9dc; }
.rt-abo-module:has(input:checked) { border-color: var(--rt-accent); background: #f3f7ff; }
.rt-abo-module input { margin: 0; }
.rt-abo-module img { width: 32px; height: 32px; object-fit: contain; }
.rt-abo-module-text { display: grid; gap: 1px; min-width: 0; }
.rt-abo-module-name { font-weight: 600; font-size: .92rem; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.rt-abo-module-price { color: var(--rt-muted); font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-abo-price-incl { display: none; }
.rt-abo-modules:disabled .rt-abo-module { grid-template-columns: 32px minmax(0, 1fr); cursor: default; background: var(--rt-bg); border-color: var(--rt-border); }
.rt-abo-modules:disabled .rt-abo-module input, .rt-abo-modules:disabled .rt-abo-price-single { display: none; }
.rt-abo-modules:disabled .rt-abo-price-incl { display: inline; color: #065f46; font-weight: 600; }
.rt-abo-summary {
  position: sticky; top: 24px; display: grid; gap: 10px;
  padding: 22px; background: #f3f6fb; border: 1px solid var(--rt-border); border-radius: 0 28px 0 0;
}
.rt-abo-summary h3 { margin: 0; font-size: 1rem; font-weight: 650; }
.rt-abo-summary-plan { margin: 0; color: var(--rt-muted); font-size: .92rem; }
.rt-abo-total { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.rt-abo-total strong { font-size: 2.1rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rt-abo-total span { color: var(--rt-muted); }
.rt-abo-fine { margin: 0; color: var(--rt-muted); font-size: .82rem; line-height: 1.5; }
.rt-abo-tip { margin: 0; padding: 10px 12px; font-size: .85rem; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; }
.rt-abo-summary .rt-alert { margin: 0; }
.rt-abo-summary .rt-consent { margin: 4px 0; font-size: .85rem; }
.rt-abo-summary .rt-btn { margin-top: 2px; }
.rt-abo-summary .rt-btn:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 1100px) {
  .rt-abo-form { grid-template-columns: 1fr; }
  .rt-abo-summary { position: static; }
}
@media (max-width: 640px) {
  .rt-abo-plan-grid, .rt-abo-module-grid { grid-template-columns: 1fr; }
  .rt-abo-plan { grid-template-columns: auto minmax(0, 1fr); }
  .rt-abo-plan-price { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; justify-items: start; text-align: left; }
  /* Komplettpaket: die Legende sagt „alle enthalten“, die Kacheln dürfen kompakt sein. */
  .rt-abo-modules:disabled .rt-abo-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rt-abo-modules:disabled .rt-abo-module { grid-template-columns: 20px minmax(0, 1fr); gap: 7px; min-height: 0; padding: 9px 7px; }
  .rt-abo-modules:disabled .rt-abo-module img { width: 20px; height: 20px; }
  .rt-abo-modules:disabled .rt-abo-module-name { font-size: .8rem; hyphens: manual; overflow-wrap: normal; }
  .rt-abo-modules:disabled .rt-abo-price-incl { display: none; }
}
@media (max-width: 360px) {
  .rt-abo-modules:disabled .rt-abo-module-grid { grid-template-columns: 1fr; }
}
