.automation-stack {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.overview-actions {
  max-width: 420px;
  flex-shrink: 0
}

.mail-trigger-status {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted-text);
  margin-top: 10px
}

.mail-trigger-status[data-state=error] {
  color: #a92a2a
}

.mail-trigger-status[data-state=success] {
  color: var(--success-text)
}

.reminder-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff3ce;
  color: #65542b;
  font-size: 11px;
  margin-left: auto
}

.reminder-count[hidden] {
  display: none
}

.reminder-list:empty {
  display: none
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e8e3ee;
  border-radius: var(--panel-radius)
}

.catalog-filters label {
  display: flex;
  flex: 1 1 180px;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #51495d
}

.catalog-filters input,
.catalog-filters select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--interactive-border);
  border-radius: 10px;
  background: #fff;
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 400;
  color: #40374f
}

.catalog-filters input:focus,
.catalog-filters select:focus {
  outline: 2px solid #f9bd16;
  outline-offset: 1px
}

.catalog-filters p {
  flex: 1 1 280px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-text)
}

.matrix-filters {
  border: 0;
  border-bottom: 1px solid #eeeaf2;
  border-radius: 0
}

.catalog-caption {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted-text);
  overflow-wrap: anywhere
}

.metadata-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px
}

.metadata-tags .pill {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%
}

.rule-summary {
  margin-top: 8px
}

.editor-metadata,
.editor-rules {
  margin-top: 22px;
  margin-bottom: 22px
}

.rule-options {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto
}

.rule-options[hidden] {
  display: none
}

.rule-options .rule-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--interactive-border);
  border-radius: 10px;
  background: #fff;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere
}

.rule-check input[type=checkbox] {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: #4b4263;
  flex-shrink: 0
}

.rule-check:has(input:checked) {
  border-color: #a391bb;
  background: #f6f2fb
}

.portal-open {
  font-size: 11px;
  font-weight: 700;
  color: #4b4263;
  margin-right: 5px
}

.portal-card-footer>div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end
}

.portal-card,
.portal-summary {
  overflow-wrap: anywhere
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 70px #0003
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #eeeaf2;
  flex-shrink: 0
}

.dialog-heading h2 {
  font-size: 20px;
  font-weight: 900;
  color: #40374f
}

.dialog-heading p {
  font-size: 13px;
  color: var(--muted-text);
  margin-top: 3px
}

.dialog-heading button {
  padding: 8px;
  border-radius: 10px
}

.dialog-content {
  padding: 24px;
  overflow-y: auto;
  min-height: 0
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #eeeaf2
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--form-stack-gap)
}

.form-stack label,
.form-columns label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #51495d
}

.form-stack input:not([type=checkbox]),
.form-stack select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e2dce9;
  border-radius: 11px;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  color: #40374f;
  min-width: 0
}

.form-stack input:focus,
.form-stack select:focus {
  outline: 2px solid #ffcf4d;
  outline-offset: 1px
}

.form-stack small {
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--muted-text)
}

.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.form-stack .check-line {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  line-height: 1.6
}

.check-line input[type=checkbox] {
  accent-color: #4b4263;
  margin-top: 4px;
  flex-shrink: 0;
  width: 17px;
  height: 17px
}

.form-box {
  padding: 18px;
  border: 1px solid #e2dce9;
  border-radius: var(--panel-radius);
  background: #faf9fc
}

.form-box legend {
  padding: 0 7px;
  font-size: 13px;
  font-weight: 800;
  color: #4b4263
}

.info-note {
  padding: 13px 15px;
  border: 1px solid #e6dbaa;
  border-radius: 12px;
  background: #fffbed;
  font-size: 13px;
  line-height: 1.7;
  color: #65542b
}

.info-note.error {
  background: #fff3f3;
  border-color: #f4cdcd;
  color: #a92a2a
}

.info-note.success {
  background: #eaf7f3;
  border-color: #bfe5d9;
  color: var(--success-text)
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  padding: 11px 15px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center
}

.primary-button {
  background: #f9bd16;
  color: #29202f;
  border: 1px solid #ecb00b
}

.primary-button:hover {
  background: #ffcf4d
}

.secondary-button {
  background: #f5f2f8;
  color: #4b4263;
  border: 1px solid #dcd5e6
}

.secondary-button:hover {
  background: #ebe5f1
}

button:disabled {
  opacity: .45;
  cursor: not-allowed
}

[hidden] {
  display: none!important
}

.eyebrow {
  font-size: 11px!important;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800
}

.show-job-matrix {
  display: block;
  margin-top: 10px;
  line-height: 1.7
}

.support-rule select[multiple],
#portalDepartmentChoices {
  min-height: 110px
}

.portal-overview-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px
}

.portal-overview-footer p {
  flex: 1 1 320px
}

.catalog-filters small {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted-text)
}

.catalog-filters select:disabled {
  background: #f5f3f7;
  color: #81798b;
  cursor: not-allowed
}

.job-classification-filters {
  align-items: flex-start
}

.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px
}

