/* =============================================================================
   PATINA — Design System
   A private ledger for tangible & intangible wealth. Helle, ruhige Oberfläche
   im Stil bekannter Banking-Apps: weiße Karten auf zartem Hellgrau, eine
   gedeckte Petrol-Akzentfarbe (statt reinem Schwarz oder Signalgrün) und eine
   Mono-Schrift für jede Zahl.
   ========================================================================== */

:root {
  /* ---- Flächen ------------------------------------------------------- */
  --bg:            #F5F6F8;
  --bg-raised:     #FBFBFC;
  --surface:       #FFFFFF;
  --surface-2:     #F6F7F9;
  --surface-hover: #EEF0F3;
  --border:        #E4E7EC;
  --border-soft:   #EDEFF3;
  --overlay:       rgba(15, 23, 42, 0.45);

  /* ---- Schrift --------------------------------------------------------- */
  --text:        #0F172A;
  --text-dim:    #334155;
  --text-faint:  #566478;
  --text-on-brand: #FFFFFF;

  /* ---- Akzent: ruhiges Petrol --------------------------------------- */
  --brand:       #0F766E;
  --brand-bright:#14948A;
  --brand-ink:   #0B645D;
  --brand-soft:  rgba(15, 118, 110, 0.09);
  --brand-line:  rgba(15, 118, 110, 0.28);

  /* ---- Signalfarben ----------------------------------------------------- */
  --up:          #16A34A;
  --up-text:     #136F35;
  --down-text:   #BE2A2A;
  --up-soft:     rgba(22, 163, 74, 0.11);
  --down:        #DC2626;
  --down-soft:   rgba(220, 38, 38, 0.10);

  /* ---- Kategoriefarben (keine Überlappung mit --up / --down) --------- */
  --cat-gold:        #D4AF6A;
  --cat-silber:      #C3CAD3;
  --cat-platin:      #8FA9C7;
  --cat-palladium:   #9A86C9;
  --cat-kupfer:      #D2754A;
  --cat-muenzen:     #3F8FD6;
  --cat-barren:      #6C7078;
  --cat-papiergeld:  #4DBFA8;
  --cat-whisky:      #7A4E2A;
  --cat-krypto:      #F08A24;
  --cat-aktien:      #E0476F;
  --cat-etfs:        #3FB27F;
  --cat-immobilien:  #27408B;
  --cat-bargeld:     #A5B52E;
  --cat-uhren:       #6E4FB8;
  --cat-schmuck:     #E58FCB;
  --cat-kunst:       #1F8A8A;
  --cat-sonstiges:   #9C948A;

  /* ---- Rundung / Schatten ----------------------------------------------- */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-pill: 999px;
  --shadow-modal: 0 24px 48px rgba(15, 23, 42, 0.18);
  --shadow-card:  0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);

  /* ---- Schriftarten ------------------------------------------------------ */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

  --container: 1240px;
}

/* Dark Mode —————————————————————————————————————————————————————————————— */
[data-theme="dark"] {
  --bg:            #0E1218;
  --bg-raised:     #151A22;
  --surface:       #171C25;
  --surface-2:     #1E2430;
  --surface-hover: #242B38;
  --border:        #2A3140;
  --border-soft:   #222938;
  --overlay:       rgba(0, 0, 0, 0.62);
  --text:          #EEF1F6;
  --text-dim:      #CBD2DD;
  --text-faint:    #8B95A7;
  --up-text:       #4ADE80;
  --down-text:     #F87171;
  --text-on-brand: #04201D;
  --brand:         #2DD4BF;
  --brand-bright:  #5EEAD4;
  --brand-ink:     #5EEAD4;
  --brand-soft:    rgba(45, 212, 191, 0.12);
  --brand-line:    rgba(45, 212, 191, 0.32);
  --shadow-modal:  0 24px 48px rgba(0, 0, 0, 0.5);
  --shadow-card:   0 1px 3px rgba(0, 0, 0, 0.35);
}
/* ===== Reset =============================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; }
.hidden { display: none !important; }
.pt-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Faint engraved guilloché texture — the signature ambient detail.
   Used sparingly behind the hero figure only. */
.pt-engraving {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-radial-gradient(circle at 18% 15%, rgba(138,106,51,0.12) 0px, rgba(138,106,51,0.12) 1px, transparent 1.6px, transparent 7px);
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.pt-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; }

/* ===== Topbar =============================================================== */
.pt-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.pt-topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.pt-brand { display: flex; align-items: center; gap: 10px; }
.pt-brand__mark { width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; border-radius: 50%; }
.pt-brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.pt-brand__tag {
  font-size: 11px;
  color: var(--text-faint);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 4px;
  display: none;
}
@media (min-width: 760px) { .pt-brand__tag { display: inline; } }

.pt-nav-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ===== Buttons =============================================================== */
.pt-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--r-pill);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.pt-btn .pt-icon { width: 15px; height: 15px; }
.pt-btn--primary { background: var(--brand); color: var(--text-on-brand); }
.pt-btn--primary:hover { background: var(--brand-bright); }
.pt-btn--ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.pt-btn--ghost:hover { color: var(--text); border-color: var(--text-faint); background: var(--surface); }
.pt-btn--danger { background: var(--down-soft); color: var(--down-text); }
.pt-btn--danger:hover { background: rgba(226,104,95,0.24); }
.pt-btn--sm { padding: 7px 12px; font-size: 12.5px; }
.pt-btn:disabled { opacity: .4; cursor: not-allowed; }
.pt-btn-icon {
  width: 34px; height: 34px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim); border: 1px solid var(--border); background: transparent;
}
.pt-btn-icon:hover { color: var(--text); background: var(--surface); border-color: var(--text-faint); }
.pt-btn-icon .pt-icon { width: 15px; height: 15px; }

/* ===== Shell / layout ======================================================== */
.pt-shell { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px 80px; flex: 1 0 auto; }

/* ===== Landing =============================================================== */
.pt-landing {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 76px 0 60px;
}
@media (max-width: 880px) { .pt-landing { grid-template-columns: 1fr; padding-top: 48px; } }

.pt-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand);
}
.pt-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.pt-landing__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 18px 0 20px;
}
.pt-landing__title em { font-style: italic; color: var(--brand); }

.pt-landing__lead {
  color: var(--text-dim);
  font-size: 16.5px;
  max-width: 480px;
  margin-bottom: 32px;
}

.pt-landing__cta { display: flex; gap: 12px; margin-bottom: 44px; flex-wrap: wrap; }
.pt-landing__cta .pt-btn { padding: 13px 24px; font-size: 14.5px; }

.pt-stat-row { display: grid; grid-template-columns: repeat(4, auto); gap: 28px 36px; }
@media (max-width: 560px) { .pt-stat-row { grid-template-columns: repeat(2, auto); } }
.pt-stat-row .pt-stat-num { display: block; font-family: var(--font-mono); font-size: 21px; font-weight: 600; }
.pt-stat-row .pt-stat-label { display: block; font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }

.pt-landing__visual {
  position: relative;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
}
.pt-landing__visual svg { width: 100%; height: 100%; }

/* ===== Hero (dashboard) ====================================================== */
.pt-hero { position: relative; padding: 48px 0 36px; overflow: hidden; }
.pt-hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  position: relative;
  z-index: 1;
}
@media (max-width: 880px) { .pt-hero__grid { grid-template-columns: 1fr; gap: 28px; } }

.pt-hero__figure {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(38px, 5.2vw, 56px);
  letter-spacing: -0.01em;
  margin: 10px 0 14px;
}

.pt-delta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pt-delta-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill);
}
.pt-delta-pill.is-up { background: var(--up-soft); color: var(--up-text); }
.pt-delta-pill.is-down { background: var(--down-soft); color: var(--down-text); }
.pt-delta-pill.is-flat { background: var(--surface-2); color: var(--text-dim); }
.pt-hero__caption { font-size: 13px; color: var(--text-faint); }
.pt-hero__caption b { color: var(--text-dim); font-weight: 600; }

.pt-hero__metrics { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.pt-metric__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 5px; }
.pt-metric__toggle {
  font-family: var(--font-sans); font-size: 10px; text-transform: none; letter-spacing: normal;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim);
  border-radius: var(--r-pill); padding: 1px 7px; margin-left: 6px; cursor: pointer; vertical-align: middle;
}
.pt-metric__toggle.is-active { background: var(--up-soft); color: var(--up-text); border-color: transparent; }
.pt-metric__value { font-family: var(--font-mono); font-size: 16px; font-weight: 600; }

.pt-hero__side {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  align-self: start;
}
.pt-hero__stat { background: var(--bg-raised); padding: 18px 20px; }
.pt-hero__stat-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.pt-hero__stat-value { font-family: var(--font-mono); font-size: 18px; font-weight: 600; }
.pt-hero__stat-value.is-small { font-family: var(--font-body); font-size: 13.5px; font-weight: 600; line-height: 1.3; }

/* ===== Overview grid (ring + categories) ===================================== */
.pt-overview { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 20px; margin-bottom: 28px; }
@media (max-width: 880px) { .pt-overview { grid-template-columns: 1fr; } }

.pt-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.pt-panel__head { margin-bottom: 18px; }
.pt-panel__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.pt-panel__sub { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }

