.admin-dashboard {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1f2a22;
  min-height: 100vh;
  background: #f6f7f5;
}

/* Topbar */

.admin-dashboard__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #2f6b3a;
  color: #fff;
  flex-wrap: wrap;
}

.admin-dashboard__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 15px;
}

.admin-dashboard__topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-dashboard__season-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #fff;
  text-decoration: none;
  opacity: .9;
}

.admin-dashboard__season-select:hover {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
}

.admin-dashboard__user {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.admin-dashboard__user:hover {
  color: #fff;
  text-decoration: underline;
}

.admin-role-badge {
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, .2);
  padding: 2px 8px;
  border-radius: 20px;
}

.admin-dashboard__logout {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #fff;
  text-decoration: none;
  opacity: .85;
}

.admin-dashboard__logout:hover {
  opacity: 1;
  color: #fff;
  text-decoration: underline;
}

/* Main navigation: tabs above the content on narrow screens, a sidebar on the left from 900px. */

.admin-subnav {
  display: flex;
  gap: 0;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid #e6e8e4;
  overflow-x: auto;
}

.admin-subnav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 400;
  color: #6b7280;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.admin-subnav__group {
  display: contents;
}

.admin-subnav__heading {
  display: none;
}

.admin-subnav__link i {
  width: 1.25em;
  text-align: center;
}

.admin-subnav__link:hover {
  color: #2f6b3a;
}

.admin-subnav__link--active {
  font-weight: 600;
  color: #2f6b3a;
  border-bottom-color: #2f6b3a;
}

@media (min-width: 900px) {
  .admin-dashboard {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
  }

  .admin-dashboard > * {
    grid-column: 2;
  }

  .admin-dashboard > .admin-dashboard__topbar {
    grid-column: 1 / -1;
  }

  .admin-dashboard > .admin-dashboard__body {
    width: 100%;
  }

  .admin-dashboard > .admin-subnav {
    grid-column: 1;
    grid-row: 2 / span 30;
    position: sticky;
    top: 0;
    flex-direction: column;
    min-height: calc(100vh - 56px);
    padding: 12px 0;
    overflow-x: visible;
    border-bottom: 0;
    border-right: 1px solid #e6e8e4;
  }

  .admin-subnav__group {
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
  }

  .admin-subnav__group + .admin-subnav__group {
    border-top: 1px solid #eef0ec;
    padding-top: 8px;
  }

  .admin-subnav__heading {
    display: block;
    padding: 6px 22px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9aa39b;
  }

  .admin-subnav__link {
    padding: 9px 22px;
    border-bottom: 0;
    border-left: 3px solid transparent;
  }

  .admin-subnav__link:hover {
    background: #f6f7f5;
  }

  .admin-subnav__link--active {
    background: #eef6ef;
    border-left-color: #2f6b3a;
  }
}

/* Body */

.admin-dashboard__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

/* Pages whose content needs the whole window (the Rückmeldungen details table). Panels on such a
   page that are better off narrow opt back in with --readable. */
.admin-dashboard__body--wide {
  max-width: none;
}

.admin-dashboard__body--wide .admin-dashboard__panel--readable {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
}

.admin-card {
  background: #fff;
  border: 1px solid #e6e8e4;
  border-radius: 9px;
  padding: 18px;
}

.admin-card__title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2a22;
  margin-bottom: 12px;
}

/* Season summary card */

.admin-dashboard__season-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
}

.admin-dashboard__season-card-info {
  flex: 1;
  min-width: 220px;
}

.admin-dashboard__season-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2a22;
}

.admin-dashboard__season-card-meta {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 3px;
}

/* Stats grid */

.admin-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.admin-stat {
  background: #fff;
  border: 1px solid #e6e8e4;
  border-radius: 9px;
  padding: 14px 16px;
}

.admin-stat__label {
  font-size: 11.5px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.admin-stat__value {
  font-size: 26px;
  font-weight: 700;
  color: #1f2a22;
  line-height: 1.2;
}

.admin-stat__value--accent {
  color: #2f6b3a;
}

.admin-dashboard__stats--four {
  grid-template-columns: repeat(4, 1fr);
}

/* The row a link jumps to (#bid_12), e.g. from the Ernteanteile */
tr:target > td,
tbody:target > tr > td {
  background: #fff7d6;
}

/* CSV dropzone */

.admin-dropzone {
  border: 2px dashed #b9c9bb;
  border-radius: 9px;
  background: #f7faf7;
  padding: 24px;
  text-align: center;
}

.admin-dropzone__icon {
  font-size: 24px;
  color: #2f6b3a;
}

.admin-dropzone__text {
  font-size: 14px;
  color: #1f2a22;
  margin-top: 9px;
}

.admin-dropzone__link {
  color: #2f6b3a;
  font-weight: 600;
  text-decoration: underline;
}

.admin-dropzone__hint {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 7px;
}

.admin-import-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #eff5ef;
  border: 1px solid #cfe0d2;
  border-radius: 8px;
}

