/* ============================================================
   SP INDUSTRIES HQ — liquid marble · neutral-tech
   ============================================================ */

:root {
  --bg:        #0a0a0c;
  --bg-soft:   #0f0f12;
  --surface:   rgba(255,255,255,.028);
  --surface-2: rgba(255,255,255,.05);
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.14);
  --text:      #f4f4f5;
  --text-2:    #a1a1aa;
  --text-3:    #6b6b74;
  --accent:    #d9b56a;
  --accent-2:  #ecd39a;
  --accent-bg: rgba(217,181,106,.10);
  --accent-line: rgba(217,181,106,.38);
  --danger:    #e07070;
  --danger-bg: rgba(224,112,112,.10);
  --ok:        #8fbf8f;
  --sans:      "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --r-sm:      10px;
  --r:         16px;
  --r-lg:      24px;
  --r-pill:    999px;
  --ease:      cubic-bezier(.2,.7,.2,1);
  --side-w:    240px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(217,181,106,.055), transparent 62%),
    radial-gradient(760px 480px at -8% 108%, rgba(255,255,255,.035), transparent 60%);
}
::selection { background: var(--accent-bg); color: var(--accent-2); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 99px; border: 2.5px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); }

.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Screens (boot / config / login / denied) ---------- */
.screen {
  position: fixed; inset: 0; z-index: 5;
  display: grid; place-items: center;
  padding: 24px; overflow-y: auto;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-card {
  width: min(420px, 100%);
  padding: 44px 40px 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, rgba(255,255,255,.05), transparent 46%), var(--surface);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 30px 80px -30px rgba(0,0,0,.7);
  text-align: center;
}
.auth-mark { width: 58px; height: 54px; fill: var(--accent); stroke: none; margin-bottom: 22px; }
.auth-card h1 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
.auth-sub { font-size: 14.5px; color: var(--text-2); margin: 0 0 26px; line-height: 1.55; }
.auth-hint { font-size: 13px; color: var(--text-3); margin: 18px 0 0; min-height: 1em; }
.auth-hint.err { color: var(--danger); }

.field-label { display: block; text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px 2px; }
input[type="email"], input[type="text"], input[type="date"], textarea, select {
  width: 100%; font-family: inherit; font-size: 14.5px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; outline: none;
  transition: border-color .2s ease, background .2s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { border-color: var(--accent-line); background: rgba(255,255,255,.06); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }
select option { background: #131316; color: var(--text); }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input[type="date"] { color-scheme: dark; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em;
  padding: 12px 22px; border-radius: var(--r-pill); cursor: pointer;
  transition: transform .2s var(--ease), background .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn:disabled { opacity: .5; cursor: default; transform: none !important; }
.btn-gold { background: var(--accent); color: #171204; border: 1px solid var(--accent); font-weight: 600; }
.btn-gold:hover:not(:disabled) { transform: translateY(-1px); background: var(--accent-2); border-color: var(--accent-2); }
#login-form .btn-gold { width: 100%; margin-top: 16px; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { transform: translateY(-1px); border-color: var(--text-3); background: var(--surface-2); }
.btn-danger { background: none; color: var(--danger); border: 1px solid rgba(224,112,112,.35); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 8px 15px; font-size: 13.5px; }

.sent-ico, .denied-ico {
  width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent-2);
}
.denied-ico { background: var(--surface-2); border-color: var(--line-2); color: var(--text-2); }
.sent-title { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.denied-mail { color: var(--accent-2); font-weight: 500; }
.config-steps { text-align: left; font-size: 14px; color: var(--text-2); line-height: 1.6; margin: 0; padding-left: 20px; }
.config-steps li { margin-bottom: 10px; }
.config-steps code { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--accent-2); }

/* ---------- App shell ---------- */
#app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }
#demo-banner {
  flex-shrink: 0; text-align: center; font-size: 12px; font-weight: 500; letter-spacing: .04em;
  color: var(--accent-2); background: var(--accent-bg); border-bottom: 1px solid var(--accent-line);
  padding: 6px 12px;
}
#shell { flex: 1; min-height: 0; display: flex; }

/* ---------- Sidebar ---------- */
#sidebar {
  width: var(--side-w); flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.018);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  padding: 22px 14px 16px;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; }