.pt-ring-wrap { position: relative; display: flex; justify-content: center; margin-bottom: 18px; }
.pt-ring-svg { width: 100%; max-width: 220px; height: auto; }
.pt-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.pt-ring-center span:first-child { font-family: var(--font-mono); font-size: 19px; font-weight: 600; }
.pt-ring-center-label { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.pt-ring-legend { display: flex; flex-direction: column; gap: 10px; }
.pt-legend-item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.pt-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pt-legend-name { flex: 1; color: var(--text-dim); }
.pt-legend-pct { font-family: var(--font-mono); font-weight: 600; }
.pt-legend-pct.is-up { color: var(--up-text); }
.pt-legend-pct.is-down { color: var(--down-text); }
.pt-legend-pct.is-flat { color: var(--text-faint); }

.pt-category-bars { display: flex; flex-direction: column; gap: 18px; }
.pt-cat-row__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 10px; }
.pt-cat-row__name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.pt-cat-row__name .pt-icon { width: 15px; height: 15px; flex-shrink: 0; }
.pt-cat-row__meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; flex-shrink: 0; }
.pt-cat-row__delta { font-weight: 600; }
.pt-cat-row__delta.is-up { color: var(--up-text); }
.pt-cat-row__delta.is-down { color: var(--down-text); }
.pt-cat-row__delta.is-flat { color: var(--text-faint); }
.pt-cat-row__detail { font-size: 11.5px; color: var(--text-faint); margin-bottom: 6px; }
.pt-cat-row__track { height: 6px; border-radius: var(--r-pill); background: var(--border-soft); overflow: hidden; }
.pt-cat-row__fill { height: 100%; border-radius: var(--r-pill); }

/* ===== Assets toolbar & grid ================================================= */
.pt-assets { margin-bottom: 12px; }
.pt-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.pt-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-pill);
  padding: 9px 16px; flex: 1; min-width: 200px; max-width: 320px;
  color: var(--text-faint);
}
.pt-search .pt-icon { width: 14px; height: 14px; flex-shrink: 0; }
.pt-search input { background: none; border: none; color: var(--text); width: 100%; outline: none; }
.pt-search input::placeholder { color: var(--text-faint); }

.pt-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 2; }
.pt-chip {
  padding: 8px 14px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-dim);
  transition: all .15s ease;
}
.pt-chip:hover { border-color: var(--text-faint); color: var(--text); }
.pt-chip.is-active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }

.pt-sort select {
  background: var(--surface); border: 1px solid var(--border-soft); color: var(--text);
  border-radius: var(--r-pill); padding: 9px 14px; outline: none; font-size: 12.5px; font-weight: 600;
}

.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pt-grid.is-list-view { grid-template-columns: 1fr; gap: 8px; }
.pt-grid.is-list-view .pt-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.pt-grid.is-list-view .pt-card__top { flex: 1; min-width: 0; margin-bottom: 0; }
.pt-grid.is-list-view .pt-card__mid { margin-top: 0; flex-shrink: 0; border-top: none; padding-top: 0; }
.pt-grid.is-list-view .pt-card__actions { flex-shrink: 0; }

.pt-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 18px;
  transition: border-color .15s ease, transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-card);
}
.pt-card:hover { border-color: var(--text-faint); background: var(--surface-2); box-shadow: 0 6px 16px rgba(20,18,14,0.08); transform: translateY(-1px); }
.pt-card.is-cash { background: var(--bg-raised); }

/* Sobald ein echtes Foto im Platzhalter liegt, verschwinden Prägerahmen
   und Ersatzsymbol — das Foto braucht keinen Rahmen mehr. */
.pt-card__thumb:has(img)::before,
.pt-card__thumb:has(img)::after { display: none; }
.pt-card__thumb:has(img) { background: transparent; }

.pt-card__top { display: flex; gap: 12px; margin-bottom: 16px; }

/* Assay-stamp frame — the recurring physical-asset motif */
.pt-card__thumb {
  width: 46px; height: 46px; border-radius: var(--r-sm);
  background: var(--bg-raised);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
  overflow: hidden;
}
.pt-card__thumb .pt-icon { width: 20px; height: 20px; }
.pt-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-card__thumb::before, .pt-card__thumb::after {
  content: ''; position: absolute; width: 9px; height: 9px; pointer-events: none; opacity: .8;
}
.pt-card__thumb::before { top: 2px; left: 2px; border-top: 1.4px solid currentColor; border-left: 1.4px solid currentColor; }
.pt-card__thumb::after { bottom: 2px; right: 2px; border-bottom: 1.4px solid currentColor; border-right: 1.4px solid currentColor; }

.pt-card__info { flex: 1; min-width: 0; }
.pt-card__tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.pt-card__name { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.pt-badge-dist {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  padding: 1px 6px; border-radius: 999px; vertical-align: middle;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border-soft);
}
.pt-badge-dist--acc { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.pt-badge-dist--dis { color: var(--text); border-color: var(--border); background: var(--surface-2); font-weight: 700; }
.pt-badge-category {
  display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  padding: 1px 7px; border-radius: 999px; vertical-align: middle;
  background: var(--surface-2); color: var(--text-faint); border: 1px solid var(--border-soft);
}
.pt-card__meta { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-card__count { font-size: 11px; color: var(--text-faint); margin-top: 5px; display: block; }

.pt-card__mid { display: flex; justify-content: space-between; align-items: flex-end; }
.pt-card__value { font-family: var(--font-mono); font-weight: 600; font-size: 17px; }
.pt-card__cost { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.pt-card__delta { text-align: right; font-family: var(--font-mono); font-weight: 600; font-size: 14px; }
.pt-card__delta.is-up { color: var(--up-text); }
.pt-card__delta.is-down { color: var(--down-text); }
.pt-card__delta.is-flat { color: var(--text-faint); }
.pt-card__delta-pct { display: block; font-weight: 500; font-size: 11px; margin-top: 2px; }

.pt-card__notes { font-size: 12px; line-height: 1.45; color: var(--text-faint); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }

.pt-card__actions { display: flex; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.pt-card__actions .pt-btn-icon { width: 30px; height: 30px; }

.pt-empty { text-align: center; padding: 70px 20px; color: var(--text-faint); }
.pt-empty .pt-icon { width: 30px; height: 30px; margin-bottom: 14px; opacity: .5; }
.pt-empty p:first-of-type { font-weight: 600; color: var(--text-dim); margin-bottom: 4px; }

/* ===== Footer ================================================================= */
.pt-footer { display: flex; justify-content: space-between; align-items: center; padding: 36px 0 10px; color: var(--text-faint); font-size: 12px; border-top: 1px solid var(--border-soft); margin-top: 40px; flex-wrap: wrap; gap: 8px; }

/* ===== Guest banner =========================================================== */
.pt-guest-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-ink);
  border-radius: var(--r-md); padding: 12px 18px; font-size: 13px; margin-bottom: 28px;
}
.pt-guest-banner .pt-icon { width: 16px; height: 16px; flex-shrink: 0; }
.pt-guest-banner__text { display: flex; align-items: center; gap: 10px; }

/* ===== Nachrichten ============================================================== */
.pt-news-group + .pt-news-group { margin-top: 18px; }
.pt-news-group__head { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pt-news-item { display: block; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-sm); text-decoration: none; margin-bottom: 6px; transition: border-color .15s ease; }
.pt-news-item:hover { border-color: var(--brand-line); }
.pt-news-item__title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.pt-news-item__meta { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.pt-settings-cols { columns: 2 420px; column-gap: 48px; }
.pt-settings-cols > * { break-inside: avoid; }
.pt-settings-cols h4 { break-after: avoid; }
.pt-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; align-items: start; }
.pt-news-empty { font-size: 12.5px; color: var(--text-faint); padding: 4px 0 2px; }
.pt-news-loading { font-size: 12.5px; color: var(--text-faint); text-align: center; padding: 24px 0; }

/* ===== Modals ================================================================== */
body.pt-modal-open { overflow: hidden; }
.pt-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; backdrop-filter: blur(4px);
}
.pt-modal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 420px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-modal);
}
.pt-modal--wide { max-width: 620px; }
.pt-modal-wrap.pt-modal-wrap--page { max-width: min(1400px, calc(100vw - 48px)); height: calc(100vh - 48px); }
.pt-modal-wrap--page > .pt-modal { height: 100%; max-height: 100%; }
.pt-modal.pt-modal--page { width: 100%; max-width: min(1400px, calc(100vw - 48px)); height: calc(100vh - 48px); max-height: calc(100vh - 48px); }
@supports (height: 100dvh) { .pt-modal.pt-modal--page, .pt-modal-wrap.pt-modal-wrap--page { height: calc(100dvh - 48px); max-height: calc(100dvh - 48px); } }
.pt-modal-wrap { position: relative; width: 100%; max-width: 620px; }
.pt-modal__close-float {
  position: absolute; top: -14px; right: -14px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-raised); border: 1px solid var(--border); box-shadow: var(--shadow-modal);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text-dim); transition: color .12s ease, transform .12s ease;
}
.pt-modal__close-float:hover { color: var(--text); transform: scale(1.06); }
.pt-modal__close-float .pt-icon { width: 15px; height: 15px; }
.pt-modal__close { position: absolute; }
.pt-modal h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin-bottom: 6px; }
.pt-modal__sub { color: var(--text-faint); font-size: 13px; margin-bottom: 22px; }
.pt-modal__head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

