/* ==========================================================================
   NEGATIVE BLUE FILMS — Kundenportal
   Baut auf style.css auf (Tokens, Aurora-Hintergrund, .glass-card, .btn,
   .eyebrow). Zentriertes booklike Layout, keine Fade-in-Animationen.
   ========================================================================== */

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Formularfelder (dunkle Glas-Optik) ----- */
.field { text-align: left; }
.field input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 15px 18px;
  color: var(--color-white);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field input::placeholder { color: rgba(255, 255, 255, 0.35); }
.field input:focus {
  outline: none;
  border-color: var(--color-blue);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.18);
}

/* ==========================================================================
   ZUSTAND A — LOGIN
   ========================================================================== */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login__card { width: 100%; max-width: 430px; text-align: center; padding: 44px 40px; }
.login__logo { height: 40px; width: auto; margin: 0 auto 28px; }
.login__title { font-weight: 700; font-size: 26px; color: var(--color-white); }
.login__sub { font-size: 15px; color: var(--color-gray); margin: 10px auto 28px; max-width: 320px; }
.login__form { display: flex; flex-direction: column; gap: 16px; }
.login__submit { width: 100%; padding: 15px 32px; }
.login__error { font-size: 14px; color: #F5867E; margin: -4px 0 0; text-align: left; }
.login__note { font-size: 12px; color: var(--color-gray); opacity: 0.7; margin-top: 28px; line-height: 1.5; }
.login__legal { margin-top: 22px; }

.login__card.is-shake { animation: login-shake 0.4s ease; }
@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ==========================================================================
   ZUSTAND B — PORTAL  (keine Fade-in-Animationen)
   ========================================================================== */
.portal-nav .nav__inner { gap: 16px; }
.portal-nav__client { font-size: 14px; font-weight: 500; color: var(--color-gray); white-space: nowrap; }
@media (max-width: 560px) { .portal-nav__client { display: none; } }

.portal {
  padding-top: calc(var(--nav-height) + 28px);
  padding-bottom: 24px;
}

/* ----- Kopf (zentriert): Logo · Kundenname Portal · Motto ----- */
.portal-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.portal-hero__logo {
  width: 56px; height: 56px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30, 144, 255, 0.14);
  border: 1px solid var(--glass-border);
  color: var(--color-blue);
  font-weight: 700; font-size: 21px;
  overflow: hidden;
}
.portal-hero__logo img { width: 100%; height: 100%; object-fit: cover; }
/* Link/Button ohne hinterlegtes Ziel: sichtbar, aber nicht klickbar */
.is-disabled { opacity: 0.45; pointer-events: none; cursor: default; }
.portal-hero__title { font-weight: 700; font-size: 30px; line-height: 1.15; color: var(--color-white); }
.portal-hero__motto { font-size: 16px; color: var(--color-gray); }

/* ----- Divider: fadet an den Seiten aus, definiert in der Mitte ----- */
.portal-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255, 255, 255, 0.06) 12%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(255, 255, 255, 0.06) 88%, transparent 100%);
  margin: 22px 0 20px;
}
.portal-divider--section { margin: 38px 0; }

/* ----- 4 Schnellzugriff-Pills ----- */
.pill-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px;
  border-radius: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--color-white);
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pill:hover { background: var(--glass-bg-hover); border-color: rgba(30, 144, 255, 0.4); box-shadow: 0 0 18px rgba(30, 144, 255, 0.14); }
.pill svg { width: 17px; height: 17px; color: var(--color-blue); }

@media (max-width: 560px) {
  .portal-hero__title { font-size: 25px; }
  .portal-hero__motto { font-size: 15px; }
}

/* ----- Sektionen: einheitliche, kompakte Abstände (Divider = <hr>) -----
   Wichtig: die globale Regel `section { padding: 80px 0 }` aus style.css
   hier neutralisieren, sonst entstehen riesige Abstände. */
.portal-section { margin: 0; padding: 0; }
.status-section { margin-top: 26px; }
.portal-subsection { margin-top: 32px; }

.portal-section__head { max-width: 640px; margin-bottom: 22px; }
.portal-section__head h2 { font-weight: 700; font-size: 26px; color: var(--color-white); }
.portal-section__head p { font-size: 15px; color: var(--color-gray); margin-top: 10px; }
.portal-section__head p strong { color: var(--color-white); font-weight: 600; }
.portal-section__subhead { margin: 32px 0 16px; }
.portal-section__subhead h3 { font-size: 18px; font-weight: 600; color: var(--color-white); }

.portal-text { font-size: 16px; color: var(--color-gray); }
.portal-text strong { color: var(--color-white); font-weight: 600; }
.glass-card > .eyebrow { margin-bottom: 6px; }

.portal-grid { display: grid; gap: 24px; }
.portal-grid--detail { grid-template-columns: 1.1fr 1fr; }

