:root{
  --sidebar-bg:#0f141b;
  --topbar-bg:#151b22;
  --card-bg:#ffffff;
  --border:#e6e9ef;
  --muted:#6b7280;
  --shadow:0 6px 20px rgba(16,24,40,.06);
  --radius:14px;
}

body { background:#f3f5f9; }

.app-shell{
  display:flex;
  min-height:100vh;
}

.app-sidebar{
  width:260px;
  background:var(--sidebar-bg);
  color:#cbd5e1;
  display:flex;
  flex-direction:column;
  padding:18px 14px;
}

.app-brand{ padding:8px 10px 18px 10px; }
.app-brand-title{ font-size:22px; font-weight:700; color:#fff; letter-spacing:.2px; }
.app-brand-sub{ font-size:12px; opacity:.8; margin-top:2px; }

.app-nav{ display:flex; flex-direction:column; gap:6px; padding:6px; }
.app-nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  color:#cbd5e1;
  text-decoration:none;
}
.app-nav-item:hover{ background:rgba(255,255,255,.06); color:#fff; }
.app-nav-item.active{ background:rgba(255,255,255,.10); color:#fff; }
.app-nav-item.disabled{ opacity:.45; cursor:not-allowed; }
.app-sidebar-footer{ margin-top:auto; padding:6px; }

.app-main{ flex:1; display:flex; flex-direction:column; }
.app-topbar{
  height:56px;
  background:var(--topbar-bg);
  color:#e5e7eb;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.app-topbar-title{ font-weight:600; }
.app-topbar-right{ display:flex; gap:12px; align-items:center; }
.app-pill{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
}
.app-user{ opacity:.85; font-size:13px; }

.app-content{
  padding:18px;
}

.app-card{
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

.app-card-title{
  font-weight:700;
  margin-bottom:10px;
}

.app-kicker{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.app-h1{
  font-size:28px;
  font-weight:800;
  margin:0 0 6px 0;
}

.app-info{
  border:1px solid #dbe7ff;
  background:#f4f8ff;
  border-radius:12px;
  padding:12px 14px;
}
.app-info-title{ font-weight:700; margin-bottom:6px; }

.app-pre{
  background:#0b1220;
  color:#d1d5db;
  border-radius:12px;
  padding:12px;
  max-height:320px;
  overflow:auto;
  margin:0;
}

.app-dropzone{
  border:1px dashed #cdd5e1;
  border-radius:12px;
  padding:18px;
  text-align:center;
  background:#fbfcfe;
}
.app-dropzone-title{ font-weight:700; }

.app-item{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px 12px;
  margin-bottom:10px;
  background:#fff;
}

.app-subtitle{
  font-weight:700;
  font-size:12px;
  color:var(--muted);
  margin-bottom:4px;
}

.app-kv .k{
  display:inline-block;
  width:90px;
  color:var(--muted);
  font-size:12px;
}
.app-kv .v{
  font-weight:600;
}
/* Unmatched cards */
.app-um-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-bottom: 12px;
}
.app-chip {
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}
.app-chip:hover { background: rgba(0,0,0,.03); }
.app-chip-score { font-weight: 700; }
.app-chip-nr { font-weight: 800; }
.app-chip-name { color: rgba(0,0,0,.65); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width: 360px; }

.app-picked-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Search Portal (dropdown) */
#articleSearchPortal {
  position: fixed;
  z-index: 9999;
  display: none;
  max-height: 320px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
}
#articleSearchPortal .asp-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
}
#articleSearchPortal .asp-item:hover,
#articleSearchPortal .asp-item.is-active {
  background: rgba(0,0,0,.04);
}
#articleSearchPortal .asp-nr { font-weight: 900; }
#articleSearchPortal .asp-name { color: rgba(0,0,0,.65); font-size: 13px; }

/* --------------------------------------------
   Unmatched cards: weniger "grau", mehr Hierarchie
-------------------------------------------- */
.app-um-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:14px;
  box-shadow: 0 6px 18px rgba(16,24,40,.06);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.app-um-card:hover{
  border-color: rgba(13,110,253,.18);
  box-shadow: 0 10px 28px rgba(16,24,40,.10);
}

.app-um-head .fw-semibold{
  font-size: .95rem;
}

.app-um-head .text-muted.small{
  line-height: 1.3;
}

/* --------------------------------------------
   Suchfeld: sichtbar + "App-Feeling"
-------------------------------------------- */
.app-article-search{
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fbfcff;
  padding: 10px 12px;
  font-size: .95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.app-article-search:focus{
  outline: none;
  background: #fff;
  border-color: rgba(13,110,253,.55);
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.15);
}

/* Optional: wenn du ein Search-Icon willst, ohne HTML zu ändern */
.app-article-search{
  background-image: linear-gradient(transparent,transparent), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2390a0b7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px 50%;
  padding-left: 38px;
}

/* --------------------------------------------
   Top-Candidate Chips: klarer, klickbarer
-------------------------------------------- */
.app-chip{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  max-width: 100%;
}

.app-chip:hover{
  transform: translateY(-1px);
  border-color: rgba(0,0,0,.18);
  box-shadow: 0 8px 18px rgba(16,24,40,.10);
}

.app-chip:active{
  transform: translateY(0);
  box-shadow: none;
}

/* Score-Pill nur für Zahl */
.app-chip-score{
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.10);
  min-width: 64px;
  text-align: center;
}

.app-chip-nr{
  font-weight: 800;
  white-space: nowrap;
}

.app-chip-name{
  color: rgba(15,23,42,.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}

/* --------------------------------------------
   PICKED State: deutlich sichtbar
-------------------------------------------- */
.app-um-card.is-picked{
  border-color: rgba(25,135,84,.35);              /* bootstrap success */
  box-shadow: 0 10px 28px rgba(25,135,84,.12);
  background: linear-gradient(180deg, rgba(25,135,84,.06), rgba(255,255,255,1) 50%);
}

.app-um-card.is-picked .app-article-search{
  border-color: rgba(25,135,84,.45);
  background: rgba(25,135,84,.06);
}

.app-picked-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(25,135,84,.25);
  background: rgba(25,135,84,.10);
  color: rgba(12,74,45,1);
  font-weight: 700;
}

.app-picked-text b{
  font-weight: 900;
}

/* "Ändern" Button neben Auswahl etwas präsenter */
.app-clear-pick{
  border-radius: 10px;
}

/* Hint dezenter aber lesbar */
.app-um-hint{
  color: rgba(15,23,42,.55) !important;
}

/* --------------------------------------------
   Search Portal Dropdown (dein #articleSearchPortal)
-------------------------------------------- */
#articleSearchPortal{
  position: fixed;
  z-index: 9999;
  display: none;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 20px 60px rgba(16,24,40,.18);
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}

