/* Rotus Messe-Management – Grundlayout
   Dezente, professionelle SaaS-Optik. Systemschriften (keine externen Fonts). */

:root {
  --rotus-primary: #1f4e79;
  --rotus-primary-dark: #163a5b;
  --rotus-sidebar-bg: #14263a;
  --rotus-sidebar-text: #b9c6d6;
  --rotus-sidebar-active: #ffffff;
  --rotus-surface: #f4f6f9;
  --rotus-border: #e3e7ed;
  --rotus-sidebar-width: 248px;

  --bs-primary: var(--rotus-primary);
  --bs-primary-rgb: 31, 78, 121;
  --bs-link-color: var(--rotus-primary);
  --bs-link-color-rgb: 31, 78, 121;
  --bs-link-hover-color: var(--rotus-primary-dark);
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-border-color: var(--rotus-border);
}

.btn-primary {
  --bs-btn-bg: var(--rotus-primary);
  --bs-btn-border-color: var(--rotus-primary);
  --bs-btn-hover-bg: var(--rotus-primary-dark);
  --bs-btn-hover-border-color: var(--rotus-primary-dark);
  --bs-btn-active-bg: var(--rotus-primary-dark);
  --bs-btn-active-border-color: var(--rotus-primary-dark);
}
.btn-outline-primary {
  --bs-btn-color: var(--rotus-primary);
  --bs-btn-border-color: var(--rotus-primary);
  --bs-btn-hover-bg: var(--rotus-primary);
  --bs-btn-hover-border-color: var(--rotus-primary);
  --bs-btn-active-bg: var(--rotus-primary-dark);
}

body.app-body { background: var(--rotus-surface); }
@media (min-width: 992px) {
  /* Seitenleiste optisch bis ganz nach unten verlängern, auch bei langen Seiten */
  body.app-body { background: linear-gradient(to right, var(--rotus-sidebar-bg) var(--rotus-sidebar-width), var(--rotus-surface) var(--rotus-sidebar-width)); }
  .app-main { background: var(--rotus-surface); }
}

