/* ───────── Tokens (BLICKFRISCH CI) ───────── */
:root {
  --bg: #fcfcfc;
  --soft: #dee8ed;
  --soft-2: #eef3f6;
  --ink: #172b36;
  --head: #0f4c75;
  --accent: #1487c9;
  --cta: #5fad00;
  --cta-hover: #56a000;
  --line: #e3ebef;
  --muted: #5d7280;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 43, 54, .04), 0 10px 30px rgba(23, 43, 54, .06);

  /* Status (Chip-Hintergrund / Text / Punkt) – entspricht den ClickUp-Farben */
  --st-planned-bg: #fdeee2;  --st-planned-fg: #9a4208;  --st-planned: #e16b16;
  --st-open-bg: #fbe7e8;     --st-open-fg: #a3272e;     --st-open: #d33d44;
  --st-progress-bg: #fff2cf; --st-progress-fg: #7a5500; --st-progress: #f8ae00;
  --st-feedback-bg: #f3e6fa; --st-feedback-fg: #7a2ba3; --st-feedback: #b660e0;
  --st-done-bg: #dcf3e5;     --st-done-fg: #00693a;     --st-done: #008844;
  --st-general-bg: #eceff2;  --st-general-fg: #4c5a63;  --st-general: #87909e;

  --font: "Proxima Nova", "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 420px at 50% -80px, var(--soft) 0%, rgba(222, 232, 237, 0) 72%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { text-wrap: balance; color: var(--head); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--head); }
:focus-visible { outline: 3px solid rgba(20, 135, 201, .45); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: 14.5px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* ───────── Marke ───────── */
.brandmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 15px; letter-spacing: .06em;
  color: var(--head); text-decoration: none; white-space: nowrap;
}
.brandmark b { font-weight: 800; color: var(--accent); }
.brandmark-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--cta); transform: rotate(45deg); }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 15.5px;
  padding: 12px 20px; border-radius: 12px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--cta); color: var(--ink); box-shadow: 0 6px 16px rgba(95, 173, 0, .28); }