#articleSearchPortal .asp-item{
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

#articleSearchPortal .asp-item:hover,
#articleSearchPortal .asp-item.is-active{
  background: rgba(13,110,253,.08);
}

#articleSearchPortal .asp-nr{
  font-weight: 900;
  letter-spacing: .2px;
}

#articleSearchPortal .asp-name{
  color: rgba(15,23,42,.65);
  font-size: .9rem;
}

/* --------------------------------------------
   Score colors (über JS gesetzt: --score-color)
-------------------------------------------- */
.app-chip-score{
  color: var(--score-color, rgba(15,23,42,.8));
  border-color: color-mix(in srgb, var(--score-color, #64748b) 30%, transparent);
  background: color-mix(in srgb, var(--score-color, #64748b) 12%, white);
}

.actionbar{ flex-wrap: nowrap; }

.app-search .input-group-text{
  background: #fff;
  border-color: rgba(0,0,0,.08);
}
.app-search input{
  border-color: rgba(0,0,0,.08);
}

.app-table .table{
  border-collapse: separate;
  border-spacing: 0;
}
.app-table .table tbody td{
  padding-top: 14px;
  padding-bottom: 14px;
}

/* --- Action buttons: einheitlich --- */
.ab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.14);
  background:#fff;
  color:#0f172a;
  padding:0;
  line-height:1;
  transition: all .12s ease;
}

.ab i{
  font-size:16px;           /* fixes „mal groß mal klein“ */
  line-height:1;
}

.ab:hover{
  transform: translateY(-1px);
  border-color: rgba(0,0,0,.22);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.ab:active{
  transform:none;
  box-shadow:none;
}

/* Semantische Varianten (nur Farbe, gleiche Form) */
.ab--primary{ color:#1d4ed8; border-color: rgba(29,78,216,.35); }
.ab--success{ color:#15803d; border-color: rgba(21,128,61,.35); }
.ab--danger { color:#dc2626; border-color: rgba(220,38,38,.35); }
.ab--muted  { color:#334155; }

/* Actionbar layout */
.actionbar{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:nowrap;
}

.actionbar .ab[disabled],
.actionbar .ab.is-disabled{
  opacity:.5;
  pointer-events:none;
}

/* Status pill (optional: runder + nicer) */
.badge{
  border-radius:999px;
  padding:.35em .6em;
  letter-spacing:.02em;
}

#partySearchPortal { 
  position: fixed;
  z-index: 9999;
  display: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  max-height: 320px;
  overflow: auto;
  padding: 6px 0;
}

#partySearchPortal .asp-item{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  padding:10px 12px;
  display:block;
  cursor:pointer;
}

#partySearchPortal .asp-item:hover,
#partySearchPortal .asp-item.is-active{
  background: rgba(0,0,0,.06);
}

#partySearchPortal .asp-row{
  display:flex;
  gap:10px;
}

#partySearchPortal .asp-nr{
  font-weight:600;
  font-size:.95rem;
  line-height:1.15;
}

#partySearchPortal .asp-name{
  font-size:.80rem;
  color:#6c757d; /* bootstrap text-muted */
  line-height:1.1;
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Party match pills */
.pill {
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.18rem .55rem;
  border-radius:999px;
  font-size:.75rem;
  line-height:1.2;
  border:1px solid rgba(0,0,0,.08);
  background:#f8fafc;
  color:#0f172a;
  white-space:nowrap;
}

.pill--ok    { background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }
.pill--warn  { background:#fffbeb; border-color:#fde68a; color:#92400e; }
.pill--bad   { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.pill--muted { background:#f1f5f9; border-color:#e2e8f0; color:#475569; }

.pill code {
  font-size:.72rem;
  padding:0 .25rem;
  border-radius:.4rem;
  background:rgba(0,0,0,.04);
}
.pill-soft{
  display:inline-flex;
  align-items:center;
  padding:.18rem .55rem;
  border-radius:999px;
  font-size:.75rem;
  line-height:1.2;
  border:1px solid rgba(0,0,0,.12);
  background:#f7f7f7;
  color:#333;
}

.pill-gray  { background:#f6f6f7; border-color:rgba(0,0,0,.10); }
.pill-blue  { background:#eef5ff; border-color:rgba(30,90,200,.18); color:#1f4b99; }
.pill-green { background:#eef9f1; border-color:rgba(20,120,60,.18); color:#1f6a3b; }
.pill-amber { background:#fff6e8; border-color:rgba(180,120,30,.22); color:#8a5a12; }
.pill-purple{ background:#f5f0ff; border-color:rgba(110,60,200,.18); color:#5b3aa6; }


.app-um-card.is-freetext { opacity: .75; border-style: dashed; }
.app-um-card.is-freetext .app-top-cands,
.app-um-card.is-freetext .app-picked,
.app-um-card.is-freetext .app-article-search { pointer-events: none; opacity: .5; }

/* Input bei Freitext standardmäßig kompakt */
.app-um-card .js-ft-title {
  height: 32px;
  padding: .25rem .5rem;
  font-size: .875rem;
}

/* Hinweis kleiner + weniger prominent */
.app-um-card .ft-hint {
  font-size: .8rem;
  opacity: .8;
  margin-top: .25rem;
}

/* =========================
   FlexiPilot Theme v1
   ========================= */

:root{
  --bg: #0b1220;
  --surface: #0f172a;
  --surface-2:#111c33;
  --card:#ffffff;
  --muted:#6b7280;
  --text:#0f172a;

  --border: rgba(15, 23, 42, .10);

  --accent:#3b82f6;        /* blau */
  --accent-2:#22c55e;      /* grün */
  --warn:#f59e0b;
  --danger:#ef4444;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(2,6,23,.08);
  --shadow-sm: 0 6px 18px rgba(2,6,23,.06);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

html, body { height:100%; }
body.app-body{
  font-family: var(--font);
  background: #f3f6fb;
  color: var(--text);
}

.app-shell{
  min-height:100vh;
  display:flex;
}

/* Sidebar */
.app-sidebar{
  width: 270px;
  background: radial-gradient(1200px 800px at 20% 0%, rgba(59,130,246,.18), transparent 60%),
              radial-gradient(900px 600px at 90% 20%, rgba(34,197,94,.12), transparent 55%),
              var(--surface);
  color: #e5e7eb;
  padding: 20px 16px;
  display:flex;
  flex-direction:column;
  border-right: 1px solid rgba(255,255,255,.06);
}

.app-brand{
  padding: 10px 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 12px;
}

.app-brand-title{
  font-weight: 750;
  letter-spacing: .2px;
  line-height: 1.1;
}
.app-brand-sub{
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(229,231,235,.72);
}

.app-nav{ padding: 8px 6px; display:flex; flex-direction:column; gap: 6px; }

.app-nav-item{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(229,231,235,.86);
  text-decoration:none;
  transition: background .15s ease, transform .15s ease;
}

.app-nav-item:hover{
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
  color: #fff;
}

.app-nav-item.active{
  background: rgba(59,130,246,.18);
  color:#fff;
  border: 1px solid rgba(59,130,246,.22);
}

.app-nav-icon{
  width: 26px;
  height: 26px;
  display:grid;
  place-items:center;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}

.app-sidebar-footer{ margin-top:auto; padding: 8px 6px 0; }

/* Main / Topbar */
.app-main{
  flex: 1;
  display:flex;
  flex-direction:column;
  min-width: 0;
}

.app-topbar{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243,246,251,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,.08);
  padding: 14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.app-topbar-title{
  font-size: 14px;
  color: rgba(15,23,42,.65);
  letter-spacing:.2px;
  font-weight:600;
}

.app-content{
  padding: 22px;
}

/* Cards / Panels */
.card, .modal-content{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card .card-header{
  background: transparent;
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 14px 16px;
  font-weight: 700;
}

/* KPI strip */
.fp-kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.fp-kpi{
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 14px 14px;
  display:flex;
  gap: 12px;
  align-items:center;
}

.fp-kpi-ico{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(59,130,246,.12);
  color: var(--accent);
}

.fp-kpi .label{ font-size: 12px; color: rgba(15,23,42,.55); }
.fp-kpi .value{ font-size: 20px; font-weight: 800; line-height: 1.1; }
.fp-kpi .hint{ font-size: 12px; color: rgba(15,23,42,.55); }

/* Tables nicer */
.table{
  --bs-table-bg: transparent;
}
.table thead th{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(15,23,42,.55);
  border-bottom: 1px solid rgba(15,23,42,.08) !important;
  padding-top: 12px;
  padding-bottom: 12px;
}
.table tbody td{
  vertical-align: middle;
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid rgba(15,23,42,.06);
}

/* Status chips */
.badge{
  border-radius: 999px;
  padding: .45em .7em;
  font-weight: 700;
}
.badge.fp-badge{
  background: rgba(15,23,42,.06);
  color: rgba(15,23,42,.72);
  border: 1px solid rgba(15,23,42,.08);
}

/* Buttons: a bit more product-like */
.btn{
  border-radius: 12px;
  font-weight: 650;
}
.btn-primary{
  background: var(--accent);
  border-color: rgba(59,130,246,.0);
  box-shadow: 0 8px 18px rgba(59,130,246,.20);
}
.btn-primary:hover{ filter: brightness(0.98); }
.btn-success{
  background: var(--accent-2);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(34,197,94,.18);
}

/* Layout helpers for pages */
.fp-page-title{
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.02em;
  margin: 6px 0 4px;
}
.fp-page-sub{
  color: rgba(15,23,42,.60);
  margin-bottom: 14px;
}

/* Responsive */
@media (max-width: 1200px){
  .fp-kpis{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .app-sidebar{ width: 240px; }
}
@media (max-width: 820px){
  .app-sidebar{ display:none; }
  .app-content{ padding: 14px; }
  .fp-kpis{ grid-template-columns: 1fr; }
}

.fp-hero{
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 18px 18px;
  margin-bottom: 16px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
}

.fp-hero .title{
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 0;
}
.fp-hero .meta{
  color: rgba(15,23,42,.60);
  margin-top: 4px;
  font-size: 13px;
}

/* ===== Home / Dashboard polish ===== */

.fp-hero{
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
  padding: 16px 16px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 14px;
}
.fp-title{ font-weight: 900; letter-spacing: -.02em; }

.fp-kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1200px){ .fp-kpis{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px){ .fp-kpis{ grid-template-columns: 1fr; } }

.fp-kpi{
  background:#fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
  padding: 14px 14px;
  display:flex;
  align-items:center;
  gap: 12px;
}
.fp-kpi-ico{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(59,130,246,.12);
  color: #3b82f6;
}
.fp-kpi-ico.fp-ok{ background: rgba(34,197,94,.14); color:#16a34a; }
.fp-kpi-ico.fp-warn{ background: rgba(245,158,11,.16); color:#d97706; }
.fp-kpi-ico.fp-blue{ background: rgba(59,130,246,.12); color:#3b82f6; }

.fp-kpi .label{ font-size:12px; color: rgba(15,23,42,.55); }
.fp-kpi .value{ font-size:20px; font-weight: 900; line-height:1.1; }
.fp-kpi .hint{ font-size:12px; color: rgba(15,23,42,.55); }

/* Card head */
.fp-cardhead{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 12px;
  margin-bottom: 10px;
}
.fp-cardtitle{
  font-weight: 850;
  letter-spacing: -.01em;
  font-size: 16px;
}
.fp-cardsub{
  font-size: 12px;
  color: rgba(15,23,42,.55);
  margin-top: 2px;
}

.fp-search .input-group-text{
  background: #fff;
  border-right: 0;
}
.fp-search .form-control{
  border-left: 0;
}

/* Table polish */
.app-table thead th{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.app-table{
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 14px;
  overflow: hidden;
}

/* Output console */
.fp-console{
  background: #0b1220;
  color: #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  min-height: 140px;
  max-height: 240px;
  overflow:auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  font-size: 12.5px;
  line-height: 1.35;
  white-space: pre-wrap;    /* Umbrüche + wrap */
  word-break: break-word;
}

.app-nav-section { margin-top: 10px; }

.app-nav-section-title{
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .65;
  margin: 14px 10px 6px;
}
.app-nav-icon i{ font-size: 1.05rem; }

th.fp-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.fp-sort .fp-sort-ico { margin-left: .25rem; font-size: .75rem; opacity: .7; }
th.fp-sort.active { text-decoration: underline; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 280px;
  height: 100vh;
  position: sticky; /* bleibt beim Scrollen */
  top: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0,0,0,.08);
  }

.app-nav {
  flex: 1;
  overflow-y: auto;
  padding-bottom: .5rem;
}

/* Footer immer unten */
.app-sidebar-footer {
  margin-top: auto;
  padding: .5rem;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* Toggle Button optisch */
.app-sidebar-toggle {
  white-space: nowrap;
}

/* Collapsed state: auf .app-shell oder body togglen */
.app-shell.is-collapsed .app-sidebar {
  width: 72px;
}

.app-shell.is-collapsed .app-brand-text,
.app-shell.is-collapsed .app-nav-section-title,
.app-shell.is-collapsed .app-nav-label {
  display: none !important;
}

.app-shell.is-collapsed .app-nav-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.app-shell.is-collapsed .app-nav-icon {
  margin: 0 !important;
}

/* Main soll den Rest nehmen */
.app-main {
  flex: 1;
  min-width: 0;
}

.fp-dropzone{
  border: 2px dashed rgba(0,0,0,.15);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  background: rgba(0,0,0,.02);
  cursor: pointer;
  transition: transform .08s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
  user-select: none;
}
.fp-dropzone:hover{
  border-color: rgba(13,110,253,.45);
  background: rgba(13,110,253,.04);
}
.fp-dropzone:focus{
  outline: none;
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.15);
  border-color: rgba(13,110,253,.55);
}
.fp-dropzone.is-dragover{
  border-color: rgba(13,110,253,.75);
  background: rgba(13,110,253,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.fp-dropzone.is-busy{
  opacity: .7;
  pointer-events: none;
}
.fp-dropzone-ico{
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
}
.fp-dropzone-title{
  font-weight: 700;
}
.fp-dropzone-sub{
  font-size: 12px;
  margin-top: 2px;
}

.fp-dropzone-files{
  margin-top: 12px;
  text-align: left;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 10px;
  font-size: 12px;
}
.fp-dropzone-file{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
}
.fp-dropzone-file code{
  font-size: 12px;
}
.fp-dropzone-file .muted{
  opacity: .7;
  font-variant-numeric: tabular-nums;
}
/* --- Table preview modal --- */
#viewTableWrap { padding: 0 6px 14px; }

.fp-tablebar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  padding: 10px 6px 8px;
}

.fp-tabletitle{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
}

.fp-tablemeta{
  margin-top: 2px;
}

.fp-tabletabs{
  padding: 0 6px;
  margin-bottom: 10px !important;
}

.fp-tablecard{
  background:#fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0,0,0,.06);
  overflow:hidden;
}

.fp-table-scroll{
  max-height: 68vh;
  overflow:auto;
}

.fp-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #64748b;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.fp-table tbody td{
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  vertical-align: middle;
}

.fp-table tbody tr:nth-child(even){
  background: rgba(15, 23, 42, .02);
}

.fp-table td, .fp-table th{
  white-space: nowrap;
}

.fp-table.is-wrap td, .fp-table.is-wrap th{
  white-space: normal;
}

/* Optional: Zellen bei langen Texten etwas besser */
.fp-table td{
  max-width: 520px;
}