.admin-import-status__icon {
  color: #2f6b3a;
}

.admin-import-status__text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: #1f2a22;
}

.admin-import-status__detail {
  color: #6b7280;
}

/* Cards with table header (search, actions) */

.admin-card--table {
  padding: 0;
  overflow: hidden;
}

.admin-card--table .admin-card__title {
  margin-bottom: 0;
}

.admin-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #eceee9;
}

.admin-card__header .admin-card__title {
  flex: 1;
}

.admin-search {
  position: relative;
}

.admin-search i {
  position: absolute;
  left: 10px;
  top: 9px;
  font-size: 12px;
  color: #9aa39c;
}

.admin-search input {
  padding-left: 30px;
  width: 200px;
  font-size: 13px;
}

/* Scroll container around a table: vertically once there are more rows than fit the window,
   horizontally when the columns are wider than the card. The header stays visible while scrolling —
   the background has to sit on the cells, since a sticky thead paints nothing itself. */
.admin-table-scroll {
  overflow: auto;
  max-height: calc(100vh - 300px);
}

.admin-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f7f5;
}

.admin-dashboard table {
  font-size: 13.5px;
  margin-bottom: 0;
}

.admin-dashboard table thead {
  background: #f6f7f5;
}

.admin-dashboard table thead tr {
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.admin-dashboard table th {
  padding: 10px 18px;
  font-weight: 600;
}

.admin-dashboard table td {
  padding: 11px 18px;
  color: #1f2a22;
  vertical-align: middle;
}

.admin-dashboard table .admin-mono {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: #6b7280;
}

.admin-card__footer {
  padding: 11px 18px;
  border-top: 1px solid #eceee9;
  font-size: 12.5px;
  color: #6b7280;
}

.admin-badge {
  display: inline-block;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  color: #fff;
  background: #6b7280;
}

.admin-badge--answered,
.admin-badge--admin {
  background: #2f6b3a;
}

.admin-badge--sent,
.admin-badge--viewer {
  background: #e5e7e1;
  color: #3d4a41;
}

.admin-badge--open {
  background: #fdeccd;
  color: #7a5b1f;
}

.admin-badge--bounced {
  background: #fdecea;
  color: #a13a30;
}

/* Two column layout */

.admin-dashboard__two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 760px) {
  .admin-dashboard__two-col,
  .admin-dashboard__stats {
    grid-template-columns: 1fr;
  }
}

.admin-field {
  margin-bottom: 11px;
}

.admin-field label {
  font-size: 12.5px;
  color: #4b5563;
  margin-bottom: 4px;
  display: block;
}

.admin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Evaluation card */

.admin-eval__row {
  margin-bottom: 11px;
}

.admin-eval__row-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

/* Back link / table row actions */

.admin-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #4b5563;
  text-decoration: none;
}

.admin-back-link:hover {
  color: #2f6b3a;
}

/* Secondary detail under a table cell's main value (e.g. the Biet-Partner under a Gebot). */
.admin-table__subline {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.admin-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: #9aa39c;
}

.admin-table-actions a {
  color: #6b7280;
}

.admin-table-actions a:hover {
  color: #2f6b3a;
}

.admin-table-actions__disabled {
  color: #d7dbd4;
  cursor: not-allowed;
}

.admin-table-actions form {
  display: inline-flex;
}

.admin-table-actions__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #6b7280;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.admin-table-actions__button:hover {
  color: #2f6b3a;
}

/* Test-mail modal */

.admin-modal {
  border: 1px solid #e6e8e4;
  border-radius: 9px;
  padding: 18px;
  width: min(360px, calc(100vw - 32px));
}

.admin-modal::backdrop {
  background: rgba(31, 42, 34, .35);
}

.admin-modal__status {
  font-size: 12.5px;
  color: #6b7280;
  min-height: 1.4em;
  margin-top: 8px;
}

.admin-modal__status--success {
  color: #2f6b3a;
}

.admin-modal__status--error {
  color: #c0392b;
}

.admin-modal__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.admin-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2a22;
  margin-bottom: 10px;
}