.side-mark { width: 34px; height: 31px; fill: var(--accent); stroke: none; flex-shrink: 0; }
.side-word { display: flex; flex-direction: column; line-height: 1.25; }
.side-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.side-hq { font-size: 11px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }

.side-nav { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.nav-group-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); margin: 20px 12px 7px;
}
.nav-group-label:first-of-type { margin-top: 4px; }
.nav-item {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 11px; width: 100%;
  font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text-2); text-align: left;
  background: none; border: none; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 2px; cursor: pointer;
  transition: color .2s ease;
}
.nav-item:hover { color: var(--text); }
.nav-item.on { color: var(--accent-2); }
.nav-item .ico { width: 17px; height: 17px; opacity: .85; }
.nav-item .org-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); margin: 0 5px; flex-shrink: 0; transition: background .2s ease, box-shadow .2s ease; }
.nav-item.on .org-dot { background: var(--accent); box-shadow: 0 0 7px rgba(217,181,106,.6); }
.nav-count { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.nav-item.on .nav-count { color: var(--accent-2); opacity: .8; }
.nav-pill {
  position: absolute; left: 0; top: 0; width: 100%; height: 40px; z-index: 0;
  background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 12px;
  opacity: 0; pointer-events: none;
}

.side-foot { flex-shrink: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--accent-2);
  background: var(--accent-bg); border: 1px solid var(--accent-line);
}
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.icon-btn {
  margin-left: auto; width: 32px; height: 32px; flex-shrink: 0;
  display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 9px;
  color: var(--text-3); cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.icon-btn .ico { width: 16px; height: 16px; }

/* ---------- Topbar (mobil) ---------- */
#topbar { display: none; }

/* ---------- Main / Views ---------- */
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view-head { flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 30px 32px 0; }
.view-title h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; margin: 0; }
.view-title p { font-size: 13.5px; color: var(--text-3); margin: 4px 0 0; }

/* Toolbar */
.toolbar { flex-shrink: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 32px 0; }
.pill-row { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill {
  font-family: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text-2); background: none; border: 1px solid transparent; border-radius: var(--r-pill);
  padding: 6px 13px; cursor: pointer; white-space: nowrap;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.pill:hover { color: var(--text); }
.pill.on { color: var(--accent-2); background: var(--accent-bg); border-color: var(--accent-line); }
.toolbar select { width: auto; min-width: 150px; padding: 8px 34px 8px 12px; font-size: 13px; border-radius: var(--r-pill); }
.toolbar .spacer { flex: 1; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); position: relative; transition: background .2s ease, border-color .2s ease; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-3); transition: transform .25s var(--ease), background .2s ease; }
.switch input:checked + .track { background: var(--accent-bg); border-color: var(--accent-line); }
.switch input:checked + .track::after { transform: translateX(14px); background: var(--accent); }

/* ---------- Kanban board ---------- */
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 18px 32px 26px; }
.col { display: flex; flex-direction: column; min-height: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); transition: border-color .2s ease, background .2s ease; }
.col.dragover { border-color: var(--accent-line); background: var(--accent-bg); }
.col-head { flex-shrink: 0; display: flex; align-items: center; gap: 9px; padding: 14px 16px 10px; }
.col-head .dot { width: 7px; height: 7px; border-radius: 50%; }
.col-head .dot.todo { background: var(--text-3); }
.col-head .dot.doing { background: var(--accent); box-shadow: 0 0 8px rgba(217,181,106,.55); }
.col-head .dot.done { background: var(--ok); }
.col-head h3 { font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.col-head .count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.col-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 12px; }
.col-empty { font-size: 13px; color: var(--text-3); text-align: center; padding: 26px 10px; }

