/* DnB Design Kundenportal, gemeinsame Styles (Präfix pt-), Runde 1.5 */

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

.pt-theme-dark {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --surface-3: #202020;
  --line: #1f1f1f;
  --line-strong: #2e2e2e;
  --text: #ebebeb;
  --muted: #a3a3a3;
  --soft: #8f8f8f;
  --faint: #6f6f6f;
  --accent: #ccff00;
  --on-accent: #0a0a0a;
  --accent-ink: #ccff00;
  --bubble-in: #1a1a1a;
  --danger: #ff8a7a;
  --ok: #3ddc84;
  --ph0: #6aa8ff;
  --ph1: #b38bff;
  --ph2: #ffb347;
  --ph3: #4fd1c5;
  --ph4: #ccff00;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

.pt-theme-light {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #f0f0ec;
  --surface-3: #e8e8e3;
  --line: #e4e4de;
  --line-strong: #d2d2ca;
  --text: #0e0e0e;
  --muted: #555555;
  --soft: #5f5f5f;
  --faint: #6b6b6b;
  --accent: #ccff00;
  --on-accent: #0a0a0a;
  --accent-ink: #4b5f00;
  --bubble-in: #ececE7;
  --danger: #b3261e;
  --ok: #1a8f4f;
  --ph0: #2563c9;
  --ph1: #7c4ddb;
  --ph2: #a85f00;
  --ph3: #0c7f75;
  --ph4: #4b5f00;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
  color-scheme: light;
}

.pt-ph-0 { --ph: var(--ph0); }
.pt-ph-1 { --ph: var(--ph1); }
.pt-ph-2 { --ph: var(--ph2); }
.pt-ph-3 { --ph: var(--ph3); }
.pt-ph-4 { --ph: var(--ph4); }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Satoshi", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { text-wrap: balance; }
p, li, label, .pt-bubble, .pt-card__text { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
a:hover, a:focus { text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
[hidden] { display: none !important; }

.pt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.pt-btn:hover { border-color: var(--soft); }
.pt-btn:active { transform: scale(0.98); }
.pt-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pt-btn--primary:hover { opacity: 0.9; border-color: var(--accent); }
.pt-btn--light { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; }
.pt-btn--quiet { border-color: transparent; color: var(--muted); padding: 0 10px; font-weight: 500; }
.pt-btn--quiet:hover { color: var(--text); border-color: transparent; }
.pt-btn--small { min-height: 38px; padding: 0 15px; font-size: 14px; }
.pt-btn--block { width: 100%; }
.pt-btn:disabled { opacity: 0.5; cursor: default; }
.pt-btn svg { width: 17px; height: 17px; flex: none; }

.pt-icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
}
.pt-icon-btn:hover { color: var(--text); }
.pt-icon-btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pt-icon-btn svg { width: 19px; height: 19px; }

.pt-link {
  border: none;
  background: none;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.pt-link:hover { color: var(--text); }

/* ---------- Felder ---------- */
.pt-field { display: flex; flex-direction: column; gap: 6px; }
.pt-field label, .pt-label { font-size: 13px; color: var(--muted); }
.pt-input, .pt-textarea, .pt-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
}
.pt-textarea { resize: vertical; line-height: 1.5; }
.pt-input:focus-visible, .pt-textarea:focus-visible, .pt-select:focus-visible { box-shadow: none; border-color: var(--accent); }
.pt-hint { font-size: 13px; color: var(--faint); }
.pt-error { color: var(--danger); font-size: 14px; }
.pt-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- Avatar ---------- */
.pt-av {
  --size: 36px;
  position: relative;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
  font-size: calc(var(--size) * 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  letter-spacing: 0.01em;
}
.pt-av img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.pt-av--dennis { background: var(--accent); color: var(--on-accent); }
.pt-av--xs { --size: 22px; border-radius: 6px; }
.pt-av--sm { --size: 30px; }
.pt-av--lg { --size: 44px; }
.pt-av--xl { --size: 72px; }
.pt-av--hero { --size: 112px; }
.pt-av__online {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ok);
  border: 2px solid var(--bg);
}

/* ---------- Phase ---------- */
.pt-phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ph) 15%, transparent);
  color: var(--ph);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
