/* MasterDashboard - Basis aus dem JobDashboard (InvaQuant-Stil), keine externen Assets */

:root {
  /* --- Flaechen --- */
  --void: #06090E;
  --deep: #0A0F16;
  --panel: #0E141C;
  --panel-2: #131B25;
  --line: #1E2934;
  --line-2: #172029;

  /* --- Schrift --- */
  --ink: #DDE6EC;
  --ink-2: #93A3AF;
  --ink-3: #5E6E7B;

  /* --- Signal (Cyan) --- */
  --signal: #56CFE1;
  --signal-2: #8AE4F0;
  --signal-dim: #12333D;

  /* --- Zweitakzent (Violett), hier fuer Quellen --- */
  --fix: #A98BF5;
  --fix-dim: #241C3D;

  /* --- Status --- */
  --ok: #4FD9A5;      --ok-bg: #0D2B24;
  --prop: #7FA6F0;    --prop-bg: #16223A;
  --open: #E8A33D;    --open-bg: #2E2211;
  --bad: #F0705E;     --bad-bg: #33170F;

  --glow: 1;

  --font-display: "Chakra Petch", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;

  /* Rueckwaertskompatible Namen - das Markup nutzt sie unveraendert weiter. */
  --bg: var(--void);
  --surface: var(--panel);
  --surface-2: var(--panel-2);
  --border: var(--line);
  --text: var(--ink);
  --muted: var(--ink-2);
  --accent: var(--signal);
  --accent-soft: var(--signal-dim);
  --green: var(--ok);        --green-soft: var(--ok-bg);
  --amber: var(--open);      --amber-soft: var(--open-bg);
  --red: var(--bad);         --red-soft: var(--bad-bg);

  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .35);

  color-scheme: dark;
  font-synthesis-weight: none;
}

:root[data-theme="light"] {
  --void: #E9EEF2; --deep: #EFF3F6; --panel: #FFFFFF; --panel-2: #F3F7F9;
  --line: #C9D5DD; --line-2: #DCE5EA;
  --ink: #101820; --ink-2: #4A5A66; --ink-3: #7A8A96;
  --signal: #0E7C90; --signal-2: #0B6373; --signal-dim: #D4EAEF;
  --fix: #6742C4; --fix-dim: #E6DEF9;
  --ok: #0E7A57; --ok-bg: #DCF0E8;
  --prop: #33529C; --prop-bg: #DFE7F6;
  --open: #8E5D0B; --open-bg: #F5E7CC;
  --bad: #A83A28; --bad-bg: #F7E0DB;
  --glow: 0;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .04);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 {
  font-family: var(--font-display);
  font-size: 18px; letter-spacing: .06em; text-transform: uppercase;
}
h2 { font-size: 15px; margin-bottom: 4px; }
a { color: var(--signal); }
a:hover { color: var(--signal-2); }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); font-size: 13px; }
.spacer { flex: 1; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

::selection { background: var(--signal-dim); color: var(--signal-2); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ---------- Kopfzeile ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 22px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--deep) 100%);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--signal-dim); color: var(--signal);
  border: 1px solid var(--signal);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px; letter-spacing: .06em;
  box-shadow: 0 0 calc(12px * var(--glow)) rgba(86, 207, 225, .22);
}
.brand .sub {
  margin: 2px 0 0; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase;
}
.tabs { display: flex; gap: 4px; }
.tab {
  border: 1px solid transparent; background: transparent;
  padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-2); transition: color .14s, border-color .14s, background .14s;
}
.tab:hover { color: var(--signal); border-color: var(--line); }
.tab.active { background: var(--signal-dim); color: var(--signal); border-color: var(--signal); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.last-run { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; }

.badge {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 2px; border: 1px solid transparent;
}
.badge-mock { background: var(--open-bg); color: var(--open); border-color: var(--open); }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid var(--line); background: var(--panel);
  padding: 8px 13px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-2);
  transition: color .14s, border-color .14s, background .14s, box-shadow .14s;
}
.btn:hover { color: var(--signal); border-color: var(--signal); }
.btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { color: var(--ink-2); border-color: var(--line); }
.btn-primary { background: var(--signal-dim); border-color: var(--signal-dim); color: var(--signal); }
.btn-primary:hover {
  border-color: var(--signal);
  box-shadow: 0 0 calc(14px * var(--glow)) rgba(86, 207, 225, .4);
}
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 9px; font-size: 10.5px; }
.btn-chip { padding: 4px 9px; font-size: 10px; letter-spacing: .08em; }
.btn-chip.on { background: var(--signal-dim); border-color: var(--signal); color: var(--signal); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 18px; top: 70px; z-index: 60; display: grid; gap: 8px; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius-sm); padding: 10px 14px;
  box-shadow: var(--shadow); max-width: 380px; font-size: 13.5px; color: var(--ink);
}
.toast.err { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--open); }