.task {
  position: relative;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(140deg, rgba(255,255,255,.035), transparent 55%), var(--surface-2);
  padding: 12px 13px 11px; margin-bottom: 8px; cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .2s ease;
}
.task:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 14px 30px -18px rgba(0,0,0,.8); }
.task.dragging { opacity: .45; }
.task-title { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.4; margin: 0 0 8px; word-wrap: break-word; }
.task.done .task-title { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.task-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip { font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--text-3); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2.5px 9px; white-space: nowrap; }
.chip.gold { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-bg); }
.prio { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.prio.high { background: var(--accent); box-shadow: 0 0 6px rgba(217,181,106,.6); }
.prio.normal { background: var(--text-3); }
.prio.low { background: rgba(255,255,255,.16); }
.task-av { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-2); flex-shrink: 0; }
.task-av.me { color: var(--accent-2); background: var(--accent-bg); border-color: var(--accent-line); }
.task-actions { position: absolute; top: 8px; right: 8px; display: none; gap: 3px; }
.task:hover .task-actions { display: flex; }
.task-actions .icon-btn { width: 25px; height: 25px; border-radius: 7px; background: rgba(19,19,22,.9); border-color: var(--line); }
.task-actions .icon-btn .ico { width: 13px; height: 13px; }

/* ---------- Übersicht ---------- */
.ov-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 32px 30px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px 20px 16px; }
.stat-card .n { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.stat-card .n em { font-style: normal; color: var(--accent-2); }
.stat-card .l { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.ov-section-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px; }
.ov-section-row { display: flex; align-items: center; justify-content: space-between; }
.ov-section-link { font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--accent-2); }
.ov-section-link:hover { color: var(--accent); }
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 28px; }
.org-card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(145deg, rgba(255,255,255,.04), transparent 50%), var(--surface);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: 20px 20px 16px;
  transition: transform .25s var(--ease), border-color .2s ease;
}
.org-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.org-card h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 3px; }
.org-card .org-sub { font-size: 12.5px; color: var(--text-3); margin: 0 0 14px; }
.org-card .org-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.org-card .org-stats b { font-weight: 600; color: var(--text); }
.org-proj { display: flex; flex-wrap: wrap; gap: 6px; }
.org-proj .chip { cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.org-proj .chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.add { color: var(--text-3); border-style: dashed; }
.chip.add:hover { color: var(--accent-2); border-color: var(--accent-line); }
.my-list { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; margin-bottom: 8px; }
.my-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s ease; }
.my-row:first-child { border-top: none; }
.my-row:hover { background: var(--surface-2); }
.my-row .task-title { margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-row .chip { flex-shrink: 0; }
.empty-note { font-size: 13.5px; color: var(--text-3); padding: 18px; text-align: center; }

/* ---------- Roadmap ---------- */
.rm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 32px 30px; }
.rm-month { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 22px 0 10px; display: flex; align-items: center; gap: 12px; }
.rm-month:first-child { margin-top: 0; }
.rm-month::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ms-row {
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 12px 16px; margin-bottom: 8px;
  transition: border-color .2s ease, background .2s ease;
}
.ms-row:hover { border-color: var(--line-2); }
.ms-row.done { opacity: .55; }
.ms-check {
  width: 22px; height: 22px; border-radius: 8px; flex-shrink: 0;
  border: 1px solid var(--line-2); background: var(--surface-2);
  display: grid; place-items: center; color: transparent; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.ms-check:hover { border-color: var(--accent-line); }
.ms-check.on { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-2); }
.ms-check .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.ms-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer; transition: color .15s ease; }
.ms-title:hover { color: var(--accent-2); }
.ms-row.done .ms-title { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.ms-due { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.ms-due .ico { width: 14px; height: 14px; }
.ms-due.over { color: var(--danger); }
.ms-row .icon-btn { opacity: 0; }
.ms-row:hover .icon-btn { opacity: 1; }
.rm-timeline { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.rmt-col { flex: 0 0 240px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px; }
.rmt-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--text-2); margin-bottom: 10px; padding: 0 2px; }
.rmt-count { font-size: 11px; color: var(--text-3); font-weight: 500; }
.rmt-body { display: flex; flex-direction: column; gap: 8px; }
.rmt-card {
  position: relative; display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  padding: 10px 11px; transition: border-color .2s ease;
}
.rmt-card:hover { border-color: var(--line-2); }
.rmt-card.done { opacity: .5; }
.rmt-check {
  position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--surface); color: transparent; cursor: pointer;
  display: grid; place-items: center; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.rmt-check:hover { border-color: var(--accent-line); }
.rmt-check.on { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-2); }
.rmt-check .ico { width: 11px; height: 11px; stroke-width: 2.4; }
.rmt-title { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; padding-right: 24px; cursor: pointer; }
.rmt-title:hover { color: var(--accent-2); }
.rmt-card.done .rmt-title { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.rmt-meta { font-size: 11px; color: var(--text-3); }
.rmt-del { position: absolute; bottom: 6px; right: 6px; width: 22px; height: 22px; opacity: 0; }
.rmt-card:hover .rmt-del { opacity: 1; }

/* ---------- Aktivität ---------- */
.act-list { display: flex; flex-direction: column; gap: 6px; }
.act-row {
  display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 11px 16px; cursor: pointer; transition: border-color .2s ease, background .2s ease;
}
.act-row:hover { border-color: var(--line-2); background: var(--surface-2); }
.act-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-2); color: var(--accent-2);
}
.act-ico .ico { width: 15px; height: 15px; }
.act-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.act-text { font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-time { flex-shrink: 0; font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ---------- Finanzen ---------- */
.fin-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 32px 30px; }
.stat-card .n.eur { font-size: 21px; padding-top: 5px; letter-spacing: -0.02em; white-space: nowrap; }
.stat-card .n.neg { color: var(--danger); }
.stat-card .n.gold { color: var(--accent-2); }
.stat-card .n.plus-t { color: var(--ok); }
.month-step { display: flex; align-items: center; gap: 4px; }
.month-step .icon-btn { border-color: var(--line); }
.month-label { font-size: 13px; font-weight: 500; color: var(--text-2); min-width: 118px; text-align: center; }
.fin-list { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.fin-row { display: flex; align-items: center; gap: 13px; padding: 12px 18px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s ease; }
.fin-row:first-child { border-top: none; }
.fin-row:hover { background: var(--surface-2); }
.fin-date { font-size: 12.5px; color: var(--text-3); min-width: 58px; flex-shrink: 0; }
.fin-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-amount { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-amount.plus { color: var(--ok); }
.fin-amount.minus { color: var(--danger); }
.fin-row .icon-btn { opacity: 0; }
.fin-row:hover .icon-btn { opacity: 1; }
.fin-list .empty-note { padding: 26px; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.fin-month { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 22px 0 10px; }
.fin-month:first-child { margin-top: 0; }
.fin-month .line { flex: 1; height: 1px; background: var(--line); }
.fin-month-saldo { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.fin-month-saldo.plus { color: var(--ok); }
.fin-month-saldo.minus { color: var(--danger); }
.fin-group { margin-bottom: 4px; }
.toolbar .search-input { width: 170px; font-family: inherit; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px; outline: none; transition: border-color .2s ease, background .2s ease; }
.toolbar .search-input:focus { border-color: var(--accent-line); background: rgba(255,255,255,.06); }
.toolbar .search-input::placeholder { color: var(--text-3); }
.toolbar .search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- V4: Liquid-Pill-Leisten ---------- */
.pill-row.liquid { position: relative; }
.pill-row.liquid .pill { position: relative; z-index: 1; }
.pill-row.liquid .pill.on { background: none; border-color: transparent; }
.row-pill {
  position: absolute; top: 3px; left: 3px; height: calc(100% - 6px); width: 12px;
  background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: var(--r-pill);
  opacity: 0; pointer-events: none; z-index: 0;
}

/* ---------- V4: Fälligkeit, Fortschritt, Sync, Hero ---------- */
.chip.due { display: inline-flex; align-items: center; gap: 4px; }
.chip.due .ico { width: 11px; height: 11px; }
.chip.due.over { color: var(--danger); border-color: rgba(224,112,112,.4); background: var(--danger-bg); }
.prog-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.prog { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s var(--ease); }
.prog-label { font-size: 11.5px; color: var(--text-3); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.sync-row { display: flex; align-items: center; gap: 8px; padding: 0 10px 10px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; transition: background .3s ease, box-shadow .3s ease; }
.sync-dot.ok { background: var(--ok); box-shadow: 0 0 7px rgba(143,191,143,.6); }
.sync-dot.err { background: var(--danger); box-shadow: 0 0 7px rgba(224,112,112,.6); }
.sync-dot.demo { background: var(--accent); box-shadow: 0 0 7px rgba(217,181,106,.6); }
.sync-label { font-size: 11px; letter-spacing: .04em; color: var(--text-3); }
.auth-hero { display: block; width: 132px; height: 132px; object-fit: contain; margin: -16px auto 6px; mix-blend-mode: screen; }
.kbd { font-size: 11px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 1.5px 6px; color: var(--text-2); font-family: inherit; }

/* ---------- Kommentare ---------- */
.chip.chat { display: inline-flex; align-items: center; gap: 4px; }
.chip.chat .ico { width: 11px; height: 11px; }
.cm-list { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 0; }
.cm-item { display: flex; align-items: flex-start; gap: 10px; }
.cm-item .task-av { margin: 2px 0 0; }
.cm-body { flex: 1; min-width: 0; }
.cm-meta { font-size: 12px; font-weight: 500; color: var(--text-2); margin: 0 0 2px; }
.cm-meta span { color: var(--text-3); font-weight: 400; }
.cm-text { font-size: 13.5px; line-height: 1.5; margin: 0; word-wrap: break-word; }
.cm-item .icon-btn { opacity: 0; width: 26px; height: 26px; }
.cm-item:hover .icon-btn { opacity: 1; }
.cm-empty { font-size: 13px; color: var(--text-3); margin: 4px 0; }
.cm-input { display: flex; gap: 8px; margin-top: 12px; }
.cm-input input { flex: 1; min-width: 0; }

/* ---------- Einstellungen ---------- */
.settings-shell { flex: 1; min-height: 0; display: flex; gap: 0; padding: 18px 32px 30px; }
.settings-nav {
  position: relative; flex-shrink: 0; width: 168px;
  border-right: 1px solid var(--line); padding-right: 16px; margin-right: 20px;
}
.set-nav-item {
  position: relative; z-index: 1; display: block; width: 100%; text-align: left;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--text-2);
  background: none; border: none; border-radius: 10px;
  padding: 9px 12px; margin-bottom: 2px; cursor: pointer; transition: color .2s ease;
}
.set-nav-item:hover { color: var(--text); }
.set-nav-item.on { color: var(--accent-2); }
.set-pill {
  position: absolute; left: 0; top: 0; width: 100%; height: 36px; z-index: 0;
  background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 10px;
  opacity: 0; pointer-events: none;
}
.settings-content { flex: 1; min-width: 0; overflow-y: auto; max-width: 760px; }
.set-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 20px; margin-bottom: 12px; }
.set-card:last-child { margin-bottom: 0; }
.set-card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.set-hint { font-size: 12.5px; color: var(--text-3); margin: 0 0 14px; line-height: 1.5; }
.set-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.set-row:last-child { margin-bottom: 0; }
.set-row input { flex: 1; min-width: 0; }
.set-row .user-meta { flex: 1; min-width: 0; }
.user-mail { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.port-org { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.port-org:first-child { margin-top: 0; }
.port-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 0 -10px; border-top: 1px solid var(--line); border-radius: 10px; transition: background .15s ease; }
.port-row:first-of-type { border-top: none; }
.port-row:hover { background: var(--surface-2); }
.port-name { font-size: 13.5px; font-weight: 500; flex-shrink: 0; }
.port-domain { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent-2); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.port-domain.muted { color: var(--text-3); }
.port-domain .ico { width: 13px; height: 13px; flex-shrink: 0; }
.od-warn { margin: 0 0 14px; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.od-count { color: var(--danger); font-weight: 600; }

/* ---------- Modal ---------- */
.modal-veil {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6,6,8,.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 22px;
  animation: veilIn .22s ease;
  overflow-y: auto;
}
@keyframes veilIn { from { opacity: 0; } }
.modal {
  display: flex; flex-direction: column;
  width: min(480px, 100%);
  max-height: min(640px, 88vh);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: linear-gradient(150deg, rgba(255,255,255,.05), transparent 46%), #121215;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 40px 90px -30px rgba(0,0,0,.85);
  animation: modalIn .28s var(--ease);
  overflow: hidden;
}
.modal.wide { width: min(680px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 26px; }
.modal .field { margin-bottom: 14px; }
.modal .field:last-child { margin-bottom: 0; }
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tm-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 24px; align-items: start; }
.tm-side .field { margin-bottom: 14px; }
.modal-foot {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 16px 26px 22px; border-top: 1px solid var(--line);
}
.modal-foot .grow { flex: 1; }

/* ---------- Globale Suche ---------- */
.search-veil {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(6,6,8,.6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 22px 22px; animation: veilIn .18s ease;
}
.search-box {
  width: min(560px, 100%); max-height: 66vh;
  display: flex; flex-direction: column;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: linear-gradient(150deg, rgba(255,255,255,.05), transparent 46%), #121215;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 40px 90px -30px rgba(0,0,0,.85);
  overflow: hidden; animation: modalIn .22s var(--ease);
}
.search-input-row { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search-input-row .ico { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }
.search-input-row input { flex: 1; min-width: 0; background: none; border: none; font-family: inherit; font-size: 15px; color: var(--text); outline: none; padding: 0; }
.search-input-row input::placeholder { color: var(--text-3); }
.search-results { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.gs-group-label { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 12px 10px 6px; }
.gs-group-label:first-child { margin-top: 4px; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; transition: background .15s ease; }
.gs-item:hover { background: var(--surface-2); }
.gs-item .ico { width: 15px; height: 15px; color: var(--accent-2); flex-shrink: 0; }
.gs-item-text { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item-sub { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { padding: 34px 10px; text-align: center; font-size: 13px; color: var(--text-3); }

/* ---------- Team-Chat (Bubble + Panel) ---------- */
.chat-bubble {
  position: fixed; bottom: 22px; right: 22px; z-index: 42;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(150deg, rgba(255,255,255,.08), transparent 50%), #16161a;
  border: 1px solid var(--accent-line);
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.75);
  display: grid; place-items: center; cursor: pointer; color: var(--accent-2);
  transition: transform .2s var(--ease), border-color .2s ease;
}
.chat-bubble:hover { transform: translateY(-2px); border-color: var(--accent); }
.chat-bubble .ico { width: 22px; height: 22px; grid-area: 1 / 1; transition: opacity .15s ease, transform .15s ease; }
.chat-bubble .i-shut { opacity: 0; transform: scale(.6) rotate(-45deg); }
.chat-bubble.open .i-open { opacity: 0; transform: scale(.6) rotate(45deg); }
.chat-bubble.open .i-shut { opacity: 1; transform: none; }
.chat-badge {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #2a0d0d;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}
.chat-panel {
  position: fixed; right: 22px; bottom: 86px; z-index: 41;
  width: min(340px, calc(100vw - 32px)); height: min(460px, 70vh);
  display: flex; flex-direction: column;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: linear-gradient(150deg, rgba(255,255,255,.05), transparent 46%), #121215;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 40px 90px -30px rgba(0,0,0,.85);
  overflow: hidden; animation: modalIn .22s var(--ease);
}
.chat-panel-head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
}
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 88%; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-msg-author { font-size: 11px; color: var(--text-3); }
.chat-msg-time { font-weight: 400; }
.chat-msg-body {
  margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; word-wrap: break-word;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 11px; display: inline-block; text-align: left;
}
.chat-msg.mine .chat-msg-body { background: var(--accent-bg); border-color: var(--accent-line); }
@keyframes chatMsgIn { from { opacity: 0; transform: translateY(6px); } }
.chat-msg-new { animation: chatMsgIn .25s var(--ease); }
.chat-input-row { flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-input-row textarea {
  flex: 1; min-width: 0; resize: none; max-height: 110px; min-height: 20px;
  line-height: 1.4; padding: 8px 12px; font-family: inherit; font-size: 13.5px;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  outline: none; transition: border-color .2s ease;
}
.chat-input-row textarea:focus { border-color: var(--accent-line); }
.chat-input-row textarea::placeholder { color: var(--text-3); }
.chat-send { flex-shrink: 0; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  background: rgba(22,22,26,.92); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 10px 20px; max-width: min(480px, 90vw);
  box-shadow: 0 16px 40px -18px rgba(0,0,0,.8);
  animation: toastIn .3s var(--ease);
}
.toast.err { border-color: rgba(224,112,112,.4); color: #f3c8c8; }
.toast.ok { border-color: var(--accent-line); color: var(--accent-2); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.toast.bye { opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .board { grid-template-columns: repeat(3, minmax(240px, 1fr)); overflow-x: auto; }
}
@media (max-width: 860px) {
  #sidebar { display: none; }
  #topbar {
    display: flex; align-items: center; gap: 12px; flex-shrink: 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(10,10,12,.72);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
  #shell { flex-direction: column; }
  .topbar-mark { width: 27px; height: 25px; fill: var(--accent); stroke: none; flex-shrink: 0; }
  .topnav { flex: 1; display: flex; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav .pill { flex: 1; text-align: center; }
  .avatar-btn { background: none; border: none; padding: 0; cursor: pointer; }
  .avatar-btn .avatar { width: 30px; height: 30px; }
  .view-head { padding: 20px 18px 0; }
  .toolbar { padding: 14px 18px 0; }
  .board { grid-template-columns: repeat(3, 82vw); gap: 10px; padding: 14px 18px 20px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .ov-scroll, .rm-scroll, .fin-scroll { padding: 16px 18px 26px; }
  .month-label { min-width: 96px; font-size: 12px; }
  .modal { max-height: min(560px, 85vh); }
  .modal-head { padding: 18px 18px 14px; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 14px 18px 18px; }
  .modal .row2, .tm-grid { grid-template-columns: 1fr; gap: 0; }
  .modal .row2 .field, .tm-grid .field { margin-bottom: 14px; }
  .settings-shell { flex-direction: column; padding: 14px 18px 26px; }
  .settings-nav { width: 100%; border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 10px; margin: 0 0 16px; display: flex; gap: 4px; overflow-x: auto; }
  .set-nav-item { width: auto; white-space: nowrap; border: 1px solid transparent; }
  .set-nav-item.on { background: var(--accent-bg); border-color: var(--accent-line); }
  .set-pill { display: none; }
  .port-domain { max-width: 40vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