.pt-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pt-field span, .pt-field label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.pt-field input, .pt-field select, .pt-field textarea {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-sm); padding: 11px 13px; outline: none; width: 100%;
}
.pt-field input:focus, .pt-field select:focus, .pt-field textarea:focus { border-color: var(--brand); }
.pt-field small { font-size: 11px; color: var(--text-faint); }
.pt-field-row { display: flex; flex-direction: column; gap: 0; }

.pt-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-bottom: 4px; }
.pt-field--wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .pt-form-grid { grid-template-columns: 1fr; } }

.pt-modal__error {
  background: var(--down-soft); color: var(--down-text); border-radius: var(--r-sm);
  padding: 10px 13px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start;
}
.pt-modal__error .pt-icon { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

.pt-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.pt-modal__actions.is-center { justify-content: center; flex-wrap: wrap; }

.pt-link-row { display: flex; gap: 8px; margin-top: 4px; }
.pt-link-row > .pt-btn { flex-shrink: 0; }
.pt-link-row input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12.5px; cursor: pointer; }

.pt-autocomplete-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  max-height: 240px; overflow-y: auto; padding: 4px;
}
.pt-autocomplete-group-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); padding: 6px 10px 2px; }
.pt-autocomplete-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.pt-autocomplete-item:hover { background: var(--surface-hover); }
.pt-autocomplete-item__meta { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); flex-shrink: 0; }

.pt-lookup-result {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  margin-bottom: 6px; cursor: pointer; font-size: 13px; background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.pt-lookup-result:hover { border-color: var(--text-faint); background: var(--surface-2); }
.pt-lookup-result__meta { color: var(--text-faint); font-size: 11.5px; font-family: var(--font-mono); }

/* History ledger */
.pt-ledger { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; margin: -4px -4px 0; }

/* NEU (v4.66): Übersicht vollständig verkaufter/ausgebuchter Positionen,
   siehe renderSoldPositions() in render.js. Bewusst ein eigenes, simples
   Zeilenraster statt des Karten-Layouts der normalen Positionen — hier
   zählt die schnelle Übersicht über mehrere Positionen, nicht die
   Detailtiefe einer einzelnen Karte. */
.pt-sold-list { display: flex; flex-direction: column; gap: 2px; }
.pt-sold-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto auto auto auto;
  gap: 14px; align-items: center;
  padding: 11px 10px; border-radius: var(--r-sm); font-size: 13px;
}
.pt-sold-row:hover { background: var(--surface-2); }
.pt-sold-row__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-sold-row__name strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-sold-row__isin { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.pt-sold-row__kind { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.pt-sold-row__dates { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.pt-sold-row__cost, .pt-sold-row__proceeds { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); text-align: right; white-space: nowrap; }
.pt-sold-row__gain { font-family: var(--font-mono); font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
.pt-sold-row__actions { text-align: right; }
.pt-sold-row__gain.is-up { color: var(--up-text); }
.pt-sold-row__gain.is-down { color: var(--down-text); }
@media (max-width: 640px) {
  .pt-sold-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 10px; }
  .pt-sold-row__cost, .pt-sold-row__proceeds, .pt-sold-row__gain { text-align: left; }
}
.pt-ledger-row {
  display: grid;
  /* BUGFIX (v4.61): grid-template-areas unten wurde definiert, aber keines
     der Kind-Elemente hatte je ein passendes grid-area zugewiesen. Ohne das
     ist eine benannte Grid-Fläche wirkungslos, der Browser platziert die 5
     Kinder dann per automatischer Reihenfolge in die vorhandenen Zellen,
     was bei schmalen Fenstern (Handy) sichtbar durcheinander geriet, u. a.
     der Bewegungstyp (teils lange Texte wie "Bestandsübernahme") landete in
     der schmalen, für den Betrag gedachten Spalte. Jetzt beide Regeln mit
     echten grid-area-Zuweisungen, siehe unten.
  */
  grid-template-columns: 76px 90px 1fr auto auto; grid-template-areas: "date type qty amount actions";
  gap: 10px; align-items: center;
  padding: 11px 8px; border-radius: var(--r-sm); font-size: 13px;
}
.pt-ledger-row:hover { background: var(--surface); }
.pt-ledger-date { grid-area: date; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-ledger-type { grid-area: type; font-size: 12px; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-ledger-qty { grid-area: qty; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-ledger-amount { grid-area: amount; font-family: var(--font-mono); font-weight: 600; text-align: right; }
.pt-ledger-actions { grid-area: actions; display: flex; gap: 4px; }
.pt-ledger-amount.is-up { color: var(--up-text); }
.pt-ledger-amount.is-down { color: var(--down-text); }
@media (max-width: 540px) {
  .pt-ledger-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "date amount" "type qty" "actions actions";
    row-gap: 4px;
  }
}

/* Dividendenhistorie (FEAT-002) */
.pt-dividend-list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; margin: -4px -4px 0; }
.pt-dividend-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; padding: 9px 8px; border-radius: var(--r-sm); font-size: 13px; }
.pt-dividend-row:hover { background: var(--surface); }
.pt-dividend-row.is-head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); padding-bottom: 2px; }
.pt-dividend-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.pt-dividend-amount { font-family: var(--font-mono); font-weight: 600; text-align: right; }

/* Manuell erfasste Dividenden ("Meine Dividenden") */
.pt-my-dividend-row { display: grid; grid-template-columns: 92px 76px 1fr auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: var(--r-sm); font-size: 12.5px; }
.pt-my-dividend-row:hover { background: var(--surface); }
.pt-my-dividend-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.pt-my-dividend-amount { font-family: var(--font-mono); font-weight: 600; }
.pt-my-dividend-note { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-my-dividend-del { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 4px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.pt-my-dividend-del:hover { color: var(--down-text); background: var(--surface-2); }
.pt-my-dividend-empty { font-size: 12.5px; color: var(--text-faint); font-style: italic; padding: 6px 8px; }

/* Detail modal */
.pt-detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pt-detail-stat { background: var(--surface); border-radius: var(--r-sm); padding: 12px 14px; }
.pt-detail-stat__label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.pt-detail-stat__value { font-family: var(--font-mono); font-size: 17px; font-weight: 600; }
.pt-detail-row { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.pt-detail-row b { color: var(--text); font-weight: 600; }
.pt-detail-img { width: 92px; height: 92px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }

/* ===== Toast =================================================================== */
.pt-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px);
  background: var(--bg-raised); border: 1px solid var(--border); color: var(--text);
  padding: 13px 20px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600;
  display: flex; align-items: center; gap: 9px;
  box-shadow: var(--shadow-modal);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.pt-toast .pt-icon { width: 16px; height: 16px; }
.pt-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.pt-toast.success .pt-icon { color: var(--up-text); }
.pt-toast.error .pt-icon { color: var(--down-text); }
.pt-toast__action { margin-left: 6px; background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
.pt-toast.is-show .pt-toast__action { pointer-events: auto; }
.pt-toast.is-show:has(.pt-toast__action) { pointer-events: auto; }

/* Schmale, nicht blockierende Lade-Anzeige am oberen Bildschirmrand —
   bewusst kein Overlay: die Seite bleibt währenddessen bedienbar. */
.pt-busy-bar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 400;
  height: 3px; background: var(--border-soft); overflow: hidden;
}
.pt-busy-bar__fill {
  position: absolute; top: 0; left: 0; height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  animation: pt-busy-sweep 1.1s ease-in-out infinite;
}
@keyframes pt-busy-sweep { 0% { left: -40%; } 100% { left: 100%; } }
.pt-busy-bar__label {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-card); white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) { .pt-busy-bar__fill { animation: none; left: 0; width: 100%; opacity: .5; } }

/* Ganzseitiger Ladebildschirm für "Kurse aktualisieren" (Portfolio und
   Watchlist) — NEU (v4.61). Der bisherige, dezente busyBar oben reicht für
   kurze Hintergrundaktionen, wurde für diese längere, vom Nutzer bewusst
   angestoßene Aktion aber als zu unauffällig empfunden. Zeigt die
   tatsächliche, im Voraus bekannte Anzahl zu prüfender Positionen (echte
   Zahl, kein Fake) und eine animierte, unbestimmte Fortschrittsanzeige
   (da eine einzelne Anfrage/Antwort keinen echten Zwischenfortschritt
   liefert), am Ende kurz das tatsächliche Ergebnis mit Haken-Symbol. */
.pt-refresh-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; backdrop-filter: blur(4px);
}
.pt-refresh-overlay.hidden { display: none; }
.pt-refresh-overlay__box {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal); padding: 36px 44px; text-align: center; min-width: 260px;
}
.pt-refresh-overlay__icon { margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.pt-refresh-overlay__spin { width: 32px; height: 32px; color: var(--brand); animation: pt-refresh-spin 1s linear infinite; }
.pt-refresh-overlay__icon.is-done .pt-refresh-overlay__spin { animation: none; color: var(--up-text); }
@keyframes pt-refresh-spin { to { transform: rotate(360deg); } }
.pt-refresh-overlay__title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pt-refresh-overlay__subtitle { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; min-height: 16px; }
.pt-refresh-overlay__bar { width: 220px; height: 4px; border-radius: 2px; background: var(--surface); overflow: hidden; margin: 0 auto; }
.pt-refresh-overlay__bar-fill {
  width: 35%; height: 100%; border-radius: 2px; background: var(--brand);
  animation: pt-refresh-bar 1.1s ease-in-out infinite;
}
.pt-refresh-overlay__bar-fill.is-done { animation: none; width: 100%; background: var(--up); }
@keyframes pt-refresh-bar { 0% { transform: translateX(-120%); } 100% { transform: translateX(380%); } }
@media (prefers-reduced-motion: reduce) {
  .pt-refresh-overlay__spin { animation: none; }
  .pt-refresh-overlay__bar-fill { animation: none; width: 100%; opacity: .5; }
}

/* ===== Interaktive Chart-Werkzeuge (global: Portfolio + Watchlist) ============ */
.pt-chart-tooltip {
  position: fixed; z-index: 500; pointer-events: none;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 13px; font-size: 12.5px; box-shadow: var(--shadow-modal);
  min-width: 140px; transition: opacity .1s ease;
  /* BUGFIX (v4.59): bei sehr vielen Watchlist-Positionen (30+) wurde der
     Tooltip höher als der sichtbare Bildschirm, der untere Teil (also
     ein Teil der Aktien) landete dadurch unsichtbar außerhalb des
     Fensters, ohne jede Möglichkeit, ihn noch zu sehen — siehe
     AI-HARNESS.md. max-height + Scroll ist die Absicherung dagegen,
     unabhängig vom neuen "Nur unter dem Zeiger"-Umschalter (siehe unten),
     der den Normalfall entschärft, aber pointer-events:none macht diesen
     Bereich nicht mit der Maus scrollbar, ist also nur ein Sicherheitsnetz. */
  max-height: calc(100vh - 24px); overflow-y: auto;
}
.pt-chart-tooltip__date { font-weight: 700; margin-bottom: 6px; color: var(--text); }
.pt-chart-tooltip__row { display: flex; align-items: center; gap: 7px; padding: 2px 0; white-space: nowrap; }
.pt-chart-tooltip__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pt-chart-tooltip__name { flex: 1; color: var(--text-dim); }
.pt-chart-tooltip__val { font-family: var(--font-mono); font-weight: 600; }
.pt-chart-tooltip__val.is-up { color: var(--up-text); }
.pt-chart-tooltip__val.is-down { color: var(--down-text); }
.pt-chart-tooltip__val.is-flat { color: var(--text-faint); }
.pt-chart-tooltip__price { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-left: 6px; }

.pt-chart-range-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-chart-range-btn {
  padding: 6px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-dim);
}
.pt-chart-range-btn:hover { border-color: var(--text-faint); color: var(--text); }
.pt-chart-range-btn.is-active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }

