/* intranet/style.css – remoteSalesForce.asia Intranet
   Baut auf denselben CI-Tokens wie ../assets/css/style.css auf (teal/amber),
   ergaenzt um Layout-Komponenten fuer Dashboards (Sidebar, Tabellen, Stat-Cards).
   Version 1.0 – 2026-07-24 – Bodo Kopplin */

:root {
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-light: #99f6e4;
  --accent: #f59e0b;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f1f5f9;
  --bg-mute: #f8fafc;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --ok: #16a34a;
  --ok-bg: #ecfdf5;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg-mute);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Login ---------- */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(120deg, rgba(15,118,110,.92), rgba(15,23,42,.9)),
              #0f766e center/cover no-repeat;
}
.auth-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px; width: 100%; max-width: 380px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.1rem; margin-bottom: 28px; }
.auth-brand .dot { color: var(--brand); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.field input {
  font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,148,136,.15); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; width: 100%;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: .96rem;
  border: none; cursor: pointer; background: var(--brand); color: #fff; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--brand-dark); border: 1px solid var(--line); }
.auth-msg { font-size: .86rem; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; display: none; }
.auth-msg.show { display: block; }
.auth-msg.err { background: var(--danger-bg); color: #991b1b; border: 1px solid #fca5a5; }
.auth-msg.ok { background: var(--ok-bg); color: #065f46; border: 1px solid #6ee7b7; }

/* ---------- App shell ---------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.app-sidebar {
  background: var(--ink); color: #cbd5e1; padding: 24px 16px; display: flex; flex-direction: column; gap: 4px;
}
.app-sidebar .brand { color: #fff; font-weight: 800; padding: 0 8px 24px; display: block; }
.app-sidebar .brand .dot { color: var(--brand-light); }
.app-nav a {
  display: block; padding: 10px 12px; border-radius: 8px; color: #cbd5e1; font-weight: 600; font-size: .92rem;
}
.app-nav a:hover, .app-nav a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.app-sidebar .user-box { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; }
.app-sidebar .user-box .role-badge {
  display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: rgba(153,246,228,.18); color: var(--brand-light);
}
.app-sidebar .logout { display: block; margin-top: 10px; color: #94a3b8; font-size: .82rem; cursor: pointer; }
.app-main { padding: 32px 40px; max-width: 1280px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.app-topbar h1 { font-size: 1.5rem; margin: 0; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.stat-card .label { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value { font-size: 1.7rem; font-weight: 800; color: var(--ink); margin-top: 6px; }
.stat-card .sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ---------- Panels / tables ---------- */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.panel h2 { font-size: 1.1rem; margin-bottom: 16px; }
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data-table th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 700; text-transform: uppercase;
  font-size: .72rem; letter-spacing: .04em; border-bottom: 2px solid var(--line); white-space: nowrap;
}
table.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data-table tr:hover td { background: var(--bg-mute); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
}
.badge--admin { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.badge--va { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.badge--kandidat { background: var(--ok-bg); color: #065f46; border-color: #6ee7b7; }
.badge--client { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.text-muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---------- Forms (Kandidat Self-Service) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid textarea { min-height: 100px; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; }
.readonly-note { font-size: .8rem; color: var(--muted); background: var(--bg-soft); padding: 10px 12px; border-radius: 8px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: flex; flex-direction: row; overflow-x: auto; align-items: center; }
  .app-sidebar .user-box { display: none; }
  .app-main { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Treffpunkt – gemeinsamer Feed, Artikelansicht (feed.html, artikel.html)
   Ergaenzt 26.07.2026. Ausschliesslich neue Klassennamen, keine bestehende
   Regel geaendert – die uebrigen Dashboard-Seiten bleiben unberuehrt.
   ========================================================================== */

.feed { max-width: 720px; }

.feed-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.feed-filter button {
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: .85rem; font-family: var(--font);
  color: var(--muted); cursor: pointer;
}
.feed-filter button:hover { border-color: var(--brand); color: var(--brand-dark); }
.feed-filter button.aktiv { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.feed-karte {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px 22px; margin-bottom: 16px;
}
.feed-karte.angeheftet { border-color: var(--brand-light); border-left: 3px solid var(--brand); }
.feed-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.feed-autor { font-weight: 600; color: var(--ink); font-size: .9rem; }
.feed-zeit { color: var(--muted); font-size: .8rem; }
.feed-karte h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--ink); line-height: 1.35; }
.feed-karte p { margin: 0 0 12px; color: var(--text); font-size: .92rem; line-height: 1.6; white-space: pre-wrap; }
.feed-bild { width: 100%; border-radius: 10px; margin-bottom: 12px; display: block; }
.feed-link {
  display: inline-block; font-size: .88rem; font-weight: 600;
  color: var(--brand-dark); text-decoration: none; margin-bottom: 12px;
}
.feed-link:hover { text-decoration: underline; }

.typ-blog { background: var(--bg-soft); color: var(--brand-dark); }
.typ-ankuendigung { background: #fef3c7; color: #92400e; }
.typ-coaching { background: var(--ok-bg); color: #15803d; }
.typ-beitrag { background: var(--bg-mute); color: var(--muted); }
.sicht-hinweis { background: var(--bg-soft); color: var(--muted); }

.feed-coaching {
  background: var(--ok-bg); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 12px; font-size: .88rem; color: #15803d;
}

.feed-aktionen {
  display: flex; gap: 16px; align-items: center;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px;
}
.feed-aktion {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: .85rem; color: var(--muted); font-family: var(--font);
}
.feed-aktion:hover { color: var(--brand-dark); }
.feed-aktion.aktiv { color: var(--brand); font-weight: 600; }
.feed-aktion--loeschen { margin-left: auto; color: var(--muted); }
.feed-aktion--loeschen:hover { color: var(--danger); }

.kommentare { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.kommentar { display: flex; gap: 10px; margin-bottom: 12px; font-size: .88rem; }
.kommentar-inhalt { flex: 1; }
.kommentar-inhalt .wer { font-weight: 600; color: var(--ink); }
.kommentar-inhalt .wann { color: var(--muted); font-size: .78rem; margin-left: 6px; }
.kommentar-inhalt .was { color: var(--text); margin-top: 2px; white-space: pre-wrap; line-height: 1.55; }
.kommentar-form { display: flex; gap: 8px; margin-top: 10px; }
.kommentar-form input {
  flex: 1; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 9px; font-family: var(--font); font-size: .88rem;
}
.kommentar-form input:focus { outline: none; border-color: var(--brand); }
.kommentar-form button { padding: 9px 16px; font-size: .85rem; width: auto; }

.verfassen textarea, .verfassen input[type="text"], .verfassen input[type="url"] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--font); font-size: .92rem; margin-bottom: 10px;
}
.verfassen textarea { min-height: 90px; resize: vertical; }
.verfassen textarea:focus, .verfassen input:focus { outline: none; border-color: var(--brand); }
.format-hilfe { font-size: .78rem; color: var(--muted); margin: -4px 0 12px; line-height: 1.6; }
.format-hilfe code { background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; font-size: .95em; }
.redaktion-felder { display: none; }
.redaktion-felder.sichtbar { display: block; }
.redaktion-zeile { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.redaktion-zeile select, .redaktion-zeile input {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--font); font-size: .85rem; margin: 0; flex: 1; min-width: 150px;
}

/* ---- Artikel-Leseansicht ---- */
.artikel { max-width: 680px; }
.artikel-kopf { margin-bottom: 24px; }
.artikel-kopf h1 { font-size: 1.7rem; line-height: 1.25; color: var(--ink); margin: 10px 0 12px; }
.artikel-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.artikel-bild { width: 100%; border-radius: var(--radius); margin-bottom: 22px; display: block; }
.artikel-koerper { color: var(--text); font-size: 1rem; line-height: 1.75; }
.artikel-koerper h3 { color: var(--ink); font-size: 1.15rem; margin: 28px 0 10px; line-height: 1.35; }
.artikel-koerper p { margin: 0 0 16px; }
.artikel-koerper ul { margin: 0 0 16px; padding-left: 22px; }
.artikel-koerper li { margin-bottom: 7px; }
.artikel-koerper a { color: var(--brand-dark); }
.artikel-koerper strong { color: var(--ink); }
.artikel-zurueck {
  display: inline-block; color: var(--muted); text-decoration: none;
  font-size: .87rem; margin-bottom: 6px;
}
.artikel-zurueck:hover { color: var(--brand-dark); }
.artikel-fuss { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 8px; }
.feed-text { color: var(--text); font-size: .92rem; line-height: 1.6; margin-bottom: 12px; }
.feed-text p { margin: 0 0 10px; white-space: normal; }
.feed-text h3 { font-size: 1rem; margin: 14px 0 6px; color: var(--ink); }
.feed-text ul { margin: 0 0 10px; padding-left: 20px; }
.feed-text li { margin-bottom: 5px; }
.feed-text a { color: var(--brand-dark); }
.rolle-team { background: #ccfbf1; color: #0f766e; }
.rolle-talent { background: #f1f5f9; color: #475569; }
.rolle-auftraggeber { background: #fef3c7; color: #92400e; }
.kommentar-inhalt .badge { margin-left: 6px; font-size: .68rem; }
/* .rolle-penky entfernt - war fuer eine falsch angenommene Bot-Rolle */

/* Lange Listen auf ~10 Zeilen begrenzen und darin scrollen lassen.
   .table-scroll allein hat nur overflow-x, waechst also vertikal endlos –
   beim Audit-Trail bedeutet das eine Seite ohne Ende. Der Kopf bleibt beim
   Scrollen stehen, sonst weiss man nach drei Zeilen nicht mehr, welche
   Spalte was ist. */
.table-scroll--kurz { max-height: 27rem; overflow-y: auto; }
.table-scroll--kurz table.data-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg);
  box-shadow: inset 0 -2px 0 var(--line);
  border-bottom: none;
}
.listen-hinweis {
  font-size: .78rem; color: var(--muted);
  margin: -8px 0 12px;
}

/* ── Aufgaben (va.html, admin.html) ───────────────────────────────────────── */
.aufg-karte {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; background: var(--bg);
}
.aufg-karte--zur_abnahme { border-left: 3px solid var(--accent); border-radius: 0; }
.aufg-karte--abgenommen { opacity: .72; }
.aufg-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.aufg-titel { font-weight: 600; color: var(--ink); font-size: .98rem; margin: 0 0 6px; }
.aufg-text { color: var(--text); font-size: .89rem; line-height: 1.6; white-space: pre-wrap; margin: 0 0 10px; }
.aufg-person { font-size: .8rem; color: var(--muted); margin-left: auto; }
.faellig { font-size: .78rem; color: var(--muted); }
.faellig--ueber { color: var(--danger); font-weight: 600; }
.st-offen { background: var(--bg-soft); color: var(--muted); }
.st-arbeit { background: #dbeafe; color: #1e40af; }
.st-abnahme { background: #fef3c7; color: #92400e; }
.st-fertig { background: var(--ok-bg); color: #15803d; }
.prio-hoch { background: var(--danger-bg); color: var(--danger); }
.aufg-bericht {
  background: var(--bg-mute); border-radius: 10px; padding: 11px 13px; margin: 10px 0;
}
.aufg-bericht-titel { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 5px; }
.aufg-bericht-text { font-size: .88rem; color: var(--text); line-height: 1.6; }
.aufg-bericht-text p { margin: 0 0 8px; }
.aufg-bericht-text ul { margin: 0 0 8px; padding-left: 20px; }
.aufg-rueck {
  background: var(--danger-bg); color: #991b1b; border-radius: 10px;
  padding: 10px 13px; margin: 10px 0; font-size: .86rem;
}
.aufg-dateien { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.aufg-datei { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-soft); border-radius: 999px; padding: 3px 6px 3px 11px; }
.aufg-datei-link { background: none; border: none; cursor: pointer; font-family: var(--font); font-size: .8rem; color: var(--brand-dark); padding: 0; }
.aufg-datei-link:hover { text-decoration: underline; }
.aufg-datei-weg { background: none; border: none; cursor: pointer; color: var(--muted); font-size: .95rem; line-height: 1; padding: 0 4px; }
.aufg-datei-weg:hover { color: var(--danger); }
.aufg-aktionen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.aufg-aktionen .btn { width: auto; padding: 8px 16px; font-size: .84rem; }
.btn--stumm { background: var(--bg-soft); color: var(--text); }
.btn--stumm:hover { background: var(--line); }
.aufg-fertig { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.aufg-fertig textarea {
  width: 100%; min-height: 90px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--font); font-size: .89rem; resize: vertical;
}
.aufg-fertig textarea:focus { outline: none; border-color: var(--brand); }
.aufg-pflicht { font-size: .78rem; color: var(--muted); margin: 6px 0 8px; }
.aufg-datei-wahl { font-size: .82rem; margin: 6px 0 10px; }
.aufg-leer { color: var(--muted); font-size: .9rem; padding: 14px 0; }

/* Hunter-Ansicht (hunter.html): Gruppenzeile je Stage + gedaempfte Leerwerte.
   Bewusst schlicht gehalten, damit die Tabelle wie die uebrigen Datentabellen
   im Intranet wirkt und nicht wie ein Fremdkoerper. */
.data-table tr.group-row td {
  background: var(--bg-soft);
  font-size: .84rem;
  padding-top: 7px;
  padding-bottom: 7px;
}
.muted { color: var(--muted); }

/* Lange Freitextfelder in Datentabellen (Pitch in der Auftraggeber-Ansicht,
   Interne_Kommentare in Admin- und VA-Ansicht). Ohne Begrenzung zieht ein
   einziger langer Eintrag die Zeile auf mehrere Bildschirmhoehen auf und
   macht die Tabelle unlesbar - beobachtet bei Mara Inacio, deren interner
   Kommentar ein vollstaendiges Rechercheprotokoll enthaelt.
   Loesung: feste Hoehe mit eigenem Scrollbereich je Zelle. */
.zelle-lang {
  max-height: 110px;
  min-width: 220px;
  max-width: 340px;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding-right: 4px;
}
.zelle-lang::-webkit-scrollbar { width: 7px; }
.zelle-lang::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ── Treffpunkt: ruhigere Oberflaeche ─────────────────────────────────────
   Vorher nahm das Verfassen-Formular den kompletten ersten Bildschirm ein,
   alle Spezialfelder waren dauerhaft sichtbar und unter jedem Beitrag stand
   ein offenes Antwortfeld. Wer den Treffpunkt oeffnet, will aber zuerst
   lesen. Deshalb: alles Schreibende erst auf Klick. */

/* Lesespalte zentrieren statt links kleben zu lassen */
.feed-spalte { max-width: 780px; margin-inline: auto; }

/* Verfassen-Bereich zugeklappt */
.verfassen-oeffner {
  display: none; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; padding: 4px 2px;
  font-family: var(--font); font-size: .95rem; color: var(--muted);
}
.verfassen-oeffner:hover { color: var(--brand-dark); }
.verfassen-oeffner-punkt {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; margin-right: 10px;
  background: var(--brand); color: #fff; font-weight: 700; line-height: 1;
}
.verfassen--zu .verfassen-oeffner { display: flex; align-items: center; }
.verfassen--zu > h2,
.verfassen--zu > form,
.verfassen--zu > .auth-msg { display: none; }
.verfassen--zu { padding-top: 14px; padding-bottom: 14px; }

/* Spezialfelder hinter einem Schalter */
.mehr-optionen {
  background: none; border: none; cursor: pointer; padding: 2px 0; margin: 2px 0 8px;
  font-family: var(--font); font-size: .82rem; color: var(--brand-dark); text-decoration: underline;
}
.redaktion-felder--zu { display: none; }

/* Antwortfeld erst auf Klick */
.kommentar-form--zu { display: none; }
button.feed-aktion {
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: inherit; color: inherit; padding: 0;
}
button.feed-aktion:hover { color: var(--brand-dark); }
