/* Portal Layout System V8
   Single Source of Truth fuer interne Shell, Header und Content-Frame.
   Alle internen Kernseiten ziehen dieselben Breiten, Hoehen und Slots.
*/

:root {
  --portal-frame-max: 1120px;
  --portal-frame-side: 24px;
  --portal-frame-bottom: 68px;
  --portal-shell-gap: 18px;

  --portal-bar-min-h: 54px;
  --portal-bar-wrap-pad-top: 12px;
  --portal-bar-wrap-pad-bottom: 10px;
  --portal-bar-pill-pad-y: 7px;
  --portal-bar-pill-pad-x: 8px;

  --portal-head-min-h: 196px;
  --portal-head-radius: 32px;
  --portal-head-pad-x: 34px;
  --portal-head-pad-y: 32px;
  --portal-head-copy-max: 760px;
  --portal-head-action-slot: 232px;
  --portal-head-actions-top: 22px;
  --portal-head-actions-right: 24px;

  --portal-surface-radius: 28px;
  --portal-surface-border: rgba(255, 255, 255, 0.62);
  --portal-surface-bg: rgba(248, 251, 252, 0.86);
  --portal-surface-shadow: 0 24px 60px rgba(12, 17, 22, 0.10);
  --portal-head-bg:
    radial-gradient(720px 300px at 10% 0%, rgba(108, 208, 201, 0.22), transparent 68%),
    radial-gradient(520px 220px at 100% 0%, rgba(208, 224, 228, 0.18), transparent 72%),
    linear-gradient(96deg, rgba(221, 241, 239, 0.94) 0%, rgba(236, 241, 238, 0.92) 56%, rgba(241, 243, 241, 0.94) 100%);
}

body[class*="portal-"] .portal-shell-wrap {
  width: min(var(--portal-frame-max), calc(100% - (var(--portal-frame-side) * 2))) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 10px 0 var(--portal-frame-bottom) !important;
  box-sizing: border-box;
}

body[class*="portal-"] .portal-shell-wrap > .portal-page-head,
body[class*="portal-"] .portal-shell-wrap > .portal-content-surface {
  width: 100%;
  box-sizing: border-box;
}

body[class*="portal-"] .portal-page-head {
  position: relative;
  display: grid;
  align-items: center;
  min-height: var(--portal-head-min-h);
  padding: var(--portal-head-pad-y) var(--portal-head-pad-x);
  border-radius: var(--portal-head-radius);
  border: 1px solid var(--portal-surface-border);
  background: var(--portal-head-bg);
  box-shadow: var(--portal-surface-shadow);
  overflow: hidden;
}

body[class*="portal-"] .portal-page-head.is-centered {
  justify-items: center;
  text-align: center;
}

body[class*="portal-"] .portal-page-head.has-actions {
  padding-right: calc(var(--portal-head-pad-x) + var(--portal-head-action-slot));
}

body[class*="portal-"] .portal-page-head-copy {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: var(--portal-head-copy-max);
}

body[class*="portal-"] .portal-page-head.is-centered .portal-page-head-copy {
  margin: 0 auto;
}

body[class*="portal-"] .portal-page-head.has-actions .portal-page-head-copy {
  max-width: min(var(--portal-head-copy-max), calc(100% - var(--portal-head-action-slot)));
}

body[class*="portal-"] .portal-page-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(46px, 6vw, 60px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0c1116;
}

body[class*="portal-"] .portal-page-lead {
  margin: 0;
  color: rgba(12, 17, 22, 0.68);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.72;
}

body[class*="portal-"] .portal-page-actions {
  position: absolute;
  top: var(--portal-head-actions-top);
  right: var(--portal-head-actions-right);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  max-width: calc(100% - 48px);
}

body[class*="portal-"] .portal-page-actions .btn,
body[class*="portal-"] .portal-page-actions a.btn,
body[class*="portal-"] .portal-page-actions .pill {
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(12, 17, 22, 0.08) !important;
}

body[class*="portal-"] .portal-page-actions .btn.secondary,
body[class*="portal-"] .portal-page-actions a.btn.secondary {
  background: rgba(255, 255, 255, 0.90) !important;
  border-color: rgba(12, 17, 22, 0.08) !important;
}

body[class*="portal-"] .portal-content-surface {
  margin-top: var(--portal-shell-gap) !important;
  border-radius: var(--portal-surface-radius) !important;
  border: 1px solid var(--portal-surface-border) !important;
  background: var(--portal-surface-bg) !important;
  box-shadow: var(--portal-surface-shadow) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

/* Kernseiten ziehen an dieselbe Aussenlogik */
body.portal-profile .card.wide.portal-content-surface,
body.portal-support .card.support-shell.portal-content-surface,
body.portal-ids .pageShell.portal-content-surface,
body.portal-funde .panel.portal-content-surface,
body.portal-admin-home .panel.portal-content-surface,
body.portal-admin-tickets .card.wide.portal-content-surface,
body.portal-admin-fundfaelle .dashboard-shell.portal-content-surface,
body.portal-admin-work-queue .panel.portal-content-surface {
  width: 100%;
  max-width: none;
}

body.portal-funde .bar .filters a[href="/dashboard.php"] {
  display: none !important;
}

html[data-theme="dark"] body[class*="portal-"] .portal-page-head {
  border-color: rgba(89, 134, 155, 0.26);
  background:
    radial-gradient(560px 230px at 12% 8%, rgba(18, 170, 162, 0.28), transparent 68%),
    radial-gradient(440px 190px at 88% 8%, rgba(31, 127, 168, 0.22), transparent 72%),
    linear-gradient(96deg, rgba(6, 31, 47, 0.95) 0%, rgba(8, 35, 53, 0.93) 55%, rgba(10, 28, 44, 0.95) 100%);
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32);
}

html[data-theme="dark"] body[class*="portal-"] .portal-page-title {
  color: #e7f4f9;
}

html[data-theme="dark"] body[class*="portal-"] .portal-page-lead {
  color: rgba(218, 233, 240, 0.76);
}

html[data-theme="dark"] body[class*="portal-"] .portal-page-actions .btn.secondary,
html[data-theme="dark"] body[class*="portal-"] .portal-page-actions a.btn.secondary {
  background: rgba(9, 31, 46, 0.82) !important;
  color: #e7f4f9 !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
}

html[data-theme="dark"] body[class*="portal-"] .portal-content-surface {
  border-color: rgba(89, 134, 155, 0.26) !important;
  background: rgba(6, 23, 35, 0.78) !important;
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32) !important;
}

@media (max-width: 920px) {
  :root {
    --portal-frame-side: 18px;
    --portal-frame-bottom: 56px;
    --portal-head-pad-x: 26px;
    --portal-head-pad-y: 28px;
    --portal-head-min-h: 176px;
  }

  body[class*="portal-"] .portal-page-title {
    font-size: clamp(40px, 8vw, 50px);
  }
}

@media (max-width: 640px) {
  :root {
    --portal-frame-side: 14px;
    --portal-frame-bottom: 42px;
    --portal-head-pad-x: 20px;
    --portal-head-pad-y: 24px;
    --portal-head-min-h: 0;
  }

  body[class*="portal-"] .portal-page-head {
    border-radius: 26px;
  }

  body[class*="portal-"] .portal-page-head.has-actions {
    padding-right: var(--portal-head-pad-x);
  }

  body[class*="portal-"] .portal-page-actions {
    position: static;
    max-width: none;
    justify-content: flex-start;
    margin: 0 0 8px;
  }

  body[class*="portal-"] .portal-page-head.has-actions .portal-page-head-copy {
    max-width: var(--portal-head-copy-max);
  }

  body[class*="portal-"] .portal-page-title {
    font-size: clamp(34px, 11vw, 42px);
  }

  body[class*="portal-"] .portal-page-lead {
    font-size: 15px;
    line-height: 1.6;
  }
}


/* Content System V6
   Eine gemeinsame Surface-, Card- und Modul-Familie fuer interne Kernseiten.
   Profil, Adminbereich und Arbeitskorb ziehen damit aus derselben Systemlogik.
*/

:root {
  --portal-card-radius: 24px;
  --portal-card-border: rgba(12, 17, 22, 0.08);
  --portal-card-bg: rgba(255, 255, 255, 0.90);
  --portal-card-bg-soft: rgba(255, 255, 255, 0.78);
  --portal-card-shadow: 0 10px 26px rgba(12, 17, 22, 0.06);
  --portal-card-pad: 18px;
  --portal-card-gap: 14px;
  --portal-section-radius: 24px;
  --portal-section-bg: rgba(255, 255, 255, 0.84);
  --portal-section-border: rgba(12, 17, 22, 0.08);
  --portal-section-shadow: 0 8px 22px rgba(12, 17, 22, 0.05);
}

body[class*="portal-"] .portal-content-surface > .inner,
body[class*="portal-"] .portal-content-surface > .content-body,
body[class*="portal-"] .portal-content-surface > .body.content,
body[class*="portal-"] .portal-content-surface > .body,
body[class*="portal-"] .portal-content-surface > .pageShellBody {
  padding: 22px !important;
}

body.portal-admin-home .grid,
body.portal-admin-work-queue .grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px !important;
  align-items: stretch !important;
  margin-top: 0 !important;
}

body.portal-admin-home .grid > .card,
body.portal-admin-work-queue .grid > .card {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  min-height: 232px !important;
  height: 100% !important;
  padding: 18px !important;
  border-radius: var(--portal-card-radius) !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
  overflow: hidden !important;
}

body.portal-admin-home .grid > .card > b,
body.portal-admin-work-queue .grid > .card > b {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  font-weight: 900 !important;
  color: #0c1116 !important;
}

body.portal-admin-home .grid > .card p,
body.portal-admin-work-queue .grid > .card p {
  margin: 0 !important;
  color: rgba(12, 17, 22, 0.66) !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
}

body.portal-admin-home .pill,
body.portal-admin-work-queue .pill,
body.portal-admin-work-queue .sectionCount {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 30px !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.80) !important;
  border: 1px solid rgba(12, 17, 22, 0.10) !important;
  color: rgba(12, 17, 22, 0.74) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.portal-admin-home .metaStats,