/* ---------- Grundgerüst ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-content { padding: 1.5rem; max-width: 1400px; width: 100%; }

/* ---------- Seitennavigation ---------- */
.app-sidebar {
  --bs-offcanvas-width: var(--rotus-sidebar-width);
  --bs-offcanvas-bg: var(--rotus-sidebar-bg);
  background: var(--rotus-sidebar-bg);
  color: var(--rotus-sidebar-text);
}
@media (min-width: 992px) {
  .app-sidebar {
    width: var(--rotus-sidebar-width);
    flex: 0 0 var(--rotus-sidebar-width);
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    background: var(--rotus-sidebar-bg) !important;
  }
  /* Bootstrap blendet den Offcanvas-Kopf auf großen Bildschirmen aus – Logo soll sichtbar bleiben */
  .app-sidebar .offcanvas-header { display: flex !important; }
}
.app-brand { padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.app-brand-link { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.app-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, #2f6ea8, #1f4e79);
  color: #fff; font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.app-brand-mark-lg { width: 48px; height: 48px; font-size: 1.4rem; border-radius: 12px; }
.app-brand-text { display: flex; flex-direction: column; font-weight: 700; line-height: 1.15; font-size: 1.05rem; }
.app-brand-text small { font-weight: 400; font-size: .75rem; color: var(--rotus-sidebar-text); }

.app-nav { padding: .75rem; display: flex; flex-direction: column; gap: 2px; }
.app-nav-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem; border-radius: 8px;
  color: var(--rotus-sidebar-text); text-decoration: none; font-weight: 500;
}
.app-nav-link .bi { font-size: 1.1rem; width: 1.25rem; text-align: center; }
.app-nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav-link.active { background: rgba(255,255,255,.12); color: var(--rotus-sidebar-active); }
.app-nav-badge {
  margin-left: auto; font-size: .65rem; text-transform: uppercase; letter-spacing: .04em;
  padding: .1rem .4rem; border-radius: 4px; background: rgba(255,255,255,.08); color: #8ea3bb;
}
.app-sidebar-footer { padding: 1rem 1.25rem; color: #6f849c; border-top: 1px solid rgba(255,255,255,.07); }

/* ---------- Kopfzeile ---------- */
.app-topbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.5rem; background: #fff;
  border-bottom: 1px solid var(--rotus-border);
  position: sticky; top: 0; z-index: 1020;
}
.app-page-title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.btn-icon { font-size: 1.4rem; padding: .15rem .45rem; line-height: 1; }

/* ---------- Karten und Tabellen ---------- */
.card { border-color: var(--rotus-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom-color: var(--rotus-border); padding: .85rem 1.25rem; border-radius: 12px 12px 0 0 !important; }
.table > :not(caption) > * > * { padding: .7rem 1.25rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7785; font-weight: 600; background: #fafbfc; }

.kpi-card .card-body { padding: 1.1rem 1.25rem; }
.kpi-label { color: #5d6b7a; font-size: .85rem; font-weight: 500; }
.kpi-value { font-size: 1.75rem; font-weight: 700; margin-top: .35rem; letter-spacing: -.01em; }
.kpi-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; }

/* ---------- Demo-Kennzeichnung ---------- */
.alert-demo { background: #fff8e6; border: 1px solid #f3d27a; color: #6b4e00; border-radius: 12px; }
.badge-demo {
  display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .15rem .45rem; border-radius: 4px; background: #fff1c7; color: #8a6400; border: 1px solid #f3d27a;
}

/* ---------- Platzhalterseiten ---------- */
.placeholder-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 16px; font-size: 1.8rem;
  background: rgba(31,78,121,.08); color: var(--rotus-primary);
}

.sysinfo dt, .sysinfo dd { padding: .6rem 1.25rem; margin: 0; border-bottom: 1px solid var(--rotus-border); }
.sysinfo dt { font-weight: 500; color: #5d6b7a; }

/* ---------- Anmeldeseite ---------- */
body.auth-body { background: linear-gradient(160deg, #14263a 0%, #1f4e79 100%); min-height: 100vh; }
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 440px; border: 0; border-radius: 16px; }

/* ---------- Messen ---------- */
.kpi-sub { color: #6b7785; font-size: .8rem; margin-top: .15rem; }
.kpi-value-sm { font-size: 1.25rem; margin-top: 0; }
.min-w-0 { min-width: 0; }
.filter-card .form-label { color: #5d6b7a; font-weight: 500; }
.card-muted { background: #fafbfc; border-style: dashed; }
.row-cancelled td, .row-cancelled > *:not(.badge) { opacity: .6; }
.row-cancelled a { text-decoration: line-through; }

.status-badge { font-weight: 600; border: 1px solid transparent; white-space: nowrap; align-self: flex-start; }
.status-vorschlag    { --st-bg: #fff7e0; --st-fg: #8a6400; --st-bd: #f3d27a; }
.status-geplant      { --st-bg: #e7f0fa; --st-fg: #1f4e79; --st-bd: #b7cfe8; }
.status-bestaetigt   { --st-bg: #e5f5ec; --st-fg: #17663b; --st-bd: #a9dcbd; }
.status-abgeschlossen{ --st-bg: #eef0f3; --st-fg: #4a5563; --st-bd: #d3d8de; }
.status-abgesagt     { --st-bg: #fdecec; --st-fg: #a3262a; --st-bd: #f2b8b9; }
.status-badge, .cal-event, .legend-dot { background: var(--st-bg); color: var(--st-fg); border-color: var(--st-bd); }

.role-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: #4a5563; white-space: nowrap; }
.role-aussteller { color: #7a4b00; }
.role-beides { color: #4b3f8f; }

.cal-title { min-width: 9rem; text-align: center; }
.cal-table { table-layout: fixed; }
.cal-table th { text-align: center; }
.cal-table td { height: 108px; vertical-align: top; padding: .35rem .25rem !important; border-right: 1px solid var(--rotus-border); }
.cal-table td:last-child { border-right: 0; }
.cal-out { background: #fafbfc; }
.cal-out .cal-daynum { color: #b0b8c3; }
.cal-daynum { font-size: .8rem; font-weight: 600; color: #5d6b7a; padding: 0 .25rem .25rem; }
.cal-today .cal-daynum { display: inline-block; background: var(--rotus-primary); color: #fff; border-radius: 999px; padding: 0 .45rem; }
.cal-event {
  display: block; font-size: .72rem; line-height: 1.3; padding: .1rem .35rem; margin-bottom: 2px;
  border: 1px solid; border-radius: 4px; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event:hover { filter: brightness(.96); }
.cal-event.status-abgesagt { text-decoration: line-through; }
.cal-event.cal-cont { text-decoration: none; }
.legend-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; border: 1px solid; vertical-align: -1px; }
.cal-date-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 10px; background: rgba(31,78,121,.08); color: var(--rotus-primary); line-height: 1;
}
.cal-date-box span { font-weight: 700; font-size: 1.05rem; }
.cal-date-box small { font-size: .65rem; text-transform: uppercase; margin-top: 2px; }

.fair-form .card-body { padding: 1.25rem; }
@media (max-width: 575.98px) {
  .form-actions { position: sticky; bottom: 0; background: var(--rotus-surface); padding: .75rem 0; }
  .form-actions .btn { flex: 1; }
}

/* ---------- Aufgaben ---------- */
.task-row { display: flex; align-items: flex-start; gap: .75rem; padding-top: .65rem; padding-bottom: .65rem; }
.task-toggle { margin: 0; padding-top: .1rem; }
.task-check { width: 1.25rem; height: 1.25rem; cursor: pointer; margin: 0; }
.task-body { flex: 1 1 auto; min-width: 0; cursor: pointer; margin: 0; }
.task-title { display: block; }
.task-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .8rem; color: #6b7785; }
.task-fair { color: #4a5563; }
.task-due.due-ueberfaellig { color: #b42318; font-weight: 600; }
.task-due.due-heute { color: #b54708; font-weight: 600; }
.task-due.due-bald { color: #8a6400; }
.task-row.is-done .task-title { text-decoration: line-through; color: #8a95a3; }
.task-row.is-done { background: #fafbfc; }
.task-actions { display: flex; gap: .1rem; opacity: .55; }
.task-row:hover .task-actions { opacity: 1; }
.task-actions form { margin: 0; }
.btn-icon-sm { padding: .15rem .4rem; line-height: 1; color: #5d6b7a; }
.btn-icon-sm:hover { background: #eef0f3; }
.template-table td { padding-top: .45rem !important; padding-bottom: .45rem !important; }
.template-new { background: #fafbfc; }
.template-table .form-check-input, .task-check { border-color: #98a2b3; }
@media (max-width: 575.98px) {
  .task-check { width: 1.45rem; height: 1.45rem; }   /* größere Tippfläche auf dem Handy */
  .task-actions { opacity: 1; }
}

/* ---------- Dokumente ---------- */
.doc-row { display: flex; align-items: center; gap: .75rem; }
.doc-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 8px; background: rgba(31,78,121,.08); color: var(--rotus-primary);
}
.doc-body { flex: 1 1 auto; min-width: 0; text-decoration: none; color: inherit; }
.doc-body:hover .doc-title { text-decoration: underline; }
.doc-title { display: block; font-weight: 500; overflow-wrap: anywhere; }
.doc-meta { display: block; font-size: .78rem; color: #6b7785; }
.doc-row:hover .task-actions { opacity: 1; }

/* ---------- Aussteller & Bewertung ---------- */
.rating-A { --rt-bg: #e5f5ec; --rt-fg: #17663b; --rt-bd: #6fcf97; --rt-on: #1e8e4e; }
.rating-B { --rt-bg: #e7f0fa; --rt-fg: #1f4e79; --rt-bd: #8fb3da; --rt-on: #2f6ea8; }
.rating-C { --rt-bg: #fff7e0; --rt-fg: #8a6400; --rt-bd: #f3d27a; --rt-on: #c48a00; }
.rating-N { --rt-bg: #f1f2f4; --rt-fg: #5d6b7a; --rt-bd: #c8ced6; --rt-on: #6b7785; }
.rating-chip {
  display: inline-flex; gap: .3rem; align-items: center; padding: .1rem .55rem; border-radius: 999px; font-weight: 600;
  background: var(--rt-bg, #f4f6f9); color: var(--rt-fg, #4a5563); border: 1px solid var(--rt-bd, #d3d8de); text-decoration: none; font-size: .8rem;
}
.rating-btn {
  --bs-btn-padding-x: .6rem; min-width: 2.2rem; font-weight: 700;
  background: #fff; color: var(--rt-fg, #4a5563); border: 1px solid var(--rt-bd, #d3d8de);
}
.rating-btn:hover { background: var(--rt-bg, #f4f6f9); color: var(--rt-fg, #4a5563); border-color: var(--rt-bd, #c8ced6); }
.rating-btn.active, .btn-check:checked + .rating-btn {
  background: var(--rt-on, #4a5563); color: #fff; border-color: var(--rt-on, #4a5563);
}
.rating-group .btn { border-radius: 0; }
.rating-group .btn:first-child { border-radius: 6px 0 0 6px; }
.rating-group .btn:last-child { border-radius: 0 6px 6px 0; }
.rating-form { margin: 0; }
.rating-choice { display: flex; flex-wrap: wrap; gap: .4rem; }
.rating-choice .rating-btn { font-weight: 600; font-size: .85rem; }

.ex-row { display: flex; align-items: center; gap: 1rem; }
.ex-loc { width: 6.5rem; flex-shrink: 0; display: flex; flex-direction: column; font-size: .8rem; line-height: 1.25; }
.ex-hall { font-weight: 700; color: #1f4e79; }
.ex-stand { color: #4a5563; }
.ex-main { flex: 1 1 auto; min-width: 0; }
.ex-name { font-weight: 600; }
.ex-meta { display: flex; flex-wrap: wrap; gap: .1rem .9rem; font-size: .8rem; color: #6b7785; }
.ex-meta a { color: #4a5563; }
.ex-products { font-size: .8rem; color: #4a5563; margin-top: .15rem; }
.ex-row[data-rating="N"] .ex-name { color: #8a95a3; }
.ex-rate { flex-shrink: 0; }

.rate-card { max-width: 820px; }
.rate-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
@media (min-width: 768px) { .rate-buttons { grid-template-columns: repeat(4, 1fr); } }
.rate-buttons .rating-btn { font-size: .95rem; padding: .7rem .5rem; }

.import-steps { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .8rem; }
.import-steps .step { padding: .25rem .7rem; border-radius: 999px; background: #eef0f3; color: #6b7785; }
.import-steps .step.active { background: var(--rotus-primary); color: #fff; }
.import-steps .step.done { background: #e5f5ec; color: #17663b; }
.raw-table { font-size: .75rem; }
.raw-table th, .raw-table td { white-space: nowrap; padding: .3rem .6rem !important; }
.raw-table thead th { text-transform: none; letter-spacing: 0; }
.preview-table { font-size: .82rem; }
.preview-table td, .preview-table th { padding: .35rem .7rem !important; }
.pv-fehler td { background: #fdf2f2; }
.pv-dublette_datei td, .pv-vorhanden td { color: #8a95a3; }

@media (max-width: 767.98px) {
  .ex-row { flex-wrap: wrap; gap: .4rem .8rem; }
  .ex-loc { width: auto; flex-direction: row; gap: .4rem; order: 0; }
  .ex-main { flex-basis: 100%; order: 1; }
  .ex-rate { order: 2; }
  .rating-btn { min-width: 2.6rem; padding-top: .35rem; padding-bottom: .35rem; }
}

/* ---------- Besuchsplan, Kontakte, Notizen ---------- */
.chip-scroll { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; -webkit-overflow-scrolling: touch; }
.day-chip {
  flex-shrink: 0; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--rotus-border);
  background: #fff; color: #4a5563; text-decoration: none; font-size: .85rem; font-weight: 500; white-space: nowrap;
}
.day-chip.active { background: var(--rotus-primary); border-color: var(--rotus-primary); color: #fff; }
.day-chip-sm { font-size: .78rem; padding: .25rem .65rem; }
.plan-day { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7785; margin: 1.25rem 0 .5rem; font-weight: 700; }
.plan-row { display: flex; align-items: center; gap: .9rem; }
.plan-where { width: 5.5rem; flex-shrink: 0; display: flex; flex-direction: column; line-height: 1.2; }
.plan-time { font-weight: 700; color: var(--rotus-primary); }
.plan-stand { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.plan-main { flex: 1 1 auto; min-width: 0; }
.plan-actions { display: flex; gap: .35rem; flex-shrink: 0; }
.plan-actions form { display: flex; gap: .35rem; margin: 0; }
.visit-btn { border: 1px solid var(--rotus-border); background: #fff; min-width: 2.4rem; }
.visit-btn-besucht { color: #17663b; }
.visit-btn-ausgefallen { color: #a3262a; }
.visit-btn-besucht.active, .btn-check:checked + .visit-btn-besucht { background: #1e8e4e; border-color: #1e8e4e; color: #fff; }
.visit-btn-ausgefallen.active, .btn-check:checked + .visit-btn-ausgefallen { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn-check:checked + .visit-btn-offen { background: #6b7785; border-color: #6b7785; color: #fff; }
.btn-check:checked + .visit-btn-geplant { background: var(--rotus-primary); border-color: var(--rotus-primary); color: #fff; }
.visit-choice { display: flex; flex-wrap: wrap; gap: .35rem; }
.visit-row-besucht .plan-main a, .visit-row-ausgefallen .plan-main a { color: #8a95a3; }
.visit-row-besucht { background: #f4fbf6; }
.visit-row-ausgefallen .plan-main a { text-decoration: line-through; }
.visit-chip { display: inline-flex; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-weight: 600; font-size: .8rem; border: 1px solid #d3d8de; background: #f4f6f9; color: #4a5563; }
.visit-besucht { background: #e5f5ec; color: #17663b; border-color: #a9dcbd; }
.visit-geplant { background: #e7f0fa; color: #1f4e79; border-color: #b7cfe8; }
.visit-ausgefallen { background: #fdecec; color: #a3262a; border-color: #f2b8b9; }
.note-row { font-size: .9rem; }
.note-meta { font-size: .75rem; color: #6b7785; margin-bottom: .15rem; }
@media (max-width: 575.98px) {
  .plan-row { gap: .6rem; }
  .plan-where { width: 4.2rem; }
  .visit-btn { min-width: 2.75rem; padding-top: .45rem; padding-bottom: .45rem; }  /* große Tippflächen */
}

/* ---------- Bewertungs-Vorschläge ---------- */
.sugg { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; margin-top: .3rem; font-size: .8rem; }
.sugg-long { background: #f7f5ff; border: 1px dashed #c9bff2; border-radius: 8px; padding: .5rem .65rem; font-size: .85rem; }
.sugg-chip {
  display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .5rem; border-radius: 999px; font-weight: 600;
  font-size: .75rem; border: 1px dashed; text-decoration: none; white-space: nowrap;
}
.sugg-A { color: #17663b; border-color: #6fcf97; background: #f2fbf5; }
.sugg-B { color: #1f4e79; border-color: #8fb3da; background: #f3f7fc; }
.sugg-C { color: #8a6400; border-color: #f3d27a; background: #fffaf0; }
.sugg-N { color: #5d6b7a; border-color: #c8ced6; background: #f7f8fa; }
.sugg-U { color: #6b4fbf; border-color: #c9bff2; background: #f7f5ff; }
.sugg-reason { color: #4a5563; }
.sugg-sources { flex-basis: 100%; font-size: .75rem; color: #6b7785; overflow-wrap: anywhere; }
.sugg-take { margin-top: .35rem; display: block; width: 100%; font-size: .75rem; padding: .15rem .4rem;
  border: 1px solid #6b4fbf; color: #6b4fbf; background: #fff; }
.sugg-take:hover { background: #6b4fbf; color: #fff; }
.rating-btn.is-suggested { box-shadow: 0 0 0 3px #c9bff2; }

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
  .app-content { padding: 1rem; }
  .app-topbar { padding: .6rem 1rem; }
  .table > :not(caption) > * > * { padding: .6rem .75rem; }
  .kpi-value { font-size: 1.4rem; }
  .card-header { flex-wrap: wrap; row-gap: .25rem; }
}
@media (max-width: 575.98px) {
  .table .badge { font-size: .7rem; }
  .card-header .small { font-size: .8rem; }
}

/* ---------- Phase 5: Angebote, Auswertung, E-Mail-Entwürfe ---------- */
.filter-chip {
  display: inline-flex; gap: .3rem; align-items: center; padding: .15rem .65rem; border-radius: 999px;
  background: #fff; color: #4a5563; border: 1px solid #d3d8de; text-decoration: none; font-size: .8rem; font-weight: 600;
}
.filter-chip:hover { background: #eef2f7; color: #1f2933; }
.filter-chip.active { background: var(--rotus-primary); border-color: var(--rotus-primary); color: #fff; }
.filter-chip-warn { color: #8a5a00; border-color: #f0c36d; background: #fff8e6; }

.offer-status { font-weight: 600; border: 1px solid transparent; }
.offer-angefordert { background: #eef1f4; color: #4a5563; border-color: #d3d8de; }
.offer-erhalten { background: #e3f1fb; color: #0b5c8f; border-color: #b7d8ef; }
.offer-pruefung { background: #e8ecf8; color: #2b3f8c; border-color: #c3cbec; }
.offer-verhandlung { background: #fff4dc; color: #8a5a00; border-color: #f0d08f; }
.offer-abgeschlossen { background: #e3f4ea; color: #1d6b3d; border-color: #b4dfc4; }
.offer-abgelehnt { background: #f6f6f6; color: #8a929c; border-color: #e1e3e6; text-decoration: line-through; }

.offer-row { display: flex; gap: 1rem; align-items: flex-start; }
.offer-main { flex: 1 1 auto; min-width: 0; text-decoration: none; color: inherit; }
.offer-main:hover .offer-title { text-decoration: underline; }
.offer-title { display: block; font-weight: 600; color: var(--rotus-primary); }
.offer-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .82rem; margin-top: .15rem; }
.offer-side { flex: 0 0 auto; text-align: right; }
.offer-value { font-weight: 600; margin-top: .25rem; white-space: nowrap; }

.status-choice { display: flex; flex-wrap: wrap; gap: .35rem; }
.status-choice .btn { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .6rem; font-size: .82rem; }

.kpi { background: #fff; border: 1px solid var(--rotus-border); border-radius: .6rem; padding: .8rem 1rem; height: 100%; }
.kpi-label { font-size: .78rem; color: #6c7682; text-transform: none; }
.kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.kpi-sub { font-size: .78rem; color: #6c7682; }

.items-table th, .items-table td { white-space: nowrap; vertical-align: middle; }
.items-table td.desc { white-space: normal; min-width: 14rem; }
.items-edit input.form-control-sm { min-width: 5.5rem; }
.items-edit td:first-child input { min-width: 9.5rem; }
.items-edit td.desc input { min-width: 16rem; }

.mail-body { font-family: inherit; min-height: 22rem; }
.placeholder-list code { font-size: .8rem; }
@media (max-width: 575.98px) {
  .offer-row { flex-direction: column; gap: .35rem; }
  .offer-side { text-align: left; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
  .offer-value { margin-top: 0; }
}
.task-ref { font-size: .8rem; text-decoration: none; position: relative; z-index: 1; }
.task-ref:hover { text-decoration: underline; }

/* ---------- Reiterleiste je Messe ---------- */
.fair-head { margin: -.25rem 0 1rem; }
.fair-head-title { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-bottom: .5rem; }
.fair-head-name { font-weight: 700; font-size: 1.05rem; color: #1f2933; text-decoration: none; }
.fair-head-name:hover { text-decoration: underline; }
.fair-head-meta { font-size: .85rem; color: #6c7682; }
.fair-tabs {
  display: flex; gap: .25rem; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  border-bottom: 1px solid var(--rotus-border); -webkit-overflow-scrolling: touch;
}
.fair-tabs::-webkit-scrollbar { display: none; }
.fair-tab {
  display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .6rem; color: #4a5563; text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; font-size: .88rem; flex: 0 0 auto;
}
.fair-tab:hover { color: var(--rotus-primary); background: rgba(31, 78, 121, .04); }
.fair-tab.active { color: var(--rotus-primary); border-bottom-color: var(--rotus-primary); font-weight: 600; }
.fair-tab-badge { font-size: .72rem; font-weight: 600; background: #e9edf2; color: #4a5563; border-radius: 999px; padding: .05rem .45rem; }
.fair-tab.active .fair-tab-badge { background: var(--rotus-primary); color: #fff; }
.fair-tab-badge.warn { background: #fff4dc; color: #8a5a00; }

/* ---------- Ablauf-Checkliste Messebesuch ---------- */
.flow { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991.98px) { .flow { grid-template-columns: 1fr; } }
.flow-phase-name { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6c7682; margin-bottom: .35rem; }
.flow-step {
  display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .6rem; border-radius: .5rem; text-decoration: none;
  color: inherit; border: 1px solid transparent;
}
.flow-step:hover { background: #f4f6f9; }
.flow-step.is-next { border-color: #b7cbe0; background: #f2f7fc; }
.flow-icon { flex: 0 0 auto; font-size: 1.05rem; line-height: 1.3; }
.flow-erledigt .flow-icon { color: #1d8a4a; }
.flow-begonnen .flow-icon { color: #c98a00; }
.flow-offen .flow-icon { color: #aab2bd; }
.flow-title { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.flow-value { font-size: .8rem; color: #6c7682; }
.flow-hint { font-size: .78rem; color: #8a5a00; font-weight: 600; }
.flow-next { font-size: .72rem; font-weight: 700; color: var(--rotus-primary); text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 991.98px) {
  .fair-tabs { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
}
@media (max-width: 575.98px) {
  .fair-head-name { display: none; }
}
.flow-info .flow-icon { color: var(--rotus-primary); }
.qr-box { background: #fff; border: 1px solid var(--rotus-border); border-radius: .5rem; padding: .4rem; display: inline-block; }
.qr-box img { display: block; width: 100%; height: auto; }
.product-row.is-packed .product-name { text-decoration: line-through; color: #8a929c; }
.stat-big { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.badge-vorlaeufig { background: #fff4dc; color: #8a5a00; border: 1px solid #f0d08f; font-weight: 600; }
/* Viele Reiter (Messe als Besucher & Aussteller): auf mittleren Bildschirmen ohne Symbole, damit alles passt */
@media (min-width: 992px) and (max-width: 1599.98px) {
  .fair-tabs-many .fair-tab > i { display: none; }
  .fair-tabs-many .fair-tab { padding: .5rem .5rem; }
}

/* ---------- Unternavigation eines Bereichs (z. B. Messen: Liste · Kalender · Recherche) ---------- */
.section-tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.section-tabs::-webkit-scrollbar { display: none; }
.section-tab {
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 999px; flex: 0 0 auto;
  color: #4a5563; text-decoration: none; font-size: .86rem; font-weight: 500; border: 1px solid #dfe4ea; background: #fff;
}
.section-tab:hover { color: var(--rotus-primary); border-color: #b7cbe0; }
.section-tab.active { background: var(--rotus-primary); border-color: var(--rotus-primary); color: #fff; }
.section-tab.active .fair-tab-badge { background: rgba(255,255,255,.2); color: #fff; }
@media (max-width: 575.98px) { .section-tabs + .btn { margin-left: 0 !important; } }

/* Gruppen-Trenner in der Reiterleiste einer Messe (Vorbereiten · Auf der Messe · Nachbereiten) */
.fair-tab-sep { flex: 0 0 auto; width: 1px; align-self: center; height: 1.2rem; background: #dfe4ea; margin: 0 .3rem; }
.flow-due { font-size: .76rem; color: #6c7682; }
.flow-due.is-overdue { color: #b02a37; font-weight: 600; }

/* ---------- Startseite ---------- */
.section-title { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6c7682; margin: 0 0 .6rem; }
.focus-card.is-live { border-color: #2e8b57; box-shadow: 0 0 0 1px #2e8b57 inset; }
.focus-countdown { font-weight: 600; color: #1f4e79; }
.progress-thin { height: .35rem; }
.focus-next {
  position: relative; display: block; padding: .6rem 2.2rem .6rem .8rem; border-radius: .5rem; text-decoration: none; color: inherit;
  background: #f2f7fc; border: 1px solid #b7cbe0;
}
.focus-next:hover { background: #e8f1fa; }
.focus-next.is-overdue { background: #fdf1f2; border-color: #f0c2c7; }
.focus-arrow { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: #1f4e79; }
.focus-kpis { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .75rem; font-size: .82rem; }
.focus-kpis a { color: #4a5563; text-decoration: none; }
.focus-kpis a:hover { color: var(--rotus-primary); text-decoration: underline; }
.focus-kpis strong { color: #14263a; }

/* ---------- Messe-Übersicht ---------- */
.live-card { border-color: #2e8b57; }
.live-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #2e8b57; box-shadow: 0 0 0 3px rgba(46,139,87,.2); }
.live-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.live-actions .btn { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .95rem; padding: .7rem .4rem; }
.live-actions .btn i { font-size: 1.4rem; }
.details-card > summary { list-style: none; cursor: pointer; }
.details-card > summary::-webkit-details-marker { display: none; }
.details-card[open] .details-chevron { transform: rotate(180deg); }
.details-card:not([open]) > summary { border-bottom: 0; border-radius: inherit; }

/* ---------- Aussteller-Seite: Kurzprofil oben, Arbeit rechts, Stammdaten unten ---------- */
.ex-layout { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "b" "c"; }
@media (min-width: 992px) {
  .ex-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; grid-template-areas: "a b" "c b"; align-items: start; }
}
.ex-area-a { grid-area: a; } .ex-area-b { grid-area: b; } .ex-area-c { grid-area: c; }
.ex-location { font-size: 1.1rem; font-weight: 700; color: #14263a; }
.ex-products { font-size: .9rem; color: #36414d; }
.ex-products > summary { list-style: none; cursor: pointer; }
.ex-products > summary::-webkit-details-marker { display: none; }
.ex-products[open] > summary { display: none; }
.ex-more { color: var(--rotus-primary); font-weight: 600; white-space: nowrap; }
.ex-rating { background: #fafbfc; }

/* ---------- KI-Analyse ---------- */
.ai-card { border-color: #d9cdf2; }
.ai-card > .card-header { background: #f7f4fd; }
.ai-facts dt { font-weight: 600; color: #4a5563; }
.ai-facts dd { margin-bottom: .35rem; }