.pt-ring-svg circle[data-segment], .pt-ring-svg path[data-segment] { transition: opacity .12s ease, stroke-width .12s ease; cursor: pointer; }
.pt-legend-item[data-segment-ref] { cursor: pointer; border-radius: var(--r-sm); padding: 3px 4px; margin: 0 -4px; transition: background-color .12s ease; }
.pt-legend-item[data-segment-ref]:hover { background: var(--surface-2); }

.pt-chart-overlay { fill: transparent; cursor: crosshair; touch-action: pan-y; }

.pt-watchlist-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-soft);
  background: var(--surface); margin-bottom: 6px;
  transition: border-color .12s ease, background-color .12s ease;
}
.pt-watchlist-row:hover { border-color: var(--text-faint); background: var(--surface-2); }
.pt-watchlist-row.is-dragging { opacity: .4; }
.pt-watchlist-row__main { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.pt-watchlist-row__notes { padding-left: 34px; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.pt-watchlist-row__notes-empty { color: var(--text-faint); font-style: italic; cursor: pointer; }
.pt-watchlist-row__notes-empty:hover { color: var(--text-dim); }
.pt-watchlist-row__notes-view { cursor: text; }
.pt-watchlist-row__notes-view p { margin: 0 0 4px; }
.pt-watchlist-row__notes-view p:last-child { margin-bottom: 0; }
.pt-watchlist-row__notes-view code { font-family: var(--font-mono); background: var(--surface-2); padding: 1px 4px; border-radius: 4px; font-size: 11.5px; }
.pt-watchlist-row__notes-view a { color: var(--brand); }
.pt-watchlist-row__notes-edit { display: flex; flex-direction: column; gap: 6px; }
.pt-watchlist-row__notes-edit textarea {
  width: 100%; min-height: 60px; resize: vertical; font-family: var(--font-body); font-size: 12.5px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 9px; color: var(--text);
}
.pt-watchlist-row__notes-actions { display: flex; gap: 8px; }
.pt-watchlist-row__handle {
  cursor: grab; color: var(--text-faint); flex-shrink: 0; touch-action: none;
  display: flex; align-items: center; padding: 4px;
}
.pt-watchlist-row__handle:active { cursor: grabbing; }
.pt-watchlist-row__handle .pt-icon { width: 15px; height: 15px; }

/* ===== Globale Fußzeile (jede Seite) =========================================== */
.pt-site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-raised); margin-top: 0; flex-shrink: 0; }
.pt-site-footer__inner { max-width: var(--container); margin: 0 auto; padding: 22px 32px 28px; display: flex; flex-direction: column; gap: 10px; }
.pt-site-footer__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 20px; }
.pt-site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pt-site-footer__links a { font-size: 13px; color: var(--text-dim); text-decoration: none; }
.pt-site-footer__links a:hover { color: var(--brand); text-decoration: underline; }
.pt-site-footer__version { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); text-decoration: none; }
.pt-site-footer__version:hover { color: var(--text); text-decoration: underline; }
.pt-site-footer__attribution { font-size: 16px; line-height: 1; color: var(--text-faint); display: inline-block; }
.pt-site-footer__attribution a { color: var(--text-dim); line-height: 1; }
.pt-site-footer__by { font-size: 12.5px; color: var(--text-faint); }
.pt-site-footer__by a { color: var(--text-dim); }

/* ===== Hinweis zu technisch notwendiger Speicherung ============================ */
.pt-cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 350; margin: 0 auto; max-width: 760px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 16px 48px rgba(20,18,14,0.18), 0 2px 6px rgba(20,18,14,0.06);
  animation: pt-cookie-slide-up .25s ease;
}
.pt-cookie-notice.is-hiding { opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.pt-cookie-notice__inner { padding: 14px 16px 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pt-cookie-notice__inner p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); flex: 1 1 320px; }
.pt-cookie-notice__inner a { color: var(--brand); }
@keyframes pt-cookie-slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pt-cookie-notice { animation: none; } }

/* ===== Admin & auth pages ===================================================== */
.pt-narrow-shell { max-width: 480px; margin: 90px auto; padding: 0 24px; }
.pt-admin-shell { width: 100%; min-width: 0; max-width: 880px; margin: 0 auto; padding: 48px 24px 80px; }
.pt-card-block { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg); padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.pt-card-block h2, .pt-card-block h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 18px; }
.pt-admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; gap: 12px; flex-wrap: wrap; }
.pt-admin-header h1 { font-family: var(--font-display); font-size: 26px; font-weight: 600; }

.pt-msg { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 18px; font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.pt-msg .pt-icon { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.pt-msg--success { background: var(--up-soft); color: var(--up-text); }
.pt-msg--error { background: var(--down-soft); color: var(--down-text); }

.pt-table { width: 100%; border-collapse: collapse; }
.pt-table th, .pt-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.pt-table th { color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.pt-table td.pt-mono { color: var(--text-dim); }
.pt-role-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-dim); }
.pt-role-badge.is-admin { background: var(--brand-soft); color: var(--brand-ink); }

.pt-login-mark { display: flex; justify-content: center; margin-bottom: 22px; color: var(--brand); }
.pt-login-mark svg { width: 52px; height: 52px; }
.pt-login-mark img { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; }
.pt-login-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-faint); }
.pt-inline-form { display: flex; gap: 12px; flex-wrap: wrap; }
.pt-inline-form .pt-field { flex: 1; min-width: 160px; }

/* ===== Utility =============================================================== */
.pt-flex-between { display: flex; justify-content: space-between; align-items: center; }
.pt-scrollbar-thin::-webkit-scrollbar { width: 6px; }
.pt-scrollbar-thin::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.pt-badge-div { display:inline-block; margin-left:6px; padding:1px 7px; border-radius:999px; font-size:11px; border:1px solid var(--border-soft); color:var(--text-dim); background:var(--surface-2); }
.pt-div-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:10px; }
.pt-div-grid > div { padding:10px 12px; border:1px solid var(--border-soft); border-radius:var(--r-sm); background:var(--surface-2); }
.pt-div-grid span { display:block; font-size:11.5px; color:var(--text-faint); margin-bottom:3px; }
.pt-modal__section { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint); margin:18px 0 8px; }
.pt-news-group { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.pt-news-group__title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-faint); }
.pt-news-group__window { font-weight:400; text-transform:none; letter-spacing:0; margin-left:6px; }