/* ---------- Laufstatus ---------- */
/* ---------- Ansichten ---------- */
.view { padding: 18px 22px 60px; max-width: 1420px; margin: 0 auto; }

/* ---------- Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.tile .label {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .12em;
}
.tile .value {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  margin-top: 6px; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.tile .detail { font-size: 12px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
.tile.accent .value { color: var(--signal); }
.bar-mini {
  height: 3px; border-radius: 2px; background: var(--deep);
  margin-top: 8px; overflow: hidden; border: 1px solid var(--line);
}
.bar-mini span { display: block; height: 100%; background: var(--signal); }

/* ---------- Filter ---------- */
.filters {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.filter-row:last-of-type { margin-bottom: 0; }
input[type="search"], input[type="text"], input[type="number"], input[type="password"], select, textarea {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 10px;
  font-family: var(--font-body); font-size: 14px;
  background: var(--deep); color: var(--ink); min-width: 150px;
}
input[type="search"], input[type="number"] { font-family: var(--font-mono); font-size: 13px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-dim);
}
input::placeholder { color: var(--ink-3); }
textarea { width: 100%; resize: vertical; }
input.grow { flex: 1; min-width: 260px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.check input[type="checkbox"] { accent-color: var(--signal); }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }

/* ---------- Jobliste ---------- */
.job-list { display: grid; gap: 8px; }
.job {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); display: grid;
  grid-template-columns: 58px 1fr auto; gap: 14px; align-items: start;
  transition: border-color .14s, background .14s;
}
.job:hover { background: var(--panel-2); }
.job.is-new { border-left: 2px solid var(--signal); }
.job.status-beworben { background: var(--ok-bg); border-color: var(--ok); }
.job.status-abgelehnt { opacity: .5; }
.job.status-ausgeblendet { opacity: .35; }

.score {
  width: 52px; height: 52px; border-radius: var(--radius); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  font-variant-numeric: tabular-nums;
  background: var(--deep); border: 1px solid var(--line); color: var(--ink-2);
}
.score.high {
  background: var(--signal-dim); color: var(--signal); border-color: var(--signal);
  box-shadow: 0 0 calc(12px * var(--glow)) rgba(86, 207, 225, .25);
}
.score.mid { background: var(--open-bg); color: var(--open); border-color: var(--open); }
.score.low { color: var(--ink-3); }