.format-toolbar button {
  font: inherit;
  font-size: 12px;
  padding: 5px 9px;
  border: 1px solid #dcd5e6;
  border-radius: 7px;
  background: #f5f2f8;
  color: #4b4263
}

.formatted-text {
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  color: #51495d
}

.formatted-text ul {
  list-style: disc;
  padding-left: 22px
}

.formatted-text strong {
  font-weight: 800
}

.formatted-text em {
  font-style: italic
}

.formatted-text p {
  margin: 5px 0
}

.format-preview {
  border: 1px solid #e5dfeb;
  border-radius: 10px;
  background: #faf9fc;
  padding: 10px;
  margin-top: 8px;
  min-height: 36px
}

.format-preview:empty:before {
  content: 'Formatvorschau · Listen, **fett**, _kursiv_';
  font-size: 12px;
  color: #8a8194
}

.plain-copy summary {
  font-size: 11px;
  cursor: pointer;
  color: #81798b;
  margin: 8px 0
}

.portal-notes {
  margin-top: 12px;
  border-radius: 10px;
  background: #fff9e9;
  padding: 10px;
  font-size: 12px;
  line-height: 1.7
}

.portal-notes p {
  white-space: pre-wrap;
  overflow-wrap: anywhere
}

.portal-notes strong {
  display: block;
  margin-top: 5px
}

.form-stack textarea {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--interactive-border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 400
}

.posting-actions {
  display: grid;
  gap: 12px
}

.posting-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px
}

.posting-action small {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-text)
}

.posting-action button:disabled {
  opacity: .5
}

.posting-audit {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted-text)
}

.content-panel {
  padding: 18px;
  border: 1px solid var(--surface-border);
  border-radius: var(--panel-radius);
  background: #fff
}

.content-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: #4b4263
}

.catalog-add {
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  color: #66527c;
  padding: 5px 0
}

.taxonomy-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.taxonomy-choices button {
  padding: 6px 9px;
  background: #f5f2f8;
  border: 1px solid #dcd5e6;
  border-radius: 8px;
  font-size: 12px
}

.taxonomy-choices button[aria-pressed=true] {
  background: #fff1b5;
  border-color: #e9bb36
}

.support-rule {
  padding: 12px;
  border: 1px solid var(--interactive-border);
  border-radius: 12px;
  min-width: 0
}

.support-rule select[multiple] {
  min-height: 95px
}

.support-rule-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 800
}

.matrix-caption {
  padding: 0 20px 12px
}

.rule-check small {
  display: block
}

.rule-check.incompatible {
  border-color: #e4c7c4;
  background: #fff7f6
}

.portal-selection-note {
  grid-column: 1/-1;
  font-size: 12px;
  color: var(--muted-text)
}

.rule-exclusions {
  grid-column: 1/-1
}

.rule-exclusions summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 0
}

.rule-exclusions .rule-options {
  margin-top: 8px
}

.history-item {
  padding: 15px;
  border: 1px solid #e3ddea;
  border-radius: 13px;
  background: #fff;
  overflow-wrap: anywhere
}

.history-item .pill {
  margin-top: 5px
}

#sidebar nav {
  overflow-y: auto;
  min-height: 0
}

#jobForm select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--interactive-border);
  border-radius: 10px;
  background: #fff;
  min-width: 0
}

#manualPostingForm input:disabled {
  background: #f4f2f7
}

#portalAuditContent,
#archiveList {
  overflow-wrap: anywhere
}

.portal-summary {
  padding: 15px;
  background: #faf9fc;
  border: 1px solid #e8e3ee;
  border-radius: 14px;
  min-width: 0
}

.portal-summary h3 {
  font-size: 13px;
  font-weight: 800;
  color: #4b4263
}

.portal-number {
  font-size: 25px;
  font-weight: 900;
  color: #40374f
}

.portal-summary p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-text)
}

.quota-bar {
  height: 5px;
  border-radius: 9px;
  background: #ece6f2;
  margin: 10px 0;
  overflow: hidden
}

.quota-bar span {
  display: block;
  height: 100%;
  background: #008c82
}

.quota-bar.full span {
  background: #c24135
}

.target-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--interactive-border);
  border-radius: 14px;
  background: #fff
}

.target-card input {
  width: 18px;
  height: 18px;
  accent-color: #4b4263;
  margin-top: 4px;
  flex-shrink: 0
}

.target-card:has(input:checked) {
  border-color: #a391bb;
  background: #f6f2fb
}

.target-card:has(input:disabled) {
  background: #f7f7f8;
  color: #8a8591
}

.target-card h3 {
  font-size: 14px;
  font-weight: 800;
  color: #40374f
}

.target-card p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted-text);
  margin-top: 4px
}

.target-card .target-reason {
  color: #a63d32
}

.target-card .target-ready {
  color: var(--success-text)
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f0ecf5;
  color: #62516f;
  white-space: nowrap
}

.pill.pill--success {
  background: #e6f5f0;
  color: var(--success-text)
}

.pill.pill--danger {
  background: #fff0ef;
  color: #ad3333
}

