/* KimbaCAD Startseite und Admin-Seite: Farben wie die Programmoberflaeche (src/style.css). */
:root {
  --bg: #212830;
  --panel: #2b333c;
  --line: #3d4652;
  --text: #d8dee6;
  --muted: #8a96a3;
  --accent: #6fb3ff;
  --error: #ff7b72;
  --ok: #7ee787;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent); }
main { flex: 1; width: min(640px, calc(100vw - 32px)); margin: 0 auto; padding: 40px 0 24px; display: flex; flex-direction: column; gap: 20px; }
main.wide { width: min(900px, calc(100vw - 32px)); }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; border-top: 1px solid var(--line); }

/* Logo wie das Startbild im Programm: weisse Karte, Versionszeile rechts unten */
.logo { position: relative; container-type: inline-size; background: #fefefe; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45); }
.logo img { display: block; width: 100%; height: auto; }
.logo .version { position: absolute; right: 3.5cqw; bottom: 3.5cqw; font-size: 2.6cqw; color: #5b6168; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.panel h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; color: var(--accent); }
form.grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; }
form.grid .actions { grid-column: 1 / 3; display: flex; justify-content: flex-end; gap: 8px; }
label { color: var(--muted); }
input[type="text"], input[type="password"], input[type="url"], input[type="email"] {
  font: inherit; width: 100%; padding: 7px 9px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px;
}
input:focus { outline: none; border-color: var(--accent); }
button { font: inherit; padding: 7px 16px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #10161d; border-color: var(--accent); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.danger:hover { border-color: var(--error); color: var(--error); }
button:disabled { opacity: 0.5; cursor: default; }
.msg { margin: 10px 0 0; font-size: 13px; }
.msg:empty { display: none; }
.msg.error { color: var(--error); }
.msg.ok { color: var(--ok); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.bar { display: flex; align-items: center; gap: 10px; }
.bar .grow { flex: 1; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; }
td.over { color: var(--error); }
td.actions-cell button + button { margin-left: 6px; }
.tag { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0 5px; margin-left: 6px; }
@media (max-width: 560px) { form.grid { grid-template-columns: 1fr; } form.grid .actions { grid-column: 1; } }
#new-quota, #edit-quota-mb { width: 8em; flex: none; }
.bar .hint { margin: 0; white-space: nowrap; }
fieldset.grid { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; }
fieldset.grid .actions { grid-column: 1 / 3; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
fieldset:disabled input { opacity: 0.5; }
.hint-text { font-size: 13.5px; line-height: 1.5; max-height: 16em; overflow-y: auto; padding-right: 6px; }
.hint-text h2 { margin: 0 0 10px; }
.hint-text p { margin: 0 0 8px; }
.hint-actions { margin-top: 10px; }
.hint-actions .msg { margin: 0; }
@media (max-width: 560px) { fieldset.grid { grid-template-columns: 1fr; } fieldset.grid .actions { grid-column: 1; } }
.actions .grow { flex: 1; }
.log-scroll { max-height: 22em; overflow-y: auto; }
.forgot-link { margin: 10px 0 0; font-size: 13px; text-align: right; }
.panel > .hint + form { margin-top: 12px; }
textarea { font: inherit; width: 100%; padding: 7px 9px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); }
a.plain { color: inherit; text-decoration: none; }
.tag.new { color: var(--ok); border-color: var(--ok); }
table.topics td a { font-weight: 600; text-decoration: none; }
.post { border-bottom: 1px solid var(--line); padding: 12px 0; }
.post:last-child { border-bottom: 0; }
.post-head { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.post-head strong { color: var(--text); }
.post-tools { margin-left: auto; display: flex; gap: 6px; }
.post-tools button { padding: 3px 10px; font-size: 13px; }
.post-body p { margin: 0 0 8px; line-height: 1.5; overflow-wrap: anywhere; }
.post-body .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#reply .actions { display: flex; justify-content: flex-end; }
#list-view, #topic-view { display: flex; flex-direction: column; gap: 20px; }