.job-main h3 { font-size: 15px; line-height: 1.35; font-weight: 550; }
.job-main h3 a { text-decoration: none; color: var(--ink); }
.job-main h3 a:hover { color: var(--signal); }
.job-meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--ink-3); margin-top: 5px; align-items: center;
}
.job-company { font-weight: 600; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; }
.snippet { font-size: 13px; color: var(--ink-2); margin-top: 7px; line-height: 1.5; }
.pill {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  padding: 2.5px 6px; border-radius: 2px;
  background: var(--deep); border: 1px solid var(--line); color: var(--ink-3);
}
.pill.new { background: var(--signal-dim); color: var(--signal); border-color: var(--signal); }
.pill.src { background: var(--fix-dim); border-color: var(--fix); color: var(--fix); }
.pill.dup { background: var(--open-bg); border-color: var(--open); color: var(--open); }
.pill.st-interessant { background: var(--prop-bg); color: var(--prop); border-color: var(--prop); }
.pill.st-beworben { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.pill.st-abgelehnt { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }

.job-side { display: grid; gap: 6px; justify-items: end; min-width: 190px; }
.status-row { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.job-detail {
  grid-column: 1 / -1; border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 10px;
  display: grid; gap: 12px;
}
.score-table { width: 100%; border-collapse: collapse; font-size: 12.5px; max-width: 640px; }
.score-table td { padding: 3px 8px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.score-table td.p {
  text-align: right; width: 60px; font-family: var(--font-mono); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.score-table td.p.plus { color: var(--ok); }
.score-table td.p.minus { color: var(--bad); }
.detail-block h4 {
  margin: 0 0 4px; font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
}
.detail-block p { margin: 0; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; color: var(--ink-2); }
.note-row { display: flex; gap: 8px; align-items: center; }
.note-row input { flex: 1; }

.empty {
  text-align: center; color: var(--ink-3); padding: 40px 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
}

/* ---------- Karten (Einstellungen) ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 18px; }
.grid-2 label, .field label {
  display: block; font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-3);
  margin-bottom: 5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.field input, .field select { width: 100%; }
.row-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.foot {
  padding: 16px 22px 30px; text-align: center; color: var(--ink-3);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em;
}

@media (max-width: 760px) {
  .job { grid-template-columns: 48px 1fr; }
  .job-side { grid-column: 1 / -1; justify-items: start; }
  .status-row { justify-content: flex-start; }
}
.overlay {
  position: fixed; inset: 0; background: rgba(6, 9, 14, .78);
  display: grid; place-items: center; z-index: 80; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6); max-width: 560px; width: 100%;
}
.modal h2 { margin-bottom: 6px; }
.modal .score-table { margin: 12px 0; width: 100%; }
.cl-spin {
  width: 12px; height: 12px; flex: none; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--signal);
  animation: cl-turn .9s linear infinite;
}
@keyframes cl-turn { to { transform: rotate(360deg); } }

/* =================== MasterDashboard =================== */

.tile .detail { overflow-wrap: anywhere; }

/* ---------- Programmzeile ---------- */
.prog {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); display: grid;
  grid-template-columns: 74px 1fr auto; gap: 14px; align-items: start;
  transition: border-color .14s, background .14s;
}
.prog:hover { background: var(--panel-2); }
.prog.pri-A { border-left: 2px solid var(--signal); }
.prog.st-beworben, .prog.st-interview { border-color: var(--prop); }
.prog.st-zusage { background: var(--ok-bg); border-color: var(--ok); }
.prog.st-absage, .prog.st-verworfen { opacity: .45; }
.prog h3 { font-size: 15px; line-height: 1.35; font-weight: 550; cursor: pointer; }
.prog h3:hover { color: var(--signal); }
.prog .uni {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-2); margin-top: 2px;
}

.count {
  width: 68px; min-height: 58px; border-radius: var(--radius);
  display: grid; place-items: center; align-content: center; gap: 1px;
  background: var(--deep); border: 1px solid var(--line); color: var(--ink-2);
}
.count .n {
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.count .u {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.count.urgent { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.count.soon { background: var(--open-bg); border-color: var(--open); color: var(--open); }
.count.later {
  background: var(--signal-dim); border-color: var(--signal); color: var(--signal);
  box-shadow: 0 0 calc(10px * var(--glow)) rgba(86, 207, 225, .18);
}
.count.rolling { color: var(--prop); border-color: var(--prop); background: var(--prop-bg); }
.count.rolling .n { font-size: 13px; letter-spacing: .08em; }
.count.past .n, .count.none .n { color: var(--ink-3); }
.count.est { border-style: dashed; }

.pill.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: var(--ok); }
.pill.warn { background: var(--open-bg); color: var(--open); border-color: var(--open); }
.pill.bad  { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad); }
.pill.info { background: var(--prop-bg); color: var(--prop); border-color: var(--prop); }
.pill.sig  { background: var(--signal-dim); color: var(--signal); border-color: var(--signal); }
.pill.area-Management  { color: var(--fix); border-color: var(--fix-dim); }
.pill.area-Psychologie { color: var(--ok); border-color: var(--ok-bg); }
.pill.area-Economics   { color: var(--prop); border-color: var(--prop-bg); }
.stars { color: var(--signal); letter-spacing: 1px; font-size: 11px; }
.stars .off { color: var(--line); }

.side { display: grid; gap: 6px; justify-items: end; min-width: 200px; }
.side select { min-width: 150px; padding: 5px 8px; font-size: 13px; }

/* ---------- Detail ---------- */
.detail {
  grid-column: 1 / -1; border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 12px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 22px;
}
.detail .wide { grid-column: 1 / -1; }
.detail-block ul { margin: 0; padding-left: 16px; }
.detail-block li { font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 3px 10px; font-size: 13px; margin: 0; }
.kv dt {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); padding-top: 3px;
}
.kv dd { margin: 0; color: var(--ink-2); }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: top; }
.tbl td.date { font-family: var(--font-mono); white-space: nowrap; color: var(--ink); }
.tbl tr.past td { opacity: .45; }
.tbl tr.target td { background: var(--signal-dim); }
.tbl input[type="radio"], .tbl input[type="checkbox"] { accent-color: var(--signal); }

.box-warn {
  padding: 9px 12px; border-radius: var(--radius);
  background: var(--open-bg); border: 1px solid var(--open);
}
.box-warn h4 { color: var(--open) !important; }

.checklist { display: grid; gap: 4px; }
.checklist .check { font-size: 13px; }
.checklist .check.done { color: var(--ink-3); text-decoration: line-through; }
.progress-mini { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }

.check-box { border-top: 1px solid var(--line-2); padding-top: 12px; }
.diff td.v { font-family: var(--font-mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-word; }
.diff td.v.old { color: var(--bad); }
.diff td.v.new { color: var(--ok); }
.err-box {
  font-size: 12.5px; color: var(--bad); background: var(--bad-bg);
  border: 1px solid var(--bad); border-radius: var(--radius); padding: 8px 11px;
}

/* ---------- Tabellenansicht ---------- */
.view-row { border-top: 1px solid var(--line-2); padding-top: 8px; }
.view-row #viewName { min-width: 180px; }
.table-wrap {
  overflow-x: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.overview { font-size: 12.5px; }
.overview th { position: sticky; top: 0; background: var(--panel); white-space: nowrap; }
.overview th.sortable { cursor: pointer; }
.overview th.sortable:hover, .overview th.on { color: var(--signal); }
.overview td { vertical-align: middle; white-space: nowrap; }
.overview .trow { cursor: pointer; }
.overview .trow:hover td { background: var(--panel-2); }
.overview .trow.open td { background: var(--signal-dim); }
.overview .trow.st-absage td, .overview .trow.st-verworfen td { opacity: .45; }
.overview .tprog { color: var(--ink); font-weight: 550; white-space: normal; min-width: 220px; }
.overview .tdays { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.overview .tdays.urgent { color: var(--bad); }
.overview .tdays.soon { color: var(--open); }
.overview .tdays.later { color: var(--signal); }
.overview .tdays.rolling { color: var(--prop); font-size: 11px; }
.overview .tdays.past, .overview .tdays.none { color: var(--ink-3); font-size: 11px; }
.overview .tdays.est { text-decoration: underline dotted; }
.overview select { min-width: 120px; padding: 3px 6px; font-size: 12px; }
.overview .btn-chip { padding: 2px 6px; }
.overview .status-row { flex-wrap: nowrap; }
.detail { align-items: start; }
.note-dot { color: var(--open); font-size: 11px; }
.trow-detail > td { padding: 0 !important; background: var(--deep); white-space: normal; }
.prog.inline {
  display: block; border: 0; border-radius: 0; box-shadow: none;
  background: var(--deep); padding: 4px 14px 14px;
  position: sticky; left: 0; width: min(1500px, calc(100vw - 60px));
}
#view-programs.wide { max-width: none; }
.prog.inline:hover { background: var(--deep); }

/* ---------- Personen ---------- */
.uchip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 2px; white-space: nowrap;
  color: var(--uc); border: 1px solid var(--uc);
  background: color-mix(in srgb, var(--uc) 14%, transparent);
}
.uchip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--uc); }
.uchip.dim { opacity: .45; }
.others { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.tothers { white-space: normal !important; min-width: 130px; }
.tgmat { white-space: normal !important; min-width: 150px; }
.tgmat .pill { display: inline-block; margin: 1px 2px 1px 0; }
.tothers .uchip { margin: 1px 0; }
#accountBtn { padding: 4px 8px; }
body.locked > header .tabs, body.locked > header .actions, body.locked > main, body.locked > footer { visibility: hidden; }
.modal.login { max-width: 380px; }
.modal.login .field { margin-top: 12px; }
.modal.wide-modal { max-width: 860px; }
.err-line { color: var(--bad); font-size: 12.5px; min-height: 18px; margin: 8px 0 0; }
.admin-user {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--deep);
}
.admin-user .au-name { min-width: 140px; }
.admin-user input[type="color"], #accColor { min-width: 0; width: 46px; height: 32px; padding: 2px; }
.other-user { border-left: 2px solid var(--uc); padding-left: 10px; }
.other-user h4 { color: var(--uc) !important; }
.other-note { margin-top: 6px !important; font-size: 13px; }

/* ---------- Kommentare ---------- */
.comments-box { border-top: 1px solid var(--line-2); padding-top: 12px; }
.thread { margin-bottom: 10px; }
.comment {
  border-left: 2px solid var(--uc); padding: 6px 10px; background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 4px;
}
.comment.deleted { opacity: .55; }
.replies { margin-left: 22px; }
.c-head { display: flex; align-items: center; gap: 8px; }
.c-time { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.c-body { margin: 4px 0 0 !important; font-size: 13.5px !important; color: var(--ink) !important; white-space: pre-wrap; }
.c-actions { display: flex; gap: 12px; margin-top: 3px; }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-3);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
}
.linkbtn:hover { color: var(--signal); }
.c-compose { margin-top: 6px; max-width: 760px; }
.c-compose .row-actions, .comment .row-actions { margin-top: 6px; }