.admin-modal__close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 2px;
}

.admin-modal__close:hover {
  color: #2f6b3a;
}

/* File-viewer modal (Rückmeldungen) */

.admin-modal--viewer {
  width: min(720px, calc(100vw - 32px));
  height: min(80vh, 900px);
}

/* `dialog` is display:none by default (UA stylesheet) and only display:block once [open] — a bare
   class selector here would outrank that and leave the modal sitting inline on the page even
   closed, so the flex layout only kicks in once showModal() has set [open]. */
.admin-modal--viewer[open] {
  display: flex;
  flex-direction: column;
}

.admin-modal--viewer__body {
  flex: 1;
  min-height: 0;
}

.admin-modal--viewer__body iframe,
.admin-modal--viewer__body img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

/* Document chips (Rückmeldungen) */

.admin-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  margin: 0 8px 4px 0;
}

.admin-doc-chip__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: #4b5563;
  cursor: pointer;
  text-decoration: underline;
}

.admin-doc-chip__name:hover {
  color: #2f6b3a;
}

.admin-doc-chip__download {
  color: #6b7280;
}

.admin-doc-chip__download:hover {
  color: #2f6b3a;
}

/* Quick filters (Rückmeldungen) */

.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #e6e8e4;
}

.admin-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-filter-pill {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #e6e8e4;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
}

.admin-filter-pill:hover {
  color: #2f6b3a;
}

.admin-filter-pill--active {
  font-weight: 600;
  color: #2f6b3a;
  border-color: #2f6b3a;
  background: #eaf2ea;
}

/* Sub-tabs (Rückmeldungen: Statistik / Details) */

.admin-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f6f7f5;
  border-radius: 10px;
  margin-bottom: 18px;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 7px;
  border: none;
  background: none;
  color: #6b7280;
  cursor: pointer;
}

.admin-tab:hover {
  color: #2f6b3a;
}

.admin-tab--active {
  background: #fff;
  color: #1f2a22;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(31, 42, 34, .12);
}

/* Pie charts (Rückmeldungen statistics) */

.admin-pie-chart {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.admin-pie {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
}

.admin-pie--empty {
  background: #e5e7e1;
}

.admin-pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 160px;
}

.admin-pie-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #4b5563;
  margin-bottom: 6px;
}

.admin-pie-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.admin-pie-legend__label {
  flex: 1;
}

.admin-pie-legend__value {
  color: #6b7280;
  white-space: nowrap;
}

/* Mail template editor */

.admin-mail-template {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 760px) {
  .admin-mail-template {
    grid-template-columns: 1fr;
  }
}

.admin-mail-field {
  position: relative;
}

.admin-mail-field__input {
  position: relative;
  z-index: 1;
  background: transparent;
  resize: none;
}

.admin-mail-field__highlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: transparent;
  border-color: transparent;
  pointer-events: none;
}

.admin-mail-field__token {
  color: transparent;
  border-radius: 3px;
  padding: 0;
}

.admin-mail-field__token--ok {
  background: rgba(47, 107, 58, .14);
}

.admin-mail-field__token--bad {
  background: rgba(220, 38, 38, .35);
  box-shadow: inset 0 -2px 0 #b3261e;
}

.admin-mail-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 14px;
  padding: 10px 12px;
  background: #fdf4f3;
  border: 1px solid #f0cdc9;
  border-radius: 8px;
  font-size: 12.5px;
  color: #8a2f27;
  line-height: 1.5;
}

.admin-mail-warning i {
  margin-top: 1px;
}

.admin-mail-placeholders {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.admin-mail-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #f6f9f6;
  border: 1px solid #cfe0d2;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.admin-mail-placeholder:hover {
  border-color: #7aab84;
  background: #eff5ef;
}

.admin-mail-placeholder code {
  color: #2f6b3a;
  font-weight: 600;
  font-size: 12px;
}

.admin-mail-preview {
  grid-column: 1 / -1;
}

.admin-mail-preview__meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
}

.admin-mail-preview__subject {
  font-size: 14px;
  font-weight: 600;
  color: #1f2a22;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eceee9;
}

.admin-mail-preview__body {
  font-size: 13.5px;
  color: #1f2a22;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.admin-mail-preview__token--bad {
  background: rgba(220, 38, 38, .35);
  box-shadow: inset 0 -2px 0 #b3261e;
  color: #8a2f27;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Mailversand (app/views/admin/season_mailings)
   --------------------------------------------------------------------------- */

.admin-mailing__checks {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.admin-mailing__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1f2a22;
  padding: 5px 0;
}

.admin-mailing__check--ok i {
  color: #2f6b3a;
}

.admin-mailing__check--missing i {
  color: #b3261e;
}

.admin-mailing__check-fix {
  font-size: 12.5px;
  margin-left: 4px;
}

.admin-mailing__preview-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #6b7280;
}