body.portal-admin-work-queue .pillRow {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-top: 2px !important;
}

body.portal-admin-home .card .btn.secondary,
body.portal-admin-work-queue .card .btn.secondary,
body.portal-admin-work-queue .actions .btn.secondary {
  margin-top: auto !important;
}

body.portal-admin-work-queue .actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: auto !important;
  padding-top: 8px !important;
}

body.portal-admin-work-queue details.section {
  margin-top: 18px !important;
  border-radius: var(--portal-section-radius) !important;
  border: 1px solid var(--portal-section-border) !important;
  background: var(--portal-section-bg) !important;
  box-shadow: var(--portal-section-shadow) !important;
  overflow: hidden !important;
}

body.portal-admin-work-queue .section summary {
  list-style: none !important;
  cursor: pointer !important;
  padding: 18px !important;
}

body.portal-admin-work-queue .section summary::-webkit-details-marker {
  display: none !important;
}

body.portal-admin-work-queue .sectionHead {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

body.portal-admin-work-queue .sectionHead h2 {
  margin: 0 !important;
  font-family: "Fraunces", serif !important;
  font-size: 30px !important;
  line-height: 1.08 !important;
  color: #0c1116 !important;
}

body.portal-admin-work-queue .sectionHead p {
  margin: 6px 0 0 !important;
  color: rgba(12, 17, 22, 0.64) !important;
  font-weight: 700 !important;
}

body.portal-admin-work-queue .sectionMeta {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

body.portal-admin-work-queue .sectionBody {
  display: none;
  padding: 0 18px 18px !important;
}

body.portal-admin-work-queue details.section[open] .sectionBody {
  display: block !important;
}

body.portal-admin-work-queue .chev {
  font-size: 14px !important;
  font-weight: 900 !important;
  color: rgba(12, 17, 22, 0.62) !important;
  transition: transform .15s ease;
}

body.portal-admin-work-queue details.section[open] .chev {
  transform: rotate(180deg) !important;
}

body.portal-admin-work-queue .list {
  display: grid !important;
  gap: 10px !important;
}

body.portal-admin-work-queue .item {
  display: grid !important;
  grid-template-columns: minmax(180px,1.35fr) minmax(120px,.9fr) minmax(160px,1fr) minmax(130px,.9fr) auto;
  gap: 12px !important;
  align-items: center !important;
  padding: 12px 14px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(12, 17, 22, 0.08) !important;
  background: rgba(255, 255, 255, 0.76) !important;
}

body.portal-admin-work-queue .itemMain strong {
  display: block !important;
  font-size: 15px !important;
}

body.portal-admin-work-queue .itemMain .muted,
body.portal-admin-work-queue .mini,
body.portal-admin-home .muted,
body.portal-admin-home .small {
  color: rgba(12, 17, 22, 0.62) !important;
  font-weight: 700 !important;
}

body.portal-admin-work-queue .empty {
  padding: 14px 16px !important;
  border-radius: 18px !important;
  border: 1px dashed rgba(12, 17, 22, 0.16) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  color: rgba(12, 17, 22, 0.58) !important;
  font-weight: 700 !important;
}

body.portal-profile .body.content.profile-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, .96fr) !important;
  gap: 20px !important;
  align-items: start !important;
  padding: 22px !important;
}

