body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f7f8fb;
  color: #222;
}

.topbar {
  background: #12213a;
  color: #fff;
  padding: 16px 24px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-logout {
  color: #e8eef8;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-logout:hover {
  text-decoration: underline;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.topbar p {
  margin: 4px 0 0;
  color: #cfd7e6;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #e9eef7;
  border-bottom: 1px solid #d8dfec;
}

.tab {
  border: 1px solid #cad3e4;
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.tab.active {
  background: #1f3b66;
  color: #fff;
}

main {
  padding: 16px;
}

.view {
  display: block;
}

.hidden {
  display: none;
}

.card {
  background: #fff;
  border: 1px solid #dde3ee;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.state-empty {
  border-left: 4px solid #7d8ca8;
}

.state-error {
  border-left: 4px solid #b13a3a;
}

.state-ok {
  border-left: 4px solid #2f7d48;
}

.columns {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.explorer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.workflow-controls,
.audit-controls {
  margin-top: 12px;
  margin-bottom: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.workflow-controls h3,
.audit-controls h3 {
  grid-column: 1 / -1;
  margin: 4px 0;
}

input,
button {
  padding: 8px;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #173d75;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
}

.link-button:hover {
  text-decoration: underline;
}

.inbox-segment h2 {
  font-size: 17px;
  margin: 18px 0 10px;
  color: #1f3b66;
}

.inbox-meta-bar {
  font-size: 13px;
  color: #445;
}

.inbox-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.inbox-card {
  border-left-width: 6px;
}

.primary-row {
  margin-top: 4px;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.signal-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.why-row {
  margin-top: 8px;
  color: #2f3f57;
  font-size: 13px;
}

.action-row {
  margin-top: 8px;
  font-size: 13px;
}

.action-label {
  color: #3f4d64;
}

.operator-block-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.operator-block {
  background: #f6f8fc;
  border: 1px solid #dce3f1;
  border-radius: 6px;
  padding: 8px;
}

.operator-block-label {
  font-size: 12px;
  font-weight: 700;
  color: #334a73;
  margin-bottom: 4px;
}

.operator-block-body {
  font-size: 13px;
  color: #1f2e45;
  line-height: 1.35;
}

.operator-block-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #4e607e;
}

.prio-note,
.source-note {
  font-size: 12px;
  color: #526380;
}

.fit-chip,
.segment-chip,
.urgency-chip {
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
}

.fit-chip {
  font-weight: 700;
}

.fit-strong {
  background: #dff3e6;
  color: #155b34;
}

.fit-medium {
  background: #fff2d8;
  color: #7a4a09;
}

.fit-weak,
.fit-none {
  background: #edf0f6;
  color: #485a74;
}

.ww-signal-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.segment-chip {
  background: #e9eef7;
  color: #1f3b66;
}

.urgency-chip {
  font-weight: 700;
  background: #e9eef7;
  color: #1f3b66;
  min-width: 58px;
  justify-content: center;
}

.urgency-today .urgency-chip,
.urgency-tomorrow .urgency-chip,
.urgency-3d .urgency-chip,
.urgency-expired .urgency-chip {
  background: #ffe2e2;
  color: #8d1f1f;
}

.urgency-7d .urgency-chip {
  background: #fff1d6;
  color: #8a5a12;
}

.urgency-later .urgency-chip,
.urgency-none .urgency-chip {
  background: #e9eef7;
  color: #41597d;
}

.badge {
  font-size: 12px;
  background: #e9eef7;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-grade {
  background: #dfe8f7;
  font-size: 11px;
}

.badge-fit {
  background: #d9f0e0;
  color: #1a3d24;
  font-size: 11px;
}

.badge-family {
  background: #e8ecfa;
  color: #2f4575;
}

.badge-docs {
  background: #e9f6ee;
  color: #1d5c36;
}

.badge-official {
  background: #edf1fb;
  color: #314b7a;
}

.kpi-row {
  margin-bottom: 12px;
  line-height: 1.5;
}

.cockpit-summary {
  margin-bottom: 10px;
}

.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.cockpit-grid div {
  background: #f4f7fd;
  border: 1px solid #d9e2f2;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cockpit-grid strong {
  font-size: 12px;
  color: #2e446d;
}

.cockpit-grid span {
  font-size: 20px;
  font-weight: 700;
  color: #1e355e;
}

.cockpit-preset-hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.board-toolbar .preset-hint {
  margin: 0;
  flex: 1 1 220px;
}

.board-keyword-search {
  min-width: 320px;
  flex: 1 1 320px;
}

.board-profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.board-profile-row select {
  min-width: 210px;
}

.board-reading {
  margin: 8px 0 6px;
  padding: 8px 10px;
  background: #f4f7fd;
  border: 1px solid #e2e8f5;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.board-reading-empty {
  background: #fafbfc;
  border-style: dashed;
}

.board-reading-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4a5f85;
  margin-bottom: 4px;
}

.board-reading-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1e2a3d;
}

.board-notice-body {
  margin: 0 0 6px;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #243047;
  background: #fff;
  border: 1px solid #e5eaf3;
  border-radius: 6px;
  padding: 8px;
}

.board-card .board-notice-body {
  max-height: 11rem;
}

pre.detail-notice {
  max-height: min(50vh, 28rem);
}

.board-load-full {
  font-size: 13px;
}

.cockpit-empty h3 {
  margin-top: 0;
  color: #1f3b66;
}

.empty-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.empty-cta-row button {
  border: 1px solid #cad3e4;
  background: #fff;
  border-radius: 8px;
}

.deadline-note {
  font-size: 12px;
  color: #3c4f6f;
}

.inbox-meta {
  font-size: 13px;
  line-height: 1.45;
  margin-top: 6px;
}

.meta-secondary {
  color: #4c5d7a;
  margin-top: 4px;
}

.signal-pos {
  color: #1f5f3a;
}

.signal-warn {
  color: #8a4b16;
}

.inbox-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.board-column h3 {
  margin-top: 0;
  color: #1f3b66;
  font-size: 15px;
}

.board-grid .board-column {
  background: #f9fbff;
}

.board-card {
  margin-bottom: 8px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab.active {
  background: #1f3b66;
  color: #fff;
}

.queue-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.detail-facts h3,
.detail-bewertung h3,
.detail-analyst h3 {
  margin-top: 0;
  font-size: 15px;
  color: #1f3b66;
}

.detail-fallback {
  margin: 12px 0;
  padding: 8px 12px;
  background: #eef1f6;
  border-radius: 6px;
  font-size: 13px;
}

.detail-fallback summary {
  cursor: pointer;
  color: #445;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 95vw);
  height: 100vh;
  overflow-y: auto;
  background: #f6f8fc;
  border-left: 1px solid #cad3e4;
  box-shadow: -8px 0 24px rgba(19, 35, 59, 0.16);
  padding: 12px;
  z-index: 40;
}

.detail-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.drawer-close {
  background: #fff;
  border: 1px solid #cad3e4;
  border-radius: 6px;
}

.identity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quick-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-action-buttons button {
  border: 1px solid #cad3e4;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
}

.quick-action-buttons button.is-busy {
  opacity: 0.6;
}

.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  border: 1px solid #cad3e4;
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
}

.preset-btn.active {
  background: #1f3b66;
  color: #fff;
}

.card-details {
  margin-top: 8px;
}

.card-details summary {
  cursor: pointer;
  color: #35507a;
  font-size: 12px;
}

.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  background: #1f3b66;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(16, 32, 58, 0.25);
  font-size: 13px;
}

.toast-ok {
  background: #1f6a3b;
}

.toast-error {
  background: #a22c2c;
}

.link-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 8px 0;
  padding: 8px 10px;
  background: #f0f4fb;
  border-radius: 6px;
  border: 1px solid #d8dfec;
}

.shelf-link {
  font-weight: 600;
  color: #1f3b66;
  text-decoration: none;
}

.shelf-link:hover {
  text-decoration: underline;
}

.shelf-meta {
  font-size: 12px;
  color: #455;
}

.shelf-empty {
  font-size: 12px;
}

.document-shelf {
  margin: 6px 0 10px;
}

.shelf-title {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: #35507a;
}

.document-shelf-list {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 12px;
}

.confidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.badge-ok {
  background: #e6f4ea;
  border: 1px solid #9bc9a8;
  color: #1a4d2a;
}

.badge-warn {
  background: #fff4e5;
  border: 1px solid #e0c29a;
  color: #6a3b00;
}

.badge-data {
  background: #eef2fa;
  border: 1px solid #c5cee0;
}

.detail-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