.pt-check { display: flex !important; flex-direction: row; align-items: center; justify-content: flex-start !important; gap: 10px; cursor: pointer; }
.pt-check input { flex: 0 0 auto; width: auto; margin: 0; }
.pt-news-grid .pt-news-group { margin: 0 !important; }
#watchlistSearchInput { font-family: inherit; font-size: 14px; cursor: text; padding: 11px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); outline: none; }
#watchlistSearchInput:focus { border-color: var(--brand); }

/* Import-Vorschau und Sicherungen */
.pt-import-preview { border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; background: var(--surface-2, transparent); font-size: 13.5px; }
.pt-import-preview__title { font-weight: 600; margin: 0 0 6px; }
.pt-import-preview ul { margin: 0 0 8px; padding-left: 18px; }
.pt-import-preview li { margin: 2px 0; }
.pt-import-preview__warn { margin: 6px 0; color: var(--warn, #b45309); }
.pt-import-preview__next { margin: 8px 0 0; color: var(--text-faint); }
.pt-import-preview__table { overflow-x: auto; margin-top: 8px; }
.pt-import-preview table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pt-import-preview th, .pt-import-preview td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--border-soft); }
.pt-import-preview .num { text-align: right; font-variant-numeric: tabular-nums; }
.pt-backup-list { list-style: none; margin: 0 0 18px; padding: 0; }
.pt-backup-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.pt-backup-list small { color: var(--text-faint); margin-left: 6px; }
.pt-backup-list__empty { color: var(--text-faint); }
.pt-settings-cols .pt-settings-span { column-span: all; }
.pt-check.hidden { display: none !important; }
#bulkImportAdjustWrap { margin: 0 0 12px; }

/* Platzhalter beim Laden */
.pt-skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--border-soft) 25%, rgba(127,127,127,.18) 50%, var(--border-soft) 75%); background-size: 200% 100%; animation: pt-skel-shimmer 1.3s linear infinite; }
.pt-skel-row { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border-soft); }
.pt-skel--dot { width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; }
.pt-skel--name { height: 14px; flex: 1; max-width: 260px; }
.pt-skel--price { height: 14px; width: 70px; margin-left: auto; }
@keyframes pt-skel-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
#watchlistChart.is-loading { opacity: .35; transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) { .pt-skel { animation: none; } }
.pt-news-group { gap: 8px; }
.pt-news-group .pt-news-item { margin-bottom: 0; }
.pt-news-group__title { margin-bottom: 2px; }
.pt-news-item, .pt-news-item__title { overflow-wrap: anywhere; min-width: 0; }
.pt-chart-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0 8px; color: var(--text-faint); font-size: 13.5px; }
.pt-chart-loading .pt-icon { width: 20px; height: 20px; }
.pt-import-preview td small { display: block; color: var(--text-faint); font-size: 11.5px; }
@media (max-width: 640px) {
  .pt-import-preview thead { display: none; }
  .pt-import-preview tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
  .pt-import-preview td { border: 0; padding: 2px 0; text-align: left; }
  .pt-import-preview td.pt-ip-name { grid-column: 1 / -1; font-weight: 600; }
  .pt-import-preview td.num { text-align: left; }
  .pt-import-preview td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--text-faint); font-weight: 400; }
}

