/* nachtschicht: hell, ruhig, ein bisschen tief.
   Stil wie nexhub.dev (kleine Überschriften mit Strich, dünne Icons, keine Verläufe),
   Helligkeit wie HelpMate. Keine Emojis, keine fremden Quellen. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f2f1ee;          /* Papier am Abend */
  --surface: #fbfaf8;
  --surface-2: #ecebe7;
  --ink: #1d2129;         /* fast schwarz, leicht blau */
  --muted: #5f656e;
  --faint: #8b9098;
  --line: rgba(29, 33, 41, 0.11);
  --line-strong: rgba(29, 33, 41, 0.2);
  --night: #34425a;       /* Nachtblau, einzige starke Farbe */
  --night-soft: #e3e7ee;
  --ember: #a8865c;       /* Glut, nur für kleine Akzente */
  --ok: #4f7a63;
  --warn: #a8865c;
  --err: #9b4a46;
  --ask: #4a6491;
  --radius: 8px;
  --focus: 0 0 0 3px rgba(52, 66, 90, 0.25);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;           /* etwas größer, gut lesbar */
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--night); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-box { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--night); }

/* kleine Überschrift mit Strich, wie auf nexhub.dev */
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--ember); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(30px, 4vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-primary { background: var(--night); border-color: var(--night); color: #f7f6f3; }
.btn-primary:hover { background: #2a364a; color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); height: 36px; padding: 0 10px; font-weight: 500; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.auth-top, .auth-foot { padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand .icon { width: 24px; height: 24px; color: var(--night); }
.auth-main { display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px 28px; }
.auth-card .btn { width: 100%; }
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps li { background: var(--surface); padding: 12px 14px; display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--muted); }
.steps li.done { color: var(--ink); }
.steps .num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.steps li.done .num { background: var(--night); border-color: var(--night); color: #fff; }
.auth-foot { font-size: 13px; color: var(--faint); gap: 18px; justify-content: center; }
.auth-foot a { color: var(--faint); }

/* ---------- App ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.side .brand { padding: 4px 10px 18px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 18px 10px 6px; }
.side-bottom { margin-top: auto; display: grid; gap: 4px; }

.main { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--faint); }
.search input { border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); width: 100%; outline: none; }

/* Status-Punkt: grün fertig, gelb arbeitet, rot Fehler, blau Frage */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.dot.work { background: var(--warn); animation: breathe 1.6s ease-in-out infinite; }
.dot.err { background: var(--err); }
.dot.ask { background: var(--ask); }
@keyframes breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot.work { animation: none; } }

.content { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }

.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.composer textarea { display: block; width: 100%; min-height: 150px; resize: vertical; border: 0; background: transparent; padding: 18px 20px; font: inherit; font-size: 17px; line-height: 1.7; color: var(--ink); outline: none; }
.composer textarea::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.mood { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.mood button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; font-size: 12px; color: var(--muted); }
.mood button[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }

.list { margin-top: 26px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.note { background: var(--surface); padding: 16px 20px; display: grid; gap: 6px; }
.note-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.note-title { font-weight: 600; }
.note-time { font-size: 13px; color: var(--faint); white-space: nowrap; }
.note-text { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--night-soft); color: var(--night); font-weight: 500; }
.tag.person { background: #efe8de; color: #6f5434; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 16px; }
.seal-msg { font-size: 15px; color: var(--ink); border-left: 2px solid var(--night); padding: 2px 0 2px 12px; margin: 10px 0 14px; }
.meta { font-size: 12px; color: var(--faint); }

.help-line { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }

@media (max-width: 960px) {
  .content { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Anmeldung: Zusatz ---------- */
[hidden] { display: none !important; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 17px; letter-spacing: .04em; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; margin: 10px 0 14px; word-break: break-all; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 0 0 14px; }
.check input { margin-top: 5px; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.field input { height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); }
.field input:focus { outline: none; box-shadow: var(--focus); }
.meldung { margin: 14px 0 0; font-size: 14px; color: var(--night); background: var(--night-soft); padding: 10px 12px; border-radius: var(--radius); }
.meldung.err { color: var(--err); background: #f3e6e4; }
.audit { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); max-height: 260px; overflow: auto; }
.mt { margin-top: 14px; }
.mt-lg { margin-top: 28px; }
.auth-card.wide { max-width: 720px; }
.legal h2 { font-size: 18px; margin-top: 26px; }
.legal ul { padding-left: 20px; margin: 0 0 14px; }
.legal li { margin-bottom: 6px; }