button.pt-phase-pill { cursor: pointer; border-color: color-mix(in srgb, var(--ph) 40%, transparent); }
.pt-phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ph);
  flex: none;
}
.pt-pulse { animation: pt-pulse 2.2s ease-in-out infinite; }
@keyframes pt-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ph, var(--accent)) 55%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ph, var(--accent)) 0%, transparent); }
}
.pt-phasebar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.pt-phasebar span { height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--ph) 22%, transparent); }
.pt-phasebar span.is-done, .pt-phasebar span.is-now { background: var(--ph); }

/* ---------- Karten ---------- */
.pt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.pt-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pt-card__title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.pt-card__meta { font-size: 13px; color: var(--soft); white-space: nowrap; }
.pt-card__text { margin: 0; color: var(--muted); }

/* ---------- Kunden-Shell ---------- */
.pt-shell { height: 100dvh; display: flex; flex-direction: column; }
.pt-main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pt-sidebar { display: none; }
.pt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 0;
}
.pt-brand { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.pt-brand span { color: var(--soft); font-weight: 500; }
.pt-view { display: none; }
.pt-view.is-active { display: block; }
.pt-view--chat.is-active { display: flex; flex-direction: column; height: 100%; }
.pt-page { padding: 18px 18px 32px; display: flex; flex-direction: column; gap: 16px; max-width: 1120px; }
.pt-page__head h1 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.pt-page__head p { margin: 8px 0 0; color: var(--muted); font-size: 16px; max-width: 620px; }

.pt-tabbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, var(--surface));
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  flex: none;
}
.pt-tabbar button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px;
  border: none;
  background: none;
  color: var(--soft);
  font-size: 11px;
  font-weight: 500;
  min-height: 54px;
}
.pt-tabbar button[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
.pt-tabbar svg { width: 23px; height: 23px; }
.pt-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 7px);
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-navlink {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.pt-navlink:hover { color: var(--text); background: var(--surface); }
.pt-navlink[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.pt-navlink[aria-current="page"] svg { color: var(--accent-ink); }
.pt-navlink svg { width: 20px; height: 20px; flex: none; }
.pt-navlink .pt-badge { position: static; margin-left: auto; height: 20px; min-width: 20px; font-size: 11px; }

.pt-sidecard {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pt-sidecard__label { font-size: 13px; color: var(--soft); }
.pt-person-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pt-person-row__name { font-weight: 600; font-size: 14px; }
.pt-person-row__meta { font-size: 13px; color: var(--soft); }

@media (min-width: 960px) {
  .pt-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
  .pt-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 26px 18px;
    border-right: 1px solid var(--line);
    min-height: 0;
    overflow-y: auto;
  }
  .pt-sidebar .pt-brand { padding: 0 10px; font-size: 17px; }
  .pt-sidebar nav { display: flex; flex-direction: column; gap: 4px; }
  .pt-sidebar__bottom { margin-top: auto; }
  .pt-topbar, .pt-tabbar { display: none; }
  .pt-page { padding: 40px 48px 56px; gap: 22px; }
  .pt-page__head h1 { font-size: 40px; }
  .pt-page__head p { font-size: 17px; }
}

/* ---------- Übersicht ---------- */
.pt-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.pt-timeline li { display: flex; gap: 14px; }
.pt-timeline__rail { display: flex; flex-direction: column; align-items: center; }
.pt-timeline__dot {
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--ph) 45%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pt-timeline__dot svg { width: 12px; height: 12px; }
.is-done .pt-timeline__dot { background: var(--ph); border-color: var(--ph); color: var(--on-accent); }
.is-now .pt-timeline__dot { border-color: var(--ph); }
.is-now .pt-timeline__dot::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--ph); }
.pt-timeline__line { width: 2px; flex: 1; min-height: 14px; background: var(--line-strong); }
.is-done .pt-timeline__line { background: var(--ph); }
.pt-timeline__body { padding-bottom: 14px; }
.pt-timeline li:last-child .pt-timeline__body { padding-bottom: 0; }
.pt-timeline__name { font-weight: 600; color: var(--muted); }
.is-done .pt-timeline__name { color: var(--text); }
.is-now .pt-timeline__name { color: var(--ph); font-weight: 700; }
.pt-timeline__sub { font-size: 13px; color: var(--faint); }
.is-now .pt-timeline__sub { color: var(--muted); }