/* Freigaben */
.pt-share-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; padding: 14px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 14px; }
.pt-share-new .pt-field { margin: 0; }
.pt-share-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pt-share-empty { color: var(--text-faint); font-size: 14px; padding: 10px 0; }
.pt-share-row { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.pt-share-row__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.pt-share-row__meta { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; overflow-wrap: anywhere; }
.pt-share-row__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-share-row__edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); align-items: end; }
.pt-share-row__edit.hidden { display: none; }
.pt-share-status { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.pt-share-status.is-on { background: rgba(52,199,89,0.16); color: #1f9d46; }
.pt-share-status.is-off { background: var(--down-soft); color: var(--down-text); }

/* Moderne Auswahlfelder und Kontrollkästchen */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238E8E93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
  padding-right: 34px; cursor: pointer; text-overflow: ellipsis;
}
select:not([multiple]):not([size]):focus-visible { outline: 2px solid var(--accent, #0A84FF); outline-offset: 1px; }
input[type="checkbox"]:not(.pt-switch-input) {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--text-faint); border-radius: 6px;
  background: var(--surface); cursor: pointer; display: inline-grid; place-content: center; vertical-align: middle;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
input[type="checkbox"]:not(.pt-switch-input)::after {
  content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.2px 2.2px; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .12s;
}
input[type="checkbox"]:not(.pt-switch-input):checked { background: var(--accent, #0A84FF); border-color: var(--accent, #0A84FF); }
input[type="checkbox"]:not(.pt-switch-input):checked::after { transform: rotate(-45deg) scale(1); }
input[type="checkbox"]:not(.pt-switch-input):hover { border-color: var(--accent, #0A84FF); }
input[type="checkbox"]:not(.pt-switch-input):focus-visible { box-shadow: 0 0 0 3px rgba(10,132,255,0.3); outline: none; }
input[type="checkbox"]:not(.pt-switch-input):disabled { opacity: .45; cursor: not-allowed; }
input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--text-faint); border-radius: 50%;
  background: var(--surface); cursor: pointer; display: inline-grid; place-content: center; vertical-align: middle; transition: border-color .15s;
}
input[type="radio"]::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #0A84FF); transform: scale(0); transition: transform .12s; }
input[type="radio"]:checked { border-color: var(--accent, #0A84FF); }
input[type="radio"]:checked::after { transform: scale(1); }

/* Demokonto: gesperrte Funktionen */
.pt-demo-lock { position: relative; opacity: .6; }
.pt-demo-lock::after {
  content: "Nur mit Konto"; position: absolute; top: -9px; right: -6px; z-index: 2; pointer-events: none;
  font: 600 9.5px/1 var(--font-sans, inherit); letter-spacing: .02em; white-space: nowrap;
  background: var(--accent, #0F766E); color: #fff; padding: 3px 7px; border-radius: 999px;
}
.pt-demo-lock-box { position: relative; }
.pt-demo-lock-box > :not(.pt-demo-lock-veil) { opacity: .45; filter: grayscale(.4); pointer-events: none; user-select: none; }
.pt-demo-lock-veil {
  position: absolute; inset: 0; z-index: 3; border: 0; border-radius: 14px; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 55%, transparent); display: flex; justify-content: center; align-items: flex-start;
}
.pt-demo-lock-veil span {
  position: sticky; top: 45vh; margin-top: 60px;
  background: var(--accent, #0F766E); color: #fff; font-weight: 600; font-size: 13px; padding: 8px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.pt-demo-notice { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg, #f5f5f7) 88%, transparent); backdrop-filter: blur(8px); }
.pt-demo-notice.hidden { display: none; }
.pt-demo-notice__card { max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.16); text-align: center; }
.pt-demo-notice__card h2 { font-size: 20px; margin: 0 0 10px; }
.pt-demo-notice__card p { color: var(--text-dim); line-height: 1.5; margin: 0 0 18px; }
.pt-demo-notice__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#demoLockModal { z-index: 450; }
.pt-btn-icon.pt-demo-lock::after { content: "Konto"; font-size: 8.5px; padding: 2px 5px; top: -7px; right: -5px; }
.pt-btn--sm.pt-demo-lock::after { display: none; }

/* Startseite: Funktionen, Ablauf, Einladung */
.pt-landing-more { grid-column: 1 / -1; margin-top: 24px; }
.pt-landing-more__title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 600; text-align: center; margin-bottom: 26px; }
.pt-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.pt-feature { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 18px; padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pt-feature:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(60,40,10,.10); border-color: var(--border); }
.pt-feature__icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin-bottom: 14px; }
.pt-feature__icon .pt-icon { width: 22px; height: 22px; }
.pt-feature h3 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.pt-feature p { font-size: 14px; color: var(--text-dim); line-height: 1.55; }
.pt-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px; margin: 34px 0; }
.pt-step { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: 14px; font-weight: 600; }
.pt-step b { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--text-on-brand); font-size: 13px; }
.pt-landing-cta2 { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px 30px; border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface)); border: 1px solid var(--border); }
.pt-landing-cta2 h2 { font-size: 20px; font-weight: 650; margin-bottom: 4px; }
.pt-landing-cta2 p { color: var(--text-dim); font-size: 14px; max-width: 560px; }
@media (prefers-reduced-motion: reduce) { .pt-feature { transition: none; } .pt-feature:hover { transform: none; } }
.pt-landing__cta a.pt-btn, .pt-landing-cta2 a.pt-btn, .pt-demo-notice a.pt-btn, #demoLockModal a.pt-btn { text-decoration: none; }

/* Startseite: Link zum Beispielkonto und Vorschau-Karte */
.pt-landing__peek { display: inline-block; font-size: 14.5px; font-weight: 600; color: var(--brand); text-decoration: none; margin-top: -18px; padding: 4px 0; border-bottom: 1px solid transparent; }
.pt-landing__peek:hover { border-bottom-color: var(--brand); }
.pt-landing { width: 100%; }
.pt-landing__cta { margin-bottom: 26px; }
.pt-landing__visual { aspect-ratio: auto; }
.pt-preview { width: 100%; max-width: 470px; margin-left: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 30px 70px rgba(60,40,10,.16), 0 4px 12px rgba(60,40,10,.06); overflow: hidden; transform: rotate(1.2deg); }
.pt-preview__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); font-weight: 600; font-size: 13px; }
.pt-preview__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.pt-preview__bar i:first-of-type { margin-left: auto; }
.pt-preview__body { padding: 22px 24px 26px; }
.pt-preview__label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-weight: 600; margin-bottom: 6px; }
.pt-preview__value { font-family: var(--font-mono); font-size: clamp(30px, 4.4vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.pt-preview__delta { display: inline-block; margin: 10px 0 22px; padding: 4px 12px; border-radius: 999px; background: var(--up-soft); color: var(--up-text); font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.pt-preview__delta small { font-size: inherit; }
.pt-preview__bars { display: grid; gap: 12px; }
.pt-preview__bars > div { display: grid; grid-template-columns: 54px 1fr 64px; align-items: center; gap: 12px; font-size: 12.5px; }
.pt-preview__bars span { color: var(--text-dim); }
.pt-preview__bars b { height: 8px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; }
.pt-preview__bars b::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c); border-radius: inherit; }
.pt-preview__bars em { font-style: normal; text-align: right; font-family: var(--font-mono); color: var(--up-text); font-weight: 600; }
@media (max-width: 880px) { .pt-preview { margin: 0 auto; transform: none; } .pt-landing__peek { margin-top: -10px; } }

[data-theme="dark"] .pt-topbar { background: rgba(28, 28, 30, 0.82); }
@media (max-width: 720px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
}

.pt-modal:focus { outline: none; }

select { color: var(--text); }
select option { color: var(--text); background: var(--surface); }

.pt-open-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pt-open-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 600px) {
  .pt-topbar__inner { padding: 10px 14px; gap: 10px; }
  .pt-brand__name, .pt-brand__tag { display: none; }
  .pt-nav-actions { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .pt-nav-actions .pt-btn { padding: 0; width: 34px; height: 34px; justify-content: center; }
  .pt-nav-actions .pt-btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pt-nav-actions #btnLogin { width: auto; padding: 0 16px; }
}

/* v4.83: Auswertung, Schnellsuche, Sammelbearbeitung, Hinweise, Handyleiste */
.pt-muted { color: var(--text-faint); font-size: 13px; margin: 0 0 10px; }
.pt-analysis-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px 8px; }
#analysisTabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.pt-an-block { margin: 0 0 26px; }
.pt-an-block h4 { margin: 0 0 6px; font-size: 15px; }
.pt-an-block h5 { margin: 16px 0 6px; font-size: 13px; }
.pt-chart-svg { width: 100%; height: 220px; display: block; margin: 6px 0 10px; }
.pt-chart-svg .pt-line { fill: none; stroke: var(--brand); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.pt-chart-svg .pt-area { fill: var(--brand-soft); }
.pt-chart-svg .pt-dot { fill: var(--brand); }
.pt-chart-svg .pt-bar { fill: var(--brand); }
.pt-chart-svg .pt-bar.is-future { fill: var(--brand-soft); stroke: var(--brand-line); }
.pt-chart-svg .pt-axis { font-size: 10.5px; fill: var(--text-faint); }
.pt-chart-svg .pt-axis-line { stroke: var(--border); stroke-width: 1; }
.pt-share-list { display: flex; flex-direction: column; gap: 8px; }
.pt-share-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.pt-share-row__bar { height: 10px; border-radius: 6px; background: var(--border-soft); overflow: hidden; }
.pt-share-row__bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.pt-share-row__val { text-align: right; white-space: nowrap; }
.pt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.pt-kpis > div { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; background: var(--surface-2, var(--surface)); }
.pt-kpis span { display: block; font-size: 11.5px; color: var(--text-faint); }
.pt-kpis b { font-family: var(--font-mono); font-size: 15px; }
.pt-kpis .is-up, .pt-table-wide .is-up { color: var(--up-text); }
.pt-kpis .is-down, .pt-table-wide .is-down { color: var(--down-text); }
.pt-table-wide table { min-width: 560px; }
.pt-row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 12px; }
.pt-textarea-mono { width: 100%; font-family: var(--font-mono); font-size: 12.5px; }
.pt-status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: var(--up-soft); color: var(--up-text); }
.pt-status--abweichung, .pt-status--fehlt { background: var(--down-soft); color: var(--down-text); }
.pt-findings, .pt-log { list-style: none; margin: 0 0 14px; padding: 0; }
.pt-finding { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.pt-finding__lvl { flex: 0 0 66px; font-size: 11.5px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.pt-finding--fehler .pt-finding__lvl { color: var(--down-text); }
.pt-finding--warnung .pt-finding__lvl { color: var(--warn, #b45309); }
.pt-log li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.pt-log__time { flex: 0 0 120px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.pt-log__text { flex: 1; min-width: 0; }
.pt-notices:empty { display: none; }
.pt-notices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pt-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 13.5px; }
.pt-notice > span { flex: 1; min-width: 180px; }
.pt-notice--warn { border-color: var(--brand-line); background: var(--brand-soft); }
.pt-badge-manual, .pt-badge-alert { display: inline-block; font-size: 10.5px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-faint); vertical-align: middle; }
.pt-badge-alert.is-hit { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pt-filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.pt-filter-row.hidden { display: none; }
.pt-history-sum { display: flex; justify-content: space-between; gap: 10px; padding: 10px 6px 0; margin-top: 8px; border-top: 1px solid var(--border); font-size: 13px; }
.pt-history-sum.hidden { display: none; }
.pt-secret { font-size: 15px; letter-spacing: .08em; word-break: break-all; user-select: all; padding: 8px 10px; background: var(--surface); border: 1px dashed var(--border); border-radius: 8px; }
.pt-recovery { columns: 2; padding-left: 18px; margin: 8px 0; }
.pt-link { color: var(--brand); font-weight: 600; }
.pt-search-modal { padding-top: 16px; }
.pt-quick-results { max-height: min(52vh, 420px); overflow-y: auto; margin-top: 10px; }
.pt-quick-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); padding: 10px 8px 4px; }
.pt-quick-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text); font: inherit; }
.pt-quick-item.is-active, .pt-quick-item:hover { background: var(--brand-soft); }
.pt-quick-item__t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-quick-item__s { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pt-bulk-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; position: sticky; top: 64px; z-index: 20; padding: 10px 12px; margin: 0 0 14px; border: 1px solid var(--brand-line); border-radius: 10px; background: var(--surface); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.pt-bulk-bar.hidden { display: none; }
.pt-bulk-bar #bulkCount { font-weight: 600; margin-right: auto; font-size: 13.5px; }
#btnBulkSelect.is-active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.pt-grid.is-selecting .pt-card { position: relative; }
.pt-card__select { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border); background: var(--surface); }
.pt-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-line); }
.pt-card.is-selected .pt-card__select { background: var(--brand); border-color: var(--brand); }
.pt-card.is-selected .pt-card__select::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pt-mobile-bar { display: none; }

@media (max-width: 720px) {
  .pt-share-row { grid-template-columns: 1fr; gap: 4px; }
  .pt-share-row__val { text-align: left; }
  .pt-log li { flex-wrap: wrap; }
  .pt-log__time { flex-basis: 100%; }
  .pt-quick-item { flex-direction: column; gap: 2px; }
  .pt-quick-item__s { max-width: 100%; }
  .pt-recovery { columns: 1; }
  .pt-table-wide table { min-width: 0; }
  .pt-bulk-bar { top: 56px; }
  .pt-mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px; }
  .pt-mobile-bar.hidden { display: none; }
  .pt-mobile-bar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: var(--text-faint); font: inherit; font-size: 11px; padding: 6px 2px; border-radius: 8px; min-height: 44px; }
  .pt-mobile-bar button.is-active { color: var(--brand); background: var(--brand-soft); }
  body { padding-bottom: 68px; }
  .pt-ledger-actions { display: none; }
  .pt-ledger-row.is-open .pt-ledger-actions { display: flex; }
  .pt-nav-actions #btnSearch, .pt-nav-actions #btnAnalysis { display: none; }
}
.pt-analysis-body table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pt-analysis-body th, .pt-analysis-body td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border-soft); }
.pt-analysis-body .num { text-align: right; font-variant-numeric: tabular-nums; }
.pt-analysis-body .pt-import-preview__table { overflow-x: auto; }
@media (max-width: 640px) {
  .pt-analysis-body thead { display: none; }
  .pt-analysis-body tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
  .pt-analysis-body td { border: 0; padding: 2px 0; text-align: left; }
  .pt-analysis-body td.pt-ip-name { grid-column: 1 / -1; font-weight: 600; }
  .pt-analysis-body td.num { text-align: left; }
  .pt-analysis-body td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--text-faint); font-weight: 400; }
}
.pt-mobile-bar .pt-icon { width: 22px; height: 22px; }
@media (max-width: 720px) { .pt-toast { bottom: 84px; } }
#taxYearSelect { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 6px 14px; font-size: 12.5px; font-weight: 600; }

/* ===== v4.84: ruhiges Erscheinungsbild, Vollseiten, Auswertung, Einstellungen ===== */
@keyframes pt-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pt-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; } }

