@charset "utf-8";
/* =====================================================================
   Roy Goebel Berliner Vermögen: Theme für den U-Makler Online-Kundenordner
   Wird NACH Styles.css geladen und überschreibt nur die Optik.
   ===================================================================== */

@font-face { font-family: 'RG Roboto'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('https://www.roygoebel.de/wp-content/uploads/2019/01/roboto-v18-latin-300.woff2') format('woff2'); }
@font-face { font-family: 'RG Roboto'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('https://www.roygoebel.de/wp-content/uploads/2019/01/roboto-v18-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'RG Roboto'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('https://www.roygoebel.de/wp-content/uploads/2019/01/roboto-v18-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'RG Roboto'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('https://www.roygoebel.de/wp-content/uploads/2019/01/roboto-v18-latin-700.woff2') format('woff2'); }

:root {
  --rg-brand: #8C6941;        /* Gold-Braun der Website */
  --rg-brand-dark: #3B2A17;   /* Buttons der Website */
  --rg-brand-hover: #6E5233;
  --rg-sand: #F7F3EE;         /* Seitenhintergrund */
  --rg-sand-2: #ECE4DA;
  --rg-line: #E6DCCF;
  --rg-text: #3A3A3A;
  --rg-muted: #7A7A7A;
  --rg-white: #FFFFFF;
  --rg-ok: #477519;
  --rg-error: #B42318;
  --rg-radius: 14px;
  --rg-radius-sm: 10px;
  --rg-shadow: 0 1px 2px rgba(59,42,23,.05), 0 8px 24px rgba(59,42,23,.06);
  --rg-font: 'RG Roboto', Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --rg-max: 1120px;
}

/* ---------- Grundlayout ---------- */
html { -webkit-text-size-adjust: 100%; }
html.rg-js body {
  margin: 0;
  background: var(--rg-sand) !important;
  color: var(--rg-text);
  font-family: var(--rg-font) !important;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}
html.rg-js body, html.rg-js table, html.rg-js td, html.rg-js font, html.rg-js input,
html.rg-js select, html.rg-js textarea, html.rg-js button { font-family: var(--rg-font) !important; }
html.rg-js *, html.rg-js *::before, html.rg-js *::after { box-sizing: border-box; }
html.rg-js img { max-width: 100%; }
html.rg-js .umbox table { font-size: 15px; }
.rg-hidden { display: none !important; }

/* Bis das Skript fertig ist, die alte Toolbar nicht aufblitzen lassen */
html.rg-js:not(.rg-ready) table.ToolbarStyle { visibility: hidden; }

/* ---------- Kopfzeile ---------- */
.rg-header {
  background: var(--rg-white);
  border-bottom: 1px solid var(--rg-line);
  position: sticky; top: 0; z-index: 50;
}
.rg-header__inner {
  max-width: var(--rg-max); margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
}
.rg-brand { display: block; line-height: 0; }
.rg-brand img { height: 56px; width: auto; }
.rg-brand__label {
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rg-brand); padding-left: 16px; border-left: 1px solid var(--rg-line);
}
.rg-header__actions { margin-left: auto; display: flex; gap: 8px; }
.rg-menubtn { display: none !important; }

/* Buttons wie auf der Website */
.rg-btn, html.rg-js input[type="Submit"], html.rg-js input[type="submit"], html.rg-js input[type="button"], html.rg-js button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px !important;
  border-radius: var(--rg-radius-sm) !important;
  border: 0 !important;
  background: var(--rg-brand-dark) !important; color: #fff !important;
  font-size: 15px !important; font-weight: 500 !important; line-height: 1.2;
  text-decoration: none !important; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
  -webkit-appearance: none; appearance: none;
}
.rg-btn:hover, html.rg-js input[type="Submit"]:hover, html.rg-js input[type="submit"]:hover,
html.rg-js input[type="button"]:hover, html.rg-js button:hover { background: var(--rg-brand-hover) !important; color: #fff !important; }
.rg-btn:focus-visible, html.rg-js input[type="Submit"]:focus-visible { outline: 3px solid rgba(140,105,65,.35); outline-offset: 2px; }
.rg-ico { width: 20px; height: 20px; flex: 0 0 auto; }

/* Navigation (ersetzt die braune Icon-Toolbar) */
.rg-nav { border-top: 1px solid var(--rg-line); background: var(--rg-white); }
.rg-nav__inner {
  max-width: var(--rg-max); margin: 0 auto; padding: 0 16px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.rg-nav__inner::-webkit-scrollbar { display: none; }
.rg-nav__item {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 12px; color: var(--rg-text) !important; text-decoration: none !important;
  border-bottom: 2px solid transparent; font-size: 15px;
}
.rg-nav__item .rg-ico { color: var(--rg-brand); }
.rg-nav__item:hover { color: var(--rg-brand-dark) !important; border-bottom-color: var(--rg-brand); }

/* Zurück-Link */
.rg-backbar { max-width: var(--rg-max); margin: 0 auto; padding: 20px 24px 0; }
.rg-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--rg-brand-dark) !important; font-weight: 500; text-decoration: none !important;
  padding: 6px 0;
}
.rg-back b { font-weight: 500; }
.rg-back:hover { color: var(--rg-brand) !important; }