@media (min-width: 960px) {
  .pt-timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .pt-timeline li { flex-direction: column; gap: 12px; }
  .pt-timeline__rail { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ph) 20%, transparent); }
  .is-done .pt-timeline__rail, .is-now .pt-timeline__rail { background: var(--ph); }
  .pt-timeline__dot, .pt-timeline__line { display: none; }
  .pt-timeline__body { padding: 0; }
  .pt-timeline__name { display: flex; align-items: center; gap: 7px; font-size: 14px; }
  .pt-timeline__name::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ph) 55%, transparent); }
  .is-done .pt-timeline__name::before, .is-now .pt-timeline__name::before { background: var(--ph); }
}

.pt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 960px) {
  .pt-grid--overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.85fr); gap: 20px; }
  .pt-grid--overview-2 { grid-template-columns: minmax(0, 2.25fr) minmax(0, 0.85fr); gap: 20px; }
}

.pt-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  min-height: 46px;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  background: none;
  text-align: left;
  color: var(--text);
}
.pt-check:hover { background: var(--surface-2); }
.pt-check__box {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-accent);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.pt-check__box svg { width: 13px; height: 13px; }
.pt-check__box path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.35s ease 0.05s; }
.pt-check[aria-pressed="true"] .pt-check__box { background: var(--accent); border-color: var(--accent); }
.pt-check[aria-pressed="true"] .pt-check__box path { stroke-dashoffset: 0; }
.pt-check[aria-pressed="true"] .pt-check__label { color: var(--faint); text-decoration: line-through; }
.pt-check__label { padding-top: 1px; }
.pt-check--static { cursor: default; }
.pt-check--static:hover { background: none; }

