/* Visueller Feinschliff fuer Chat und mehrzeilige Eingaben. */
.rail-logo {
  background: transparent !important;
  overflow: visible;
}
.rail-logo::before,
.rail-logo::after,
.rail-logo i {
  display: none !important;
}
.rail-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, .16));
}
#view-chat {
  padding-bottom: 20px;
}
#view-chat .messages {
  scrollbar-width: thin;
  scrollbar-color: #b8c1bd transparent;
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.message {
  animation: message-in .22s ease-out;
}
.assistant .bubble {
  border-radius: 5px 18px 18px 18px;
  box-shadow: 0 10px 30px rgba(26, 37, 41, .055);
}
.user .bubble {
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 8px 24px rgba(32, 42, 46, .12);
}
.composer {
  flex: 0 0 auto;
  padding: 8px;
  border: 1px solid rgba(190, 199, 195, .8);
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 45px rgba(27, 37, 41, .10), 0 2px 8px rgba(27, 37, 41, .05);
  backdrop-filter: blur(14px);
}
.composer textarea {
  display: block;
  min-height: 52px;
  height: 52px;
  max-height: 190px;
  overflow-y: hidden;
  border: 0;
  border-radius: 15px;
  padding: 15px 62px 22px 16px;
  line-height: 1.48;
  box-shadow: none;
  transition: height .12s ease, background .18s ease;
}
.composer textarea:focus {
  border: 0;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(215, 68, 54, .22);
}
.composer button {
  top: auto;
  right: 14px;
  bottom: 14px;
  margin: 0;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, #e05041, #bd3429);
  box-shadow: 0 6px 16px rgba(190, 52, 41, .25);
  transition: transform .16s ease, box-shadow .16s ease;
}
.composer button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(190, 52, 41, .32);
}
.composer > span {
  left: 24px;
  bottom: 10px;
}
.diagnosis {
  margin: 8px 0 0 15px;
  color: var(--muted);
  font-size: 12px;
}
.diagnosis summary {
  cursor: pointer;
  color: #a53930;
  font-weight: 700;
}
.diagnosis pre {
  white-space: pre-wrap;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.terminal {
  outline: none;
  caret-color: #f0a33a;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.terminal:focus-within,
.terminal:focus {
  border-color: #f0a33a;
  box-shadow: 0 18px 48px rgba(18, 25, 22, .18), 0 0 0 3px rgba(240, 163, 58, .13);
}
.terminal pre {
  min-height: 100%;
  white-space: pre;
  word-break: normal;
  overflow: visible;
  tab-size: 8;
  user-select: text;
}
.terminal pre::selection {
  color: #fff;
  background: rgba(215, 68, 54, .78);
}
.terminal-actions .secondary {
  white-space: nowrap;
}
@keyframes message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
  #view-chat { padding-bottom: 10px; }
  .composer { border-radius: 18px; padding: 6px; }
  .composer textarea { min-height: 50px; height: 50px; padding-left: 14px; }
  .composer button { right: 11px; bottom: 11px; }
}

/* Cockpit und Dokumentenbibliothek */
.dashboard-view { overflow: hidden; }
.dashboard-scroll { overflow: auto; padding: 30px 2px 50px; scrollbar-width: thin; }
.system-pill { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--muted); font-size: 11px; font-weight: 700; }
.system-pill i { width: 8px; height: 8px; border-radius: 50%; background: #29a16d; box-shadow: 0 0 0 4px rgba(41,161,109,.12); }
.hero-search { position: relative; overflow: hidden; padding: 40px clamp(24px,5vw,64px); border-radius: 24px; background: linear-gradient(125deg,#1e2b2f,#263a3a); color: #fff; box-shadow: 0 20px 55px rgba(25,37,39,.15); }
.hero-search::after { content:""; position:absolute; width:330px; height:330px; right:-105px; top:-155px; border:45px solid rgba(232,154,39,.08); border-radius:50%; }
.hero-search h3 { position:relative; z-index:1; margin: 8px 0 22px; font: 500 clamp(28px,3vw,40px)/1.1 Georgia,serif; }
.hero-search .welcome-kicker { margin-top:0!important; }
#dashboard-search { position:relative; z-index:1; display:flex; max-width:840px; padding:7px; border-radius:16px; background:#fff; box-shadow:0 12px 32px rgba(0,0,0,.18); }
#dashboard-search input { min-width:0; flex:1; border:0; outline:0; padding:11px 14px; background:transparent; color:var(--ink); }
#dashboard-search button { width:45px; border:0; border-radius:11px; background:var(--red); color:#fff; cursor:pointer; font-size:20px; }
.quick-prompts { position:relative; z-index:1; display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.quick-prompts button { border:1px solid rgba(255,255,255,.19); border-radius:999px; padding:8px 12px; background:rgba(255,255,255,.07); color:#d9e2df; cursor:pointer; font-size:11px; }
.quick-prompts button:hover { background:rgba(255,255,255,.14); color:#fff; }
.dashboard-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:20px 0; }
.action-card { display:grid; grid-template-columns:48px 1fr; column-gap:14px; border:1px solid var(--line); border-radius:17px; padding:20px; background:#fff; text-align:left; cursor:pointer; color:var(--ink); box-shadow:0 8px 26px rgba(30,39,43,.045); transition:.18s ease; }
.action-card:hover { transform:translateY(-2px); border-color:#bdc8c3; box-shadow:0 15px 35px rgba(30,39,43,.09); }
.action-icon { grid-row:1/4; width:45px; height:45px; display:grid; place-items:center; border-radius:13px; font-size:20px; }
.action-icon.green { color:#167453; background:#e4f2eb; }.action-icon.amber { color:#a86708; background:#fff1d9; }.action-icon.red { color:#bd3429; background:#fff0ed; }
.action-card strong { font-family:Georgia,serif; font-size:19px; font-weight:500; }.action-card small { margin:4px 0 13px; color:var(--muted); line-height:1.35; }.action-card b { color:var(--red); font-size:11px; }
.dashboard-lower { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(260px,.7fr); gap:16px; }
.dashboard-panel { padding:24px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.76); }
.dashboard-panel h3 { margin:6px 0 18px; font:500 22px Georgia,serif; }.dashboard-panel>p:not(.welcome-kicker) { color:var(--muted); font-size:13px; line-height:1.6; }
.panel-heading { display:flex; justify-content:space-between; align-items:flex-start; }.panel-heading button { border:0; background:none; color:var(--red); font-size:11px; font-weight:700; cursor:pointer; }
.recent-documents .document-row { padding:11px 4px; background:transparent; border-width:0 0 1px; border-radius:0; }.recent-documents .document-row:last-child { border-bottom:0; }
.trust-preview,.trust-badge { display:flex; align-items:center; gap:11px; }.trust-preview { margin-top:24px; padding:13px; border-radius:12px; background:#e5f3ec; color:#145d45; }.trust-preview i,.trust-badge i { width:10px; height:10px; border-radius:50%; background:#29a16d; box-shadow:0 0 0 5px rgba(41,161,109,.12); }.trust-preview strong,.trust-preview small,.trust-badge strong,.trust-badge small { display:block; }.trust-preview small,.trust-badge small { margin-top:2px; opacity:.72; font-size:10px; }
.document-tools { display:flex; align-items:center; gap:20px; margin:28px 0 14px; }.document-tools>span { white-space:nowrap; color:var(--muted); font-size:12px; }
.library-search { flex:1; display:flex; align-items:center; gap:10px; padding:4px 15px; border:1px solid var(--line); border-radius:13px; background:#fff; box-shadow:0 6px 20px rgba(30,39,43,.035); }.library-search>span { color:var(--muted); font-size:22px; }.library-search input { width:100%; border:0; outline:0; padding:10px 0; background:transparent; }
.document-list { overflow:auto; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.65); }
.document-row { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:14px; padding:14px 17px; border-bottom:1px solid var(--line); color:inherit; text-decoration:none; background:rgba(255,255,255,.78); transition:background .15s ease; }.document-row:last-child{border-bottom:0}.document-row:hover{background:#fff}
.pdf-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; background:#fff0ed; color:var(--red); font-size:9px; font-weight:850; letter-spacing:.08em; }.document-info { min-width:0; }.document-info strong,.document-info span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.document-info strong { font-size:13px; }.document-info span { margin-top:4px; color:var(--muted); font-size:10px; }.document-meta { display:flex; align-items:center; gap:14px; color:var(--muted); font-size:10px; }.document-meta b { padding:3px 6px; border-radius:5px; background:#e5f3ec; color:#167453; font-size:8px; }.document-meta i { color:var(--red); font-size:16px; font-style:normal; }
.library-loading,.library-empty { display:grid; place-items:center; gap:5px; min-height:180px; color:var(--muted); font-size:13px; }.library-empty span { font-size:11px; }
.compact-upload { margin-top:30px; padding:44px 30px; position:relative; }.panel-close { position:absolute; right:16px; top:14px; border:0; background:transparent; color:var(--muted); font-size:25px; cursor:pointer; }
.bubble p { margin:0 0 10px; }.bubble p:last-child { margin-bottom:0; }.bubble h4 { margin:6px 0 9px; font:600 18px Georgia,serif; }.bubble ul { margin:8px 0; padding-left:20px; }
.answer-evidence { max-width:780px; margin:10px 0 0; }.trust-badge { width:max-content; padding:9px 12px; border-radius:11px; background:#e5f3ec; color:#145d45; }.trust-badge.partial { background:#fff1d9; color:#87580f; }.trust-badge.partial i { background:var(--amber); box-shadow:0 0 0 5px rgba(232,154,39,.14); }
.source-heading { display:flex; justify-content:space-between; align-items:end; margin:16px 2px 8px; }.source-heading strong { font-size:12px; }.source-heading span { color:var(--muted); font-size:10px; }
.source-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.source-card { min-width:0; padding:12px 14px; border:1px solid var(--line); border-radius:13px; background:#fff; color:inherit; text-decoration:none; transition:.16s ease; }.source-card:hover { border-color:#e2a59f; transform:translateY(-1px); }.source-card>span { color:var(--red); font-size:9px; font-weight:800; letter-spacing:.08em; }.source-card>strong { display:block; margin:5px 0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }.source-card b { color:var(--red); font-size:9px; }
.document-pagination { display:flex; align-items:center; justify-content:center; gap:18px; padding:16px 0 2px; }.document-pagination span { min-width:110px; text-align:center; color:var(--muted); font-size:12px; }.document-pagination button { border:1px solid var(--line); border-radius:9px; padding:8px 12px; background:#fff; color:var(--ink); cursor:pointer; font-size:12px; font-weight:650; }.document-pagination button:hover:not(:disabled) { border-color:var(--red); color:var(--red); }.document-pagination button:disabled { opacity:.4; cursor:default; }
@media(max-width:980px){.dashboard-grid{grid-template-columns:1fr}.dashboard-lower{grid-template-columns:1fr}.dashboard-panel.compact{display:none}}
@media(max-width:760px){.dashboard-view{padding-bottom:0}.dashboard-scroll{padding-top:18px}.system-pill{display:none}.hero-search{padding:28px 20px;border-radius:18px}.quick-prompts{display:none}.dashboard-grid{gap:10px}.dashboard-lower{display:block}.dashboard-panel{padding:18px}.document-tools{margin-top:18px;display:grid;gap:8px}.document-tools>span{padding-left:4px}.document-row{grid-template-columns:38px minmax(0,1fr)}.document-meta{grid-column:2;justify-content:flex-start}.document-meta span:first-of-type{display:none}.source-grid{grid-template-columns:1fr}.source-heading span{display:none}}