.pill.pill--warning {
  background: #fff5ce;
  color: #91621b
}

.portal-stat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px
}

.portal-stat-list>div {
  border: 1px solid #eeeaf2;
  border-radius: 11px;
  padding: 11px
}

.portal-stat-list small {
  font-size: 11px;
  color: #81788c
}

.portal-stat-list strong {
  display: block;
  font-size: 20px;
  color: #4b4263
}

.portal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #eeeaf2;
  margin-top: 18px;
  padding-top: 12px
}

.portal-card-footer button {
  padding: 7px;
  border-radius: 8px
}

.count-list {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted-text)
}

.count-list strong {
  color: #4b4263
}

.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px
}

.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #fff9e9;
  border: 1px solid #efdfac;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px
}

.reminder-item strong {
  color: #5c4b26
}

.reminder-item p {
  color: #8a7345;
  margin-top: 3px
}

@media(max-width:639px) {
  .form-columns {
    grid-template-columns: 1fr
  }

  .dialog-content {
    padding: 17px
  }

  .dialog-heading {
    padding: 17px
  }

  .dialog-actions {
    align-items: stretch
  }

  .dialog-actions>button {
    flex: 1
  }

  .portal-stat-list {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:639px) {
  .catalog-filters label {
    flex-basis: 100%
  }

  .rule-options {
    grid-template-columns: 1fr
  }

  .portal-card-footer {
    align-items: flex-start
  }
}

.format-preview {
  width: 100%;
  height: calc(var(--preview-rows,5)*1.7em + 22px);
  min-width: min(100%,160px);
  min-height: 56px;
  max-width: 100%;
  max-height: min(65vh,640px);
  overflow: auto;
  resize: both;
  box-sizing: border-box
}

.format-preview:focus-visible {
  outline: 2px solid #f9bd16;
  outline-offset: 2px
}

.data-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center
}

.data-file-actions button {
  white-space: normal;
  text-align: left
}

.data-file-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #e7d7a7;
  background: #fff9e9;
  border-radius: 12px;
  color: #65542b;
  font-size: 12px;
  line-height: 1.6
}

.data-file-statusbar[hidden] {
  display: none
}

.data-file-statusbar button {
  flex-shrink: 0
}

#view-data details summary {
  cursor: pointer;
  font-weight: 700
}

#view-data details p {
  margin-top: 10px
}

.data-file-statusbar p,
#view-data .info-note {
  min-width: 0;
  overflow-wrap: anywhere
}

.data-file-statusbar p {
  flex: 1 1 240px
}

.data-file-statusbar {
  margin-bottom: 20px
}

.data-file-statusbar button[hidden],
#view-data [hidden] {
  display: none!important
}

.publication-filters {
  margin-top: 16px;
  background: #faf9fc
}

.publication-filters>label:first-child {
  flex: 2 1 260px
}

.publication-filters>p {
  flex-basis: 100%;
  margin: 0;
  overflow-wrap: anywhere
}

.dialog-persistent-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid #e5dfeb;
  box-shadow: 0 -5px 15px #40394f08;
  position: relative;
  z-index: 2
}

#publicationScroll {
  flex: 1 1 auto
}

#publicationSelectionSummary {
  flex: 1 1 260px;
  min-width: 0;
  max-height: 72px;
  overflow: auto;
  overflow-wrap: anywhere;
  line-height: 1.6
}

#jobForm,
#portalForm {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  min-height: 0;
  flex: 1 1 auto;
  gap: 0
}

.editor-scroll {
  padding: 24px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto
}

.portal-edit-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #4b4263;
  border: 1px solid #dcd5e6;
  background: #f5f2f8;
  min-height: 34px
}

.portal-edit-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0
}

.target-card .target-active {
  color: #0076b8
}

.target-card .target-reserved {
  color: #87621c
}

#quickCopyFields,
#copyFields {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-items: start
}

#quickCopyFields>.copy-card,
#copyFields>.copy-card {
  grid-column: 1/-1;
  align-self: start
}

.editor-basics {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-items: start;
  gap: 20px
}

.editor-basics>label {
  min-width: 0
}

.editor-wide {
  grid-column: 1/-1
}

@media(min-width:640px) {
  #quickCopyFields,
  #copyFields,
  .editor-basics {
    grid-template-columns: repeat(2,minmax(0,1fr))
  }

  #quickCopyFields>.copy-card[data-copy-field=location],
  #quickCopyFields>.copy-card[data-copy-field=department],
  #copyFields>.copy-card[data-copy-field=location],
  #copyFields>.copy-card[data-copy-field=department] {
    grid-column: auto
  }
}

@media(max-width:639px) {
  .dialog-persistent-actions {
    padding: 12px 17px
  }

  .editor-scroll {
    padding: 17px
  }

  #publicationSelectionSummary {
    flex-basis: 100%;
    font-size: 12px;
    max-height: 62px
  }

  .publication-filters {
    padding: 12px
  }

  .publication-filters>label:first-child {
    flex-basis: 100%
  }
}