.admin-mailing__preview-picker select {
  width: auto;
  min-width: 200px;
}

/* The preview is laid out like a message in a mail client: an envelope header of
   Von/An/Betreff rows above a plain-text message pane. */
.admin-mailing__mail {
  border: 1px solid #e6e8e4;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.admin-mailing__mail-header {
  background: #f6f7f5;
  border-bottom: 1px solid #e6e8e4;
  padding: 12px 16px;
}

.admin-mailing__mail-row {
  display: flex;
  gap: 12px;
  padding: 3px 0;
  align-items: baseline;
}

.admin-mailing__mail-label {
  flex: 0 0 62px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  font-weight: 600;
}

.admin-mailing__mail-value {
  font-size: 13px;
  color: #1f2a22;
  word-break: break-word;
}

.admin-mailing__mail-value--subject {
  font-size: 14.5px;
  font-weight: 600;
}

.admin-mailing__mail-body {
  padding: 16px;
  font-size: 13.5px;
  color: #1f2a22;
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 120px;
}

.admin-mailing__preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eceee9;
}

.admin-mailing__status {
  font-size: 12.5px;
  color: #6b7280;
}

.admin-mailing__status--ok {
  color: #2f6b3a;
}

.admin-mailing__status--error {
  color: #b3261e;
}

.admin-mailing__kinds {
  display: flex;
  gap: 16px;
}

.admin-mailing__kind {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1f2a22;
  cursor: pointer;
}

.admin-mailing__kind .form-check-input {
  margin-top: 0;
}

.admin-mailing__row--blocked {
  color: #9ca3af;
}

.admin-mailing__send {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-mailing__count {
  font-size: 13px;
  color: #4b5563;
}

.admin-mailing__run-counts {
  font-size: 13px;
  color: #1f2a22;
  margin: 10px 0 0;
}

.admin-mailing__failures {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eceee9;
}

.admin-mailing__failures ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #8a2f27;
}

/* Document assignment dialog (Dokumente) */

.doc-split {
  width: min(960px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
}

.doc-split__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0;
}

.doc-split__segment,
.doc-split__tray {
  border: 1px solid #d8ddd5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafbf9;
}

.doc-split__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}

.doc-split__header small {
  font-weight: 400;
  color: #6b7280;
}

.doc-split__remove {
  background: none;
  border: none;
  color: #8a3b2f;
  font-size: 12.5px;
  cursor: pointer;
}

.doc-split__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 70px;
  padding: 6px;
  border-radius: 6px;
}

.doc-split__page {
  margin: 0;
  width: 110px;
  cursor: grab;
  text-align: center;
  font-size: 11.5px;
  color: #4b5563;
}

.doc-split__page img {
  width: 100%;
  min-height: 80px;
  background: #e5e7e1;
  border: 1px solid #cfd4cb;
  border-radius: 4px;
}

.doc-split__cut {
  align-self: center;
  background: #fff;
  border: 1px dashed #9aa597;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  line-height: 1;
  color: #2f6b3a;
  cursor: pointer;
}

.doc-split__cut:hover {
  background: #2f6b3a;
  color: #fff;
}

.doc-person {
  position: relative;
}

