/* ════════════════════════════════════════════════════
   screens.css – Login, Warnung, Admin-Bereich
   ════════════════════════════════════════════════════ */

/* ── Login ── */
.auth-screen {
  display: none; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.auth-screen.active { display: flex; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: min(400px, 96vw); padding: 36px 32px; animation: fadeIn .3s ease;
}
.auth-logo { width: 56px; height: 56px; margin: 0 auto 18px; display: block; }
.auth-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; text-align: center; letter-spacing: -.01em; }
.auth-sub { font-size: .8rem; color: var(--ink-faint); text-align: center; margin-bottom: 26px; }
.auth-error {
  display: none; font-size: .8rem; color: var(--red); background: var(--red-bg);
  border: 1px solid var(--red-mid); border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 14px; text-align: center;
}
.auth-lockout {
  display: none; font-size: .8rem; color: var(--amber); background: var(--amber-bg);
  border: 1px solid #ecd9a8; border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 14px; text-align: center;
}

/* Passwort-Stärke */
.pw-strength { height: 4px; background: var(--surface2); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.pw-strength-bar { height: 100%; width: 0; transition: all .25s; border-radius: 3px; }
.pw-label { font-size: .7rem; color: var(--ink-faint); margin-top: 5px; }

/* ── Warnung / Terms ── */
.warn-content {
  max-height: 50vh; overflow-y: auto; padding: 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); font-size: .84rem; line-height: 1.75; color: var(--ink-dim);
  margin-bottom: 16px;
}
.warn-content strong { color: var(--ink); }
.terms-check { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--ink-dim); }
.terms-check input { width: 17px; height: 17px; }

/* ── Admin-Bereich ── */
.admin-layout { display: flex; flex: 1; overflow: hidden; }
.admin-nav {
  width: 220px; flex-shrink: 0; border-right: 1px solid var(--border);
  background: var(--surface); overflow-y: auto; padding: 12px 8px;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--r-sm); font-size: .82rem; font-weight: 500; color: var(--ink-dim);
  margin-bottom: 2px; transition: all .12s;
}
.admin-nav-item:hover { background: var(--surface2); }
.admin-nav-item.active { background: var(--teal-bg); color: var(--teal-dark); font-weight: 600; }
.admin-nav-icon { width: 18px; text-align: center; }
.admin-nav-badge { margin-left: auto; font-size: .62rem; background: var(--red); color: #fff; padding: 1px 6px; border-radius: 8px; font-weight: 700; }

.admin-content { flex: 1; overflow-y: auto; padding: 24px; }
.admin-section { display: none; max-width: 920px; }
.admin-section.active { display: block; animation: fadeIn .2s ease; }
.admin-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.admin-title { font-size: 1.15rem; font-weight: 700; flex: 1; }

/* Karten / Statistik */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--teal-dark); letter-spacing: -.02em; }
.stat-label { font-size: .72rem; color: var(--ink-faint); margin-top: 3px; }

/* Tabellen / Listen */
.data-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 8px;
}
.data-main { flex: 1; min-width: 0; }
.data-name { font-size: .86rem; font-weight: 600; }
.data-meta { font-size: .72rem; color: var(--ink-faint); margin-top: 2px; }
.data-actions { display: flex; gap: 6px; }

/* Prompt-Editor */
.prompt-editor { width: 100%; min-height: 280px; padding: 14px; border: 1.5px solid var(--border2);
  border-radius: var(--r); font-family: var(--mono); font-size: .8rem; line-height: 1.6; color: var(--ink); resize: vertical; }
.prompt-editor:focus { outline: none; border-color: var(--teal); }

/* Audit-Log */
.audit-row {
  display: flex; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-size: .78rem; align-items: center;
}
.audit-time { font-family: var(--mono); font-size: .68rem; color: var(--ink-faint); width: 130px; flex-shrink: 0; }
.audit-actor { font-weight: 600; width: 90px; flex-shrink: 0; }
.audit-action { color: var(--teal-dark); font-family: var(--mono); font-size: .72rem; }

/* Admin-Konversationen */
.conv-layout { display: flex; height: calc(100vh - 180px); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.conv-list { width: 230px; border-right: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; }
.conv-list-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); transition: background .1s; }
.conv-list-item:hover, .conv-list-item.active { background: var(--teal-bg); }
.conv-av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--teal2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; flex-shrink: 0; }
.conv-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.conv-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 9px; background: var(--bg); }
.conv-bubble { max-width: 78%; padding: 9px 13px; border-radius: var(--r); font-size: .82rem; line-height: 1.55; }
.conv-bubble.user { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.conv-bubble.admin { align-self: flex-end; background: linear-gradient(135deg, var(--teal), var(--teal2)); color: #fff; }
.conv-input { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* Verlauf-Liste (Nutzer-Sidebar) */
.history-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: var(--r-sm); font-size: .8rem; color: var(--ink-dim);
  cursor: pointer; transition: background .12s;
}
.history-item:hover { background: var(--surface2); }
.history-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-del { opacity: 0; background: none; border: none; color: var(--ink-faint); font-size: .8rem; padding: 2px 5px; border-radius: 4px; }
.history-item:hover .history-del { opacity: 1; }
.history-del:hover { color: var(--red); background: var(--red-bg); }

/* v2.1 – Dokument-Inline-Bearbeitung + Mehrfach-Upload */
.doc-inline-name:focus { outline: none; border-bottom: 1.5px solid var(--teal) !important; }
.doc-edit-field {
  display: flex; flex-direction: column; gap: 3px;
  font-size: .66rem; color: var(--ink-faint); font-weight: 600;
}
.doc-edit-field select, .doc-edit-field input {
  font-size: .76rem; padding: 5px 8px; border: 1.5px solid var(--border2);
  border-radius: 7px; background: var(--surface); color: var(--ink); font-family: var(--sans);
}
.doc-edit-field select:focus, .doc-edit-field input:focus { outline: none; border-color: var(--teal); }
.up-file-row {
  padding: 6px 10px; background: var(--surface2); border-radius: 7px;
  display: flex; justify-content: space-between; align-items: center;
}
