/* Spotario Landing — UI-Nachbauten (Rangliste, Lagedetail, Bewertung).
   Werte übernommen aus Projekt_ExpandScout frontend/src/styles.css,
   leicht verdichtet für die Artefakt-Darstellung auf der Landingpage. */

.ui-panel {
  background: rgba(255, 252, 245, 0.9);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-artifact);
  padding: 18px 20px 20px;
}

.ui-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  color: #9b6d1e;
}

.ui-panel h3 {
  margin: 5px 0 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
}

.ui-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

/* ---------- Pillen und Badges ---------------------------------------- */

.role-badge {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}

.role-badge--anchor  { background: #286a4a; color: #f6f1e7; }
.role-badge--context { background: #b45309; color: #fdf3e0; }

.priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.priority-a { background: #fde9e5; color: #b42318; }
.priority-b { background: #fff0d2; color: #b35c00; }
.priority-c { background: #e8f7ef; color: #0f7a4d; }

.cluster-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.cluster-badge--ekz    { background: #e7eef9; border-color: rgba(54, 87, 133, 0.2);  color: #315176; }
.cluster-badge--fmz    { background: #e3f3e5; border-color: rgba(38, 110, 65, 0.18); color: #23603a; }
.cluster-badge--inner  { background: #fff0d2; border-color: rgba(179, 92, 0, 0.22);  color: #965100; }
.cluster-badge--supply { background: #e8f7ef; border-color: rgba(15, 122, 77, 0.16); color: #0f6f47; }

/* ---------- Rangliste -------------------------------------------------- */

.ui-rangliste .table-shell {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(59, 72, 63, 0.1);
  background: rgba(255, 255, 255, 0.7);
}

.ui-rangliste table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.ui-rangliste th,
.ui-rangliste td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(59, 72, 63, 0.08);
  white-space: nowrap;
  vertical-align: top;
}

.ui-rangliste thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #6b726d;
  background: rgba(247, 242, 232, 0.85);
}

.ui-rangliste tbody tr:last-child td { border-bottom: none; }

.ui-rangliste tbody tr[data-selected="true"] { background: rgba(243, 234, 209, 0.72); }

.ui-rangliste .hotspot-row--rejected { opacity: 0.45; }

.ranking-name strong { font-weight: 600; }

.ranking-locality {
  margin-left: 6px;
  font-size: 12px;
  color: rgba(30, 36, 31, 0.7);
}

.ranking-cluster-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.ranking-cluster-row small {
  font-size: 11px;
  color: rgba(30, 36, 31, 0.66);
}

.ranking-anchor-cell {
  max-width: 12rem;
  white-space: normal;
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(30, 36, 31, 0.82);
}

.ranking-index strong {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

.ranking-index small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(30, 36, 31, 0.68);
}

.status-neu       { color: #8a5b08; font-size: 12.5px; }
.status-bekannt   { color: rgba(30, 36, 31, 0.7); font-size: 12.5px; }
.status-verworfen { color: #a13a34; font-size: 12.5px; }

/* ---------- Lagedetail / Scorecard ------------------------------------ */

.cluster-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.cluster-locality {
  font-size: 12.5px;
  color: rgba(30, 36, 31, 0.66);
}

.map-jump-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.map-jump-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(59, 72, 63, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #173f34;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.map-jump-link::after {
  content: "↗";
  margin-left: 6px;
  font-size: 0.85em;
}

.expansion-scorecard {
  display: grid;
  gap: 12px;
}

.expansion-index-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #203a32 0%, #315846 100%);
  color: #fff9f0;
  box-shadow: 0 14px 32px rgba(31, 58, 50, 0.16);
}

.expansion-index-card > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 249, 240, 0.72);
}

.expansion-index-card strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.expansion-index-card small {
  font-size: 16px;
  color: rgba(255, 249, 240, 0.72);
}

.expansion-index-card p {
  margin-top: 7px;
  color: rgba(255, 249, 240, 0.86);
  font-weight: 600;
  font-size: 14.5px;
}

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

.expansion-metric-card {
  min-width: 0;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(59, 72, 63, 0.1);
  background: #fcfaf4;
}

.expansion-metric-card > span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #626c65;
}

.expansion-metric-card strong {
  display: block;
  margin-top: 5px;
  color: #223027;
  font-size: 14.5px;
  font-weight: 600;
}

.expansion-metric-card p {
  margin-top: 5px;
  color: #4e5b52;
  font-size: 12px;
  line-height: 1.45;
}

.expansion-metric-card.strong { background: #e8f7ef; border-color: rgba(15, 122, 77, 0.12); }
.expansion-metric-card.good   { background: #eef6f0; }
.expansion-metric-card.watch  { background: #fff0d2; border-color: rgba(179, 92, 0, 0.12); }

/* ---------- Bewertungskarte ------------------------------------------- */

.assessment-block {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(59, 72, 63, 0.1);
  background: #fcfaf4;
}

.assessment-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.assessment-subtitle {
  display: block;
  margin: 12px 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(30, 36, 31, 0.55);
}

.assessment-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(59, 72, 63, 0.28);
  background: transparent;
  color: inherit;
  font-size: 12.5px;
}

.assessment-chip--active {
  background: linear-gradient(135deg, #203a32 0%, #315846 100%);
  color: #fff9f0;
  border-color: #2c4f3f;
}

.assessment-pursue-trigger {
  border-color: rgba(30, 122, 70, 0.35);
  color: #1e7a46;
}

.assessment-reject-trigger {
  border-color: rgba(180, 35, 24, 0.35);
  color: #b42318;
}

.assessment-reject-trigger::after {
  content: "▾";
  font-size: 0.85em;
}

.badge-inquiry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 600;
  background: #e8f0f9;
  color: #2c5c94;
  border: 1px solid #c4d8ee;
}

.assessment-link {
  background: none;
  border: none;
  padding: 0;
  color: #475467;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.assessment-reasons {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(59, 72, 63, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

.assessment-reason-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.assessment-reason-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(30, 36, 31, 0.55);
  width: 100%;
}

.assessment-reason {
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(59, 72, 63, 0.22);
  background: #fff;
  color: inherit;
  font-size: 12.5px;
}

.assignee-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 72, 63, 0.22);
  background: #fff;
  font-size: 12.5px;
}

.assignee-remove {
  color: rgba(30, 36, 31, 0.55);
  font-size: 14px;
  line-height: 1;
}

.assignee-input {
  flex: 1 1 8rem;
  min-width: 7rem;
  font: inherit;
  font-size: 12.5px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(59, 72, 63, 0.22);
  background: #fff;
  color: rgba(30, 36, 31, 0.66);
}

/* ---------- Schmale Viewports: Rangliste als gestapelte Zeilenkarten --- */

@media (max-width: 860px) {
  .ui-rangliste thead { display: none; }

  .ui-rangliste table,
  .ui-rangliste tbody { display: block; width: 100%; }

  .ui-rangliste tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    padding: 12px 12px;
    border-bottom: 1px solid rgba(59, 72, 63, 0.08);
  }

  .ui-rangliste td {
    display: block;
    border: none;
    padding: 0;
    white-space: normal;
  }

  .ui-rangliste td.ranking-name { flex: 1 1 100%; }
  .ui-rangliste .col-anker,
  .ui-rangliste .col-trag { display: none; }
}

/* ---------- Profileditor (interaktiver Nachbau) ------------------------ */

.ui-profil { max-width: 560px; }

.editor-kopf {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.editor-step-badge {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8e2d6;
  color: #4d5a51;
  font-size: 12px;
  font-weight: 700;
}

.editor-kopf strong { font-size: 15px; }

.editor-kopf p {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(30, 36, 31, 0.7);
}

.editor-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.category-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(59, 72, 63, 0.14);
  background: rgba(255, 252, 245, 0.76);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13.5px;
  color: inherit;
}

.category-list-row strong { font-weight: 600; }

.category-list-row.is-selected {
  border-color: rgba(35, 96, 58, 0.55);
  background: rgb(237, 246, 239);
  box-shadow: inset 3px 0 0 #286a4a;
}

.editor-detail {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(59, 72, 63, 0.1);
  background: #fcfaf4;
}

.editor-detail__kopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-detail__kopf h4 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
}

.editor-detail__rolle {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(30, 36, 31, 0.66);
}

.editor-entfernen {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid rgba(59, 72, 63, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #314036;
  font-size: 12.5px;
}

.editor-detail__desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #4e5b52;
}

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

.editor-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #fdf3e0;
  color: #92600e;
  font-size: 11.5px;
  font-weight: 700;
}

.editor-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.editor-switch__tile {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid rgba(59, 72, 63, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.76);
  color: #405047;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.editor-switch__tile strong { font-size: 13px; }

.editor-switch__tile span {
  font-size: 11.5px;
  line-height: 1.35;
}

.editor-switch__tile.is-active--anchor {
  border-color: #286a4a;
  background: #286a4a;
  color: #f6f1e7;
}

.editor-switch__tile.is-active--anchor span { color: rgba(246, 241, 231, 0.85); }

.editor-switch__tile.is-active--context {
  border-color: #b45309;
  background: #b45309;
  color: #fdf3e0;
}

.editor-switch__tile.is-active--context span { color: rgba(253, 243, 224, 0.85); }

.editor-nachbarn {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(59, 72, 63, 0.1);
  background: rgba(255, 255, 255, 0.6);
}

.editor-nachbarn__titel {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(30, 36, 31, 0.55);
  margin-bottom: 8px;
}

.editor-nachbarn div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.editor-nachbarn div span {
  padding: 5px 11px;
  border-radius: 999px;
  background: #1f3a2b;
  color: #fff9f0;
  font-size: 12px;
  font-weight: 600;
}

.editor-marken {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.editor-marken span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 72, 63, 0.18);
  background: rgba(255, 252, 245, 0.85);
  font-size: 12px;
}

.editor-marken span b {
  font-weight: 400;
  color: rgba(30, 36, 31, 0.55);
}

.editor-marken__mehr {
  border-style: dashed;
  color: rgba(30, 36, 31, 0.66);
}

.editor-input {
  display: block;
  margin-top: 10px;
  max-width: 260px;
  padding: 7px 10px;
  border: 1px solid rgba(59, 72, 63, 0.28);
  border-radius: 4px;
  background: #fff;
  font-size: 12.5px;
  color: rgba(30, 36, 31, 0.5);
}

.editor-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
}

.editor-check--tile {
  padding: 9px 11px;
  border-radius: 8px;
  background: #f1eee5;
  font-weight: 600;
}

.editor-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: #1d4ed8;
}

.editor-fein {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}