.pt-draft { padding: 0; overflow: hidden; gap: 0; }
.pt-draft__img {
  position: relative;
  height: 210px;
  background: linear-gradient(160deg, var(--surface-3), var(--surface-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 14px;
}
.pt-draft__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pt-draft__foot { padding: 18px 22px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pt-draft__title { font-weight: 600; font-size: 16px; }

.pt-countdown { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.pt-countdown__num { font-size: 88px; line-height: 0.9; font-weight: 700; letter-spacing: -0.05em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.pt-countdown__unit { font-size: 17px; font-weight: 600; }
.pt-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pt-progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
@media (max-width: 959px) {
  .pt-countdown__num { font-size: 56px; }
}

.pt-quick { display: flex; gap: 10px; }
.pt-quick .pt-input { border-radius: 999px; padding: 0 18px; }

.pt-upgrade { display: flex; flex-direction: column; gap: 6px; }
.pt-upgrade + .pt-upgrade { padding-top: 14px; border-top: 1px solid var(--line); }
.pt-upgrade__title { font-weight: 600; }
.pt-upgrade__meta { font-size: 14px; color: var(--muted); }
.pt-upgrade__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }

.pt-empty { color: var(--soft); font-size: 14px; }

/* ---------- Chat ---------- */
.pt-chathead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.pt-chathead__name { font-weight: 600; font-size: 16px; }
.pt-chathead__meta { font-size: 13px; color: var(--soft); }
.pt-phasestrip {
  margin: 10px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--ph) 28%, transparent);
  background: color-mix(in srgb, var(--ph) 9%, transparent);
  font-size: 14px;
  color: var(--text);
  text-align: left;
  width: calc(100% - 28px);
  flex: none;
  margin-bottom: 2px;
}
.pt-phasestrip strong { color: var(--ph); }
.pt-chatbox { flex: 1; min-height: 0; display: flex; }
.pt-chat { position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; }
.pt-chat__list {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overscroll-behavior: contain;
}
.pt-chat__empty { margin: auto; text-align: center; color: var(--muted); max-width: 320px; }
.pt-day { align-self: center; font-size: 12px; color: var(--soft); padding: 4px 12px; background: var(--surface); border-radius: 999px; margin: 10px 0 6px; }
.pt-system { align-self: center; display: flex; align-items: center; gap: 8px; max-width: 92%; padding: 6px 4px; font-size: 13px; color: var(--muted); text-align: center; margin: 6px 0; }
.pt-system .pt-phase-dot { --ph: var(--accent); }
.pt-newline { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.pt-newline::before, .pt-newline::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--accent-ink) 35%, transparent); }
.pt-msg { display: flex; gap: 8px; align-items: flex-end; max-width: min(600px, 88%); }
.pt-msg__col { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.pt-msg__spacer { width: 30px; flex: none; }
.pt-msg--own { align-self: flex-end; }
.pt-msg--own .pt-msg__col { align-items: flex-end; }
.pt-msg__meta { font-size: 12px; color: var(--faint); padding: 0 4px 6px; }
.pt-msg--own + .pt-msg__metarow { align-self: flex-end; }
.pt-bubble {
  padding: 10px 14px;
  border-radius: 18px 18px 18px 6px;
  background: var(--bubble-in);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pt-msg--own .pt-bubble { border-radius: 18px 18px 6px 18px; background: var(--accent); color: var(--on-accent); }
.pt-msg.is-new { animation: pt-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pt-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pt-image { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); max-width: 300px; }
.pt-image img { display: block; max-width: 100%; max-height: 320px; object-fit: cover; }
.pt-file { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; background: var(--bubble-in); border-radius: 14px; max-width: 300px; }
.pt-file__icon { width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pt-file__name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pt-file__size { font-size: 12px; color: var(--muted); }
.pt-typing { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 0 16px 4px 54px; font-size: 12px; color: var(--soft); }
.pt-typing__dots { display: inline-flex; gap: 4px; padding: 9px 12px; border-radius: 14px; background: var(--bubble-in); }
.pt-typing__dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--muted); animation: pt-blink 1.2s infinite ease-in-out; }
.pt-typing__dots span:nth-child(2) { animation-delay: 0.15s; }
.pt-typing__dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pt-blink { 0%, 80%, 100% { opacity: 0.35; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }
.pt-composer { position: relative; border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.pt-composer__quick { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-composer__quick button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 13px; }
.pt-composer__quick button:hover { color: var(--text); }
.pt-composer__row { display: flex; align-items: flex-end; gap: 8px; }
.pt-composer__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 180px;
  padding: 11px 18px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  resize: none;
  line-height: 1.45;
}
.pt-composer__input:focus-visible { box-shadow: none; border-color: var(--soft); }
.pt-composer__hint { font-size: 12px; color: var(--faint); padding-left: 52px; }
.pt-upload { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.pt-upload__bar { flex: 1; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pt-upload__bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.15s linear; }
.pt-offline { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); z-index: 4; }
.pt-drop { position: absolute; inset: 10px; border: 2px dashed var(--accent); border-radius: 18px; background: color-mix(in srgb, var(--bg) 88%, transparent); display: flex; align-items: center; justify-content: center; font-weight: 600; z-index: 6; }

/* ---------- Toast ---------- */
.pt-toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 36px);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 60;
  animation: pt-in 0.3s ease both;
}
.pt-toast .pt-btn { min-height: 32px; padding: 0 12px; font-size: 13px; }
.pt-toast__icon { width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex: none; }
.pt-toast__icon svg { width: 12px; height: 12px; }
@media (min-width: 960px) { .pt-toast { bottom: 28px; } }

/* ---------- Dateien ---------- */
.pt-segment { display: inline-flex; align-self: flex-start; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); gap: 2px; }
.pt-segment button { min-height: 36px; padding: 0 14px; border: none; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; }
.pt-segment button[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }
.pt-files__label { font-size: 13px; color: var(--soft); }
.pt-files__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .pt-files__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pt-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pt-tile__img { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.pt-tile__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-tile__img .pt-av { position: absolute; top: 8px; left: 8px; }
.pt-tile__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-tile__meta { font-size: 13px; color: var(--soft); }
.pt-filerow { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.pt-filerow__ext { flex: none; width: 42px; height: 42px; border-radius: 8px; background: var(--surface-3); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--accent-ink); }
.pt-filerow__name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.pt-filerow__meta { font-size: 13px; color: var(--soft); }
.pt-filerow svg { width: 18px; height: 18px; color: var(--soft); flex: none; margin-left: auto; }

/* ---------- Einstellungen ---------- */
.pt-settings { max-width: 640px; }
.pt-section-label { margin: 6px 0 -4px; font-size: 13px; font-weight: 600; color: var(--soft); }
.pt-avatar-edit { display: flex; align-items: center; gap: 18px; }
.pt-avatar-edit__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pt-radio { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer; }
.pt-radio:has(input:checked) { background: var(--surface-2); }
.pt-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pt-radio__dot { flex: none; width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--line-strong); transition: border-width 0.15s ease, border-color 0.15s ease; }
.pt-radio input:checked + .pt-radio__dot { border: 6px solid var(--accent); }
.pt-radio input:focus-visible + .pt-radio__dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.pt-radio__title { display: block; font-weight: 600; }
.pt-radio__sub { font-size: 13px; color: var(--soft); }
.pt-fieldset { margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.pt-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pt-theme-tile { padding: 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: stretch; font-size: 13px; }
.pt-theme-tile[aria-checked="true"] { border-color: var(--accent); color: var(--text); font-weight: 600; }
.pt-theme-tile__prev { height: 70px; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--line-strong); }
.pt-theme-tile__prev i { display: block; border-radius: 4px; }
.pt-theme-tile__prev--split { padding: 0; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }

/* ---------- Intro und Rundgang ---------- */
.pt-intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: calc(22px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom));
}
.pt-intro__top { display: flex; justify-content: space-between; align-items: center; }
.pt-intro__body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 24px; max-width: 520px; width: 100%; margin: 0 auto; }
.pt-intro__photo { position: relative; width: 112px; height: 112px; }
.pt-intro__photo::before { content: ""; position: absolute; inset: -60px; background: radial-gradient(circle, rgba(204, 255, 0, 0.2) 0%, rgba(204, 255, 0, 0) 62%); pointer-events: none; }
.pt-intro h1 { margin: 0; font-size: 34px; line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; }
.pt-intro p { margin: 0; font-size: 17px; color: var(--muted); }
.pt-intro__chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; color: var(--muted); }
.pt-intro__actions { display: flex; flex-direction: column; gap: 10px; max-width: 520px; width: 100%; margin: 0 auto; }
.pt-intro__actions .pt-btn { min-height: 54px; font-size: 16px; }
@media (min-width: 960px) { .pt-intro h1 { font-size: 46px; } }

.pt-tour { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.pt-tour__spot {
  position: fixed;
  border-radius: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
  transition: all 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.pt-tour__tip {
  position: fixed;
  left: 18px;
  right: 18px;
  max-width: 380px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  transition: top 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), left 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pt-tour__tip h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
.pt-tour__tip p { margin: 0; color: var(--muted); }
.pt-tour__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pt-tour__dots { display: flex; gap: 6px; }
.pt-tour__dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--line-strong); transition: width 0.3s ease, background-color 0.3s ease; }
.pt-tour__dots span.is-on { width: 22px; background: var(--accent); }