/* Vollseiten statt kleiner Fenster */
.pt-modal-overlay:has(> .pt-modal--page) { padding: 0; align-items: stretch; justify-content: stretch; backdrop-filter: none; background: var(--bg); }
.pt-modal.pt-modal--page {
  max-width: none; width: 100%; height: 100vh; max-height: 100vh; border: 0; border-radius: 0; box-shadow: none;
  background: var(--bg); padding: 28px max(18px, calc((100vw - 1180px) / 2)) 40px; animation: pt-fade .18s ease both;
}
@supports (height: 100dvh) { .pt-modal.pt-modal--page { height: 100dvh; max-height: 100dvh; } }
.pt-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pt-page-head h3 { font-size: 26px; letter-spacing: -.01em; margin-bottom: 4px; }
.pt-page-head .pt-modal__sub { margin-bottom: 0; max-width: 62ch; }
.pt-sticky-actions { position: sticky; bottom: -40px; background: linear-gradient(to top, var(--bg) 70%, transparent); padding: 18px 0 4px; margin-top: 16px; }

/* Ausklappbare Bereiche */
.pt-acc-list { display: flex; flex-direction: column; gap: 10px; }
.pt-acc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); }
.pt-acc > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 2px 14px; align-items: center; padding: 16px 20px; }
.pt-acc > summary::-webkit-details-marker { display: none; }
.pt-acc__title { font-weight: 600; font-size: 15px; }
.pt-acc__desc { grid-column: 2; color: var(--text-faint); font-size: 12.5px; justify-self: end; text-align: right; }
.pt-acc__chev { grid-column: 3; grid-row: 1 / span 1; width: 18px; height: 18px; color: var(--text-faint); transition: transform .18s ease; }
.pt-acc[open] > summary { border-bottom: 1px solid var(--border-soft); }
.pt-acc[open] .pt-acc__chev { transform: rotate(180deg); }
.pt-acc__body { padding: 18px 20px 20px; max-width: 760px; animation: pt-fade .18s ease both; }
.pt-acc__sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 22px 0 10px; font-weight: 600; }
.pt-acc__sub:first-child { margin-top: 0; }
@media (max-width: 640px) { .pt-acc__desc { display: none; } .pt-acc > summary { padding: 14px 16px; } .pt-acc__body { padding: 14px 16px 18px; } }

/* Schalter */
.pt-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.pt-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pt-switch__track { flex: 0 0 40px; width: 40px; height: 24px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s ease; margin-top: 1px; }
.pt-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease; }
.pt-switch input:checked + .pt-switch__track { background: var(--brand); }
.pt-switch input:checked + .pt-switch__track::after { transform: translateX(16px); }
.pt-switch input:focus-visible + .pt-switch__track { outline: 2px solid var(--brand); outline-offset: 2px; }
.pt-switch__text { font-size: 14px; line-height: 1.4; }
.pt-switch__text small { display: block; color: var(--text-faint); font-size: 12.5px; margin-top: 2px; }

/* Auswahl in der Auswertung */
.pt-an-picker { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.pt-segment { display: inline-flex; padding: 3px; background: var(--surface-hover); border-radius: 999px; }
.pt-segment button { padding: 7px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-faint); }
.pt-segment button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.pt-segment button:disabled { opacity: .4; cursor: default; }
#anList { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; }
#anList.hidden { display: none; }
.pt-analysis-body { overflow: visible; padding: 0; animation: pt-fade .2s ease both; }

/* Karten */
.pt-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pt-kpi-strip > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-card); }
.pt-kpi-strip span { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.pt-kpi-strip b { font-family: var(--font-mono); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.pt-kpi-strip em { font-style: normal; font-family: var(--font-mono); font-size: 12.5px; margin-left: 8px; }
.pt-kpi-strip .is-up { color: var(--up-text); } .pt-kpi-strip .is-down { color: var(--down-text); }
.pt-kpi-strip--inline { margin: 12px 0 16px; }
.pt-kpi-strip--inline > div { box-shadow: none; background: var(--surface-2); border-color: var(--border-soft); }
.pt-kpi-strip--inline b { font-size: 16px; }
.pt-bento-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pt-bento-slot { min-width: 0; } .pt-span-2 { grid-column: span 2; } .pt-span-all { grid-column: 1 / -1; }
.pt-bento { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-card); animation: pt-fade .25s ease both; }
.pt-bento header h4 { font-size: 15.5px; font-weight: 600; margin: 0 0 4px; }
.pt-bento header p { font-size: 12.5px; color: var(--text-faint); margin: 0 0 14px; max-width: 80ch; }
.pt-bento h5 { font-size: 13px; margin: 18px 0 8px; }
.pt-bento a { color: var(--brand); }
.pt-note { font-size: 12.5px; color: var(--text-faint); margin: 10px 0 0; }
.pt-pending { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-faint); margin: 12px 0 0; }
.pt-spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--brand); animation: pt-spin 0.9s linear infinite; }
.pt-skel i { display: block; height: 14px; border-radius: 6px; margin: 12px 0; background: linear-gradient(90deg, var(--surface-hover) 30%, var(--border-soft) 50%, var(--surface-hover) 70%); background-size: 300% 100%; animation: pt-shimmer 1.4s ease infinite; }

/* Verteilung */
.pt-dist-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; }
.pt-donut { width: 150px; height: 150px; }
.pt-dist { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 0; padding: 0; }
.pt-dist__top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 4px; }
.pt-dist__name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pt-dist__name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.pt-dist__name .pt-sym { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; box-shadow: 0 0 0 1px var(--border-soft); }
.pt-dist__name .pt-cat-ic { width: 17px; height: 17px; flex: none; }
.pt-dist__pct { font-size: 13px; }
.pt-dist__bar { height: 6px; border-radius: 4px; background: var(--border-soft); overflow: hidden; }
.pt-dist__bar b { display: block; height: 100%; border-radius: 4px; }
.pt-dist small { color: var(--text-faint); font-size: 11.5px; font-family: var(--font-mono); }
@media (max-width: 720px) { .pt-dist-wrap { grid-template-columns: 1fr; } .pt-donut { margin: 0 auto; } }

.pt-more__btn { display: block; margin-top: 6px; }
.pt-more__close { margin-top: 2px; }