.btn-cta:hover { background: var(--cta-hover); color: var(--ink); }
.btn-cta[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--head); border-color: var(--soft); }
.btn-ghost:hover { background: var(--soft-2); color: var(--head); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ───────── Formulare ───────── */
.form { display: grid; gap: 16px; margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 650; color: var(--ink); }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #d4e0e6; border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: #8fa1ac; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(20, 135, 201, .15); }
.pw { position: relative; display: block; }
.pw input { padding-right: 96px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--accent); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.pw-toggle:hover { background: var(--soft-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 22px; font-size: 14.5px; font-weight: 600; }
.form-status.ok { color: var(--st-done-fg); }
.form-status.err { color: var(--st-open-fg); }
.alert { background: var(--st-open-bg); color: var(--st-open-fg); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14.5px; margin-top: 16px; }

/* ───────── Anmeldung ───────── */
.login-body {
  background: linear-gradient(rgba(252, 252, 252, .5), rgba(252, 252, 252, .5)), #eaf3fb url("login-bg.webp") center / cover no-repeat fixed;
}
.login {
  position: relative; min-height: 100vh; width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 90px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}
.login-kicker { margin: 0 0 15px; text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--head); animation: login-in .6s both; }
.login-card {
  width: min(460px, 100%); padding: 38px clamp(24px, 5vw, 44px) 28px;
  background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .85); border-radius: 28px;
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(15, 76, 117, .18), 0 2px 6px rgba(23, 43, 54, .04);
  animation: login-in .6s .06s cubic-bezier(.2, .7, .2, 1) both;
}
.login-head { display: flex; flex-direction: column; align-items: center; gap: 29px; text-align: center; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid rgba(15, 76, 117, .12); }
.client-logo { display: block; height: 43.6px; width: auto; max-width: 100%; }
.client-name { font-size: 22px; color: var(--head); }
.login-head h1 { margin: 0; font-size: 20px; font-weight: 650; color: var(--head); letter-spacing: .01em; }
.login-form { gap: 18px; margin-top: 0; }
.login-card .alert { margin: 0 0 18px; }
.input-ico { position: relative; display: block; }
.input-ico > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: #8fa1ac; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .15s; }
.input-ico:focus-within > svg { stroke: var(--accent); }
.input-ico input { padding: 15px 14px 15px 46px; border-radius: 14px; background: rgba(255, 255, 255, .85); border-color: rgba(15, 76, 117, .16); }
.input-ico input:focus { background: #fff; }
.input-ico.pw input { padding-right: 96px; }
.btn-lg { padding: 15px 22px; font-size: 16.5px; border-radius: 14px; margin-top: 4px; }
.login-help { margin: 22px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.login-help a { white-space: nowrap; }

.login-points { list-style: none; margin: 46px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; animation: login-in .6s .12s both; }
.login-points li {
  position: relative; padding: 12px 18px 12px 38px; border-radius: 14px; font-weight: 600; font-size: 14.5px; color: var(--ink);
  background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 8px 24px rgba(15, 76, 117, .08);
}
.login-points li::before { content: ""; position: absolute; left: 17px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 3px; background: var(--cta); transform: rotate(45deg); }
.login-footlogo { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: block; height: 22.8px; width: auto; }
@keyframes login-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .login-kicker, .login-card, .login-points { animation: none; } }


/* ───────── Kopfzeile ───────── */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(252, 252, 252, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 28px; }
.nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav a { white-space: nowrap; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 15px; padding: 8px 14px; border-radius: 10px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--soft-2); }
.nav a.is-active { color: var(--head); background: var(--soft); }
.user { display: flex; align-items: center; gap: 14px; }
.user .btn-sm { height: 40px; padding-top: 0; padding-bottom: 0; }
.icon-btn { flex: none; width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border-radius: 10px; border: 1.5px solid var(--soft); background: transparent; color: var(--head); cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: var(--soft-2); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-spinning svg { animation: icon-spin .9s linear; }
@keyframes icon-spin { to { transform: rotate(360deg); } }
.user-name { font-size: 14px; color: var(--muted); font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── Layout ───────── */
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 24px; align-items: start; margin-top: 24px; }
.col-main, .col-side { display: grid; gap: 24px; min-width: 0; }
.col-side { position: sticky; top: 92px; }
.section { padding: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.section-head .muted { margin-top: 4px; }
.count { flex: none; background: var(--st-open-bg); color: var(--st-open-fg); font-weight: 750; font-size: 13.5px; padding: 5px 12px; border-radius: 999px; }
.count.calm { background: var(--st-done-bg); color: var(--st-done-fg); }

/* ───────── Hero ───────── */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 36px 40px; background: linear-gradient(135deg, #fff 55%, rgba(222, 232, 237, .55)); }
.lead { font-size: 18px; color: var(--ink); opacity: .82; margin-top: 10px; max-width: 640px; }
.hero-text { min-width: 0; }
/* Auf breiten Bildschirmen bleibt der Einleitungssatz einzeilig */
@media (min-width: 1180px) { .lead { max-width: none; white-space: nowrap; } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--soft-2); font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pill b { color: var(--head); font-weight: 800; }
.pill.warn { background: var(--st-open-bg); color: var(--st-open-fg); }
.pill.warn b { color: var(--st-open-fg); }
.pill.pill-hot { background: var(--st-planned-bg); color: var(--st-planned-fg); }
.pill.pill-hot b { color: var(--st-planned-fg); }
.pill svg { width: 16px; height: 16px; flex: none; fill: rgba(225, 107, 22, .28); stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill.good { background: var(--st-done-bg); color: var(--st-done-fg); }
.pill.good b { color: var(--st-done-fg); }
.ring { position: relative; flex: none; width: 140px; height: 140px; }
.ring svg { display: block; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--soft); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 376.99; stroke-dashoffset: 376.99; transition: stroke-dashoffset 1s cubic-bezier(.22, .8, .2, 1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-size: 32px; font-weight: 800; color: var(--head); line-height: 1; }
.ring-label span { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ───────── Kacheln ───────── */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.tiles.tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Mit Sitemap: auf breiten Bildschirmen (ab 1240 px) vier kompakte Kacheln nebeneinander, Texte einzeilig; darunter 2×2 */
@media (min-width: 1240px) {
  .tiles.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .tiles-4 .tile { padding: 16px 14px; gap: 12px; }
  .tiles-4 .tile-ico { width: 40px; height: 40px; border-radius: 12px; }
  .tiles-4 .tile-ico svg { width: 22px; height: 22px; }
  .tiles-4 .tile-arrow { display: none; }
  .tiles-4 .tile-text strong, .tiles-4 .tile-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tiles-4 .tile-text small { font-size: 13px; }
}
.tile { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); border-color: #c9dbe4; box-shadow: 0 1px 2px rgba(23, 43, 54, .05), 0 14px 34px rgba(23, 43, 54, .09); color: var(--ink); }
.tile-ico { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; }
.tile-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile-ico-blue { background: rgba(20, 135, 201, .12); color: var(--accent); }
.tile-ico-green { background: rgba(95, 173, 0, .16); color: #3f7a00; }
.tile-text { display: grid; min-width: 0; }
.tile-text strong { font-size: 16px; color: var(--head); }
.tile-text small { color: var(--muted); font-size: 13.5px; }
.tile-arrow { margin-left: auto; color: var(--muted); font-size: 18px; }

/* ───────── Status-Chips ───────── */
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-planned  { background: var(--st-planned-bg);  color: var(--st-planned-fg); }
.st-open     { background: var(--st-open-bg);     color: var(--st-open-fg); }
.st-progress { background: var(--st-progress-bg); color: var(--st-progress-fg); }
.st-feedback { background: var(--st-feedback-bg); color: var(--st-feedback-fg); }
.st-done     { background: var(--st-done-bg);     color: var(--st-done-fg); }
.st-general  { background: var(--st-general-bg);  color: var(--st-general-fg); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

/* ───────── Aufgaben ───────── */
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.task.is-mine { border-color: rgba(20, 135, 201, .35); background: linear-gradient(90deg, rgba(20, 135, 201, .06), #fff 60%); }
.task-ico { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; flex: none; }
.task-ico.is-done { background: var(--st-done); border-color: var(--st-done); }
.task-ico svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.task-name { font-weight: 650; }
.task-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.due { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 13.5px; padding: 6px 11px; border-radius: 10px; background: var(--soft-2); color: var(--ink); white-space: nowrap; }
.due svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.due.late { background: var(--st-open-bg); color: var(--st-open-fg); }
.due.soon { background: var(--st-progress-bg); color: var(--st-progress-fg); }
.due.hot { background: var(--st-planned-bg); color: var(--st-planned-fg); }
.due.hot.late { background: var(--st-open-bg); color: var(--st-open-fg); }
.due.hot svg { width: 17px; height: 17px; fill: rgba(225, 107, 22, .28); transform-origin: 50% 90%; animation: flame 1.8s ease-in-out infinite; }
.due.hot.late svg { fill: rgba(211, 61, 68, .25); }
@keyframes flame { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .due.hot svg { animation: none; } }
.due.none { background: transparent; color: var(--muted); font-weight: 600; padding-left: 0; }
.empty { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; background: var(--st-done-bg); color: var(--st-done-fg); font-weight: 650; }
.empty svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.more { margin-top: 14px; }
.more .task-list { margin-top: 10px; }
.more summary { cursor: pointer; }

/* ───────── Projektplan ───────── */
.phases { display: grid; gap: 12px; }
.phase { border: 1.5px solid var(--line); border-radius: 14px; background: #fff; overflow: clip; }
.phase[open] { border-color: #cfdde5; }
.phase > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; }
.phase > summary::-webkit-details-marker { display: none; }
.phase > summary:hover { background: var(--soft-2); }
.phase-badge { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--head); border-radius: 9px; padding: 6px 10px; }
.phase.is-done .phase-badge { background: var(--st-done); }
.phase-title { font-weight: 700; color: var(--head); }
.phase-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.bar { flex: 1; max-width: 260px; height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .8s cubic-bezier(.22, .8, .2, 1); }
.phase.is-done .bar > i { background: var(--st-done); }
.phase-frac { font-size: 13.5px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.chev { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.phase[open] .chev { transform: rotate(180deg); }
.steps { list-style: none; margin: 0; padding: 4px 18px 16px; display: grid; }
.step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-dot { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--st-general); flex: none; }
.step[data-st=planned] .step-dot { border-color: var(--st-planned); }
.step[data-st=open] .step-dot { border-color: var(--st-open); }
.step[data-st=progress] .step-dot { border-color: var(--st-progress); background: var(--st-progress); }
.step[data-st=feedback] .step-dot { border-color: var(--st-feedback); background: var(--st-feedback); }
.step[data-st=done] .step-dot { border-color: var(--st-done); background: var(--st-done); }
.step[data-st=done] .step-name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(93, 114, 128, .5); }
.step-name { font-weight: 550; }
.step-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.owner { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: #e6f1f8; color: var(--head); box-shadow: inset 0 0 0 1px #cfe2ef; }
.owner.mine { background: #fff0c4; color: #6e4d00; box-shadow: inset 0 0 0 1px #f3dc97; }   /* Kunde (Standard): warmes Gelb */
.owner.o-texter { background: #efe4f8; color: #62298a; box-shadow: inset 0 0 0 1px #dcc6ee; }   /* Texter: Violett */
.owner.o-blickfrisch { background: #e6f1f8; color: var(--head); box-shadow: inset 0 0 0 1px #cfe2ef; } /* du: Hellblau */

/* ───────── Inhalte ───────── */
.docs { list-style: none; margin: 0; padding: 0; display: grid; }
.doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 13px 4px; border-top: 1px solid var(--line); }
.doc:first-child { border-top: 0; }
.doc-ico { width: 38px; height: 38px; border-radius: 11px; background: rgba(20, 135, 201, .1); display: grid; place-items: center; }
.doc-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.doc-name { font-weight: 650; }
.doc .btn { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.doc .nolink { color: var(--muted); font-size: 13.5px; }

/* ───────── Mitteilung ───────── */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; margin: 22px 0 18px; border: 1.5px solid #5fad00; background: linear-gradient(135deg, #fff 50%, rgba(95, 173, 0, .16)); box-shadow: var(--shadow); }
.notice-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(95, 173, 0, .16); color: #3f7d00; }
.notice-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notice strong { display: block; color: var(--head); margin-bottom: 2px; }
.notice { position: relative; padding-right: 54px; }
.notice-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--head); cursor: pointer; }
.notice-close:hover { background: rgba(95, 173, 0, .14); color: var(--head); }
.notice-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.notice p { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ───────── Kontakt + Nachricht ───────── */
.brand-logo { display: inline-flex; align-items: center; flex: none; }
.brand-logo img { display: block; height: 26px; width: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.contact { padding: 22px; }
.contact-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.contact-head h2 { font-size: 19px; }
.contact-head .muted { margin-top: 2px; font-size: 14px; }
.photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--soft), 0 8px 18px rgba(15, 76, 117, .18); }
.avail { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 5px 12px; border-radius: 999px; background: var(--soft-2); font-size: 13px; font-weight: 700; }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-general); }
.avail[data-state=open] { background: var(--st-done-bg); color: var(--st-done-fg); }
.avail[data-state=open] .avail-dot { background: var(--st-done); box-shadow: 0 0 0 4px rgba(0, 136, 68, .18); }
.avail[data-state=closed] { color: var(--muted); }
.contact-line { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.contact-line a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 14px; white-space: nowrap; }
.contact-line a:hover { color: var(--accent); }
.contact-line svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hours { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 13.5px; color: var(--muted); }
.hours li { display: inline-flex; gap: 6px; }
.hours strong { color: var(--head); font-weight: 700; }
.msg-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); gap: 12px; }
.msg-form h3 { font-size: 15.5px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.msg-form .field > span { font-size: 13px; }
.msg-form input[type=text], .msg-form input[type=email], .msg-form textarea { padding: 9px 12px; font-size: 14.5px; border-radius: 10px; }
.msg-form textarea { min-height: 84px; }
.btn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.btn-row .btn { padding: 11px 16px; font-size: 14.5px; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--cta); }
.btn-outline:hover { background: rgba(95, 173, 0, .1); color: var(--ink); }
.form-status { min-height: 0; }
.form-status:empty { display: none; }

/* ───────── Footer ───────── */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-right { display: inline-flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--head); }

/* ───────── Laden / Fehler ───────── */
.skel { height: 64px; border-radius: 14px; background: linear-gradient(90deg, var(--soft-2) 25%, #f7fafb 45%, var(--soft-2) 65%); background-size: 200% 100%; animation: sh 1.4s infinite linear; margin-bottom: 10px; }
@keyframes sh { to { background-position: -200% 0; } }
.err-box { padding: 18px; border-radius: 14px; background: var(--st-open-bg); color: var(--st-open-fg); font-weight: 600; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ───────── Responsive ───────── */
@media (max-width: 1080px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 980px) {
  .topbar-in { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 10px 16px; }
  .nav { order: 3; flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .user { margin-left: auto; }
  html { scroll-padding-top: 130px; }
}
@media (max-width: 860px) {
  .topbar-in { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 10px 16px; }
  .nav { order: 3; flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .nav a { white-space: nowrap; }
  .user { margin-left: auto; }
  .user-name { display: none; }
  html { scroll-padding-top: 130px; }
  .wrap { padding: 20px 16px 32px; }
  .hero { flex-direction: column-reverse; align-items: flex-start; padding: 24px; gap: 20px; }
  .ring { width: 104px; height: 104px; }
  .ring-label strong { font-size: 24px; }
  .tiles, .tiles.tiles-4 { grid-template-columns: minmax(0, 1fr); }
  .login-points { flex-direction: column; align-items: stretch; width: min(460px, 100%); }
}
@media (max-width: 640px) {
  .col-side { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 22px 18px; }
  .contact { padding: 20px 16px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .btn-row { grid-template-columns: minmax(0, 1fr); }
  .task { grid-template-columns: auto minmax(0, 1fr); }
  .task .due { grid-column: 2; justify-self: start; }
  .doc { grid-template-columns: auto minmax(0, 1fr); }
  .doc .chip, .doc .btn, .doc .nolink { grid-column: 2; justify-self: start; }
  .phase > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .phase-badge { grid-column: 1 / -1; justify-self: start; }
  .step { grid-template-columns: auto minmax(0, 1fr); }
  .step-meta { grid-column: 2; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ───────── Aufgaben: Abhaken, Hinweis, Aktionen ───────── */
.task-body { min-width: 0; }
.task-ico, .check { margin-top: 1px; }
.task-hint { margin: 4px 0 2px; font-size: 14.5px; color: var(--ink); opacity: .78; }
.task-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.task.is-done { border-color: var(--line); background: #fafcfd; }
.task.is-done .task-name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(93, 114, 128, .5); }
.task.is-done .task-sub { opacity: .8; }
.check { width: 26px; height: 26px; flex: none; padding: 0; border-radius: 50%; border: 2px solid var(--accent); background: #fff; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s, box-shadow .15s; }
.check svg { width: 14px; height: 14px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s; }
.check:hover { box-shadow: 0 0 0 5px rgba(20, 135, 201, .14); }
.check:hover svg { stroke: rgba(20, 135, 201, .5); }
.check.is-on { background: var(--st-done); border-color: var(--st-done); }
.check.is-on svg, .check.is-on:hover svg { stroke: #fff; }
.check.is-on:hover { box-shadow: 0 0 0 5px rgba(0, 136, 68, .16); }
.check[disabled] { opacity: .55; cursor: progress; }
.empty-gap { margin-bottom: 12px; }

/* ───────── Nachrichten-Protokoll (kleine Kachel) ───────── */
.msglog { padding: 0; }
.msglog summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; font-weight: 700; font-size: 15px; color: var(--head); border-radius: var(--radius); }
.msglog summary::-webkit-details-marker { display: none; }
.msglog summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.msglog details[open] summary::after { transform: rotate(180deg); }
.msglog summary:hover { background: var(--soft-2); }
.msglog .count { padding: 2px 10px; }
.msglog-list { list-style: none; margin: 0; padding: 4px 22px 18px; display: grid; gap: 12px; }
.msglog-list li { font-size: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.msglog-list li:first-child { border-top: 0; padding-top: 4px; }
.ml-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.msglog-list p { margin-top: 4px; color: var(--ink); overflow-wrap: anywhere; }
.privacy-note { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.privacy-note a { color: var(--muted); }

/* ───────── Popup: E-Mail-Benachrichtigung ───────── */
.dialog { border: 0; padding: 0; background: transparent; max-width: min(460px, calc(100vw - 32px)); width: 100%; overflow: visible; color: var(--ink); }
.dialog::backdrop { background: rgba(23, 43, 54, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dialog[open] { animation: dlg-in .22s cubic-bezier(.22, .8, .2, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-card { position: relative; background: var(--card); border-radius: 20px; padding: 32px 28px 24px; box-shadow: 0 24px 60px rgba(23, 43, 54, .28); display: grid; gap: 14px; }
.dialog-card h2 { font-size: 22px; padding-right: 24px; }
.dialog-ico { width: 52px; height: 52px; border-radius: 15px; background: rgba(20, 135, 201, .12); display: grid; place-items: center; }
.dialog-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dialog-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.dialog-x:hover { background: var(--soft-2); color: var(--ink); }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.choice .btn.is-selected { box-shadow: 0 0 0 4px rgba(95, 173, 0, .25); }
.nd-form { margin-top: 0; }
.dialog .form-status:empty { display: none; }
@media (max-width: 480px) { .dialog-card { padding: 28px 20px 20px; } .choice { grid-template-columns: minmax(0, 1fr); } }

/* ───────── Sitemap (eingebettet) ───────── */
.embed { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.embed iframe { display: block; width: 100%; height: 560px; border: 0; }
@media (max-width: 640px) { .embed iframe { height: 420px; } }