/* ---------- Hinweisseiten ---------- */
.pt-notice { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; max-width: 520px; margin: 0 auto; padding: 32px 24px; }
.pt-notice__brand { font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.pt-notice__title { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.pt-notice__text { margin: 0; color: var(--muted); }
.pt-login { width: 100%; max-width: 400px; margin: auto; }

/* ---------- Admin ---------- */
.pt-admin { height: 100dvh; display: flex; flex-direction: column; }
.pt-adminbar {
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  flex: none;
}
.pt-adminbar nav { display: flex; gap: 4px; }
.pt-adminbar nav button { height: 38px; padding: 0 14px; border-radius: 999px; border: none; background: none; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.pt-adminbar nav button[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.pt-adminbar nav .pt-badge { position: static; }
.pt-adminbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pt-adminbar__status { width: 250px; min-height: 38px; padding: 6px 14px; border-radius: 999px; font-size: 14px; }
.pt-avbtn { border: none; background: none; padding: 0; border-radius: 8px; }
.pt-admin__body { flex: 1; min-height: 0; overflow-y: auto; }
.pt-admin__page { padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 24px; }
.pt-admin__page h1 { margin: 0; font-size: 34px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.pt-admin__page .pt-page__lead { margin: 8px 0 0; color: var(--muted); max-width: 620px; }

.pt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pt-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.pt-kpi__label { font-size: 14px; color: var(--muted); }
.pt-kpi__num { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pt-kpi__num--accent { color: var(--accent-ink); }
.pt-kpi__sub { font-size: 13px; color: var(--soft); }
.pt-kpi__bar { display: flex; gap: 3px; height: 6px; margin-top: 8px; }
.pt-kpi__bar span { border-radius: 999px; background: var(--ph); min-width: 6px; }

.pt-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.pt-col {
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 420px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pt-col.is-over { background: color-mix(in srgb, var(--ph) 7%, transparent); border-color: color-mix(in srgb, var(--ph) 45%, transparent); }
.pt-col__head { margin: 0; padding: 6px 6px 2px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.pt-col__count { margin-left: auto; color: var(--faint); font-weight: 500; }
.pt-col__drop { height: 0; border-radius: 14px; border: 2px dashed transparent; transition: height 0.2s ease; }
.pt-col.is-over .pt-col__drop { height: 72px; border-color: var(--ph); background: color-mix(in srgb, var(--ph) 8%, transparent); }
.pt-kcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: grab;
  text-align: left;
  color: var(--text);
  width: 100%;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.pt-kcard:hover { border-color: var(--soft); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.pt-kcard.is-dragging { opacity: 0.4; }
.pt-kcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pt-kcard__name { font-weight: 600; }
.pt-kcard__menu { width: 32px; height: 32px; margin: -6px -6px 0 0; border-radius: 8px; border: none; background: none; color: var(--soft); display: inline-flex; align-items: center; justify-content: center; }
.pt-kcard__menu:hover { background: var(--surface-2); color: var(--text); }
.pt-kcard__person { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-chip { padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; white-space: nowrap; }
.pt-chip--accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); font-weight: 700; }
.pt-chip--ph { background: color-mix(in srgb, var(--ph) 15%, transparent); color: var(--ph); font-weight: 600; }
.pt-menu {
  position: absolute;
  z-index: 40;
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.pt-menu button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: none; border-radius: 9px; background: none; color: var(--text); text-align: left; font-size: 14px; }
.pt-menu button:hover, .pt-menu button[aria-checked="true"] { background: var(--surface-3); }

/* Admin Kundenseite */
.pt-detail { display: flex; flex-direction: column; height: 100%; }
.pt-detail__head { padding: 16px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; flex: none; }
.pt-detail__title { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.pt-detail__sub { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pt-detail__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-online { display: inline-flex; align-items: center; gap: 6px; }
.pt-online::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--ok); }
.pt-detail__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 440px; }
.pt-detail__chat { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pt-detail__side { padding: 20px 22px 32px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; background: color-mix(in srgb, var(--bg) 85%, var(--surface)); }
.pt-detail__side .pt-card { padding: 18px; gap: 12px; border-radius: 16px; }
.pt-detail__side .pt-card__title { font-size: 15px; }
.pt-editrow { display: flex; align-items: center; gap: 8px; }
.pt-editrow .pt-input { min-height: 40px; padding: 8px 12px; }
.pt-editrow .pt-icon-btn { width: 36px; height: 36px; }
.pt-checkbox { width: 20px; height: 20px; flex: none; accent-color: #ccff00; }
.pt-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.pt-activity li { display: flex; gap: 10px; }
.pt-activity li::before { content: ""; flex: none; margin-top: 8px; width: 6px; height: 6px; border-radius: 999px; background: var(--line-strong); }
.pt-activity li.is-fresh::before { background: var(--accent); }
.pt-activity time { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.pt-draftedit { display: flex; gap: 14px; align-items: center; }
.pt-draftedit__img { flex: none; width: 112px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--faint); }
.pt-draftedit__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pt-saved { font-size: 13px; color: var(--accent-ink); }

.pt-form { max-width: 820px; }

@media (max-width: 1200px) {
  .pt-detail__body { grid-template-columns: minmax(0, 1fr) 380px; }
  .pt-adminbar__status { width: 190px; }
}
@media (max-width: 900px) {
  .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-board { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .pt-col { min-height: 0; }
  .pt-col__drop { display: none; }
  .pt-detail__body { display: flex; flex-direction: column; overflow-y: auto; }
  .pt-detail__chat { height: 70dvh; border-right: none; border-bottom: 1px solid var(--line); flex: none; }
  .pt-detail__side { overflow: visible; }
  .pt-adminbar { padding: 0 14px; gap: 12px; }
  .pt-adminbar__status, .pt-adminbar .pt-brand span { display: none; }
  .pt-admin__page { padding: 20px 16px 40px; }
  .pt-grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