/* ---------- Rahmen & Boxen ---------- */
html.rg-js table.FrameStyle {
  width: 100% !important; max-width: var(--rg-max);
  margin: 0 auto !important; background: transparent !important;
  padding: 8px 24px 0;
  border-collapse: separate;
}
html.rg-js table.FrameStyle > tbody > tr > td { padding: 0; }
html.rg-js #divTitle { display: none; }

html.rg-js .umbox {
  width: 100% !important; max-width: 100% !important;
  background: var(--rg-white) !important;
  border: 1px solid var(--rg-line) !important;
  border-radius: var(--rg-radius) !important;
  box-shadow: var(--rg-shadow) !important;
  padding: 28px 32px !important;
  margin: 20px 0 0 !important;
}
html.rg-js .umbox + br { display: none; }

/* Box-Überschriften */
html.rg-js .umueberschrift1 {
  font-size: 22px; font-weight: 500; color: var(--rg-brand-dark) !important; letter-spacing: -.01em;
}
html.rg-js td.rg-boxicon { width: 44px !important; padding-right: 8px !important; vertical-align: middle; }
html.rg-js td.rg-boxicon img {
  width: 26px !important; height: 26px !important; opacity: .9;
  filter: sepia(1) saturate(1.6) hue-rotate(-12deg) brightness(.75);
}
html.rg-js td.rg-indent { width: 0 !important; padding: 0 !important; }
html.rg-js hr { border: 0; border-top: 1px solid var(--rg-line); margin: 16px 0; }

