:root{
  --bg:#f8fafc;         /* Seitenhintergrund */
  --panel:#ffffff;      /* Karten/Paneele */
  --muted:#6b7280;      /* sekundärer Text */
  --text:#111827;       /* Haupttext */
  --border:#e5e7eb;     /* Rahmen */
  --accent:#2563eb;     /* Akzent (Links/Primärbutton) */
  --danger:#dc2626;     /* Warn-/Löschbutton */
  --radius:10px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size:16px; line-height:1.45;
  color:var(--text);
  background:var(--bg);
}

a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.page-title{margin:8px 0 16px 0; font-size:24px}

.chat-layout{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:16px;
}

.sidebar, .main{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
}

.sidebar{padding:12px}
.main{padding:16px; min-height:60vh}

.inline-form{display:flex; gap:8px; margin-bottom:12px}

.chat-list{list-style:none; padding:0; margin:0}
.chat-list-item{
  display:flex; align-items:center; gap:8px; justify-content:space-between;
  padding:6px 0; border-bottom:1px dashed rgba(0,0,0,.06);
}
.chat-list-item:last-child{border-bottom:none}
.chat-link{flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.icon-btn{
  background:none; border:none; cursor:pointer; font-size:18px;
  opacity:.9; transition:opacity .15s ease;
}
.icon-btn:hover{opacity:1}

.chat-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:10px
}
.chat-title{margin:0; font-size:20px}

.messages{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:10px;
  max-height:55vh;
  overflow:auto;
}

.message{padding:10px 6px; border-bottom:1px dashed rgba(0,0,0,.06)}
.message:last-child{border-bottom:none}
.message-role{font-weight:600; color:#374151; margin-bottom:4px}
.message-content{
  white-space:pre-wrap; margin:0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.composer{margin-top:14px; display:flex; flex-direction:column; gap:8px}
.row{display:flex; align-items:center; gap:8px}

.label{font-size:12px; color:var(--muted)}
.muted{color:var(--muted)}

.input, .textarea{
  width:100%; color:var(--text); background:#fff;
  border:1px solid var(--border); border-radius:8px; padding:10px 12px;
}
.input-sm{padding:6px 8px; max-width:280px}
.textarea{min-height:110px; resize:vertical}

.btn{
  background:#f3f4f6; color:var(--text);
  border:1px solid var(--border);
  padding:8px 12px; border-radius:8px; cursor:pointer;
  transition:transform .04s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{background:#e5e7eb; border-color:#d1d5db}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--accent); border-color:transparent; color:#fff}
.btn-primary:hover{filter:brightness(1.05)}
.btn-danger{background:var(--danger); border-color:transparent; color:#fff}
.btn-danger:hover{filter:brightness(1.05)}

@media (max-width: 860px){
  .chat-layout{grid-template-columns:1fr}
  .sidebar{order:2}
  .main{order:1}
}