/* ==========================================================================
   STATUS-ZEILE: Phase + Ansprechpartner (links) · Video (rechts)
   ========================================================================== */
.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.status-row__left { display: flex; flex-direction: column; gap: 18px; }
.status-row__right { display: flex; }
.status-row__left .callout,
.status-row__left .contact-card { padding: 22px 24px; }

.intro-video {
  position: relative;
  width: 100%; height: 100%;
  min-height: 240px;
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-gray);
}
.intro-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.intro-video__label { font-size: 13px; max-width: 320px; }
.intro-video:has(iframe) { border: none; padding: 0; background: #000; }

.contact-card__name { font-size: 16px; font-weight: 600; color: var(--color-white); margin: 6px 0 16px; }

@media (max-width: 860px) {
  .status-row { grid-template-columns: 1fr; }
  .portal-grid--detail { grid-template-columns: 1fr; }
}

/* ==========================================================================
   BUTTONS — Ghost-Buttons prominenter (nur im Portal), kleine Variante
   ========================================================================== */
.btn--ghost { background: var(--glass-bg); border: 1px solid var(--glass-border); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--glass-bg-hover); box-shadow: 0 0 20px rgba(30, 144, 255, 0.35); }
.btn--sm { padding: 10px 18px; font-size: 13px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.summary-all { margin-top: 16px; }

/* ==========================================================================
   STATUS-CALLOUT (Farbe = Bedeutung, aus Notion)
   ========================================================================== */
.callout {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid var(--callout-accent, var(--glass-border));
  border-left-width: 3px;
  background: var(--callout-bg, var(--glass-bg));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.callout__icon { font-size: 24px; line-height: 1.25; flex-shrink: 0; }
.callout__body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.callout__title {
  display: block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--callout-label, var(--color-blue));
  margin-bottom: 4px;
}
.callout__text { font-size: 15px; color: var(--color-white); line-height: 1.5; }
.callout--green  { --callout-accent: rgba(63, 207, 142, 0.55);  --callout-bg: rgba(63, 207, 142, 0.10);  --callout-label: #3FCF8E; }
.callout--yellow { --callout-accent: rgba(245, 183, 89, 0.55);  --callout-bg: rgba(245, 183, 89, 0.10);  --callout-label: #F5B759; }
.callout--red    { --callout-accent: rgba(245, 134, 126, 0.55); --callout-bg: rgba(245, 134, 126, 0.10); --callout-label: #F5867E; }
.callout--blue   { --callout-accent: rgba(30, 144, 255, 0.55);  --callout-bg: rgba(30, 144, 255, 0.10);  --callout-label: #59A9FF; }

/* ==========================================================================
   NÄCHSTER-TERMIN-KARTE
   ========================================================================== */
.appointment-card {
  border-color: rgba(30, 144, 255, 0.3);
  box-shadow: inset 0 0 40px rgba(30, 144, 255, 0.06);
  display: flex; flex-direction: column;
}
#naechster-termin { scroll-margin-top: calc(var(--nav-height) + 24px); }
.appointment-card__icon { width: 40px; height: 40px; color: var(--color-blue); margin-bottom: 16px; }
.appointment-card__icon svg { width: 100%; height: 100%; }
.appointment-card__date { font-weight: 700; font-size: 20px; color: var(--color-white); margin: 4px 0 18px; }
.appointment-card__meta { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.appointment-card__meta div { display: flex; flex-direction: column; gap: 2px; }
.appointment-card__meta dt { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-blue); }
.appointment-card__meta dd { font-size: 15px; color: var(--color-white); }
.appt-actions { margin-top: auto; display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; }
.appt-actions .btn { flex-shrink: 0; }
.booking-hint { font-size: 13px; color: var(--color-gray); line-height: 1.5; flex: 1; min-width: 220px; }

/* ==========================================================================
   GESPRÄCHSZUSAMMENFASSUNGEN (4-Felder-Schema)
   ========================================================================== */
.summary-list { display: flex; flex-direction: column; gap: 16px; }
.summary-card__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.summary-card__date { color: var(--color-blue); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-card__head h4 { font-size: 16px; font-weight: 700; color: var(--color-white); }
.summary-card__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.summary-card__fields dt { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-blue); margin-bottom: 4px; }
.summary-card__fields dd { font-size: 14px; color: var(--color-white); line-height: 1.5; }
.summary-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ==========================================================================
   DATEI-GRUPPEN
   ========================================================================== */
.file-group { margin-bottom: 26px; }
.file-group:last-child { margin-bottom: 0; }
.file-group > h3 { font-size: 17px; font-weight: 600; color: var(--color-white); margin-bottom: 6px; }
.file-group__hint { font-size: 13px; color: var(--color-gray); margin-bottom: 16px; }
/* Aktions-/Download-Spalte rechtsbündig, damit alle Datei-Tabellen fluchten */
.file-table th:last-child, .file-table td:last-child { text-align: right; }

/* ==========================================================================
   VERLAUF
   ========================================================================== */
.update-log { display: flex; flex-direction: column; }
.update-log li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 14px; }
.update-log li:last-child { border-bottom: none; }
.update-log li:first-child { padding-top: 0; }
.update-log__date { flex-shrink: 0; min-width: 88px; color: var(--color-blue); font-weight: 600; font-variant-numeric: tabular-nums; }
.update-log__text { color: var(--color-gray); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================================
   PERFORMANCE / KPIs
   ========================================================================== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 860px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi-card { display: flex; flex-direction: column; padding: 26px 24px; }
.kpi-card__value {
  font-weight: 700; font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #6FC3FF 0%, #1E90FF 55%, #0B5ED7 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(30, 144, 255, 0.3));
}
.kpi-card__label { font-size: 15px; font-weight: 600; color: var(--color-white); margin: 10px 0 8px; }
.kpi-card__note { font-size: 13px; color: var(--color-gray); line-height: 1.5; }

/* ==========================================================================
   TABELLEN (Dateien + Finanzen)
   ========================================================================== */
.table-card { padding: 8px 8px; overflow-x: auto; }
.invoice-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.invoice-table th, .invoice-table td {
  text-align: left; padding: 16px 20px; font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07); white-space: nowrap;
}
.invoice-table th { font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-gray); }
.invoice-table tbody tr:last-child td { border-bottom: none; }
.invoice-table tbody tr { transition: background 0.2s ease; }
.invoice-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.invoice-table td:first-child { color: var(--color-white); font-weight: 600; }
.invoice-table td { color: var(--color-gray); }
.invoice-table .invoice-download { color: var(--color-blue); font-weight: 600; text-decoration: none; }
.invoice-table .invoice-download:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   PHASEN-ÜBERSICHT
   ========================================================================== */
.phase-list { display: flex; flex-direction: column; }
.phase-item { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.phase-item:first-child { padding-top: 0; }
.phase-item:last-child { padding-bottom: 0; border-bottom: none; }
.phase-item__text { flex: 1; min-width: 0; }
.phase-item__text h3 { font-size: 16px; font-weight: 600; color: var(--color-white); }
.phase-item .badge { margin-top: 1px; }

.phase-check {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px;
  border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
}
.phase-check--done { background: var(--color-blue); border-color: var(--color-blue); }
.phase-check--done::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.phase-check--current { border-color: var(--color-blue); box-shadow: 0 0 10px rgba(30, 144, 255, 0.45); }
.phase-check--current::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-blue); }
.phase-check--open { border-color: rgba(255, 255, 255, 0.22); }
.phase-item--done .phase-item__text h3 { color: var(--color-gray); }

/* „Nicht relevant" — ausgegraut (nicht komplett) + Hinweis */
.phase-item--na { opacity: 0.5; }
.phase-check--na { border-color: rgba(255, 255, 255, 0.15); border-style: dashed; }
.phase-na-hint { font-size: 12px; color: var(--color-gray); font-style: italic; margin-top: 3px; }

/* ==========================================================================
   STATUS-BADGES
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 6px 13px; border-radius: 50px;
  font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--done { color: #3FCF8E; background: rgba(63, 207, 142, 0.12); border-color: rgba(63, 207, 142, 0.28); }
.badge--current { color: #59A9FF; background: rgba(30, 144, 255, 0.14); border-color: rgba(30, 144, 255, 0.3); }
.badge--open { color: #F5B759; background: rgba(245, 183, 89, 0.12); border-color: rgba(245, 183, 89, 0.28); }

/* ==========================================================================
   FESTE KASTENGRÖSSE: „Mehr anzeigen"
   ========================================================================== */
.clampable {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--clamp, 3);
  line-clamp: var(--clamp, 3);
  overflow: hidden;
}
.clampable.is-expanded { -webkit-line-clamp: unset; line-clamp: unset; display: block; overflow: visible; }
.clamp-toggle {
  margin-top: 8px;
  background: none; border: none; padding: 0;
  color: var(--color-blue); font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.clamp-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   PORTAL-FOOTER
   ========================================================================== */
.portal-footer { padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 40px; }
.portal-footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.portal-footer img { height: 34px; width: auto; }
.portal-footer__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.portal-footer__meta a { font-size: 14px; color: var(--color-gray); transition: color 0.2s ease; }
.portal-footer__meta a:hover { color: var(--color-blue); }
.portal-footer__copyright { font-size: 13px; color: var(--color-gray); }

/* ----- Responsiv ----- */
@media (max-width: 768px) {
  .summary-card__fields { grid-template-columns: 1fr; }
}