/* Werte (fett) etwas ruhiger */
html.rg-js .umbox b { font-weight: 500; color: #222; }

/* ---------- Formularfelder ---------- */
html.rg-js input[type="Text"], html.rg-js input[type="text"], html.rg-js input[type="Password"],
html.rg-js input[type="password"], html.rg-js input[type="Number"], html.rg-js input[type="email"],
html.rg-js select, html.rg-js textarea {
  font-size: 16px !important; /* verhindert Zoom auf iPhone */
  color: var(--rg-text);
  background: #fff;
  border: 1px solid #D6C9B8 !important;
  border-radius: var(--rg-radius-sm) !important;
  padding: 10px 12px !important;
  min-height: 44px;
  margin: 3px 0 !important;
  max-width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
html.rg-js textarea { min-height: 120px; width: 100%; }
html.rg-js input[type="Text"]:hover, html.rg-js input[type="Password"]:hover, html.rg-js select:hover, html.rg-js textarea:hover { border-color: #BBA88F !important; }
html.rg-js input[type="Text"]:focus, html.rg-js input[type="Password"]:focus, html.rg-js input[type="Number"]:focus,
html.rg-js select:focus, html.rg-js textarea:focus {
  border-color: var(--rg-brand) !important;
  box-shadow: 0 0 0 3px rgba(140,105,65,.18);
  outline: none !important;
}
html.rg-js input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--rg-brand-dark); margin: 3px 8px 0 0; vertical-align: top; }
html.rg-js label { font-weight: 400; }

/* Links */
html.rg-js .umbox a:not(.rg-btn) { color: var(--rg-brand); }
html.rg-js a.sortlinkactive, html.rg-js a.sortlinkactive:link, html.rg-js a.sortlinkactive:visited {
  color: var(--rg-brand-dark) !important; border-bottom: 2px solid var(--rg-brand) !important;
}
html.rg-js a.sortlinkpossible, html.rg-js a.sortlinkpossible:link, html.rg-js a.sortlinkpossible:visited { color: var(--rg-muted) !important; }
html.rg-js a.sortlinkpossible:hover { color: var(--rg-brand-dark) !important; text-decoration: none !important; }
html.rg-js a.hreflink { color: var(--rg-brand) !important; }

/* ---------- Datentabellen (Verträge, Dokumente) ---------- */
html.rg-js table.rg-datatable { border-collapse: collapse; width: 100% !important; }
html.rg-js table.rg-datatable thead td {
  border: 0 !important; border-bottom: 1px solid var(--rg-line) !important;
  padding: 10px 10px !important; white-space: nowrap;
}
html.rg-js table.rg-datatable thead td font,
html.rg-js table.rg-datatable thead td a {
  font-size: 12px !important; font-weight: 500 !important;
  text-transform: uppercase; letter-spacing: .08em;
}
html.rg-js table.rg-datatable thead tr[height="3"] { display: none; }
html.rg-js table.rg-datatable tbody td { padding: 14px 10px !important; border-bottom: 1px solid #F0EAE2; vertical-align: middle; }
html.rg-js table.rg-datatable tbody tr { height: auto !important; }
html.rg-js table.highlightrow tbody tr:hover { background: var(--rg-sand) !important; outline: 0 !important; color: inherit; }
html.rg-js table.rg-datatable tbody tr.rg-row-full td,
html.rg-js table.rg-datatable tbody tr:not([onclick]) td { border-bottom: 0; }
html.rg-js table.rg-datatable img { width: 18px !important; height: 18px !important; vertical-align: middle; }
html.rg-js table.rg-datatable td.rg-cell-merged { display: none !important; }
html.rg-js table.rg-datatable td[data-label="Beitrag"] { white-space: nowrap; }
.rg-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; background: var(--rg-sand-2); color: var(--rg-text); }
.rg-badge--ok { background: #E8F0DF; color: #3D6416; }
html.rg-js table.rg-kv td.rg-col-empty { display: none; }

/* Jahres-Trenner in der Post-Box */
html.rg-js .rg-page-postfach table.rg-datatable tbody tr.rg-row-full td { padding-top: 20px !important; }

/* ---------- Fußzeile ---------- */
html.rg-js .rg-footer {
  max-width: var(--rg-max); margin: 32px auto 0 !important; padding: 20px 24px 32px;
  font-size: 12px !important; color: var(--rg-muted) !important; text-align: center;
}
html.rg-js .rg-footer * { font-size: 12px !important; color: var(--rg-muted) !important; }

/* ---------- Login ---------- */
html.rg-page-login.rg-js table.FrameStyle { max-width: 560px; }
html.rg-page-login.rg-js table.FrameStyle table[width="600px"] { width: 100% !important; margin: 32px 0 0 !important; font-size: 15px !important; color: var(--rg-muted); }
html.rg-page-login.rg-js table.FrameStyle table[width="600px"] td { font-size: 15px !important; }
html.rg-page-login.rg-js .umbox { margin-top: 16px !important; }
html.rg-page-login.rg-js .umbox table { width: 100%; }
html.rg-page-login.rg-js .umbox td { display: block; width: auto !important; padding: 2px 0 !important; }
html.rg-page-login.rg-js .umbox tr { display: block; }
html.rg-page-login.rg-js .umbox tr[height] { display: none; }
html.rg-page-login.rg-js .umbox tr:first-child { display: flex; align-items: center; margin-bottom: 12px; }
html.rg-page-login.rg-js .umbox td.rg-indent { display: none; }
html.rg-page-login.rg-js .umbox input[type="Text"], html.rg-page-login.rg-js .umbox input[type="Password"] { width: 100%; margin-bottom: 8px !important; }
html.rg-page-login.rg-js .umbox input[type="Submit"] { width: 100%; margin-top: 12px !important; }
html.rg-page-login.rg-js .umbox td[style*="nowrap"] { white-space: normal !important; }
html.rg-page-login.rg-js .umbox i { display: block; text-align: right; font-style: normal; margin-top: 2px; }
html.rg-page-login.rg-js .umbox i a { font-size: 14px !important; }

/* ---------- Werte-Raster (Vertragsdetails etc.) Desktop ---------- */
html.rg-js table.rg-kv td { padding: 4px 12px 4px 0; vertical-align: top; }
html.rg-js table.rg-kv tr { height: auto !important; }
html.rg-js table.rg-kv td:nth-child(odd) { color: var(--rg-muted); }
html.rg-js table.rg-kv3 td { padding: 3px 12px 3px 0; vertical-align: top; }
html.rg-js table.rg-kv3 td:first-child { color: var(--rg-muted); }
html.rg-js tr.rg-row-empty { height: 12px !important; }

/* Formulare Desktop */
html.rg-js table.rg-form td { padding: 4px 12px 4px 0 !important; vertical-align: middle; }
html.rg-js table.rg-form input[type="Text"], html.rg-js table.rg-form input[type="Password"],
html.rg-js table.rg-form select, html.rg-js table.rg-form textarea { width: 100%; }
html.rg-js table.rg-form input[size="3"], html.rg-js table.rg-form input[size="5"],
html.rg-js table.rg-form input[size="10"] { width: auto; }

/* Adressänderung Desktop */
html.rg-js table.rg-adresse td { padding: 3px 8px 3px 0 !important; }
html.rg-js table.rg-adresse tr { height: auto !important; }
html.rg-js table.rg-adresse tr.rg-adresse-head td { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--rg-muted); padding-bottom: 8px !important; }
html.rg-js table.rg-adresse td.rg-adresse-label { color: var(--rg-muted); }
html.rg-js table.rg-adresse input[type="Text"] { width: 100%; }
html.rg-js table.rg-adresse input[name="PLZ"], html.rg-js table.rg-adresse input[name="PPLZ"] { width: 32%; }
html.rg-js table.rg-adresse input[name="Ort"], html.rg-js table.rg-adresse input[name="POrt"] { width: 62%; }

/* SweetAlert (Hilfe-Fenster) */
html.rg-js .swal2-popup { border-radius: var(--rg-radius) !important; font-family: var(--rg-font) !important; }
html.rg-js .swal2-styled.swal2-confirm { background: var(--rg-brand-dark) !important; border-radius: var(--rg-radius-sm) !important; box-shadow: none !important; }

/* =====================================================================
   Tablet & Smartphone
   ===================================================================== */
@media (max-width: 860px) {
  .rg-header__inner { padding: 10px 16px; gap: 12px; }
  .rg-brand img { height: 44px; }
  .rg-nav__inner { padding: 0 8px; }
  html.rg-js table.FrameStyle { padding: 0 12px; }
  .rg-backbar { padding: 14px 16px 0; }
  html.rg-js .umbox { padding: 20px 16px !important; margin-top: 14px !important; border-radius: 12px !important; }
  html.rg-js .umueberschrift1 { font-size: 19px; }

  /* Datentabellen werden zu Karten */
  html.rg-js table.rg-datatable, html.rg-js table.rg-datatable tbody,
  html.rg-js table.rg-datatable tr, html.rg-js table.rg-datatable td { display: block; width: 100% !important; }
  html.rg-js table.rg-datatable thead { display: block; }
  html.rg-js table.rg-datatable thead tr { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px 16px; padding-bottom: 6px; border-bottom: 1px solid var(--rg-line); margin-bottom: 10px; }
  html.rg-js table.rg-datatable thead tr::-webkit-scrollbar { display: none; }
  html.rg-js table.rg-datatable thead tr::before { content: 'Sortieren:'; font-size: 12px; color: var(--rg-muted); padding: 4px 0; white-space: nowrap; }
  html.rg-js table.rg-datatable thead td { display: block; width: auto !important; padding: 4px 0 !important; border: 0 !important; }
  html.rg-js table.rg-datatable thead td:empty, html.rg-js table.rg-datatable thead td.rg-cell-empty { display: none; }
  html.rg-js table.rg-datatable thead td::before { content: ''; }
  html.rg-js table.rg-datatable tbody tr[onclick] {
    position: relative;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
    padding: 14px 40px 14px 14px; margin: 0 0 10px;
    border: 1px solid var(--rg-line); border-radius: 12px; background: #fff;
  }
  html.rg-js table.rg-datatable tbody tr[onclick]::after {
    content: ''; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
    border-right: 2px solid var(--rg-brand); border-top: 2px solid var(--rg-brand);
    transform: translateY(-50%) rotate(45deg);
  }
  html.rg-js table.rg-datatable tbody td { padding: 0 !important; border: 0 !important; text-align: left !important; }
  html.rg-js table.rg-datatable tbody td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--rg-muted);
  }
  html.rg-js table.rg-datatable tbody td.rg-cell-empty { display: none; }
  html.rg-js table.rg-datatable tbody td.rg-cell-icon {
    position: absolute; right: 38px; top: 14px; width: auto !important;
  }
  /* Erste Textspalte (Art / Datum) als Titel über die volle Breite */
  html.rg-js table.rg-datatable tbody tr[onclick] td.rg-cell-title {
    grid-column: 1 / -1; font-size: 17px; font-weight: 500; color: var(--rg-brand-dark); padding-right: 28px !important;
  }
  html.rg-js table.rg-datatable tbody tr[onclick] td.rg-cell-title::before { display: none; }
  html.rg-js table.rg-datatable tbody tr:not([onclick]) td { padding: 10px 0 !important; }
  /* Dokumentlisten (Datum + Bezeichnung): kompakt */
  html.rg-js table.rg-datatable.rg-doclist tbody tr[onclick] { grid-template-columns: 1fr; }

  /* Werte-Raster: Label | Wert, untereinander */
  html.rg-js table.rg-kv, html.rg-js table.rg-kv tbody { display: block; width: 100% !important; }
  html.rg-js table.rg-kv tr { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 0 12px; }
  html.rg-js table.rg-kv td { display: block; width: auto !important; padding: 5px 0 !important; border-bottom: 1px solid #F3EEE7; }
  html.rg-js table.rg-kv td.rg-pair-empty, html.rg-js table.rg-kv tr.rg-row-empty { display: none; }

  /* Persönliche Daten: Bezeichnung oben, darunter beide Personen nebeneinander */
  html.rg-js table.rg-kv3, html.rg-js table.rg-kv3 tbody { display: block; width: 100% !important; }
  html.rg-js table.rg-kv3 tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0 12px; padding: 6px 0; border-bottom: 1px solid #F3EEE7; }
  html.rg-js table.rg-kv3 td { display: block; width: auto !important; padding: 0 !important; overflow-wrap: anywhere; }
  html.rg-js table.rg-kv3 td:first-child { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
  html.rg-js table.rg-kv3 td.rg-col-empty, html.rg-js table.rg-kv3 tr.rg-row-empty { display: none; }

  /* Formulare: Label über dem Feld */
  html.rg-js table.rg-form, html.rg-js table.rg-form tbody, html.rg-js table.rg-form tr,
  html.rg-js table.rg-form td { display: block; width: 100% !important; }
  html.rg-js table.rg-form td { padding: 2px 0 !important; white-space: normal !important; }
  html.rg-js table.rg-form tr { margin-bottom: 8px; }
  html.rg-js table.rg-form tr.rg-row-empty, html.rg-js table.rg-form td.rg-indent { display: none; }
  html.rg-js table.rg-form td:empty { display: none; }
  html.rg-js table.rg-form input[type="Text"], html.rg-js table.rg-form input[type="Password"],
  html.rg-js table.rg-form select, html.rg-js table.rg-form textarea { width: 100% !important; }
  html.rg-js table.rg-form input[type="Submit"] { width: 100%; }
  html.rg-js table.rg-form table { width: 100% !important; }
  html.rg-js table.rg-form table tr { display: flex; gap: 0; }
  html.rg-js table.rg-form table td { display: block; width: auto !important; }

  /* Adressänderung: je Feld "bisher → neu", Person 1 und 2 untereinander */
  html.rg-js table.rg-adresse, html.rg-js table.rg-adresse > tbody { display: block; width: 100% !important; }
  html.rg-js table.rg-adresse > tbody > tr { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid #F3EEE7; }
  html.rg-js table.rg-adresse > tbody > tr > td { display: block; width: auto !important; padding: 0 !important; word-break: break-word; }
  html.rg-js table.rg-adresse > tbody > tr > td.rg-adresse-label { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
  html.rg-js table.rg-adresse > tbody > tr > td.rg-sep { display: none; }
  html.rg-js table.rg-adresse > tbody > tr.rg-row-empty, html.rg-js table.rg-adresse > tbody > tr.rg-adresse-head > td:first-child { display: none; }
  html.rg-js table.rg-adresse > tbody > tr.rg-adresse-head td:nth-child(n+6) { display: none; }
  html.rg-js table.rg-adresse > tbody > tr > td[colspan] { grid-column: 1 / -1; }
  html.rg-js table.rg-adresse > tbody > tr > td:first-child:not(.rg-adresse-label):empty,
  html.rg-js table.rg-adresse > tbody > tr > td:not(.rg-adresse-label):not([colspan]):first-child { display: none; }
  html.rg-js table.rg-adresse table tr { display: flex; }
  html.rg-js table.rg-adresse input[type="Submit"] { width: 100%; }

  /* Äußere Layout-Tabellen auflösen, damit nichts breiter als der Bildschirm wird */
  html.rg-js table.FrameStyle, html.rg-js table.FrameStyle > tbody,
  html.rg-js table.FrameStyle > tbody > tr, html.rg-js table.FrameStyle > tbody > tr > td { display: block; width: 100% !important; }
  html.rg-js .umbox table:not(.rg-datatable):not(.rg-kv):not(.rg-kv3):not(.rg-form):not(.rg-adresse),
  html.rg-js .umbox table:not(.rg-datatable):not(.rg-kv):not(.rg-kv3):not(.rg-form):not(.rg-adresse) > tbody { display: block; width: 100% !important; }
  html.rg-js .umbox table:not(.rg-datatable):not(.rg-kv):not(.rg-kv3):not(.rg-form):not(.rg-adresse) > tbody > tr { display: flex; align-items: center; width: 100%; }
  html.rg-js .umbox table:not(.rg-datatable):not(.rg-kv):not(.rg-kv3):not(.rg-form):not(.rg-adresse) > tbody > tr > td { display: block; flex: 1 1 auto; min-width: 0; width: auto !important; }
  html.rg-js .umbox table:not(.rg-datatable):not(.rg-kv):not(.rg-kv3):not(.rg-form):not(.rg-adresse) > tbody > tr > td.rg-boxicon { flex: 0 0 40px; }
  html.rg-js .umbox table:not(.rg-datatable):not(.rg-kv):not(.rg-kv3):not(.rg-form):not(.rg-adresse) > tbody > tr > td.rg-indent,
  html.rg-js .umbox table:not(.rg-datatable):not(.rg-kv):not(.rg-kv3):not(.rg-form):not(.rg-adresse) > tbody > tr.rg-row-empty { display: none; }
  html.rg-js .umbox .container-fluid, html.rg-js .umbox .row { max-width: 100%; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }

  /* Lange Inhalte nie breiter als der Bildschirm */
  html.rg-js .umbox table { max-width: 100%; }
  html.rg-js .umbox td { overflow-wrap: anywhere; }
}

@media (max-width: 480px) {
  .rg-brand__label { display: none; }
  .rg-brand img { height: 40px; }
  .rg-logout span { display: none; }
  .rg-logout { padding: 10px 12px !important; }
  html.rg-js table.FrameStyle { padding: 0 10px; }
  html.rg-js .umbox { padding: 18px 14px !important; }
  html.rg-js table.rg-datatable tbody tr[onclick] { grid-template-columns: 1fr 1fr; }
}

/* Druck: Kopfzeile ausblenden */
@media print {
  .rg-header, .rg-backbar { display: none !important; }
  html.rg-js .umbox { box-shadow: none !important; }
}

@media (max-width: 860px) {
  html.rg-js .umbox b, html.rg-js .umbox font { overflow-wrap: anywhere; }
  html.rg-js table.rg-form { table-layout: fixed; }
  html.rg-js table.rg-form textarea, html.rg-js table.rg-form select { min-width: 0; }
}
@media (max-width: 860px) {
  html.rg-js .umbox table { min-width: 0 !important; }
  html.rg-js table.rg-kv td b { word-break: break-word; overflow-wrap: anywhere; display: inline-block; max-width: 100%; }
  html.rg-js .umbox [style*="padding-left"] { padding-left: 0 !important; }
}

/* ---------- Feinschliff ---------- */
html.rg-js .umbox tr[height] { height: auto !important; }
html.rg-js table.rg-datatable tbody tr.rg-row-group { background: transparent !important; cursor: default; }
html.rg-js table.rg-datatable tbody tr.rg-row-group td { font-size: 13px !important; font-weight: 500; letter-spacing: .12em; color: var(--rg-brand) !important; padding: 18px 10px 6px !important; border-bottom: 1px solid var(--rg-line) !important; }
html.rg-js table.rg-datatable tbody tr.rg-row-group div { margin: 0 !important; }
html.rg-page-login.rg-js .umbox tr:first-child { gap: 10px; }
html.rg-page-login.rg-js .umbox tr:first-child td { width: auto !important; }

@media (max-width: 860px) {
  html.rg-js .umbox td { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
  html.rg-js table.rg-kv td.rg-pair-novalue { display: none; }
  html.rg-js table.rg-datatable tbody tr.rg-row-group { display: block; margin: 6px 0 10px; }
  html.rg-js table.rg-datatable tbody tr.rg-row-group td { display: inline; border: 0 !important; padding: 0 !important; }
  /* Dokumentenkarten: Bezeichnung als Titel, Datum klein darunter */
  html.rg-js table.rg-doclist tbody tr[onclick] { grid-template-columns: 1fr !important; gap: 2px; }
  html.rg-js table.rg-doclist tbody tr[onclick] td.rg-cell-title { order: -1; font-size: 16px; }
  html.rg-js table.rg-doclist tbody td[data-label="Datum"] { font-size: 13px; color: var(--rg-muted); }
  html.rg-js table.rg-doclist tbody td[data-label="Datum"]::before { display: none !important; }
  /* Formular-Zeilen: Checkbox + Text sauber nebeneinander */
  html.rg-js .umbox td > table:not(.rg-datatable) input[type="checkbox"] + * { display: inline; }
}
html.rg-js [hidden] { display: none !important; }
@media (max-width: 860px) {
  html.rg-js table.rg-kv td b { word-break: break-all; }
}
html.rg-js .umbox td.rg-cell-check { width: 28px !important; flex: 0 0 28px !important; }
@media (max-width: 860px) {
  html.rg-js table.rg-adresse > tbody > tr:has(td[colspan]) > td:not([colspan]),
  html.rg-js table.rg-adresse > tbody > tr:has(input[type="Submit"]) > td:not(:has(input)) { display: none; }
  html.rg-js table.rg-adresse > tbody > tr > td:has(input[type="Submit"]) { grid-column: 1 / -1; }
  html.rg-js table.rg-adresse table td:not(.rg-cell-check) { flex: 1 1 auto !important; }
}
@media (max-width: 860px) {
  html.rg-js .umbox td[style*="nowrap"] { white-space: normal !important; }
  html.rg-js table.rg-kv td b { word-break: normal; }
  html.rg-js table.rg-kv tr { grid-template-columns: minmax(0, 45%) minmax(0, 1fr); }
}
html.rg-js table.rg-datatable img { max-width: none !important; }
html.rg-js table.rg-datatable td[width="25px"] { width: 34px !important; padding-right: 0 !important; }
html.rg-js table.rg-adresse td:has(input[name="PLZ"]), html.rg-js table.rg-adresse td:has(input[name="PPLZ"]) { white-space: nowrap; }
html.rg-js table.rg-adresse input[name="PLZ"], html.rg-js table.rg-adresse input[name="PPLZ"] { width: 34% !important; }
html.rg-js table.rg-adresse input[name="Ort"], html.rg-js table.rg-adresse input[name="POrt"] { width: 62% !important; }

/* Vertragskarten: alle Angaben untereinander in voller Breite (keine 2 Spalten) */
@media (max-width: 860px) {
  html.rg-js table.rg-datatable tbody tr[onclick] { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }
}
html.rg-js a.rg-doclink { color: inherit !important; text-decoration: none !important; }
html.rg-js a.rg-doclink:hover { color: var(--rg-brand) !important; text-decoration: underline !important; }

/* ---------- Box-Icons im Stil der Website ---------- */
html.rg-js td.rg-boxicon { width: 52px !important; }
.rg-boxico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--rg-sand-2); color: var(--rg-brand-dark);
}
.rg-boxico .rg-ico { width: 22px; height: 22px; }

@media (max-width: 860px) {
  html.rg-js .umbox td.rg-boxicon { flex: 0 0 52px !important; }
  .rg-boxico { width: 36px; height: 36px; }
  .rg-boxico .rg-ico { width: 20px; height: 20px; }

  /* Navigation: Menü-Button wie auf der Website, Liste klappt auf */
  html.rg-js button.rg-menubtn { display: inline-flex !important; width: 44px; padding: 0 !important; }
  .rg-nav { display: none; border-top: 1px solid var(--rg-line); box-shadow: 0 12px 24px rgba(59,42,23,.10); }
  .rg-nav-open .rg-nav { display: block; }
  .rg-nav__inner { display: block; padding: 6px 16px 10px; overflow: visible; }
  .rg-nav__item {
    display: flex; gap: 14px; padding: 14px 4px; font-size: 16px;
    border-bottom: 1px solid #F0EAE2; white-space: normal;
  }
  .rg-nav__item:last-child { border-bottom: 0; }
  .rg-nav__item .rg-ico { width: 22px; height: 22px; }
  .rg-nav__item:hover { border-bottom-color: #F0EAE2; color: var(--rg-brand) !important; }

  /* Sortier-Zeile: weicher Ausblend-Rand statt hartem Abschneiden */
  html.rg-js table.rg-datatable thead tr {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
    padding-right: 24px;
  }
}
@media (max-width: 480px) {
  .rg-brand__label { display: inline; font-size: 11px; padding-left: 12px; }
}

/* Hinweis-Fenster (SweetAlert) passend zur Website */
html.rg-js .swal2-title { color: var(--rg-brand-dark) !important; font-weight: 500 !important; font-size: 24px !important; }
html.rg-js .swal2-html-container, html.rg-js .swal2-content { color: var(--rg-text) !important; font-size: 16px !important; }
html.rg-js .swal2-icon.swal2-info { border-color: var(--rg-sand-2) !important; color: var(--rg-brand) !important; }
html.rg-js .swal2-styled.swal2-cancel {
  background: transparent !important; color: var(--rg-brand-dark) !important;
  border: 1px solid var(--rg-brand-dark) !important; border-radius: var(--rg-radius-sm) !important; box-shadow: none !important;
}
html.rg-js .swal2-styled.swal2-cancel:hover { background: var(--rg-sand) !important; }

/* ---------- Meldungs-Boxen (z. B. nach dem Abmelden) ---------- */
html.rg-js .umbox.rg-msgbox { text-align: center; padding: 40px 32px !important; }
html.rg-js .umbox.rg-msgbox > table { width: 100% !important; }
html.rg-js .umbox.rg-msgbox tr { display: block !important; }
html.rg-js .umbox.rg-msgbox td { display: block !important; width: 100% !important; text-align: center !important; padding: 0 !important; }
html.rg-js .umbox.rg-msgbox td.rg-indent, html.rg-js .umbox.rg-msgbox td:empty { display: none !important; }
html.rg-js .umbox.rg-msgbox img { width: 56px !important; height: 56px !important; margin: 0 auto 16px; display: block; }
html.rg-js .umbox.rg-msgbox font { font-size: 20px !important; font-weight: 500; color: var(--rg-brand-dark) !important; line-height: 1.4; }
html.rg-js .umbox.rg-msgbox br + br, html.rg-js .umbox.rg-msgbox td > br:last-of-type { display: none; }
.rg-msgbox__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.rg-btn--ghost {
  background: transparent !important; color: var(--rg-brand-dark) !important;
  border: 1px solid var(--rg-brand-dark) !important;
}
.rg-btn--ghost:hover { background: var(--rg-sand) !important; color: var(--rg-brand-dark) !important; }
@media (max-width: 480px) { .rg-msgbox__actions .rg-btn { width: 100%; } }

/* Hilfe-Fenster */
html.rg-js .rg-help { text-align: left; font-size: 15px; line-height: 1.55; color: var(--rg-text); }
html.rg-js .rg-help h3 { font-size: 17px; font-weight: 500; color: var(--rg-brand-dark); margin: 4px 0 6px; }
html.rg-js .swal2-icon.swal2-question { border-color: var(--rg-sand-2) !important; color: var(--rg-brand) !important; }


/* ---------- Dokument-Symbole (ersetzt die PDF-Icons, Klick-Funktionen bleiben) ---------- */
html.rg-js img[src$="o_document-pdf-neu.svg"] { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233B2A17' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M13 3v6h6'/%3E%3Cpath d='M9 14h6M9 17.5h4'/%3E%3Ccircle cx='18.5' cy='5.5' r='4' fill='%23C2571A' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E"); width: 22px !important; height: 22px !important; margin: 0 !important; }
html.rg-js img[src$="o_document-pdf-grau-neu.svg"] { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B3A797' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M13 3v6h6'/%3E%3Cpath d='M9 14h6M9 17.5h4'/%3E%3C/svg%3E"); width: 22px !important; height: 22px !important; margin: 0 !important; }
html.rg-js table.rg-datatable img[onclick] { cursor: pointer; }

/* Hinweis "Neues Dokument" in der Vertragskarte */
.rg-newpill {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; vertical-align: middle;
  padding: 2px 10px; border-radius: 999px; background: #FBEDE3; color: #9A3F10;
  font-size: 12px; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
}
.rg-newpill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #C2571A; }

/* Gekündigte/beendete Verträge: unten, etwas zurückgenommen */
html.rg-js table.rg-datatable tbody tr.rg-row-ended { opacity: .62; }
html.rg-js table.rg-datatable tbody tr.rg-row-ended:hover { opacity: 1; }
html.rg-js table.rg-datatable tbody tr.rg-row-endedhead td { padding-top: 28px !important; }

/* Symbolerklärung */
html.rg-js table.rg-legend, html.rg-js table.rg-legend tbody { display: block; width: 100% !important; }
html.rg-js table.rg-legend tr { display: flex !important; align-items: center; gap: 12px; padding: 6px 0; height: auto !important; border: 0 !important; }
html.rg-js table.rg-legend td { display: block !important; width: auto !important; height: auto !important; padding: 0 !important; border: 0 !important; }
html.rg-js table.rg-legend td:first-child { flex: 0 0 22px !important; line-height: 0; }
html.rg-js table.rg-legend font { color: var(--rg-muted) !important; font-size: 14px; }
html.rg-js tr.rg-legend-head font { font-style: normal !important; font-family: var(--rg-font) !important; font-size: 12px !important; font-weight: 500 !important; text-transform: uppercase; letter-spacing: .1em; color: var(--rg-muted) !important; }
html.rg-js tr.rg-legend-head div { margin-top: 28px !important; margin-bottom: 6px !important; }

html.rg-js table.rg-legend td:last-child { flex: 1 1 auto !important; text-align: left !important; }
.rg-newpill { display: flex; width: max-content; margin: 6px 0 0; }