/* Dividendenkalender */
.pt-cal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pt-cal__tile { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface-2); min-height: 110px; }
.pt-cal__tile.is-now { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-line); background: var(--surface); }
.pt-cal__tile.is-empty { background: transparent; border-style: dashed; }
.pt-cal__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.pt-cal__head small { color: var(--text-faint); font-weight: 400; }
.pt-cal__head b { color: var(--up-text); font-size: 13.5px; }
.pt-cal__tile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pt-cal__tile li { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 7px; align-items: center; font-size: 12.5px; }
.pt-cal__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-cal__day { color: var(--text-faint); font-size: 11.5px; }
.pt-cal li.is-estimate .pt-cal__name, .pt-cal li.is-estimate b { opacity: .78; }
.pt-cal li.is-confirmed .pt-cal__day { color: var(--brand-ink); font-weight: 600; }
.pt-cal__none { font-size: 12px; color: var(--text-faint); margin: 0; }
.pt-mini-logo { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--border-soft); }
.pt-mini-logo--ph { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-color: transparent; }
@media (max-width: 1020px) { .pt-cal { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pt-bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .pt-cal { grid-template-columns: 1fr; } .pt-bento-grid { grid-template-columns: 1fr; } .pt-span-2 { grid-column: auto; } .pt-modal.pt-modal--page { padding-top: 18px; } .pt-page-head h3 { font-size: 22px; } .pt-bento { padding: 16px; } }

/* Ruhigere Kopfzeile und Karten */
.pt-topbar { backdrop-filter: saturate(1.4) blur(10px); }
.pt-card { border-radius: var(--r-md); }
.pt-mono, .pt-card__value, .pt-kpi b { font-variant-numeric: tabular-nums; }
.pt-modal-wrap.pt-modal-wrap--page { max-width: none; width: 100%; height: 100vh; }
@supports (height: 100dvh) { .pt-modal-wrap.pt-modal-wrap--page { height: 100dvh; max-height: 100dvh; } }
.pt-modal-wrap--page > .pt-modal__close-float { display: none; }
.pt-modal-overlay:has(.pt-modal--page) { padding: 0; align-items: stretch; justify-content: stretch; backdrop-filter: none; background: var(--bg); }
.pt-switch__text { font-weight: 500; } .pt-switch__text small { font-weight: 400; }
.pt-field .pt-switch__text, .pt-switch__text { font-size: 14px; color: var(--text); } .pt-field .pt-switch__text small { font-size: 12.5px; color: var(--text-faint); }
#bulkImportRaw.is-drop { outline: 2px dashed var(--brand); outline-offset: 2px; background: var(--brand-soft); }

/* Zusammensetzung und Profil */
.pt-profile { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.pt-profile:empty { display: none; }
.pt-profile__title { font-size: 14px; margin: 0 0 10px; }
.pt-profile h5 { font-size: 12.5px; margin: 14px 0 8px; color: var(--text-dim); }
.pt-profile__text { font-size: 13px; line-height: 1.6; color: var(--text-dim); margin: 10px 0 4px; }
.pt-chipline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pt-chipline span { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
.pt-chipline em { font-style: normal; color: var(--text-faint); margin-right: 6px; }
.pt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.pt-facts > div { background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 12px; }
.pt-facts dt { font-size: 11.5px; color: var(--text-faint); } .pt-facts dd { margin: 0; font-size: 13.5px; font-weight: 600; }
.pt-wlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pt-wlist li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(60px, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; }
.pt-wlist__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-wlist__name small, .pt-faint { color: var(--text-faint); font-size: 11.5px; }
.pt-wlist__bar { height: 6px; background: var(--border-soft); border-radius: 4px; overflow: hidden; }
.pt-wlist__bar b { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.pt-wlist__val { text-align: right; font-size: 12.5px; }
.pt-alloc { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--border-soft); margin: 4px 0 6px; }
.pt-alloc i { display: block; height: 100%; }
.pt-alloc--0 { background: var(--brand); } .pt-alloc--1 { background: #2563EB; } .pt-alloc--2 { background: #D97706; } .pt-alloc--3 { background: #94A3B8; }
.pt-alloc__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--text-faint); margin: 0 0 8px; }
.pt-alloc__legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.pt-more { margin-top: 10px; } .pt-more summary { cursor: pointer; font-size: 12.5px; color: var(--brand); margin-bottom: 8px; }
.pt-fund { border: 1px solid var(--border-soft); border-radius: var(--r-md); margin-bottom: 8px; background: var(--surface-2); }
.pt-fund > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.pt-fund > summary::-webkit-details-marker { display: none; }
.pt-fund__name { font-weight: 600; font-size: 13.5px; flex: 1 1 220px; min-width: 0; }
.pt-fund__chips { display: flex; gap: 6px; flex-wrap: wrap; } .pt-fund__chips span { font-size: 11.5px; color: var(--text-faint); background: var(--surface); border: 1px solid var(--border-soft); border-radius: 999px; padding: 1px 9px; }
.pt-fund__body { padding: 4px 16px 16px; }
.pt-fund__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 720px) { .pt-fund__cols { grid-template-columns: 1fr; } .pt-wlist li { grid-template-columns: minmax(0, 1fr) 60px; } .pt-wlist__bar { display: none; } }

/* Verkaufte Positionen als Tabelle */
.pt-sold-head, .pt-sold-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 170px 110px 110px 170px 150px; gap: 16px; align-items: center; }
.pt-sold-head { padding: 0 12px 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.pt-sold-head span:nth-child(n+3):nth-child(-n+5) { text-align: right; }
.pt-sold-row { padding: 12px; border-bottom: 1px solid var(--border-soft); border-radius: 0; }
.pt-sold-row__dates { white-space: nowrap; }
.pt-sold-more { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.pt-sold-sum { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 12px; margin-top: 6px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 13px; }
@media (max-width: 900px) { .pt-sold-head { display: none; } .pt-sold-row { grid-template-columns: 1fr auto; gap: 4px 12px; } .pt-sold-row__name { grid-column: 1 / -1; } .pt-sold-row__dates { grid-column: 1 / -1; } .pt-sold-row__actions { grid-column: 1 / -1; text-align: left; } .pt-sold-row__cost, .pt-sold-row__proceeds, .pt-sold-row__gain { text-align: left; } }

/* Listenansicht der Positionen: eine saubere Zeile je Position */
.pt-segment--sm button { padding: 6px 14px; font-size: 12.5px; }
.pt-card__ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 18px; color: var(--brand); background: var(--brand-soft); }
.pt-grid.is-list-view { grid-template-columns: 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card); }
.pt-grid.is-list-view .pt-card { display: grid; grid-template-columns: minmax(0, 1fr) 150px 170px auto; gap: 16px; align-items: center; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; box-shadow: none; transform: none; }
.pt-grid.is-list-view .pt-card:last-child { border-bottom: 0; }
.pt-grid.is-list-view .pt-card:hover { transform: none; box-shadow: none; }
.pt-grid.is-list-view .pt-card__top { margin: 0; min-width: 0; align-items: center; }
.pt-grid.is-list-view .pt-card__thumb { width: 38px; height: 38px; }
.pt-grid.is-list-view .pt-card__mid { display: contents; }
.pt-grid.is-list-view .pt-card__mid > div:first-child { text-align: right; }
.pt-grid.is-list-view .pt-card__mid .pt-card__delta { text-align: right; justify-self: end; }
.pt-grid.is-list-view .pt-card__tag { margin-bottom: 0; }
.pt-grid.is-list-view .pt-card__count, .pt-grid.is-list-view .pt-card__notes, .pt-grid.is-list-view .pt-card__cost { display: none; }
.pt-grid.is-list-view .pt-card__actions { margin: 0; position: static; display: flex; gap: 6px; }
.pt-grid.is-list-view .pt-card__value { font-size: 15px; margin: 0; }
@media (max-width: 820px) {
  .pt-grid.is-list-view .pt-card { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .pt-grid.is-list-view .pt-card__top { grid-column: 1 / -1; }
  .pt-grid.is-list-view .pt-card__actions { grid-column: 1 / -1; }
  .pt-grid.is-list-view .pt-card__mid > div:first-child { text-align: left; }
}
.pt-toolbar .pt-segment { flex: none; }
.pt-watchlist-row { padding: 14px 16px; gap: 8px; }
.pt-watchlist-row__notes { border-top: 1px dashed var(--border-soft); padding-top: 8px; margin-top: 2px; }

.pt-dist small.pt-via { font-family: var(--font-body); font-size: 12px; }
.pt-grid.is-list-view .pt-card__actions { border: 0; padding: 0; }
.pt-sticky-actions { pointer-events: none; }
.pt-sticky-actions > * { pointer-events: auto; }

.pt-shortcuts { display: grid; gap: 10px; margin: 14px 0 6px; }
.pt-shortcuts > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: baseline; }
.pt-shortcuts dt { white-space: nowrap; }
.pt-shortcuts dd { color: var(--text-dim); font-size: 13.5px; }
.pt-shortcuts kbd { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); }
@media (max-width: 520px) { .pt-shortcuts > div { grid-template-columns: 1fr; gap: 2px; } }
.pt-an-warn { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--down-soft); color: var(--text); font-size: 13px; border-left: 3px solid var(--down); }
.pt-admin-shell pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.pt-admin-shell td { overflow-wrap: break-word; }
.pt-small { font-size: 12px; }
.pt-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pt-note-meta { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.pt-note-log { margin-top: 8px; display: grid; gap: 8px; }
.pt-note-log__item { border-left: 2px solid var(--border); padding: 2px 0 2px 10px; }
.pt-note-log__head { font-size: 12px; color: var(--text-faint); display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.pt-note-log__text { font-size: 13px; color: var(--text-dim); }
.pt-target-form { display: grid; gap: 8px; max-width: 460px; margin: 6px 0 10px; }
.pt-target-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.pt-target-in { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.pt-target-in input { width: 76px; text-align: right; font-family: var(--font-mono); }
.pt-cmp-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 4px 0 14px; }
.pt-cmp-form label { font-size: 13px; color: var(--text-dim); }
.pt-cmp-form input[type=date] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }

.pt-bento-slot > .pt-bento { animation: none; }
@media (prefers-reduced-motion: reduce) { .pt-bento { animation: none; } }

.pt-hold__lab { display: block; font-size: 12.5px; color: var(--text-dim); margin: 10px 0 4px; }
.pt-hold__q, .pt-hold-imp textarea { width: 100%; box-sizing: border-box; }
.pt-hold-imp textarea { font-family: var(--font-mono, monospace); font-size: 12.5px; }
.pt-hold__scroll { max-height: 340px; overflow: auto; border: 1px solid var(--border-soft); border-radius: var(--r-md, 10px); margin-top: 8px; }
.pt-hold { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt-hold th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 600; color: var(--text-dim); padding: 8px 12px; }
.pt-hold td { padding: 7px 12px; border-top: 1px solid var(--border-soft); vertical-align: top; }
.pt-hold .num { text-align: right; white-space: nowrap; }
.pt-hold__name small { color: var(--text-faint); font-size: 11.5px; }
.pt-hold__sub { display: block; }
.pt-hold__btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pt-hold__res { font-size: 13px; line-height: 1.5; }
.pt-hold__res.is-bad { color: var(--down-text, #b42318); }
.pt-hold-imp input[type="file"] { max-width: 100%; box-sizing: border-box; font-size: 13px; }

/* Kennungen zum Kopieren */
.pt-copy { cursor: copy; border-radius: 4px; padding: 0 3px; margin: 0 -3px; text-decoration: underline dotted transparent; text-underline-offset: 3px; transition: background .15s, text-decoration-color .15s, color .15s; }
.pt-copy:hover, .pt-copy:focus-visible { background: var(--brand-soft); text-decoration-color: var(--brand-ink); outline: none; }
.pt-copy:focus-visible { box-shadow: 0 0 0 2px var(--brand-line); }
.pt-copy.is-copied { background: var(--brand-soft); color: var(--brand-ink); }
.pt-copy.is-copied::after { content: " ✓"; }
.pt-idrow span:not(.hidden) ~ span:not(.hidden)::before { content: " · "; white-space: pre; }