.doc-person__results {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #cfd4cb;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.doc-person__result,
.doc-person__none {
  padding: 6px 12px;
  font-size: 13px;
}

.doc-person__result {
  cursor: pointer;
}

.doc-person__result--active,
.doc-person__result:hover {
  background: #eef5ee;
}

.doc-person__none {
  color: #6b7280;
}

.doc-split__preview {
  width: min(1040px, calc(100vw - 32px));
}

.doc-split__preview-body {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.doc-split__preview-body canvas,
.doc-split__preview-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid #cfd4cb;
}

.doc-split__fields {
  display: grid;
  grid-template-columns: 1.4fr 1fr 150px;
  gap: 8px;
  margin-top: 8px;
}

.doc-split__fields input {
  grid-column: 1 / -1;
}

.doc-split__fields select[hidden] {
  display: none;
}

.doc-split__zone {
  border: 2px dashed #b9c1b5;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.doc-split__tray-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7280;
}

.doc-split__hint {
  color: #9aa597;
  font-size: 12.5px;
}

.doc-split--over {
  outline: 2px solid #2f6b3a;
  background: #eef5ee;
}

@media (max-width: 700px) {
  .doc-split__fields {
    grid-template-columns: 1fr;
  }
}

.admin-eval__big-number {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
  color: #2f6b3a;
}

.admin-eval__big-number-note {
  margin-top: 6px;
  font-size: 12.5px;
  color: #6b7280;
}

/* A table to fill in like a spreadsheet (Admin::ProxyBidsController). */
.admin-grid__cell { width: 100%; min-width: 90px; border: 1px solid #d6d9d2; border-radius: 4px; padding: 4px 8px; text-align: right; }
.admin-grid__cell:focus { outline: 2px solid #5b7f3b; outline-offset: -1px; }

/* Person page: everything that belongs to one person, as an expandable tree */

.person-action {
  flex: 1 1 280px;
  padding: 14px 16px;
  border: 1px solid #e6e8e4;
  border-radius: 10px;
  background: #fff;
}

.person-tree__node {
  margin: 0;
  padding-left: 0;
}

.person-tree__node > summary {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid #f0f2ee;
}

.person-tree__node > summary::-webkit-details-marker {
  display: none;
}

.person-tree__node > summary::before {
  content: "▸";
  color: #9aa39b;
  width: 1em;
}

.person-tree__node[open] > summary::before {
  content: "▾";
}

.person-tree__title {
  font-weight: 600;
}

.person-tree__meta {
  color: #6b7280;
  font-size: 13px;
}

.person-tree__children {
  margin-left: 7px;
  padding: 10px 0 6px 18px;
  border-left: 1px solid #e6e8e4;
}

.person-tree__children .person-tree__node > summary {
  border-bottom: 0;
}

/* Person search in the topbar: white box on the left next to the brand, the rest stays right. */

.admin-dashboard__topbar:has(.admin-person-search) {
  justify-content: flex-start;
}

.admin-dashboard__topbar:has(.admin-person-search) .admin-dashboard__topbar-right {
  display: contents;
}

.admin-dashboard__topbar:has(.admin-person-search) .admin-dashboard__topbar-right > :not(.admin-person-search) {
  order: 2;
}

.admin-person-search {
  position: relative;
  order: 1;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  color: #6b7280;
  border-radius: 8px;
}

.admin-person-search input {
  width: 220px;
  padding: 7px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2a22;
  font-size: 13px;
}

.admin-person-search input::placeholder {
  color: #9aa39b;
}

.admin-person-search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  width: 340px;
  max-width: 90vw;
  background: #fff;
  color: #1f2a22;
  border: 1px solid #e6e8e4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  overflow: hidden;
}

.admin-person-search__row {
  display: flex;
  align-items: stretch;
}

.admin-person-search__row:hover,
.admin-person-search__row--active {
  background: #eef6ef;
}

.admin-person-search__hit {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding: 9px 14px;
  color: inherit;
  text-decoration: none;
}

.admin-person-search__hit:hover {
  color: inherit;
}

.admin-person-search__new-tab {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #6b7280;
  font-size: 13px;
}

.admin-person-search__new-tab:hover {
  color: #2f6b3a;
}

.admin-person-search__name {
  font-weight: 600;
  font-size: 13.5px;
}

.admin-person-search__meta,
.admin-person-search__empty {
  font-size: 12px;
  color: #6b7280;
}

.admin-person-search__empty {
  padding: 12px 14px;
}

/* Vollmacht-Gebote: the table on the left, the Vollmacht document on the right. */
.proxy-split { display: grid; gap: 16px; align-items: start; }
.proxy-split__viewer { background: #fff; border: 1px solid #d6d9d2; border-radius: 8px; padding: 12px; }
.proxy-split__title { font-weight: 600; margin-bottom: 8px; }
.proxy-split__empty { color: #6b7266; font-size: 13px; margin: 0; }
.proxy-split__frame { width: 100%; height: 70vh; border: 0; }
@media (min-width: 1100px) {
  .proxy-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .proxy-split__viewer { position: sticky; top: 16px; }
  .proxy-split__frame { height: calc(100vh - 120px); }
}

/* Vollmacht-Gebote: a block of three lines per person. */
.admin-grid--people .admin-grid__person > tr:first-child td { background: #f1f4ec; }
.admin-grid--people .admin-grid__person + .admin-grid__person > tr:first-child td { border-top: 2px solid #c9cfc0; }
.admin-grid--people .admin-grid__person:focus-within > tr:first-child td { background: #e3ebd6; }