body.portal-profile .profile-main,
body.portal-profile .profile-side {
  display: grid !important;
  gap: 16px !important;
  min-width: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.portal-profile .profile-main > .form,
body.portal-profile .profile-side > .form {
  display: grid !important;
  gap: 16px !important;
  margin: 0 !important;
}

body.portal-profile .formCard,
body.portal-profile .profile-side-intro,
body.portal-profile .passwordCard,
body.portal-profile .actionCard:not(.actionInline) {
  border-radius: var(--portal-card-radius) !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
  padding: 18px 20px 20px !important;
}

body.portal-profile .actionInline {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 2px 0 0 !important;
  margin-top: 4px !important;
}

body.portal-profile .formSection {
  display: grid !important;
  gap: 12px !important;
  margin-top: 10px !important;
}

body.portal-profile .formSection + .formSection {
  margin-top: 10px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .row2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

body.portal-profile label {
  display: block !important;
  margin: 12px 0 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
  color: rgba(12, 17, 22, 0.78) !important;
}

body.portal-profile .field {
  min-height: 48px !important;
  border-radius: 13px !important;
  border: 1px solid rgba(12, 17, 22, 0.14) !important;
  background: #fff !important;
  padding: 11px 12px !important;
  box-shadow: none !important;
}

body.portal-profile .field:focus-within {
  border-color: rgba(14, 165, 160, 0.56) !important;
  box-shadow: 0 0 0 4px rgba(14, 165, 160, 0.18) !important;
}

body.portal-profile .field input,
body.portal-profile .field select {
  width: 100% !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--ink, #0c1116) !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

body.portal-profile .foot {
  margin: 0 22px 22px !important;
  padding: 16px 2px 0 !important;
  border-top: 1px solid rgba(12, 17, 22, 0.10) !important;
  color: rgba(43, 60, 71, 0.76) !important;
}

html[data-theme="dark"] body.portal-profile .formCard,
html[data-theme="dark"] body.portal-profile .profile-side-intro,
html[data-theme="dark"] body.portal-profile .passwordCard,
html[data-theme="dark"] body.portal-profile .actionCard:not(.actionInline),
html[data-theme="dark"] body.portal-admin-home .grid > .card,
html[data-theme="dark"] body.portal-admin-work-queue .grid > .card,
html[data-theme="dark"] body.portal-admin-work-queue details.section {
  background: rgba(8, 25, 37, 0.84) !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32) !important;
}

html[data-theme="dark"] body.portal-profile .field,
html[data-theme="dark"] body.portal-admin-work-queue .item,
html[data-theme="dark"] body.portal-admin-home .pill,
html[data-theme="dark"] body.portal-admin-work-queue .pill,
html[data-theme="dark"] body.portal-admin-work-queue .sectionCount,
html[data-theme="dark"] body.portal-admin-home .grid > .card,
html[data-theme="dark"] body.portal-admin-work-queue .grid > .card .pill {
  background: rgba(10, 28, 41, 0.80) !important;
  border-color: rgba(89, 134, 155, 0.24) !important;
  color: #dcecf3 !important;
}

html[data-theme="dark"] body.portal-profile label,
html[data-theme="dark"] body.portal-profile .foot,
html[data-theme="dark"] body.portal-admin-work-queue .sectionHead p,
html[data-theme="dark"] body.portal-admin-work-queue .mini,
html[data-theme="dark"] body.portal-admin-home .muted,
html[data-theme="dark"] body.portal-admin-home .small {
  color: rgba(218, 233, 240, 0.72) !important;
}

html[data-theme="dark"] body.portal-admin-home .grid > .card > b,
html[data-theme="dark"] body.portal-admin-work-queue .grid > .card > b,
html[data-theme="dark"] body.portal-admin-work-queue .sectionHead h2,
html[data-theme="dark"] body.portal-profile .field input,
html[data-theme="dark"] body.portal-profile .field select {
  color: #e7f4f9 !important;
}

@media (min-width: 1240px) {
  body.portal-admin-home .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.portal-profile .body.content.profile-layout,
  body.portal-admin-home .grid,
  body.portal-admin-work-queue .grid {
    grid-template-columns: 1fr !important;
  }

  body.portal-admin-work-queue .item {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.portal-admin-work-queue .item > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.portal-profile .row2 {
    grid-template-columns: 1fr !important;
  }

  body.portal-admin-home .portal-content-surface > .inner,
  body.portal-admin-work-queue .portal-content-surface > .inner,
  body.portal-admin-work-queue .sectionBody,
  body.portal-profile .body.content.profile-layout {
    padding: 16px !important;
  }
}


/* Restseiten Bridge V7
   Detail- und Admin-Unterseiten nutzen jetzt dieselbe Shell-Familie.
   Alte portal-fixes-Header fuer diese Gruppe sind aus dem aktiven Pfad entfernt.
*/

body.portal-funde-fall .wrap,
body.portal-admin-user .wrap,
body.portal-admin-users .wrap,
body.portal-admin-moderation .wrap,
body.portal-admin-notifications .wrap,
body.portal-admin-fundmeldung .wrap,
body.portal-admin-fundmeldungen .wrap,
body.portal-admin-ticket .wrap,
body.portal-admin-fundfall .wrap,
body.portal-admin-system-health .wrap,
body.portal-admin-mail-queue .wrap,
body.portal-admin-log .wrap {
  max-width: var(--portal-frame-max) !important;
  margin: 0 auto !important;
  padding: 10px var(--portal-frame-side) var(--portal-frame-bottom) !important;
  box-sizing: border-box !important;
}

body.portal-funde-fall .dashboard-shell.portal-content-surface,
body.portal-admin-user .dashboard-shell.portal-content-surface,
body.portal-admin-users .panel.portal-content-surface,
body.portal-admin-moderation .panel.portal-content-surface,
body.portal-admin-notifications .panel.portal-content-surface,
body.portal-admin-fundmeldung .dashboard-shell.portal-content-surface,
body.portal-admin-fundmeldungen .dashboard-shell.portal-content-surface,
body.portal-admin-ticket .dashboard-shell.portal-content-surface,
body.portal-admin-fundfall .dashboard-shell.portal-content-surface,
body.portal-admin-system-health .panel.portal-content-surface,
body.portal-admin-mail-queue .panel.portal-content-surface,
body.portal-admin-log .panel.portal-content-surface {
  width: 100% !important;
  border-radius: var(--portal-surface-radius) !important;
  border: 1px solid var(--portal-surface-border) !important;
  background: var(--portal-surface-bg) !important;
  box-shadow: var(--portal-surface-shadow) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  overflow: hidden !important;
}

body.portal-funde-fall .section-head,
body.portal-admin-user .section-head,
body.portal-admin-users .pageHead,
body.portal-admin-moderation .pageHead,
body.portal-admin-notifications .pageHead,
body.portal-admin-fundmeldung .section-head,
body.portal-admin-fundmeldungen .section-head,
body.portal-admin-ticket .section-head,
body.portal-admin-fundfall .section-head,
body.portal-admin-system-health .pageHead,
body.portal-admin-mail-queue .pageHead,
body.portal-admin-log .pageHead {
  position: relative !important;
  display: grid !important;
  gap: 14px !important;
  align-items: center !important;
  min-height: var(--portal-head-min-h) !important;
  margin: 0 !important;
  padding: var(--portal-head-pad-y) var(--portal-head-pad-x) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.52) !important;
  background: var(--portal-head-bg) !important;
}

body.portal-funde-fall .section-top,
body.portal-admin-user .section-top,
body.portal-admin-fundmeldung .section-top,
body.portal-admin-fundmeldungen .section-top,
body.portal-admin-ticket .section-top,
body.portal-admin-fundfall .section-top {
  display: block !important;
}

body.portal-admin-users .pageHeadTitle,
body.portal-admin-moderation .pageHeadTitle,
body.portal-admin-notifications .pageHeadTitle,
body.portal-admin-system-health .pageHeadTitle,
body.portal-admin-mail-queue .pageHeadTitle,
body.portal-admin-log .pageHeadTitle,
body.portal-funde-fall .section-top > :first-child,
body.portal-admin-user .section-top > :first-child,
body.portal-admin-fundmeldung .section-top > :first-child,
body.portal-admin-fundmeldungen .section-top > :first-child,
body.portal-admin-ticket .section-top > :first-child,
body.portal-admin-fundfall .section-top > :first-child {
  max-width: min(var(--portal-head-copy-max), calc(100% - var(--portal-head-action-slot))) !important;
  min-width: 0 !important;
}

body.portal-funde-fall .section-head h1,
body.portal-admin-user .section-head h1,
body.portal-admin-users .pageHeadTitle h1,
body.portal-admin-moderation .pageHeadTitle h1,
body.portal-admin-notifications .pageHeadTitle h1,
body.portal-admin-fundmeldung .section-head h1,
body.portal-admin-fundmeldungen .section-head h1,
body.portal-admin-ticket .section-head h1,
body.portal-admin-fundfall .section-head h1,
body.portal-admin-system-health .pageHeadTitle h1,
body.portal-admin-mail-queue .pageHeadTitle h1,
body.portal-admin-log .pageHeadTitle h1 {
  margin: 0 !important;
  font-family: "Fraunces", serif !important;
  font-size: clamp(46px, 6vw, 60px) !important;
  line-height: 0.98 !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
  color: #0c1116 !important;
}

body.portal-funde-fall .section-head .lead,
body.portal-admin-user .section-head .lead,
body.portal-admin-users .pageHeadTitle .lead,
body.portal-admin-moderation .pageHeadTitle .lead,
body.portal-admin-notifications .pageHeadTitle .lead,
body.portal-admin-fundmeldung .section-head .lead,
body.portal-admin-fundmeldungen .section-head .lead,
body.portal-admin-ticket .section-head .lead,
body.portal-admin-fundfall .section-head .lead,
body.portal-admin-system-health .pageHeadTitle .lead,
body.portal-admin-mail-queue .pageHeadTitle .lead,
body.portal-admin-log .pageHeadTitle .lead {
  margin: 0 !important;
  color: rgba(12, 17, 22, 0.68) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.72 !important;
  max-width: var(--portal-head-copy-max) !important;
}

body.portal-admin-users .pageHeadActions,
body.portal-admin-moderation .pageHeadActions,
body.portal-admin-notifications .pageHeadActions,
body.portal-admin-system-health .pageHeadActions,
body.portal-admin-mail-queue .pageHeadActions,
body.portal-admin-log .pageHeadActions,
body.portal-funde-fall .section-actions,
body.portal-admin-user .section-actions,
body.portal-admin-fundmeldung .section-actions,
body.portal-admin-fundmeldungen .section-actions,
body.portal-admin-ticket .section-actions,
body.portal-admin-fundfall .section-actions {
  position: absolute !important;
  top: var(--portal-head-actions-top) !important;
  right: var(--portal-head-actions-right) !important;
  z-index: 4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  max-width: calc(100% - 48px) !important;
  margin: 0 !important;
}

body.portal-admin-users .inner,
body.portal-admin-moderation .inner,
body.portal-admin-notifications .inner,
body.portal-admin-system-health .inner,
body.portal-admin-mail-queue .inner,
body.portal-admin-log .inner,
body.portal-funde-fall .content-body,
body.portal-admin-user .content-body,
body.portal-admin-fundmeldung .content-body,
body.portal-admin-fundmeldungen .content-body,
body.portal-admin-ticket .content-body,
body.portal-admin-fundfall .content-body {
  padding: 22px !important;
}

html[data-theme="dark"] body.portal-funde-fall .dashboard-shell.portal-content-surface,
html[data-theme="dark"] body.portal-admin-user .dashboard-shell.portal-content-surface,
html[data-theme="dark"] body.portal-admin-users .panel.portal-content-surface,
html[data-theme="dark"] body.portal-admin-moderation .panel.portal-content-surface,
html[data-theme="dark"] body.portal-admin-notifications .panel.portal-content-surface,
html[data-theme="dark"] body.portal-admin-fundmeldung .dashboard-shell.portal-content-surface,
html[data-theme="dark"] body.portal-admin-fundmeldungen .dashboard-shell.portal-content-surface,
html[data-theme="dark"] body.portal-admin-ticket .dashboard-shell.portal-content-surface,
html[data-theme="dark"] body.portal-admin-fundfall .dashboard-shell.portal-content-surface,
html[data-theme="dark"] body.portal-admin-system-health .panel.portal-content-surface,
html[data-theme="dark"] body.portal-admin-mail-queue .panel.portal-content-surface,
html[data-theme="dark"] body.portal-admin-log .panel.portal-content-surface {
  border-color: rgba(89, 134, 155, 0.26) !important;
  background: rgba(6, 23, 35, 0.78) !important;
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32) !important;
}

html[data-theme="dark"] body.portal-funde-fall .section-head,
html[data-theme="dark"] body.portal-admin-user .section-head,
html[data-theme="dark"] body.portal-admin-users .pageHead,
html[data-theme="dark"] body.portal-admin-moderation .pageHead,
html[data-theme="dark"] body.portal-admin-notifications .pageHead,
html[data-theme="dark"] body.portal-admin-fundmeldung .section-head,
html[data-theme="dark"] body.portal-admin-fundmeldungen .section-head,
html[data-theme="dark"] body.portal-admin-ticket .section-head,
html[data-theme="dark"] body.portal-admin-fundfall .section-head,
html[data-theme="dark"] body.portal-admin-system-health .pageHead,
html[data-theme="dark"] body.portal-admin-mail-queue .pageHead,
html[data-theme="dark"] body.portal-admin-log .pageHead {
  background:
    radial-gradient(560px 230px at 12% 8%, rgba(18, 170, 162, 0.28), transparent 68%),
    radial-gradient(440px 190px at 88% 8%, rgba(31, 127, 168, 0.22), transparent 72%),
    linear-gradient(96deg, rgba(6, 31, 47, 0.95) 0%, rgba(8, 35, 53, 0.93) 55%, rgba(10, 28, 44, 0.95) 100%) !important;
  border-bottom-color: rgba(89, 134, 155, 0.26) !important;
}

html[data-theme="dark"] body.portal-funde-fall .section-head h1,
html[data-theme="dark"] body.portal-admin-user .section-head h1,
html[data-theme="dark"] body.portal-admin-users .pageHeadTitle h1,
html[data-theme="dark"] body.portal-admin-moderation .pageHeadTitle h1,
html[data-theme="dark"] body.portal-admin-notifications .pageHeadTitle h1,
html[data-theme="dark"] body.portal-admin-fundmeldung .section-head h1,
html[data-theme="dark"] body.portal-admin-fundmeldungen .section-head h1,
html[data-theme="dark"] body.portal-admin-ticket .section-head h1,
html[data-theme="dark"] body.portal-admin-fundfall .section-head h1,
html[data-theme="dark"] body.portal-admin-system-health .pageHeadTitle h1,
html[data-theme="dark"] body.portal-admin-mail-queue .pageHeadTitle h1,
html[data-theme="dark"] body.portal-admin-log .pageHeadTitle h1 {
  color: #e7f4f9 !important;
}

html[data-theme="dark"] body.portal-funde-fall .section-head .lead,
html[data-theme="dark"] body.portal-admin-user .section-head .lead,
html[data-theme="dark"] body.portal-admin-users .pageHeadTitle .lead,
html[data-theme="dark"] body.portal-admin-moderation .pageHeadTitle .lead,
html[data-theme="dark"] body.portal-admin-notifications .pageHeadTitle .lead,
html[data-theme="dark"] body.portal-admin-fundmeldung .section-head .lead,
html[data-theme="dark"] body.portal-admin-fundmeldungen .section-head .lead,
html[data-theme="dark"] body.portal-admin-ticket .section-head .lead,
html[data-theme="dark"] body.portal-admin-fundfall .section-head .lead,
html[data-theme="dark"] body.portal-admin-system-health .pageHeadTitle .lead,
html[data-theme="dark"] body.portal-admin-mail-queue .pageHeadTitle .lead,
html[data-theme="dark"] body.portal-admin-log .pageHeadTitle .lead {
  color: rgba(218, 233, 240, 0.76) !important;
}

@media (max-width: 640px) {
  body.portal-admin-users .pageHeadActions,
  body.portal-admin-moderation .pageHeadActions,
  body.portal-admin-notifications .pageHeadActions,
  body.portal-admin-system-health .pageHeadActions,
  body.portal-admin-mail-queue .pageHeadActions,
  body.portal-admin-log .pageHeadActions,
  body.portal-funde-fall .section-actions,
  body.portal-admin-user .section-actions,
  body.portal-admin-fundmeldung .section-actions,
  body.portal-admin-fundmeldungen .section-actions,
  body.portal-admin-ticket .section-actions,
  body.portal-admin-fundfall .section-actions {
    position: static !important;
    justify-content: flex-start !important;
    max-width: none !important;
  }

  body.portal-admin-users .pageHeadTitle,
  body.portal-admin-moderation .pageHeadTitle,
  body.portal-admin-notifications .pageHeadTitle,
  body.portal-admin-system-health .pageHeadTitle,
  body.portal-admin-mail-queue .pageHeadTitle,
  body.portal-admin-log .pageHeadTitle,
  body.portal-funde-fall .section-top > :first-child,
  body.portal-admin-user .section-top > :first-child,
  body.portal-admin-fundmeldung .section-top > :first-child,
  body.portal-admin-fundmeldungen .section-top > :first-child,
  body.portal-admin-ticket .section-top > :first-child,
  body.portal-admin-fundfall .section-top > :first-child {
    max-width: none !important;
  }
}


/* Admin Components V8
   Einheitliche Filterleisten, Listen- und Tabellenmodule fuer Admin-Restseiten.
   Ziel: gleiche Content-Familie statt seitenlokaler Mini-Systeme.
*/
:root {
  --portal-admin-tool-radius: 22px;
  --portal-admin-tool-pad: 14px;
  --portal-admin-tool-gap: 12px;
  --portal-admin-control-h: 46px;
  --portal-admin-list-gap: 14px;
  --portal-admin-row-radius: 22px;
  --portal-admin-row-pad: 18px;
  --portal-admin-table-min: 980px;
  --portal-admin-soft-bg: rgba(255, 255, 255, 0.72);
  --portal-admin-soft-border: rgba(12, 17, 22, 0.08);
}

body.portal-admin-notifications .bar,
body.portal-admin-moderation .bar,
body.portal-admin-mail-queue .filtersWrap,
body.portal-admin-fundmeldungen .bar {
  display: grid !important;
  gap: var(--portal-admin-tool-gap) !important;
  margin-top: 14px !important;
  padding: var(--portal-admin-tool-pad) !important;
  border-radius: var(--portal-admin-tool-radius) !important;
  border: 1px solid var(--portal-admin-soft-border) !important;
  background: var(--portal-admin-soft-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-admin-notifications .bar > *,
body.portal-admin-moderation .bar > *,
body.portal-admin-mail-queue .filtersWrap > *,
body.portal-admin-fundmeldungen .bar > * {
  min-width: 0 !important;
}

body.portal-admin-notifications .field,
body.portal-admin-moderation .field,
body.portal-admin-mail-queue .input,
body.portal-admin-mail-queue .select,
body.portal-admin-fundmeldungen .field {
  min-height: var(--portal-admin-control-h) !important;
  height: var(--portal-admin-control-h) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(12, 17, 22, 0.12) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  font-weight: 700 !important;
}

body.portal-admin-notifications .field:focus,
body.portal-admin-moderation .field:focus,
body.portal-admin-mail-queue .input:focus,
body.portal-admin-mail-queue .select:focus,
body.portal-admin-fundmeldungen .field:focus {
  outline: none !important;
  border-color: rgba(14, 165, 160, 0.46) !important;
  box-shadow: 0 0 0 4px rgba(14, 165, 160, 0.16) !important;
}

body.portal-admin-notifications .list,
body.portal-admin-moderation .queue-list,
body.portal-admin-fundmeldungen .reportList {
  display: grid !important;
  gap: var(--portal-admin-list-gap) !important;
  margin-top: 14px !important;
}

body.portal-admin-notifications .row {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: flex-start !important;
  padding: var(--portal-admin-row-pad) !important;
  border-radius: var(--portal-admin-row-radius) !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-admin-notifications .ttl {
  font-size: 18px !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
}

body.portal-admin-notifications .body {
  margin-top: 6px !important;
  color: rgba(12, 17, 22, 0.72) !important;
  font-weight: 650 !important;
  line-height: 1.65 !important;
}

body.portal-admin-notifications .meta,
body.portal-admin-notifications .small,
body.portal-admin-mail-queue .meta {
  color: rgba(12, 17, 22, 0.58) !important;
  font-weight: 700 !important;
}

body.portal-admin-notifications .chip {
  min-height: 36px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(12, 17, 22, 0.10) !important;
  background: rgba(255, 255, 255, 0.84) !important;
}

body.portal-admin-notifications .empty,
body.portal-admin-moderation .queue-empty {
  padding: 18px !important;
  border-radius: 20px !important;
  border: 1px dashed rgba(12, 17, 22, 0.16) !important;
  background: rgba(255, 255, 255, 0.64) !important;
  color: rgba(12, 17, 22, 0.58) !important;
  font-weight: 700 !important;
}

body.portal-admin-moderation .filters {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}

body.portal-admin-moderation .filters input.field[type="search"] {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
}

body.portal-admin-moderation .q-item {
  border-left: 0 !important;
  border-top: 3px solid rgba(12, 17, 22, 0.08) !important;
  border-radius: 22px !important;
  padding: 18px !important;
  background: var(--portal-card-bg) !important;
  border-color: var(--portal-card-border) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-admin-moderation .q-item[data-status="pending"] { border-top-color: rgba(14, 165, 160, 0.72) !important; }
body.portal-admin-moderation .q-item[data-status="in_progress"] { border-top-color: rgba(246, 180, 60, 0.82) !important; }
body.portal-admin-moderation .q-item[data-status="resolved"] { border-top-color: rgba(34, 197, 94, 0.72) !important; }
body.portal-admin-moderation .q-item[data-status="rejected"] { border-top-color: rgba(239, 68, 68, 0.72) !important; }

body.portal-admin-moderation .q-head {
  padding-bottom: 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-admin-moderation .q-body {
  grid-template-columns: minmax(0, 1fr) 220px !important;
  gap: 16px !important;
  margin-top: 0 !important;
}

body.portal-admin-moderation .q-main-title {
  font-size: 18px !important;
  line-height: 1.34 !important;
}

body.portal-admin-moderation .q-main-sub,
body.portal-admin-moderation .q-preview-line,
body.portal-admin-moderation .mini {
  color: rgba(12, 17, 22, 0.60) !important;
  font-weight: 700 !important;
}

body.portal-admin-moderation .q-actions {
  gap: 10px !important;
  padding-left: 16px !important;
  border-left: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-admin-moderation .q-actions .btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
}

body.portal-admin-mail-queue .pageHeadTools {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

body.portal-admin-mail-queue .pageHeadTools form,
body.portal-admin-mail-queue .actions form {
  margin: 0 !important;
}

body.portal-admin-mail-queue .filters {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 180px 180px auto !important;
  gap: 10px !important;
  margin: 0 !important;
}

body.portal-admin-mail-queue .portal-table-wrap {
  margin-top: 12px !important;
  overflow-x: auto !important;
  border-radius: 22px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: rgba(255, 255, 255, 0.76) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-admin-mail-queue .portal-data-table {
  width: 100% !important;
  min-width: var(--portal-admin-table-min) !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: transparent !important;
}

body.portal-admin-mail-queue .portal-data-table th,
body.portal-admin-mail-queue .portal-data-table td {
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(12, 17, 22, 0.06) !important;
}

body.portal-admin-mail-queue .portal-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(244, 248, 249, 0.96) !important;
  color: rgba(12, 17, 22, 0.56) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}

body.portal-admin-mail-queue .portal-data-table tbody tr:hover td {
  background: rgba(14, 165, 160, 0.05) !important;
}

body.portal-admin-mail-queue .portal-data-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

body.portal-admin-mail-queue .kindTag {
  max-width: 220px !important;
  white-space: normal !important;
  word-break: break-word !important;
}

body.portal-admin-mail-queue .pager,
body.portal-admin-fundmeldungen .pager {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 16px !important;
}

body.portal-admin-fundmeldungen .filters {
  display: grid !important;
  grid-template-columns: 180px 180px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
}

body.portal-admin-fundmeldungen .reportItem {
  grid-template-columns: minmax(220px, .92fr) minmax(0, 1.35fr) 220px !important;
  gap: 18px !important;
  padding: 18px !important;
  border-radius: 24px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-admin-fundmeldungen .ticketMeta,
body.portal-admin-fundmeldungen .pill-row,
body.portal-admin-fundmeldung .pill-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

body.portal-admin-fundmeldungen .statusPill,
body.portal-admin-fundmeldung .pill,
body.portal-admin-mail-queue .tag {
  min-height: 32px !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(12, 17, 22, 0.10) !important;
  background: rgba(255, 255, 255, 0.84) !important;
  font-weight: 850 !important;
}

body.portal-admin-fundmeldungen .detailGrid,
body.portal-admin-fundmeldung .detail-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body.portal-admin-fundmeldungen .detailGrid > div,
body.portal-admin-fundmeldungen .timeCard,
body.portal-admin-fundmeldung .mini-card {
  padding: 18px !important;
  border-radius: 22px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: none !important;
}

body.portal-admin-fundmeldungen .subject,
body.portal-admin-fundmeldung .v,
body.portal-admin-fundmeldung .v-sm {
  color: #0c1116 !important;
}

body.portal-admin-fundmeldungen .muted,
body.portal-admin-fundmeldungen .metaLabel,
body.portal-admin-fundmeldung .muted,
body.portal-admin-fundmeldung .k,
body.portal-admin-fundmeldung .action-copy {
  color: rgba(12, 17, 22, 0.60) !important;
  font-weight: 700 !important;
}

body.portal-admin-fundmeldungen .sideCol {
  gap: 14px !important;
}

body.portal-admin-fundmeldungen .actionStack {
  gap: 10px !important;
}

body.portal-admin-fundmeldungen .actionStack .btn,
body.portal-admin-fundmeldung .actions-grid .btn,
body.portal-admin-fundmeldung .actions-grid button {
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
}

body.portal-admin-fundmeldung .surface {
  border-radius: 24px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-admin-fundmeldung .message-head,
body.portal-admin-fundmeldung .action-head {
  background: rgba(12, 17, 22, 0.02) !important;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08) !important;
}

html[data-theme="dark"] body.portal-admin-notifications .bar,
html[data-theme="dark"] body.portal-admin-moderation .bar,
html[data-theme="dark"] body.portal-admin-mail-queue .filtersWrap,
html[data-theme="dark"] body.portal-admin-fundmeldungen .bar,
html[data-theme="dark"] body.portal-admin-notifications .row,
html[data-theme="dark"] body.portal-admin-moderation .q-item,
html[data-theme="dark"] body.portal-admin-mail-queue .portal-table-wrap,
html[data-theme="dark"] body.portal-admin-fundmeldungen .reportItem,
html[data-theme="dark"] body.portal-admin-fundmeldungen .detailGrid > div,
html[data-theme="dark"] body.portal-admin-fundmeldungen .timeCard,
html[data-theme="dark"] body.portal-admin-fundmeldung .surface,
html[data-theme="dark"] body.portal-admin-fundmeldung .mini-card,
html[data-theme="dark"] body.portal-admin-notifications .empty,
html[data-theme="dark"] body.portal-admin-moderation .queue-empty {
  background: rgba(8, 25, 37, 0.82) !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32) !important;
}

html[data-theme="dark"] body.portal-admin-notifications .field,
html[data-theme="dark"] body.portal-admin-moderation .field,
html[data-theme="dark"] body.portal-admin-mail-queue .input,
html[data-theme="dark"] body.portal-admin-mail-queue .select,
html[data-theme="dark"] body.portal-admin-fundmeldungen .field {
  background: rgba(6, 23, 35, 0.92) !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
  color: #e7f4f9 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.portal-admin-notifications .body,
html[data-theme="dark"] body.portal-admin-notifications .meta,
html[data-theme="dark"] body.portal-admin-notifications .small,
html[data-theme="dark"] body.portal-admin-moderation .q-main-sub,
html[data-theme="dark"] body.portal-admin-moderation .q-preview-line,
html[data-theme="dark"] body.portal-admin-moderation .mini,
html[data-theme="dark"] body.portal-admin-mail-queue .meta,
html[data-theme="dark"] body.portal-admin-fundmeldungen .muted,
html[data-theme="dark"] body.portal-admin-fundmeldungen .metaLabel,
html[data-theme="dark"] body.portal-admin-fundmeldung .muted,
html[data-theme="dark"] body.portal-admin-fundmeldung .k,
html[data-theme="dark"] body.portal-admin-fundmeldung .action-copy {
  color: rgba(218, 233, 240, 0.76) !important;
}

html[data-theme="dark"] body.portal-admin-moderation .q-head,
html[data-theme="dark"] body.portal-admin-moderation .q-actions,
html[data-theme="dark"] body.portal-admin-fundmeldung .message-head,
html[data-theme="dark"] body.portal-admin-fundmeldung .action-head {
  border-color: rgba(89, 134, 155, 0.26) !important;
}

html[data-theme="dark"] body.portal-admin-mail-queue .portal-data-table th {
  background: rgba(7, 29, 43, 0.96) !important;
  color: rgba(218, 233, 240, 0.68) !important;
}

html[data-theme="dark"] body.portal-admin-mail-queue .portal-data-table tbody tr:hover td {
  background: rgba(12, 56, 72, 0.18) !important;
}

html[data-theme="dark"] body.portal-admin-fundmeldungen .statusPill,
html[data-theme="dark"] body.portal-admin-fundmeldung .pill,
html[data-theme="dark"] body.portal-admin-mail-queue .tag,
html[data-theme="dark"] body.portal-admin-notifications .chip {
  background: rgba(6, 23, 35, 0.88) !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
  color: #e7f4f9 !important;
}

html[data-theme="dark"] body.portal-admin-fundmeldungen .subject,
html[data-theme="dark"] body.portal-admin-fundmeldung .v,
html[data-theme="dark"] body.portal-admin-fundmeldung .v-sm,
html[data-theme="dark"] body.portal-admin-notifications .ttl,
html[data-theme="dark"] body.portal-admin-moderation .q-main-title {
  color: #e7f4f9 !important;
}

@media (max-width: 900px) {
  body.portal-admin-moderation .filters,
  body.portal-admin-mail-queue .filters,
  body.portal-admin-fundmeldungen .filters {
    grid-template-columns: 1fr 1fr !important;
  }

  body.portal-admin-mail-queue .filters > :first-child,
  body.portal-admin-fundmeldungen .filters > :nth-child(3),
  body.portal-admin-moderation .filters input.field[type="search"] {
    grid-column: 1 / -1 !important;
  }

  body.portal-admin-fundmeldungen .reportItem,
  body.portal-admin-moderation .q-body {
    grid-template-columns: 1fr !important;
  }

  body.portal-admin-moderation .q-actions {
    border-left: 0 !important;
    border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
    padding-left: 0 !important;
    padding-top: 12px !important;
  }
}

@media (max-width: 640px) {
  body.portal-admin-notifications .row {
    grid-template-columns: 1fr !important;
  }

  body.portal-admin-notifications .row > :first-child {
    order: 2;
  }

  body.portal-admin-notifications .row > :last-child {
    justify-self: start !important;
  }

  body.portal-admin-moderation .filters,
  body.portal-admin-mail-queue .filters,
  body.portal-admin-fundmeldungen .filters,
  body.portal-admin-fundmeldungen .detailGrid,
  body.portal-admin-fundmeldung .detail-grid,
  body.portal-admin-fundmeldung .actions-grid {
    grid-template-columns: 1fr !important;
  }

  body.portal-admin-mail-queue .pageHeadTools,
  body.portal-admin-mail-queue .pageHeadTools form,
  body.portal-admin-mail-queue .pageHeadTools .btn {
    width: 100% !important;
  }

  body.portal-admin-fundmeldungen .actionStack .btn,
  body.portal-admin-fundmeldung .actions-grid .btn,
  body.portal-admin-fundmeldung .actions-grid button {
    min-width: 0 !important;
  }
}


/* Rest-Ausreisser Cleanup V9
   Profil zieht nicht mehr an portal-fixes, Admin-Log nutzt dieselbe Head-/Table-Familie
   wie die restlichen internen Seiten.
*/
body.portal-profile .portal-shell-wrap {
  padding-top: 10px !important;
}

body.portal-admin-log .filters {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 180px 220px 150px !important;
  gap: 10px !important;
  margin: 0 0 14px !important;
}

body.portal-admin-log .input,
body.portal-admin-log .select {
  min-height: var(--portal-admin-control-h) !important;
  height: var(--portal-admin-control-h) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(12, 17, 22, 0.12) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  font-weight: 700 !important;
}

body.portal-admin-log .input:focus,
body.portal-admin-log .select:focus {
  outline: none !important;
  border-color: rgba(14, 165, 160, 0.46) !important;
  box-shadow: 0 0 0 4px rgba(14, 165, 160, 0.16) !important;
}

body.portal-admin-log .flash,
body.portal-admin-log .detailCard,
body.portal-admin-log .tableWrap,
body.portal-admin-log details.metaD {
  border-radius: 22px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-admin-log .detailItem {
  border-radius: 20px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: rgba(255, 255, 255, 0.82) !important;
}

body.portal-admin-log .tableWrap {
  margin-top: 14px !important;
  overflow-x: auto !important;
}

body.portal-admin-log table {
  width: 100% !important;
  min-width: var(--portal-admin-table-min) !important;
}

body.portal-admin-log th {
  background: rgba(244, 248, 249, 0.96) !important;
  color: rgba(12, 17, 22, 0.56) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}

body.portal-admin-log tbody tr:hover {
  background: rgba(14, 165, 160, 0.05) !important;
}

html[data-theme="dark"] body.portal-admin-log .input,
html[data-theme="dark"] body.portal-admin-log .select {
  background: rgba(6, 23, 35, 0.92) !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
  color: #e7f4f9 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.portal-admin-log .flash,
html[data-theme="dark"] body.portal-admin-log .detailCard,
html[data-theme="dark"] body.portal-admin-log .detailItem,
html[data-theme="dark"] body.portal-admin-log .tableWrap,
html[data-theme="dark"] body.portal-admin-log details.metaD {
  background: rgba(8, 25, 37, 0.82) !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32) !important;
}

html[data-theme="dark"] body.portal-admin-log th {
  background: rgba(7, 29, 43, 0.96) !important;
  color: rgba(218, 233, 240, 0.68) !important;
}

@media (max-width: 900px) {
  body.portal-admin-log .filters {
    grid-template-columns: 1fr 1fr !important;
  }

  body.portal-admin-log .filters > :first-child {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 640px) {
  body.portal-admin-log .filters {
    grid-template-columns: 1fr !important;
  }
}


/* Portal Rollout Helpers V12 */
body[class*="portal-"] .portal-inline-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin: 0 0 16px;
}

body[class*="portal-"] .portal-inline-actions form { margin:0; }

body[class*="portal-"] .portal-inline-actions .pill {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
}

body[class*="portal-"] .portal-section-gap { margin-top: 16px; }

@media (max-width: 760px) {
  body[class*="portal-"] .portal-inline-actions { width:100%; }
}


/* Rest-Ausreisser Cleanup V11
   Profil unter festem Head neu sortiert. Admin-Seiten ziehen den Head jetzt
   als echtes Shell-Element oberhalb der Surface und nicht mehr im Innenpanel.
*/
body.portal-profile .body.content.profile-layout {
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, .84fr) !important;
  gap: 18px !important;
}

body.portal-profile .profile-main {
  gap: 0 !important;
}

body.portal-profile .requiredCard {
  display: grid !important;
}

body.portal-profile .requiredCard .profileMainActions {
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-side {
  gap: 14px !important;
}


/* Profil Redesign V15
   Profil auf saubere Zwei-Spalten-Logik reduziert.
   Links eine ruhige Hauptform, rechts zwei klare Sicherheitskarten.
*/
body.portal-profile .body.content.profile-redesign-body {
  padding: 24px !important;
}

body.portal-profile .profile-redesign-grid,
body.portal-profile .profile-redesign-grid-clean {
  display: grid !important;
  grid-template-columns: minmax(0, 1.34fr) minmax(320px, 0.86fr) !important;
  gap: 22px !important;
  align-items: start !important;
}

body.portal-profile .profile-pane-main {
  min-width: 0 !important;
}

body.portal-profile .profile-security-stack {
  display: grid !important;
  gap: 18px !important;
  min-width: 0 !important;
}

body.portal-profile .profile-pane {
  display: grid !important;
  gap: 18px !important;
  min-width: 0 !important;
  padding: 26px !important;
  border-radius: 26px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-profile .profile-pane-main {
  gap: 20px !important;
}

body.portal-profile .profile-pane-head {
  display: block !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-kicker {
  margin: 0 0 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: #0ea5a0 !important;
}

body.portal-profile .profile-pane-head h2,
body.portal-profile .profile-actions h3,
body.portal-profile .profile-block-head h3 {
  margin: 0 !important;
  color: #0c1116 !important;
}

body.portal-profile .profile-pane-head h2 {
  font-size: clamp(26px, 2vw, 34px) !important;
  line-height: 1.06 !important;
}

body.portal-profile .profile-pane-head p,
body.portal-profile .profile-actions p,
body.portal-profile .profile-help,
body.portal-profile .profile-redesign-alert span {
  margin: 8px 0 0 !important;
  color: rgba(43, 60, 71, 0.76) !important;
}

body.portal-profile .profile-block {
  display: grid !important;
  gap: 14px !important;
}

body.portal-profile .profile-block + .profile-block {
  padding-top: 18px !important;
  border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-block-head h3,
body.portal-profile .profile-actions h3 {
  font-size: 18px !important;
  line-height: 1.2 !important;
}

body.portal-profile .profile-form-grid {
  display: grid !important;
  gap: 14px !important;
}

body.portal-profile .profile-form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.portal-profile .profile-field-group {
  display: grid !important;
  gap: 7px !important;
  min-width: 0 !important;
}

body.portal-profile .profile-field-group label {
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  color: rgba(12, 17, 22, 0.78) !important;
}

body.portal-profile .profile-input {
  width: 100% !important;
  min-height: 50px !important;
  padding: 13px 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(12, 17, 22, 0.13) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0c1116 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  outline: none !important;
  box-sizing: border-box !important;
}

body.portal-profile .profile-input:focus {
  border-color: rgba(14, 165, 160, 0.56) !important;
  box-shadow: 0 0 0 4px rgba(14, 165, 160, 0.16) !important;
}

body.portal-profile .profile-input[readonly] {
  background: rgba(246, 249, 250, 0.96) !important;
  color: rgba(12, 17, 22, 0.74) !important;
}

body.portal-profile .profile-help {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body.portal-profile .profile-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  align-items: center !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-actions-compact {
  margin-top: -2px !important;
}

body.portal-profile .profile-action-buttons {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

body.portal-profile .profile-redesign-alert {
  display: grid !important;
  gap: 4px !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(196, 49, 49, 0.18) !important;
  background: rgba(196, 49, 49, 0.08) !important;
  color: #7a1f1f !important;
}

body.portal-profile .profile-redesign-alert-success {
  border-color: rgba(14, 165, 160, 0.22) !important;
  background: rgba(14, 165, 160, 0.10) !important;
  color: #0f5132 !important;
}

html[data-theme="dark"] body.portal-profile .profile-pane {
  background: rgba(8, 25, 37, 0.84) !important;
  border-color: rgba(89, 134, 155, 0.26) !important;
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32) !important;
}

html[data-theme="dark"] body.portal-profile .profile-pane-head,
html[data-theme="dark"] body.portal-profile .profile-block + .profile-block,
html[data-theme="dark"] body.portal-profile .profile-actions {
  border-color: rgba(89, 134, 155, 0.20) !important;
}

html[data-theme="dark"] body.portal-profile .profile-pane-head h2,
html[data-theme="dark"] body.portal-profile .profile-actions h3,
html[data-theme="dark"] body.portal-profile .profile-block-head h3,
html[data-theme="dark"] body.portal-profile .profile-field-group label,
html[data-theme="dark"] body.portal-profile .profile-input {
  color: #e7f4f9 !important;
}

html[data-theme="dark"] body.portal-profile .profile-pane-head p,
html[data-theme="dark"] body.portal-profile .profile-actions p,
html[data-theme="dark"] body.portal-profile .profile-help,
html[data-theme="dark"] body.portal-profile .profile-redesign-alert span {
  color: rgba(218, 233, 240, 0.72) !important;
}

html[data-theme="dark"] body.portal-profile .profile-input {
  background: rgba(10, 28, 41, 0.82) !important;
  border-color: rgba(89, 134, 155, 0.24) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.portal-profile .profile-input[readonly] {
  background: rgba(8, 24, 36, 0.92) !important;
  color: rgba(231, 244, 249, 0.72) !important;
}

@media (max-width: 980px) {
  body.portal-profile .profile-redesign-grid,
  body.portal-profile .profile-redesign-grid-clean {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  body.portal-profile .body.content.profile-redesign-body,
  body.portal-profile .profile-pane {
    padding: 16px !important;
  }

  body.portal-profile .profile-form-grid-2,
  body.portal-profile .profile-actions {
    grid-template-columns: 1fr !important;
  }

  body.portal-profile .profile-action-buttons {
    width: 100% !important;
    justify-content: stretch !important;
  }

  body.portal-profile .profile-action-buttons > * {
    width: 100% !important;
  }
}


/* Profil Redesign V16
   Rechte Sicherheitskarten entquetscht.
   Aktionen und Hinweise in rechter Spalte werden jetzt sauber gestapelt.
*/
body.portal-profile .profile-redesign-grid,
body.portal-profile .profile-redesign-grid-clean {
  grid-template-columns: minmax(0, 1.38fr) minmax(360px, 0.9fr) !important;
}

body.portal-profile .profile-pane-security .profile-pane-head h2 {
  font-size: clamp(22px, 1.8vw, 30px) !important;
  line-height: 1.08 !important;
}

body.portal-profile .profile-pane-security .profile-actions,
body.portal-profile .profile-actions-stack {
  grid-template-columns: 1fr !important;
  align-items: start !important;
  gap: 14px !important;
}

body.portal-profile .profile-pane-security .profile-actions > div:first-child,
body.portal-profile .profile-actions-stack > div:first-child {
  min-width: 0 !important;
}

body.portal-profile .profile-pane-security .profile-actions h3,
body.portal-profile .profile-actions-stack h3 {
  max-width: none !important;
}

body.portal-profile .profile-pane-security .profile-action-buttons,
body.portal-profile .profile-actions-stack .profile-action-buttons {
  width: 100% !important;
  justify-content: flex-start !important;
}

body.portal-profile .profile-pane-security .profile-action-buttons > * ,
body.portal-profile .profile-actions-stack .profile-action-buttons > * {
  min-width: 0 !important;
}

@media (max-width: 1100px) {
  body.portal-profile .profile-redesign-grid,
  body.portal-profile .profile-redesign-grid-clean {
    grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.9fr) !important;
  }
}


/* Profil Settings Layout V17
   Linke Kategoriennavigation, rechts Bearbeitungsbereich.
   Ohne JS, robust als Settings-Layout mit Sprungmarken.
*/
body.portal-profile .body.content.profile-redesign-body {
  padding: 24px !important;
}

body.portal-profile .profile-settings-shell {
  display: grid !important;
  grid-template-columns: minmax(220px, 248px) minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: start !important;
}

body.portal-profile .profile-settings-sidebar {
  position: sticky !important;
  top: 24px !important;
  display: grid !important;
  gap: 16px !important;
  padding: 18px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(12, 17, 22, 0.08) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 12px 34px rgba(11, 22, 33, 0.06) !important;
  backdrop-filter: blur(12px) !important;
}

body.portal-profile .profile-settings-sidebar-head h2,
body.portal-profile .profile-settings-card-head h2,
body.portal-profile .profile-settings-section-head h3,
body.portal-profile .profile-settings-save h3 {
  margin: 0 !important;
  color: #0c1116 !important;
}

body.portal-profile .profile-settings-sidebar-head h2 {
  font-size: 24px !important;
  line-height: 1.08 !important;
}

body.portal-profile .profile-settings-sidebar-head p,
body.portal-profile .profile-settings-sidebar-user span,
body.portal-profile .profile-settings-card-head p,
body.portal-profile .profile-settings-section-head p,
body.portal-profile .profile-settings-save p {
  margin: 6px 0 0 !important;
  color: rgba(43, 60, 71, 0.76) !important;
}

body.portal-profile .profile-settings-sidebar-user {
  display: grid !important;
  gap: 4px !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
  background: rgba(14, 165, 160, 0.08) !important;
  border: 1px solid rgba(14, 165, 160, 0.14) !important;
}

body.portal-profile .profile-settings-sidebar-user strong {
  color: #0c1116 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

body.portal-profile .profile-settings-nav {
  display: grid !important;
  gap: 8px !important;
}

body.portal-profile .profile-settings-nav-link {
  display: grid !important;
  gap: 3px !important;
  padding: 12px 14px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(12, 17, 22, 0.08) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: inherit !important;
  text-decoration: none !important;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease !important;
}

body.portal-profile .profile-settings-nav-link:hover,
body.portal-profile .profile-settings-nav-link:focus-visible {
  border-color: rgba(14, 165, 160, 0.34) !important;
  box-shadow: 0 10px 24px rgba(14, 165, 160, 0.10) !important;
  transform: translateY(-1px) !important;
  outline: none !important;
}

body.portal-profile .profile-settings-nav-label {
  color: #0c1116 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

body.portal-profile .profile-settings-nav-meta {
  color: rgba(43, 60, 71, 0.68) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.portal-profile .profile-settings-content {
  display: grid !important;
  gap: 20px !important;
  min-width: 0 !important;
}

body.portal-profile .profile-settings-card {
  display: grid !important;
  gap: 18px !important;
  min-width: 0 !important;
  padding: 24px !important;
  border-radius: 24px !important;
  border: 1px solid var(--portal-card-border) !important;
  background: var(--portal-card-bg) !important;
  box-shadow: var(--portal-card-shadow) !important;
}

body.portal-profile .profile-settings-card-head {
  display: block !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-settings-card-head h2 {
  font-size: clamp(28px, 2.2vw, 36px) !important;
  line-height: 1.06 !important;
}

body.portal-profile .profile-settings-section {
  display: grid !important;
  gap: 14px !important;
  scroll-margin-top: 120px !important;
}

body.portal-profile .profile-settings-section + .profile-settings-section {
  padding-top: 18px !important;
  border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-settings-section-head h3,
body.portal-profile .profile-settings-save h3 {
  font-size: 20px !important;
  line-height: 1.18 !important;
}

body.portal-profile .profile-settings-save {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  align-items: center !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-settings-save-actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

body.portal-profile .profile-settings-card-side .profile-settings-card-head h2 {
  font-size: clamp(24px, 1.8vw, 30px) !important;
}

body.portal-profile .profile-settings-card-side .profile-settings-save,
body.portal-profile .profile-settings-save-side {
  grid-template-columns: 1fr !important;
  align-items: start !important;
}

body.portal-profile .profile-settings-card-side .profile-settings-save-actions,
body.portal-profile .profile-settings-save-side .profile-settings-save-actions {
  justify-content: flex-start !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar,
html[data-theme="dark"] body.portal-profile .profile-settings-card {
  background: rgba(8, 25, 37, 0.84) !important;
  border-color: rgba(89, 134, 155, 0.24) !important;
  box-shadow: 0 24px 60px rgba(3, 10, 16, 0.32) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user {
  background: rgba(14, 165, 160, 0.12) !important;
  border-color: rgba(14, 165, 160, 0.22) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-link {
  background: rgba(10, 28, 41, 0.88) !important;
  border-color: rgba(89, 134, 155, 0.22) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-head h2,
html[data-theme="dark"] body.portal-profile .profile-settings-card-head h2,
html[data-theme="dark"] body.portal-profile .profile-settings-section-head h3,
html[data-theme="dark"] body.portal-profile .profile-settings-save h3,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user strong,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-label {
  color: #e7f4f9 !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-head p,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user span,
html[data-theme="dark"] body.portal-profile .profile-settings-card-head p,
html[data-theme="dark"] body.portal-profile .profile-settings-section-head p,
html[data-theme="dark"] body.portal-profile .profile-settings-save p,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-meta {
  color: rgba(218, 233, 240, 0.72) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-card-head,
html[data-theme="dark"] body.portal-profile .profile-settings-section + .profile-settings-section,
html[data-theme="dark"] body.portal-profile .profile-settings-save {
  border-color: rgba(89, 134, 155, 0.18) !important;
}

@media (max-width: 1020px) {
  body.portal-profile .profile-settings-shell {
    grid-template-columns: 1fr !important;
  }

  body.portal-profile .profile-settings-sidebar {
    position: static !important;
  }
}

@media (max-width: 720px) {
  body.portal-profile .profile-settings-card,
  body.portal-profile .profile-settings-sidebar,
  body.portal-profile .body.content.profile-redesign-body {
    padding: 16px !important;
  }

  body.portal-profile .profile-settings-save,
  body.portal-profile .profile-form-grid-2 {
    grid-template-columns: 1fr !important;
  }

  body.portal-profile .profile-settings-save-actions {
    width: 100% !important;
    justify-content: stretch !important;
  }

  body.portal-profile .profile-settings-save-actions > * {
    width: 100% !important;
  }
}


/* Profil Settings Dynamic V20
   Sidebar klarer integriert, Profilkopf luftiger und Navigation ruhiger.
*/
body.portal-profile .profile-settings-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

body.portal-profile .profile-settings-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(12, 17, 22, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(12, 17, 22, 0.05);
}

body.portal-profile .profile-settings-sidebar-head {
  display: grid;
  gap: 12px;
}

body.portal-profile .profile-settings-sidebar-head-identity {
  padding-bottom: 4px;
}

body.portal-profile .profile-settings-sidebar-user {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(18, 170, 162, 0.18);
  background: linear-gradient(180deg, rgba(224, 244, 242, 0.72), rgba(233, 244, 246, 0.54));
}

body.portal-profile .profile-role-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
}

body.portal-profile .profile-role-sidebar-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body.portal-profile .profile-settings-sidebar-user h2,
body.portal-profile .profile-settings-sidebar-user strong {
  margin: 0;
  font-size: 22px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  word-break: break-word;
}

body.portal-profile .profile-settings-sidebar-user span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(11.5px, 0.74vw, 13px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: rgba(12, 17, 22, 0.62);
  word-break: normal;
}

body.portal-profile .profile-role-badge {
  justify-self: start;
  margin-top: 4px;
}

body.portal-profile .profile-settings-nav-wrap {
  display: grid;
  gap: 10px;
}

body.portal-profile .profile-settings-nav-title {
  margin: 0;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(12, 17, 22, 0.42);
}

body.portal-profile .profile-settings-nav {
  display: grid;
  gap: 8px;
}

body.portal-profile .profile-settings-nav-link {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 13px 16px 13px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(12, 17, 22, 0.07);
  box-shadow: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body.portal-profile .profile-settings-nav-link::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

body.portal-profile .profile-settings-nav-link::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(12, 17, 22, 0.12);
  transform: translateY(-50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

body.portal-profile .profile-settings-nav-link:hover,
body.portal-profile .profile-settings-nav-link:focus-visible {
  border-color: rgba(18, 170, 162, 0.18);
  background: rgba(246, 251, 251, 0.98);
  transform: translateY(-1px);
}

body.portal-profile .profile-settings-nav-link.is-active,
body.portal-profile .profile-settings-nav-link[aria-current='page'] {
  border-color: rgba(18, 170, 162, 0.28);
  background: rgba(226, 243, 241, 0.64);
  box-shadow: 0 10px 22px rgba(18, 170, 162, 0.08);
}

body.portal-profile .profile-settings-nav-link.is-active::before,
body.portal-profile .profile-settings-nav-link[aria-current='page']::before {
  background: #12aaa2;
}

body.portal-profile .profile-settings-nav-link.is-active::after,
body.portal-profile .profile-settings-nav-link[aria-current='page']::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  background: #12aaa2;
}

body.portal-profile .profile-settings-nav-label {
  padding-right: 20px;
  font-weight: 700;
  line-height: 1.3;
}

body.portal-profile .profile-settings-nav-link.is-active .profile-settings-nav-label,
body.portal-profile .profile-settings-nav-link[aria-current='page'] .profile-settings-nav-label {
  color: #0c1116;
}

body.portal-profile .profile-settings-nav-meta {
  padding-right: 20px;
  font-size: 12px;
  line-height: 1.4;
}


body.portal-profile .profile-settings-nav-link.is-disabled,
body.portal-profile .profile-settings-nav-link[aria-disabled='true'] {
  border-color: rgba(12, 17, 22, 0.05);
  background: rgba(12, 17, 22, 0.025);
  box-shadow: none;
  cursor: default;
  transform: none;
}

body.portal-profile .profile-settings-nav-link.is-disabled:hover,
body.portal-profile .profile-settings-nav-link.is-disabled:focus-visible,
body.portal-profile .profile-settings-nav-link[aria-disabled='true']:hover,
body.portal-profile .profile-settings-nav-link[aria-disabled='true']:focus-visible {
  border-color: rgba(12, 17, 22, 0.05);
  background: rgba(12, 17, 22, 0.025);
  transform: none;
}

body.portal-profile .profile-settings-nav-link.is-disabled::before,
body.portal-profile .profile-settings-nav-link.is-disabled::after,
body.portal-profile .profile-settings-nav-link[aria-disabled='true']::before,
body.portal-profile .profile-settings-nav-link[aria-disabled='true']::after {
  opacity: 0;
}

body.portal-profile .profile-settings-nav-link.is-disabled .profile-settings-nav-label,
body.portal-profile .profile-settings-nav-link.is-disabled .profile-settings-nav-meta,
body.portal-profile .profile-settings-nav-link[aria-disabled='true'] .profile-settings-nav-label,
body.portal-profile .profile-settings-nav-link[aria-disabled='true'] .profile-settings-nav-meta {
  color: rgba(43, 60, 71, 0.46);
}

body.portal-profile .profile-settings-nav-link.is-disabled .profile-settings-nav-icon,
body.portal-profile .profile-settings-nav-link[aria-disabled='true'] .profile-settings-nav-icon {
  opacity: 0.42;
  filter: grayscale(1);
}

body.portal-profile .profile-settings-stage {
  min-width: 0;
}

body.portal-profile .profile-settings-panel {
  display: block;
  padding: 34px;
  border-radius: 24px;
  border: 1px solid rgba(12, 17, 22, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(12, 17, 22, 0.05);
  scroll-margin-top: 120px;
}

html.profile-settings-ready body.portal-profile .profile-settings-panel {
  display: none;
}

html.profile-settings-ready body.portal-profile .profile-settings-panel.is-active {
  display: block;
}

body.portal-profile .profile-settings-panel-head {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08);
}

body.portal-profile .profile-settings-panel-head h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 3vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #0c1116;
}

body.portal-profile .profile-settings-panel-head p {
  margin: 0;
  color: rgba(12, 17, 22, 0.62);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
  max-width: 720px;
}

body.portal-profile .profile-settings-panel-body {
  display: grid;
  gap: 24px;
  padding-top: 24px;
}

body.portal-profile .profile-settings-panel .profile-form-grid {
  gap: 18px;
}

body.portal-profile .profile-settings-panel .profile-form-grid-2 {
  gap: 14px;
}

body.portal-profile .profile-settings-panel .profile-field-group {
  display: grid;
  gap: 8px;
}

body.portal-profile .profile-settings-note {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(18, 170, 162, 0.16);
  background: rgba(229, 244, 243, 0.38);
}

body.portal-profile .profile-settings-note h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #0c1116;
}

body.portal-profile .profile-settings-note p {
  margin: 0;
  color: rgba(12, 17, 22, 0.64);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
}

body.portal-profile .profile-settings-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid rgba(12, 17, 22, 0.08);
}

body.portal-profile .profile-settings-panel-actions .btn {
  min-width: 160px;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar,
html[data-theme="dark"] body.portal-profile .profile-settings-panel {
  border-color: rgba(89, 134, 155, 0.26);
  background: rgba(6, 23, 35, 0.84);
  box-shadow: 0 18px 34px rgba(3, 10, 16, 0.22);
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user {
  border-color: rgba(66, 172, 170, 0.24);
  background: rgba(10, 52, 70, 0.48);
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-title,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user span {
  color: rgba(218, 233, 240, 0.72);
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-link:hover,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link:focus-visible,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-active,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-current='page'],
html[data-theme="dark"] body.portal-profile .profile-settings-note {
  background: rgba(10, 52, 70, 0.52);
  border-color: rgba(66, 172, 170, 0.24);
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-link::after {
  background: rgba(218, 233, 240, 0.24);
}

html[data-theme="dark"] body.portal-profile .profile-settings-panel-head {
  border-bottom-color: rgba(89, 134, 155, 0.24);
}

html[data-theme="dark"] body.portal-profile .profile-settings-panel-actions {
  border-top-color: rgba(89, 134, 155, 0.24);
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-panel-head h2,
html[data-theme="dark"] body.portal-profile .profile-settings-note h3,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user h2,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-active .profile-settings-nav-label,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-current='page'] .profile-settings-nav-label {
  color: #e7f4f9;
}

html[data-theme="dark"] body.portal-profile .profile-settings-panel-head p,
html[data-theme="dark"] body.portal-profile .profile-settings-note p {
  color: rgba(218, 233, 240, 0.74);
}

@media (max-width: 920px) {
  body.portal-profile .profile-settings-shell {
    grid-template-columns: 1fr;
  }

  body.portal-profile .profile-settings-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  body.portal-profile .profile-settings-panel,
  body.portal-profile .profile-settings-sidebar {
    padding: 20px;
    border-radius: 20px;
  }

  body.portal-profile .profile-settings-sidebar-user {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  body.portal-profile .profile-role-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 20px;
  }

  body.portal-profile .profile-settings-sidebar-user h2,
  body.portal-profile .profile-settings-sidebar-user strong {
    font-size: 18px;
  }

  body.portal-profile .profile-settings-panel-head h2 {
    font-size: clamp(28px, 9vw, 34px);
  }

  body.portal-profile .profile-settings-panel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.portal-profile .profile-settings-panel-actions .btn {
    width: 100%;
    min-width: 0;
  }
}


/* Profil Darkmode Cleanup V1
   Profil zieht im Darkmode auf dieselben neutralen Dashboard-Surfaces.
*/
html[data-theme="dark"] body.portal-profile .profile-settings-shell {
  grid-template-columns: 252px minmax(0, 1fr) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-stage,
html[data-theme="dark"] body.portal-profile .profile-settings-panel {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar,
html[data-theme="dark"] body.portal-profile .profile-settings-panel,
html[data-theme="dark"] body.portal-profile .profile-settings-note {
  background: linear-gradient(180deg, rgba(30,32,37,.96), rgba(22,24,28,.98)) !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 20px 56px rgba(0,0,0,.22) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link:hover,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link:focus-visible,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-active,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-current='page'] {
  background: linear-gradient(180deg, rgba(37,40,46,.96), rgba(28,31,36,.98)) !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-link::after {
  background: rgba(255,255,255,.18) !important;
}


html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-disabled,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-disabled='true'] {
  background: rgba(255,255,255,.02) !important;
  border-color: rgba(255,255,255,.05) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-disabled:hover,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-disabled:focus-visible,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-disabled='true']:hover,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-disabled='true']:focus-visible {
  background: rgba(255,255,255,.02) !important;
  border-color: rgba(255,255,255,.05) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-disabled .profile-settings-nav-label,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-disabled .profile-settings-nav-meta,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-disabled='true'] .profile-settings-nav-label,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-disabled='true'] .profile-settings-nav-meta {
  color: rgba(214,222,226,.42) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-disabled .profile-settings-nav-icon,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-disabled='true'] .profile-settings-nav-icon {
  opacity: .36;
  filter: grayscale(1);
}

html[data-theme="dark"] body.portal-profile .profile-settings-panel-head,
html[data-theme="dark"] body.portal-profile .profile-settings-panel-actions,
html[data-theme="dark"] body.portal-profile .profile-settings-card-head,
html[data-theme="dark"] body.portal-profile .profile-settings-section + .profile-settings-section,
html[data-theme="dark"] body.portal-profile .profile-settings-save {
  border-color: rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-head h2,
html[data-theme="dark"] body.portal-profile .profile-settings-panel-head h2,
html[data-theme="dark"] body.portal-profile .profile-settings-note h3,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user h2,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user strong,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-label,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link.is-active .profile-settings-nav-label,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-link[aria-current='page'] .profile-settings-nav-label {
  color: #eef1f3 !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-head p,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar-user span,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-title,
html[data-theme="dark"] body.portal-profile .profile-settings-nav-meta,
html[data-theme="dark"] body.portal-profile .profile-settings-panel-head p,
html[data-theme="dark"] body.portal-profile .profile-settings-note p {
  color: rgba(214,222,226,.74) !important;
}

html[data-theme="dark"] body.portal-profile .profile-input {
  background: linear-gradient(180deg, rgba(17,19,23,.96), rgba(13,15,18,.98)) !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02) !important;
}

html[data-theme="dark"] body.portal-profile .profile-input:focus {
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,.04) !important;
}


/* Profil Unified Cleanup V2
   Dashboard-Breite bleibt die Aussenreferenz.
   Profil nutzt dieselbe Frame-Logik ohne eigene Mindestbreiten oder theme-spezifische Split-Regeln. */
body.portal-profile .body.content.profile-redesign-body {
  padding: 24px !important;
  min-width: 0 !important;
}

body.portal-profile .portal-content-surface,
body.portal-profile .portal-content-surface > .body.content.profile-redesign-body,
body.portal-profile .profile-settings-shell,
body.portal-profile .profile-settings-sidebar,
body.portal-profile .profile-settings-stage,
body.portal-profile .profile-settings-panel,
body.portal-profile .profile-settings-panel-main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.portal-profile .profile-settings-shell {
  display: grid !important;
  grid-template-columns: clamp(248px, 22vw, 280px) minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: start !important;
}

body.portal-profile .profile-settings-sidebar {
  position: sticky !important;
  top: 18px !important;
  align-self: start !important;
}

body.portal-profile .profile-settings-stage {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  justify-items: stretch !important;
}

body.portal-profile .profile-settings-panel,
body.portal-profile .profile-settings-panel-main {
  display: block !important;
  inline-size: 100% !important;
  justify-self: stretch !important;
  padding: 32px !important;
}

body.portal-profile .profile-settings-panel-body,
body.portal-profile .profile-settings-panel-body > *,
body.portal-profile .profile-settings-panel .profile-form-grid,
body.portal-profile .profile-settings-panel .profile-form-grid-2,
body.portal-profile .profile-settings-panel .profile-field-group,
body.portal-profile .profile-type-grid,
body.portal-profile .profile-type-card,
body.portal-profile .profile-org-fields,
body.portal-profile .profile-org-block,
body.portal-profile .profile-avatar-copy,
body.portal-profile .profile-avatar-upload-group,
body.portal-profile .profile-role-sidebar-copy {
  min-width: 0 !important;
}

body.portal-profile .profile-settings-panel .profile-form-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body.portal-profile .profile-avatar-card {
  display: grid !important;
  grid-template-columns: minmax(168px, 190px) minmax(0, 1fr) !important;
  gap: 24px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body.portal-profile .profile-settings-panel-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 22px !important;
  padding-top: 22px !important;
  border-top: 1px solid rgba(12, 17, 22, 0.08) !important;
}

body.portal-profile .profile-settings-panel-actions > [data-save-state],
body.portal-profile .profile-settings-panel-actions .profile-save-state {
  grid-column: 1 !important;
  margin: 0 !important;
  min-width: 0 !important;
  white-space: normal !important;
}

body.portal-profile .profile-settings-panel-actions .btn {
  min-width: 148px !important;
  width: auto !important;
}

body.portal-profile .profile-settings-panel-actions > .btn.primary,
body.portal-profile .profile-settings-panel-actions > button.btn.primary,
body.portal-profile .profile-settings-panel-actions > input.btn.primary[type="submit"] {
  grid-column: 2 !important;
  justify-self: end !important;
}

body.portal-profile .profile-settings-panel-actions > .btn.secondary,
body.portal-profile .profile-settings-panel-actions > a.btn.secondary {
  grid-column: 3 !important;
  justify-self: start !important;
}

html[data-theme="dark"] body.portal-profile .profile-settings-shell,
html[data-theme="dark"] body.portal-profile .profile-settings-sidebar,
html[data-theme="dark"] body.portal-profile .profile-settings-stage,
html[data-theme="dark"] body.portal-profile .profile-settings-panel,
html[data-theme="dark"] body.portal-profile .profile-settings-panel-main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

@media (max-width: 1180px) {
  body.portal-profile .profile-settings-shell {
    grid-template-columns: clamp(228px, 24vw, 264px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 980px) {
  body.portal-profile .profile-settings-shell {
    grid-template-columns: 1fr !important;
  }

  body.portal-profile .profile-settings-sidebar {
    position: static !important;
  }
}

@media (max-width: 760px) {
  body.portal-profile .profile-settings-panel,
  body.portal-profile .profile-settings-sidebar {
    padding: 22px !important;
  }

  body.portal-profile .profile-avatar-card,
  body.portal-profile .profile-settings-panel .profile-form-grid-2,
  body.portal-profile .profile-type-grid,
  body.portal-profile .profile-settings-panel-actions {
    grid-template-columns: 1fr !important;
  }

  body.portal-profile .profile-settings-panel-actions > [data-save-state],
  body.portal-profile .profile-settings-panel-actions .profile-save-state,
  body.portal-profile .profile-settings-panel-actions > .btn.primary,
  body.portal-profile .profile-settings-panel-actions > button.btn.primary,
  body.portal-profile .profile-settings-panel-actions > input.btn.primary[type="submit"],
  body.portal-profile .profile-settings-panel-actions > .btn.secondary,
  body.portal-profile .profile-settings-panel-actions > a.btn.secondary,
  body.portal-profile .profile-settings-panel-actions .btn {
    grid-column: auto !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