/* ---------- Gemeinsam ---------- */
.card.match { margin-bottom: 0; }
.m-score { color: var(--signal); letter-spacing: 2px; font-size: 13px; }
.m-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.m-col { border-left: 2px solid var(--uc); padding-left: 10px; }
.m-col h4 {
  margin: 0 0 4px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--uc);
}
.m-prog {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center;
  padding: 5px 6px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
}
.m-prog:hover { background: var(--panel-2); }
.m-w { font-family: var(--font-mono); font-size: 10.5px; color: var(--uc); }
.m-name small { display: block; color: var(--ink-3); font-size: 11px; }
.m-dl { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); white-space: nowrap; }

/* ---------- Zeitleiste ---------- */
.month {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin: 18px 0 6px;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
}
.month:first-child { margin-top: 0; }
.tl-row {
  display: grid; grid-template-columns: 96px 64px 1fr auto; gap: 12px; align-items: center;
  padding: 7px 12px; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); margin-bottom: 4px; font-size: 13.5px;
}
.tl-row > span:last-child { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.tl-row .d { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.tl-row .days { font-family: var(--font-mono); font-size: 11px; text-align: right; }
.tl-row.urgent .days { color: var(--bad); }
.tl-row.soon .days { color: var(--open); }
.tl-row.later .days { color: var(--signal); }
.tl-row.past { opacity: .4; }
.tl-row.target { border-color: var(--signal); }
.tl-row .who { color: var(--ink); cursor: pointer; }
.tl-row .who:hover { color: var(--signal); }
.tl-row .who span { color: var(--ink-3); font-size: 12px; }

/* ---------- Vorschlaege Neuaufnahme ---------- */
.pending { display: grid; gap: 8px; margin-bottom: 16px; }
.pending .card { margin-bottom: 0; }
.pending-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tbl-scroll, .history-slot, .check-box { overflow-x: auto; max-width: 100%; }
.detail { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.detail > * { min-width: 0; }

@media (max-width: 760px) {
  .view { padding: 12px 12px 48px; }
  .topbar { padding: 10px 12px; gap: 10px; position: static; }
  .actions { margin-left: 0; flex-wrap: wrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 10px 12px; }
  .tile .value { font-size: 20px; }
  .filter-row > select, .filter-row > input { flex: 1 1 140px; min-width: 0; }
  input.grow { min-width: 0; }
  .kv { grid-template-columns: 100px 1fr; }
  .replies { margin-left: 10px; }
  .m-prog { grid-template-columns: 40px 1fr; }
  .m-dl { grid-column: 2; }
  .prog { grid-template-columns: 60px 1fr; }
  .side { grid-column: 1 / -1; justify-items: start; }
  .tl-row { grid-template-columns: 84px 1fr; }
  .tl-row .days, .tl-row .pill { display: none; }
}
