/* ========== Variables / tokens ========== */
:root {
  --plattes-dark: #314250;
  --plattes-gold: #dfb87d;
  --plattes-gold-hover: #d2a868;
  --plattes-bg: #f5f5f5;
  --step-inactive: #e0e0e0;
}

/* ========== Base / reset ========== */
/* (add global base styles here when needed) */

p, .p, .page_section p, .section-diagonal-left p, .section-diagonal-right p {
    font-family: Arial;
    font-weight: 400;
    font-size: 1.5rem;
    color: #19232d;
}

/* Ocultar título/breadcrumb duplicado en el centro (solo usamos el del header PCC) */
.page-heading,
.page-header,
ul.breadcrumb,
.navbar-default,
.site-nav-container,
.page-nav,
.entity-nav,
.content-nav {
  display: none !important;
}

/* Ensure pcc-nav-links never shows bullets regardless of Bootstrap base styles */
.pcc-nav-links,
.pcc-nav-links li {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

/* ========== Layout ========== */
/* (add app-wide layout here when needed) */

/* ========== Header (PCC – WilliBot style) ========== */
.pcc-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pcc-header-wrapper .skip-to-content {
  position: absolute;
  left: -9999px;
  z-index: 9999;
}
.pcc-header-wrapper .skip-to-content:focus {
  left: 1rem;
  top: 0.5rem;
  background: #fff;
  color: #1B2A4A;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* Top bar: azul WilliBot #1B2A4A, logo left | languages | user | avatar right */
.pcc-header-top {
  background: #1B2A4A;
  color: #fff;
  min-height: 64px;
  display: flex;
  align-items: center;
}

.pcc-header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.pcc-header-left {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.pcc-header-brand {
  display: flex;
  align-items: center;
}
.pcc-header-brand a,
.pcc-header-brand img {
  max-height: 40px;
  width: auto;
  height:40px;
}
.pcc-header-brand,
.pcc-header-brand * {
  color: #fff !important;
}

.pcc-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.pcc-header-item {
  display: inline-flex;
  align-items: center;
}

.pcc-header-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
}
.pcc-header-profile-trigger:hover,
.pcc-header-profile-trigger:focus {
  color: inherit;
  text-decoration: none;
}
.pcc-header-profile-trigger:hover .pcc-header-avatar {
  background: #d2a868;
  color: #1B2A4A;
}

.pcc-header-username {
  font-size: 1.5rem;
  font-weight: 500;
  color: #fff;
}

.pcc-header-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  background: #C9A84C;
  color: #1B2A4A;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
}

.pcc-header-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pcc-header-signin {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.pcc-header-signin:hover {
  color: #C9A84C;
}

.pcc-header-icon {
  color: #fff;
  padding: 0.35rem;
}
.pcc-header-icon:hover {
  color: #C9A84C;
}

.pcc-header-lang .dropdown-toggle,
.pcc-header-lang .drop_language {
  color: #fff;
}
.pcc-header-lang .dropdown-menu {
  left: auto;
  right: 0;
}

.pcc-header-fallback a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
.pcc-header-fallback a:hover {
  color: #C9A84C;
}
.pcc-header-fallback-sep {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0.25rem;
}
.pcc-header-fallback-name {
  color: #fff;
  font-weight: 500;
  margin-right: 0.35rem;
}
.pcc-header-fallback-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  background: #C9A84C;
  color: #1B2A4A;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

/* Nav bar: debajo de la franja azul, breadcrumb + back link (left) | site links (right) */
.pcc-header-nav {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0;
}
.pcc-header-nav--hidden {
  display: none;
}
.pcc-header-nav .container {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.pcc-header-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pcc-header-breadcrumb-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.pcc-header-nav .pcc-breadcrumb {
  margin: 0;
  font-size: 1.5rem;
  color: #374151;
}
.pcc-header-nav .pcc-breadcrumb a {
  color: #1B2A4A;
  text-decoration: none;
  font-weight: 600;
}
.pcc-header-nav .pcc-breadcrumb a:hover {
  text-decoration: underline;
}
.pcc-header-nav .pcc-breadcrumb-sep {
  margin: 0 0.25rem;
  color: #9ca3af;
}
.pcc-header-nav .pcc-breadcrumb-current {
  color: #111827;
  font-weight: 600;
}

.pcc-back-link-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  z-index: 1;
}
.pcc-header-nav .pcc-back-link {
  display: inline-block;
  color: #1B2A4A;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
}
.pcc-header-nav .pcc-back-link:hover {
  text-decoration: underline;
}

.pcc-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
}

.pcc-nav-links li {
  display: inline-block;
}

.pcc-nav-links a {
  color: #1B2A4A;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}
.pcc-nav-links a:hover {
  background: #f3f4f6;
  color: #1B2A4A;
}

.pcc-nav-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
}

.pcc-header-top .navbar-toggle {
  border-color: rgba(255, 255, 255, 0.5);
}
.pcc-header-top .navbar-toggle .icon-bar {
  background: #fff;
}
.pcc-header-top .dropdown-menu {
  margin-top: 0.25rem;
}

/* Mobile: collapse del bloque derecho */
@media (max-width: 767px) {
  .pcc-header-top .container {
    flex-wrap: wrap;
  }
  .pcc-header-right.collapse:not(.in) {
    display: none;
  }
  .pcc-header-right.collapse.in {
    display: flex;
    width: 100%;
    flex-basis: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  .pcc-nav-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========== Footer ========== */
/* (placeholder – add footer styles when integrating) */

/* ========== PCC Dashboard (cards + hero) ========== */
.pcc-dashboard {
  margin: 24px 0 48px;
}

.pcc-dashboard__container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.pcc-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pcc-hero {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  padding: 0;
}

.pcc-hero__header {
  background: linear-gradient(135deg, var(--plattes-dark) 0%, #2d3e4c 100%);
  color: #ffffff;
  padding: 4.5rem 2rem;
  position: relative;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pcc-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 1.5rem;
  color: var(--plattes-gold);
  font-weight: 700;
  margin-bottom: 1.5rem;
  opacity: 0.95;
  display: inline-block;
}

.pcc-hero__title {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  margin: 0 0 1rem 0;
  color: #ffffff;
  line-height: 1.1;
  font-weight: 800;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pcc-hero__subtitle {
  font-size: 1.5rem;
  color: #f5e6d3;
  opacity: 0.95;
  font-weight: 400;
  max-width: 800px;
  margin: 0 auto;
}

.pcc-card {
  display: block;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(49, 66, 80, 0.18);
  text-decoration: none;
  color: #2b2f33;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pcc-card:hover,
.pcc-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(49, 66, 80, 0.18);
  border-color: var(--plattes-gold);
  color: inherit;
}

.pcc-card__header {
  background: var(--plattes-dark);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pcc-card__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px;
  border: 1px solid var(--plattes-gold);
}

.pcc-card__header-title {
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
  color: #fff;
}

.pcc-card__body {
  padding: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.pcc-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 8px 18px;
  border-radius: 10px;
  background: var(--plattes-gold);
  color: var(--plattes-dark);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 16px rgba(223, 184, 125, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.pcc-card:hover .pcc-card__button,
.pcc-card:focus .pcc-card__button {
  background: var(--plattes-gold-hover);
  transform: translateY(-1px);
}

/* ========== PCC Willidesk – Dashboard layout (scoped) ========== */
.pcc-willidesk {
  /*min-height: 100vh;*/
  --color-primary: #1B2A4A;
  --color-primary-light: #2a3f6a;
  --color-accent: #C9A84C;
  --color-white: #ffffff;
  --color-bg: #eef2f9;
  --color-bg-card: #ffffff;
  --color-text: #1B2A4A;
  --color-text-secondary: #5a6a8a;
  --color-text-muted: #8a94a8;
  --color-border: #e2e6ed;
  --color-success: #22c55e;
  --color-success-bg: #f0fdf4;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-hover: 0 8px 25px rgba(27, 42, 74, 0.15);
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.2s ease;

  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  box-sizing: border-box;
  /* Break out of portal container to use full viewport width */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 2rem 2.5rem 1.5rem 2.5rem;
  overflow-x: hidden;
}

.pcc-willidesk .dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 2rem;
  align-items: stretch;
  max-width: 1680px;
  margin: 0 auto;
}

.pcc-willidesk .welcome-section {
  max-width: 1680px;
  margin: 0 auto;
}

.pcc-willidesk .dashboard-content {
  min-width: 0;
}

.pcc-willidesk .welcome-section {
  margin-bottom: 2rem;
}

.pcc-willidesk .welcome-section--home {
  text-align: center;
}

.pcc-willidesk .welcome-title {
  font-size: 3.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.pcc-willidesk .welcome-date {
  font-size: 1.65rem;
  color: var(--color-text-secondary);
}

.pcc-willidesk .fristen-banner {
  background: var(--color-warning-bg);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.5rem;
  margin-bottom: 2.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
}

.pcc-willidesk .fristen-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.pcc-willidesk .fristen-banner-text strong {
  color: var(--color-primary);
}

.pcc-willidesk .tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* Vertical spacing between wrapped tile rows */
.pcc-willidesk .row.g-4 > [class*='col-'] {
  padding: 0px 10px 20px 10px;
}

.pcc-willidesk .row {
    margin-left: -10px;
    margin-right: -10px;
}

.pcc-willidesk .tile {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.pcc-willidesk .tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.pcc-willidesk .tile:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--color-accent);
  text-decoration: none;
}

.pcc-willidesk .tile:hover::before {
  opacity: 1;
}

.pcc-willidesk .tile-icon {
  font-size: 3.6rem;
  margin-bottom: 0.6rem;
  line-height: 1;
}

.pcc-willidesk .tile-icon .tile-icon-img {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
  display: block;
}

.pcc-willidesk .tile-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.pcc-willidesk .tile-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  width: fit-content;
}

.pcc-willidesk .badge-default {
  background: #eef2ff;
  color: var(--color-primary);
}

.pcc-willidesk .badge-green {
  background: var(--color-success-bg);
  color: #16a34a;
}

.pcc-willidesk .badge-orange {
  background: var(--color-warning-bg);
  color: #d97706;
}

.pcc-willidesk .badge-red {
  background: var(--color-danger-bg);
  color: #dc2626;
}

/* Más espacio entre líneas; poco margen antes del estado en color para que no se separe */
.pcc-willidesk .tile-info {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.pcc-willidesk .tile-frist {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  width: fit-content;
  margin-top: auto;
}

.pcc-willidesk .frist-orange {
  background: var(--color-warning-bg);
  color: #d97706;
}

.pcc-willidesk .frist-red {
  background: var(--color-danger-bg);
  color: #dc2626;
}

/* Notification dot for tiles (e.g. NewsBlog) */
.pcc-willidesk .tile-notification-dot {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  min-width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #e97b2a;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0.2rem;
  box-shadow: 0 2px 6px rgba(233, 123, 42, 0.4);
}

/* Sidebar-Spalte: enthält Ereignisse-Kachel + WilliBot */
.pcc-willidesk .sidebar-column {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  gap: 2rem;
}

.pcc-willidesk .willibot-sidebar {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ========== Kommende Ereignisse Kachel ========== */
.pcc-willidesk .ereignisse-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
}

.pcc-willidesk .ereignisse-header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pcc-willidesk .ereignisse-header-icon {
  font-size: 1.5rem;
}

.pcc-willidesk .ereignisse-header-title {
  flex: 1;
}

.pcc-willidesk .ereignisse-list {
  padding: 0.65rem 0;
}

.pcc-willidesk .ereignisse-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  border-left: 3px solid transparent;
  transition: background 0.15s ease, border-left-color 0.15s ease;
  cursor: pointer;
}

.pcc-willidesk .ereignisse-item:last-child {
  border-bottom: none;
}

.pcc-willidesk .ereignisse-item:hover {
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--color-accent);
}

.pcc-willidesk .ereignis-date {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.5rem;
  white-space: nowrap;
}

.pcc-willidesk .ereignis-name {
  color: var(--color-text);
  font-size: 1.5rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.pcc-willidesk .ereignis-tage {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.pcc-willidesk .ereignisse-empty {
  padding: 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.5rem;
}

.pcc-willidesk .ereignisse-footer-link {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-primary);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.pcc-willidesk .ereignisse-footer-link:hover {
  background: var(--color-bg);
  color: var(--color-accent);
}

.pcc-willidesk .willibot-header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pcc-willidesk .willibot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height:350px;
}

.pcc-willidesk .chat-msg {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  line-height: 1.45;
  max-width: 92%;
}

.pcc-willidesk .chat-msg-user {
  white-space: pre-line;
}

.pcc-willidesk .chat-msg-bot {
  background: #f0f4fa;
  color: var(--color-text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.pcc-willidesk .chat-msg-user {
  background: var(--color-primary);
  color: var(--color-white);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.pcc-willidesk .chat-time {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  display: block;
}

.pcc-willidesk .chat-msg-user .chat-time {
  color: rgba(255, 255, 255, 0.6);
}

/* Markdown-Formatierung in Bot-Nachrichten (Sidebar) */
.pcc-willidesk .chat-msg-bot h2,
.pcc-willidesk .chat-msg-bot h3,
.pcc-willidesk .chat-msg-bot h4,
.pcc-willidesk .chat-msg-bot h5 {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.65rem;
  margin: 0.5rem 0 0.25rem;
  line-height: 1.35;
}

.pcc-willidesk .chat-msg-bot p {
  margin: 0.25rem 0;
}

.pcc-willidesk .chat-msg-bot ul {
  margin: 0.3rem 0;
  padding-left: 1.2rem;
}

.pcc-willidesk .chat-msg-bot li {
  margin-bottom: 0.15rem;
}

.pcc-willidesk .chat-msg-bot strong {
  font-weight: 700;
  color: var(--color-primary);
}

.pcc-willidesk .chat-msg-bot code {
  background: rgba(27, 42, 74, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 1.5rem;
}

.pcc-willidesk .willibot-input {
  border-top: 1px solid var(--color-border);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pcc-willidesk .willibot-input textarea {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 1.5rem;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: text;
  resize: none;
  overflow-y: auto;
  max-height: 150px;
  line-height: 1.4;
}

.pcc-willidesk .willibot-input textarea:disabled {
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.pcc-willidesk .willibot-input textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.pcc-willidesk .willibot-input button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
}

.pcc-willidesk .willibot-input button:hover:not(:disabled) {
  background: var(--color-primary-light);
  transform: scale(1.05);
}

.pcc-willidesk .willibot-input button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* WilliBot Header mit Status-Indikator */
.pcc-willidesk .willibot-header-icon {
  font-size: 1.5rem;
}

.pcc-willidesk .willibot-header-title {
  flex: 1;
}

.pcc-willidesk .willibot-header-status {
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 0.85;
}

.pcc-willidesk .willibot-header-status.status-online::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.pcc-willidesk .willibot-header-status.status-offline::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.pcc-willidesk .willibot-header-status.status-connecting::before,
.pcc-willidesk .willibot-header-status.status-thinking::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-right: 0.35rem;
  vertical-align: middle;
  animation: wb-pulse 1.2s infinite ease-in-out;
}

@keyframes wb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* WilliBot Typing-Indikator */
.pcc-willidesk .willibot-typing {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  letter-spacing: 3px;
  animation: wb-typing 1s infinite steps(4);
}

@keyframes wb-typing {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* WilliBot Quellen (collapsible) */
.pcc-willidesk .willibot-sources {
  padding: 0 1rem;
}

.pcc-willidesk .willibot-sources:empty {
  display: none;
}

/* Toggle-Button */
.pcc-willidesk .willibot-sources-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pcc-willidesk .willibot-sources-toggle:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Chevron */
.pcc-willidesk .willibot-sources-chevron {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
  margin-top: 0.1rem;
}

.pcc-willidesk .willibot-sources--open .willibot-sources-chevron {
  transform: rotate(45deg);
  margin-top: -0.05rem;
}

/* Badge / Count */
.pcc-willidesk .willibot-sources-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 0.625rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

/* Collapsible list */
.pcc-willidesk .willibot-sources-list {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease, padding 0.3s ease;
  overflow: hidden;
  padding-top: 0;
}

.pcc-willidesk .willibot-sources-list > * {
  overflow: hidden;
}

.pcc-willidesk .willibot-sources--open .willibot-sources-list {
  grid-template-rows: 1fr;
  padding-top: 0.4rem;
}

.pcc-willidesk .willibot-source-link {
  display: block;
  font-size: 1.5rem;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.15rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcc-willidesk .willibot-source-link:hover {
  text-decoration: underline;
  color: var(--color-accent);
}

/* WilliBot Vorschlaege */
.pcc-willidesk .willibot-suggestions {
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pcc-willidesk .willibot-suggestions:empty {
  display: none;
  padding: 0;
}

.pcc-willidesk .willibot-suggestion-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1.5rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcc-willidesk .willibot-suggestion-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ========== WilliBot Fullscreen Overlay ========== */
.pcc-willidesk .willibot-fullscreen-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
  line-height: 1;
}

.pcc-willidesk .willibot-fullscreen-btn:hover {
  background: var(--color-primary-light);
  transform: scale(1.05);
}

.willibot-fs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 42, 74, 0.65);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.willibot-fs-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.willibot-fs-overlay .willibot-fs-panel {
  background: var(--color-bg-card, #fff);
  border-radius: 18px;
  width: 92%;
  max-width: 960px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(27, 42, 74, 0.35);
}

.willibot-fs-overlay .willibot-fs-header {
  background: #1B2A4A;
  color: #fff;
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.willibot-fs-overlay .willibot-fs-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.75;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: auto;
  line-height: 1;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.willibot-fs-overlay .willibot-fs-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.willibot-fs-overlay .willibot-fs-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.willibot-fs-overlay .chat-msg {
  padding: 0.85rem 1.15rem;
  border-radius: 10px;
  font-size: 1.5rem;
  line-height: 1.6;
  max-width: 85%;
}

.willibot-fs-overlay .chat-msg-bot {
  background: #f0f4fa;
  color: #1B2A4A;
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.willibot-fs-overlay .chat-msg-user {
  background: #1B2A4A;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  white-space: pre-line;
}

.willibot-fs-overlay .chat-time {
  font-size: 1.5rem;
  color: #8a94a8;
  margin-top: 0.2rem;
  display: block;
}

.willibot-fs-overlay .chat-msg-user .chat-time {
  color: rgba(255, 255, 255, 0.6);
}

/* Markdown-Formatierung in Bot-Nachrichten (Fullscreen) */
.willibot-fs-overlay .chat-msg-bot h2,
.willibot-fs-overlay .chat-msg-bot h3,
.willibot-fs-overlay .chat-msg-bot h4,
.willibot-fs-overlay .chat-msg-bot h5 {
  font-weight: 700;
  color: #1B2A4A;
  font-size: 1.65rem;
  margin: 1rem 0 0.25rem;
  line-height: 1.35;
}

.willibot-fs-overlay .chat-msg-bot p {
  margin: 0.3rem 0;
}

.willibot-fs-overlay .chat-msg-bot ul {
  margin: 0.3rem 0;
  padding-left: 1.3rem;
  font-size:1.5;
}

.willibot-fs-overlay .chat-msg-bot li {
  margin-bottom: 0.2rem;
}

.willibot-fs-overlay .chat-msg-bot strong {
  font-weight: 700;
  color: #1B2A4A;
}

.willibot-fs-overlay .chat-msg-bot code {
  background: rgba(27, 42, 74, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 1.5rem;
}

.willibot-fs-sources .willibot-source-link{
  display:block;
}

.willibot-fs-overlay .willibot-fs-sources {
  padding: 0 1.25rem;
}

.willibot-fs-overlay .willibot-fs-sources:empty {
  display: none;
}

.willibot-fs-overlay .willibot-sources-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-secondary);
  margin-bottom: 0.35rem;
}

.willibot-fs-overlay .willibot-fs-input {
  border-top: 1px solid #e2e6ed;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.willibot-fs-overlay .willibot-fs-input textarea {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 1rem;
  border: 1px solid #e2e6ed;
  border-radius: 20px;
  font-size: 1.5rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #1B2A4A;
  background: #eef2f9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: none;
  overflow-y: auto;
  max-height: 150px;
  line-height: 1.4;
}

.willibot-fs-overlay .willibot-fs-input textarea:focus {
  outline: none;
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.willibot-fs-overlay .willibot-fs-input textarea:disabled {
  color: #8a94a8;
  cursor: not-allowed;
}

.willibot-fs-overlay .willibot-fs-input button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #1B2A4A;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.willibot-fs-overlay .willibot-fs-input button:hover:not(:disabled) {
  background: #2a3f6a;
}

.willibot-fs-overlay .willibot-fs-input button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== PCC Detail pages (breadcrumb, back, content) ========== */
.pcc-willidesk.pcc-detail-page {
  max-width: 1200px;
  margin: 0 auto;
}

.pcc-willidesk .pcc-breadcrumb {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--color-text-secondary);
}

.pcc-willidesk .pcc-breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.pcc-willidesk .pcc-breadcrumb a:hover {
  text-decoration: underline;
}

.pcc-willidesk .pcc-breadcrumb-sep {
  margin: 0 0.5rem;
  color: var(--color-text-muted);
}

.pcc-willidesk .pcc-breadcrumb-current {
  color: var(--color-text);
  font-weight: 600;
}

.pcc-back-link-wrap {
  text-align: center;
}
.pcc-willidesk .pcc-back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
}

.pcc-willidesk .pcc-back-link:hover {
  text-decoration: underline;
}

.pcc-willidesk .pcc-page-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.pcc-willidesk .pcc-detail-content {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--color-text);
}

.pcc-willidesk .pcc-detail-content.page-copy {
  min-height: 12rem;
}

/* ========== PCC Detail: Objekt/Info cards ========== */
.pcc-willidesk .objekt-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.pcc-willidesk .objekt-info.pcc-cards-two-col {
  grid-template-columns: repeat(2, 1fr);
}

/* Separación entre árbol familiar y tarjetas (Persönliche Daten) */
.pcc-willidesk .pcc-cards-section-title {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.pcc-willidesk .objekt-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--color-accent);
}

.pcc-willidesk .objekt-card h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.pcc-willidesk .objekt-card p {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.2rem;
}

/* ========== PCC Detail: Accordion ========== */
.pcc-willidesk .accordion-tile {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.pcc-willidesk .accordion-tile:hover {
  box-shadow: var(--shadow-hover);
}

.pcc-willidesk .accordion-tile.active {
  box-shadow: 0 8px 30px rgba(27, 42, 74, 0.12);
  border-color: var(--color-accent);
}

.pcc-willidesk .accordion-header {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  user-select: none;
  transition: background var(--transition);
}

.pcc-willidesk .accordion-header:hover {
  background: #fafbfd;
}

.pcc-willidesk .accordion-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.pcc-willidesk .accordion-title-group {
  flex: 1;
  min-width: 0;
}

.pcc-willidesk .accordion-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.pcc-willidesk .accordion-badge {
  flex-shrink: 0;
}

.pcc-willidesk .accordion-chevron {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.pcc-willidesk .accordion-tile.active .accordion-chevron {
  transform: rotate(180deg);
}

.pcc-willidesk .accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.pcc-willidesk .accordion-tile.active .accordion-body {
  max-height: 3000px;
}

.pcc-willidesk .accordion-content {
  padding: 0 1.5rem 1.5rem;
}

.pcc-willidesk .data-section {
  margin-bottom: 1.5rem;
}

.pcc-willidesk .data-section:last-child {
  margin-bottom: 0;
}

.pcc-willidesk .data-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
}

/* ========== PCC Detail: KV cards ========== */
.pcc-willidesk .kv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.pcc-willidesk .kv-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.pcc-willidesk .kv-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.pcc-willidesk .kv-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 1.5rem;
  gap: 1rem;
}

.pcc-willidesk .kv-label {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.pcc-willidesk .kv-value {
  font-weight: 600;
  text-align: right;
  color: var(--color-text);
  word-break: break-word;
}

.pcc-willidesk .kv-sub {
  padding-left: 1rem;
  font-size: 1.5rem;
}

/* ========== PCC Detail: Tables ========== */
.pcc-willidesk .doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.5rem;
}

.pcc-willidesk .doc-table thead {
  background: var(--color-bg);
}

.pcc-willidesk .doc-table th {
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--color-border);
}

.pcc-willidesk .doc-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.pcc-willidesk .doc-table tbody tr:hover {
  background: #fafbfd;
}

.pcc-willidesk .partner-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.pcc-willidesk .partner-table th {
  background: var(--color-bg);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-border);
}

.pcc-willidesk .partner-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.pcc-willidesk .partner-table .highlight {
  background: #eff6ff;
  font-weight: 600;
}

/* ========== PCC Detail: Status badges ========== */
.pcc-willidesk .status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 600;
}

.pcc-willidesk .status-green {
  background: var(--color-success-bg);
  color: #16a34a;
}

.pcc-willidesk .status-yellow {
  background: var(--color-warning-bg);
  color: #d97706;
}

.pcc-willidesk .status-red {
  background: var(--color-danger-bg);
  color: #dc2626;
}

/* ========== PCC Detail: Button action ========== */
.pcc-willidesk .btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  margin-bottom: 1.5rem;
}

.pcc-willidesk .btn-action:hover {
  background: var(--color-primary-light);
  box-shadow: 0 4px 12px rgba(27, 42, 74, 0.2);
}

/* ========== PCC Detail: Modal ========== */
.pcc-willidesk .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(27, 42, 74, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pcc-willidesk .modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.pcc-willidesk .modal-content {
  background: var(--color-white);
  border-radius: 18px;
  padding: 2rem;
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(27, 42, 74, 0.3);
  position: relative;
}

.pcc-willidesk .modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 0.25rem;
  border-radius: 6px;
}

.pcc-willidesk .modal-close:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.pcc-willidesk .modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

/* ========== PCC Detail: Firma selector ========== */
.pcc-willidesk .firma-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pcc-willidesk .firma-select-card {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-top: 4px solid var(--color-accent);
}

.pcc-willidesk .firma-select-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.pcc-willidesk .firma-select-card.active {
  border-color: var(--color-primary);
  box-shadow: 0 8px 30px rgba(27, 42, 74, 0.15);
}

.pcc-willidesk .firma-select-card h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.pcc-willidesk .firma-select-meta {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.2rem;
}

.pcc-willidesk .firma-frist {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-warning-bg);
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  color: #d97706;
  font-weight: 600;
}

.pcc-willidesk .firma-detail-section {
  display: none;
}

.pcc-willidesk .firma-detail-section.active {
  display: block;
}

.pcc-willidesk .firma-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border-top: 4px solid var(--color-accent);
  margin-bottom: 1.5rem;
}

.pcc-willidesk .firma-card h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.pcc-willidesk .firma-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.pcc-willidesk .firma-detail-label {
  color: var(--color-text-secondary);
}

.pcc-willidesk .firma-detail-value {
  font-weight: 600;
  text-align: right;
}

/* ========== PCC Detail: Structure tree (family/corporate) ========== */
.pcc-willidesk .structure-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.pcc-willidesk .structure-level {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pcc-willidesk .structure-connector {
  width: 2px;
  height: 30px;
  background: var(--color-accent);
  margin: 0 auto;
}

.pcc-willidesk .structure-node {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 160px;
  max-width: 220px;
}

.pcc-willidesk .structure-node.primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.pcc-willidesk .structure-node.primary .node-role {
  color: var(--color-accent);
}

.pcc-willidesk .structure-node.accent {
  border-color: var(--color-accent);
  background: var(--color-warning-bg);
}

.pcc-willidesk .node-name {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.pcc-willidesk .node-role {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
}

.pcc-willidesk .node-detail {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.pcc-willidesk .structure-node.primary .node-detail {
  color: rgba(255, 255, 255, 0.7);
}

/* Rama 1: contacto + pareja + hijos en común (agrupado). */
.pcc-willidesk .pcc-family-with-partner {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(223, 184, 125, 0.08);
  border: 1px solid rgba(223, 184, 125, 0.35);
}

/* Segundo nivel: dos columnas (izquierda = andere Beziehung, derecha = mit Partner). */
.pcc-willidesk .pcc-family-second-level {
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
  margin-top: 1rem;
  width: 100%;
  align-items: flex-start;
}

.pcc-willidesk .pcc-family-second-level .pcc-family-other-branch,
.pcc-willidesk .pcc-family-second-level .pcc-family-partner-branch {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

/* Rama izquierda: hijos de otra relación. */
.pcc-willidesk .pcc-family-other-branch {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
  border-left: 4px solid var(--color-border, #ccc);
}

.pcc-willidesk .pcc-family-second-level .pcc-family-other-branch {
  width: 100%;
}

/* Rama derecha: hijos del matrimonio (mit Partner). */
.pcc-willidesk .pcc-family-partner-branch {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(223, 184, 125, 0.12);
  border: 1px solid rgba(223, 184, 125, 0.4);
  border-right: 4px solid rgba(223, 184, 125, 0.6);
}

.pcc-willidesk .pcc-family-partner-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-secondary, #555);
  margin-bottom: 0.75rem;
  text-align: left;
}

.pcc-willidesk .pcc-family-other-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-secondary, #555);
  margin-bottom: 0.75rem;
  text-align: left;
}

/* Cuando second-level no existe, other-branch puede estar solo (margin). */
.pcc-willidesk .pcc-family-tree-inline > .pcc-family-other-branch {
  margin-top: 1.25rem;
}

@media (max-width: 700px) {
  .pcc-willidesk .pcc-family-second-level {
    flex-direction: column;
  }
}

/* ========== PCC Detail: Page subtitle ========== */
.pcc-willidesk .page-subtitle {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

/* ========== Media queries (PCC Dashboard) ========== */
@media (max-width: 1200px) {
  .pcc-willidesk .dashboard-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .pcc-willidesk .dashboard-content {
    min-height: 0;
  }
  .pcc-willidesk .tiles-grid {
    min-height: 0;
  }
  .pcc-willidesk .sidebar-column {
    position: static;
  }
  .pcc-willidesk .willibot-sidebar {
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .pcc-willidesk .tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .pcc-willidesk {
    padding: 1rem;
  }
  .pcc-willidesk .tiles-grid {
    grid-template-columns: 1fr;
  }
  .pcc-willidesk .objekt-info,
  .pcc-willidesk .objekt-info.pcc-cards-two-col {
    grid-template-columns: 1fr;
  }
  .pcc-willidesk .kv-cards {
    grid-template-columns: 1fr;
  }
  .pcc-willidesk .firma-selector {
    grid-template-columns: 1fr;
  }
}

/* ========== Ereigniskalender page ========== */

.pcc-kalender-header {
  max-width: 1680px;
  margin: 0 auto 1.5rem auto;
}

.underpage-header{
  padding-left: 6rem;
  overflow: visible;
  position: relative;
}

.underpage-header::before {
  content:"";
  background-image: url("/Logo_Signature_Blau.png");
  width: 5rem;
  height: 5rem;
  display: block;
  position: absolute;
  background-size: cover;
  margin-top: 5px;
  left:0;
}

.pcc-kalender-header.underpage-header::before {
  background-image: url("/calendar-icon-blau.png");
}

.underpage-header--immobilien.underpage-header::before {
  background-image: url("/immobilien_1.svg");
}

.underpage-header--persoenlich.underpage-header::before {
  background-image: url("/persoenliche-daten.svg");
}

.underpage-header--firmen.underpage-header::before {
  background-image: url("/firmen.svg");
}

.underpage-header--steuer.underpage-header::before {
  background-image: url("/steuererklaerungen_1.svg");
}

.underpage-header--darlehen.underpage-header::before {
  background-image: url("/icon-darlehen.png");
}

.underpage-header--gesamtstruktur.underpage-header::before {
  background-image: url("/icon-gesamtstruktur1.png");
}

.underpage-header--kyc.underpage-header::before {
  background-image: url("/kyc-compliance_1.svg");
}

.underpage-header--impressum.underpage-header::before {
  background-image: url("/Logo_Signature_Blau.png");
}
.underpage-header--datenschutz.underpage-header::before {
  background-image: url("/Logo_Signature_Blau.png");
}
.underpage-header--compliance.underpage-header::before {
  background-image: url("/Logo_Signature_Blau.png");
}
.underpage-header--newsblog.underpage-header::before {
  background-image: url("/newsblog_1.svg");
}

/* ========== NewsBlog – ChatGPT Pulse style ========== */
.nb-wrap {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 0 3rem;
  font-size: 1.5rem;
}

/* --- Pulse date header --- */
.nb-pulse-header {
  margin-bottom: 2rem;
}
.nb-pulse-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.nb-date-text {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}
.nb-date-chevron {
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}
.nb-pulse-intro {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* --- Filter tags --- */
.nb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.nb-tag {
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition);
}
.nb-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.nb-tag--active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* --- Card base --- */
.nb-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.nb-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* --- Featured card (full width, horizontal layout) --- */
.nb-card--featured {
  display: flex;
  margin-bottom: 2rem;
}
.nb-card--featured .nb-card-img-wrap {
  flex: 0 0 280px;
  min-height: 220px;
}
.nb-card--featured .nb-card-body {
  flex: 1;
  padding: 1.5rem;
}
.nb-card--featured .nb-card-title {
  font-size: 1.8rem;
}

/* --- Image area --- */
.nb-card-img-wrap {
  position: relative;
  overflow: hidden;
}
.nb-card-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nb-card-img-wrap--featured .nb-card-img-placeholder {
  min-height: 220px;
}

/* --- Badges --- */
.nb-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.nb-badge--ki {
  background: rgba(27, 42, 74, 0.85);
  color: #C9A84C;
  font-size: 1.5rem;
}
.nb-badge--podcast {
  background: rgba(27, 42, 74, 0.85);
  color: #dfb87d;
  font-size: 1.5rem;
}

/* --- Card body --- */
.nb-card-body {
  padding: 1.25rem;
}
.nb-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.nb-relevance-tag {
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.nb-relevance--high {
  background: #fef2f2;
  color: #b91c1c;
}
.nb-relevance--medium {
  background: #fffbeb;
  color: #92400e;
}
.nb-relevance--low {
  background: #f0fdf4;
  color: #166534;
}
.nb-relevance--info {
  background: #eef2f9;
  color: var(--color-primary);
}
.nb-category-label {
  font-size: 1.5rem;
  color: var(--color-text-muted);
}
.nb-card-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
  line-height: 1.35;
}
.nb-card-desc {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0 0 0.75rem;
}
.nb-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}
.nb-card-date {
  font-size: 1.5rem;
  color: var(--color-text-muted);
}
.nb-card-source {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* --- Audio row (podcast cards) --- */
.nb-card-audio {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: #f8f9fb;
  border-radius: 8px;
}
.nb-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}
.nb-play-btn:hover {
  background: var(--color-primary-light);
}
.nb-audio-label {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  flex: 1;
}
.nb-audio-link {
  font-size: 1.5rem;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nb-audio-link:hover {
  text-decoration: underline;
}

/* --- Action buttons --- */
.nb-card-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}
.nb-action {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.nb-action:hover {
  background: #eef2f9;
  color: var(--color-primary);
}
.nb-action--active {
  color: var(--color-accent);
}

/* --- News grid --- */
.nb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.nb-grid .nb-card-img-placeholder {
  min-height: 140px;
}

/* --- Older section --- */
.nb-older-section {
  margin-top: 2.5rem;
  border-top: 2px solid var(--color-border);
  padding-top: 1.5rem;
}
.nb-older-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}
.nb-older-date {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}
.nb-older-intro {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  margin: 0;
  flex: 1;
  line-height: 1.5;
}
.nb-older-chevron {
  color: var(--color-text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.nb-older-header--open .nb-older-chevron {
  transform: rotate(180deg);
}
.nb-older-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* --- Compact card (text only) --- */
.nb-card--compact {
  display: flex;
}
.nb-card--compact .nb-card-body {
  flex: 1;
}
.nb-card--compact .nb-card-title {
  font-size: 1.5rem;
}
.nb-card--compact .nb-card-desc {
  font-size: 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nb-card--featured {
    flex-direction: column;
  }
  .nb-card--featured .nb-card-img-wrap {
    flex: none;
    min-height: 180px;
  }
  .nb-grid {
    grid-template-columns: 1fr;
  }
  .nb-date-text {
    font-size: 1.8rem;
  }
  .nb-wrap {
    padding: 0 0.5rem 2rem;
  }
}

.pcc-kalender-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1680px;
  margin: 0 auto;
  align-items: start;
}

/* Calendar card (left) */
.pcc-kalender-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow: hidden;
}

.pcc-kalender-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pcc-kalender-nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  line-height: 1;
  padding: 0;
}

.pcc-kalender-nav-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.pcc-kalender-month-label {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  flex: 1;
  text-align: center;
}

.pcc-kalender-today-btn {
  padding: 0.45rem 1.2rem;
  border: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  font-size: 1.5rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.pcc-kalender-today-btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Weekday header row */
.pcc-kalender-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0;
}

.pcc-kalender-weekday {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  padding: 0.6rem 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

/* Calendar grid */
.pcc-kalender-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* Day cell – rectangular, bordered, content top-left */
.pcc-kalender-day {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
  font-size: 1.5rem;
  padding: 0;
  overflow: hidden;
}

.pcc-kalender-day:hover {
  background: #f8fafd;
}

/* Day number – top left */
.pcc-kalender-day-num {
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  color: var(--color-text);
}

/* Other month days */
.pcc-kalender-day--other {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
  background: var(--color-bg);
}

/* Today – highlight the day number */
.pcc-kalender-day--today .pcc-kalender-day-num {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 6px;
  display: inline-block;
  min-width: 1.8em;
  text-align: center;
}

.pcc-kalender-day--today:hover {
  background: #f0f4fa;
}

/* Active (selected) day */
.pcc-kalender-day--active {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  background: rgba(201, 168, 76, 0.06);
}

.pcc-kalender-day--today.pcc-kalender-day--active {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

/* Event entries inside day cells */
.pcc-kalender-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0.35rem 0.35rem;
  overflow: hidden;
  flex: 1;
}

.pcc-kalender-event {
  font-size: 1.5rem;
  line-height: 1.3;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  background: rgba(27, 42, 74, 0.07);
  color: var(--color-text);
}

.pcc-kalender-event-desc {
  font-size: 1.5rem;
  line-height: 1.25;
  padding: 0 0.4rem 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* Holiday day cells – greyed out background */
.pcc-kalender-day--holiday {
  background: #f3f3f3;
}

.pcc-kalender-day--holiday .pcc-kalender-day-num {
  color: #aaa;
}

.pcc-kalender-day--holiday:hover {
  background: #ececec;
}

/* Weekend day cells – subtle grey */
.pcc-kalender-day--weekend {
  background: #f9f9f9;
}

.pcc-kalender-day--weekend .pcc-kalender-day-num {
  color: #aaa;
}

/* Holiday event label inside day cell */
.pcc-kalender-event--holiday {
  background: transparent;
  color: #aaa;
  font-weight: 400;
  font-style: italic;
  font-size: 1.5rem;
}

/* Global event inside day cell */
.pcc-kalender-event--global {
  background: rgba(201, 168, 76, 0.12);
  color: var(--color-text);
}

/* Birthday event inside day cell */
.pcc-kalender-event--birthday {
  background: rgba(76, 145, 65, 0.14);
  color: #2d6a2e;
  font-weight: 500;
}

.pcc-kalender-event-logo {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  margin-right: 0.2rem;
  border-radius: 2px;
}

/* Termine card (right side) */
.pcc-termine-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  align-self: start;
}

.pcc-termine-list {
  max-height: 65vh;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.pcc-termin-item {
  cursor: pointer;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  border-left: 3px solid transparent;
  transition: background 0.15s ease, border-left-color 0.15s ease;
}

.pcc-termin-item:last-child {
  border-bottom: none;
}

.pcc-termin-item:hover {
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--color-accent);
}

.pcc-termin-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.pcc-termin-date {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-text);
  white-space: nowrap;
}

.pcc-termin-name {
  font-size: 1.5rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcc-termin-tage {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.pcc-termin-beschreibung {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
  padding-left: 110px;
  margin-left: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Grouped rows (additional events on same date) */
.pcc-termin-row--grouped {
  border-top: 1px dashed var(--color-border);
  padding-top: 0.4rem;
  margin-top: 0.35rem;
}

/* Global event items in sidebar */
.pcc-termin-item--event .pcc-termin-name {
  font-weight: 600;
}

.pcc-termin-logo {
  height: 1.4em;
  width: auto;
  vertical-align: middle;
  margin-right: 0.35rem;
  border-radius: 3px;
}

/* Shifted deadline hint */
.pcc-termin-shift-hint {
  font-size: 1.5rem;
  color: #999;
  font-style: italic;
  margin-top: 0.2rem;
  padding-left: 110px;
  margin-left: 0.65rem;
}

.pcc-termin-item--active {
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--color-accent);
}

/* ========== Ereigniskalender responsive ========== */
@media (max-width: 1200px) {
  .pcc-kalender-layout {
    grid-template-columns: 1fr;
  }
  .pcc-termine-list {
    max-height: 400px;
  }
}

@media (max-width: 600px) {
  .pcc-kalender-card {
    padding: 0.5rem;
  }
  .pcc-kalender-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .pcc-kalender-month-label {
    order: -1;
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }
  .pcc-kalender-day {
    min-height: 60px;
  }
  .pcc-kalender-day-num {
    font-size: 1.5rem;
    padding: 0.25rem 0.35rem;
  }
  .pcc-kalender-event {
    font-size: 1.5rem;
  }
  .pcc-termin-row {
    grid-template-columns: 90px 1fr auto;
  }
  .pcc-termin-beschreibung {
    padding-left: 90px;
  }
  .pcc-termin-shift-hint {
    padding-left: 90px;
  }
  .pcc-kalender-weekday {
    font-size: 1.5rem;
  }
}


/* ============================================================
   PCC DETAIL PAGES – Shared styles
   Used by: Personal-Data, Immobilien-Data, Firmen-Data
   ============================================================ */

/* Color shorthand variables (scoped to detail wraps) */
.pcc-wrap {
  --cp: var(--color-primary, #1B2A4A);
  --cp-light: var(--color-primary-light, #2a3f6a);
  --ca: var(--color-accent, #C9A84C);
  --ca-light: #fffdf5;
  --cbg: var(--color-bg, #eef2f9);
  --ccard: var(--color-bg-card, #ffffff);
  --ct: var(--color-text, #1B2A4A);
  --ct2: var(--color-text-secondary, #5a6a8a);
  --ctm: var(--color-text-muted, #8a94a8);
  --cbr: var(--color-border, #e2e6ed);
  --cbrl: #f0f1f4;
  --r: var(--radius-lg, 14px);
  --sh: 0 2px 4px rgba(0,0,0,.05);
  --shh: 0 8px 25px rgba(27,42,74,.15);
}

/* Layout – centered, blue bg shows through */
.pcc-wrap {
  max-width: 1680px;
  margin: 0 auto;
  font-family: var(--font-family, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
  color: var(--ct);
}

/* White card section */
.pcc-section {
  background: var(--ccard);
  border: 1px solid var(--cbr);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* Chart wrapper + zoom controls */
.pcc-chart-wrap { position: relative; }
.pcc-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}
.pcc-zoom button {
  width: 44px;
  height: 44px;
  border: 2px solid var(--cp);
  border-radius: 10px;
  background: var(--cp);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  transition: all 0.15s ease;
  padding: 0;
}
.pcc-zoom button:hover {
  background: var(--ccard);
  color: var(--cp);
  border-color: var(--cp);
}

/* ============================================================
   FAMILY-CHART OVERRIDES (generic – add .pcc-f3 class to chart div)
   ============================================================ */
.pcc-f3.f3 {
  --background-color: var(--ccard);
  --text-color: var(--ct);
  --female-color: transparent;
  --male-color: transparent;
  --genderless-color: transparent;
  background: var(--ccard) !important;
  font-family: inherit !important;
}
.pcc-f3 .main_svg { background: var(--ccard) !important; }
.pcc-f3 .link { stroke: #C9A84C !important; stroke-width: 2 !important; }
.pcc-f3 .card-male,
.pcc-f3 .card-female,
.pcc-f3 .card-genderless,
.pcc-f3 .card-inner {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
.pcc-f3 div.card > div { box-shadow: none !important; }
.pcc-f3 .f3-nav { display: none !important; }

/* ============================================================
   FC-CARD – Base card styles for all chart nodes
   ============================================================ */
.fc-card {
  background: var(--ccard);
  border: 2px solid var(--cbr);
  border-radius: var(--r);
  padding: 18px 22px;
  text-align: center;
  min-width: 220px;
  max-width: 300px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}
.fc-card:hover {
  border-color: var(--ca);
  box-shadow: var(--shh);
}

/* Card internals */
.fc-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--cp-light);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.5rem;
  margin: 0 auto 10px;
}
.fc-name   { font-weight: 700; font-size: 1.5rem; line-height: 1.3; margin-bottom: 4px; }
.fc-role   { font-size: 1.5rem; color: var(--ct2); }
.fc-detail { font-size: 1.5rem; color: var(--ctm); margin-top: 4px; }
.country-flag { width: 20px; height: auto; vertical-align: middle; margin-right: 4px; }
.fc-badge  {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Owner card (dunkelblau) – shared by Immobilien + Firmen */
.fc-card.fc-owner {
  background: var(--cp);
  color: #fff;
  border-color: var(--cp);
}
.fc-card.fc-owner .fc-role   { color: var(--ca); }
.fc-card.fc-owner .fc-detail { color: rgba(255,255,255,0.7); }
.fc-card.fc-owner .fc-avatar { background: var(--ca); color: var(--cp); }

/* Active / selected state */
.fc-card.fc-active {
  background: var(--cp) !important;
  border-color: var(--ca) !important;
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,.35), var(--shh);
}
.fc-card.fc-active .fc-role   { color: var(--ca) !important; }
.fc-card.fc-active .fc-detail { color: rgba(255,255,255,0.7) !important; }
.fc-card.fc-active .fc-avatar { background: var(--ca) !important; color: var(--cp) !important; }

/* Country card (intermediate country grouping node) */
.fc-card-country {
  background: #fff; border: 2px solid #C9A84C; border-radius: 12px;
  padding: 10px 14px; text-align: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(201,168,76,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 160px;
}
.fc-card-country:hover { box-shadow: 0 4px 12px rgba(201,168,76,0.3); }
.fc-card-country .fc-icon { margin-bottom: 4px; line-height: 0; display: flex; justify-content: center; }
.fc-card-country .fc-icon img { width: 28px; height: 19px; vertical-align: middle; }
.fc-card-country .fc-title { font-size: 13px; font-weight: 700; color: #1B2A4A; }
.fc-card-country .fc-count { font-size: 10px; color: #5a6a8a; margin-top: 2px; }
.fc-card-country .fc-toggle { font-size: 9px; color: #C9A84C; opacity: 0.8; margin-top: 4px; letter-spacing: 0.5px; }

/* ============================================================
   PERSONAL-DATA – Node type variants
   ============================================================ */
/* Mandant */
.fc-card.fc-node-primary {
  background: var(--cp);
  border-color: var(--cp);
  color: #fff;
}
.fc-card.fc-node-primary .fc-role   { color: var(--ca); }
.fc-card.fc-node-primary .fc-detail { color: rgba(255,255,255,.6); }
.fc-card.fc-node-primary .fc-avatar { background: var(--ca); color: var(--cp); }
.fc-card.fc-node-primary.fc-active {
  border-color: var(--ca) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,.5), 0 0 14px rgba(201,168,76,.35) !important;
  outline: 2px solid var(--ca);
  outline-offset: 1px;
}

/* Ehegatte */
.fc-card.fc-node-spouse {
  background: var(--ca-light);
  border-color: var(--ca);
}
.fc-card.fc-node-spouse .fc-avatar { background: var(--ca); color: var(--cp); }
.fc-card.fc-node-spouse .fc-role   { color: #d97706; }

/* Kind */
.fc-card.fc-node-child {
  background: var(--ccard);
  border-color: var(--cbr);
}

/* Stiefkind (generic) */
.fc-card.fc-node-stiefkind {
  background: var(--ca-light);
  border: 2px dashed var(--ca) !important;
  cursor: pointer;
}
.fc-card.fc-node-stiefkind .fc-avatar { background: var(--ca); color: var(--cp); }

/* Stieftochter (Rosa/Pink) */
.fc-card.fc-node-stieftochter {
  background: #fef2f5;
  border: 2px dashed #d4a0b0 !important;
}
.fc-card.fc-node-stieftochter .fc-avatar { background: #9b6b8a; color: #fff; }
.fc-card.fc-node-stieftochter .fc-role   { color: #9b6b8a; }

/* Stiefsohn (Teal) */
.fc-card.fc-node-stiefsohn {
  background: #f0f7f7;
  border: 2px dashed #5a9ea0 !important;
}
.fc-card.fc-node-stiefsohn .fc-avatar { background: #4a8b8c; color: #fff; }
.fc-card.fc-node-stiefsohn .fc-role   { color: #4a8b8c; }

/* Geschwister / Elternteil */
.fc-card.fc-node-sibling,
.fc-card.fc-node-parent {
  background: var(--ccard);
  border-color: var(--cbr);
}

/* Sibling overlay cards positioned next to chart nodes */
.sibling-overlay-card {
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-radius: 16px;
  transition: box-shadow .2s;
}
.sibling-overlay-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

/* ============================================================
   IMMOBILIEN-DATA – Property card variants
   ============================================================ */
/* Eigennutzung (Gold) */
.fc-card.fc-eigennutzung {
  background: var(--ca-light);
  border-color: var(--ca);
}
.fc-card.fc-eigennutzung .fc-avatar { background: var(--ca); color: var(--cp); }
.fc-card.fc-eigennutzung .fc-role   { color: #d97706; }

/* Vermietung (Teal) */
.fc-card.fc-vermietung {
  border-color: #4A8B8C;
  background: #f0fafa;
}
.fc-card.fc-vermietung .fc-avatar { background: #4A8B8C; color: #fff; }
.fc-card.fc-vermietung .fc-role   { color: #4A8B8C; }

/* Leerstand (grau, dashed) */
.fc-card.fc-leerstand {
  border-style: dashed;
  border-color: var(--ctm);
  background: #f5f6f8;
}
.fc-card.fc-leerstand .fc-avatar { background: var(--ctm); color: #fff; }
.fc-card.fc-leerstand .fc-role   { color: var(--ctm); }

/* Default property */
.fc-card.fc-property {
  background: var(--ccard);
  border-color: var(--cbr);
}

/* Badges */
.fc-badge.badge-eigen  { background: #fffbeb; color: #d97706; }
.fc-badge.badge-miet   { background: #f0fafa; color: #4A8B8C; }
.fc-badge.badge-leer   { background: #f5f6f8; color: var(--ctm); }

/* Table row color indicators (left border) */
tr.firmen-table-row.fc-eigennutzung { border-left: 4px solid var(--ca); }
tr.firmen-table-row.fc-vermietung   { border-left: 4px solid #4A8B8C; }
tr.firmen-table-row.fc-leerstand    { border-left: 4px solid var(--ctm); border-left-style: dashed; }

/* ============================================================
   FIRMEN-DATA – Company card variants
   ============================================================ */
.fc-card.fc-firma {
  border-color: var(--ca);
  background: var(--ca-light);
}
.fc-card.fc-firma .fc-avatar { background: var(--cp); color: var(--ca); }
.fc-card.fc-firma .fc-role   { color: var(--ct2); }
.fc-card.fc-firma .fc-badge  { background: #fffbeb; color: #d97706; }

/* ============================================================
   DETAIL PANEL – expand/collapse
   ============================================================ */
.pcc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s ease, opacity .3s ease;
  opacity: 0;
}
.pcc-panel.open {
  max-height: 2000px;
  opacity: 1;
}
.pcc-panel-card {
  position: relative;
  background: var(--ccard);
  border: 1px solid var(--cbr);
  border-radius: var(--r);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

/* Detail panel close button */
.pcc-panel-card > .pcc-detail-close {
  position: absolute !important;
  top: 12px !important; right: 12px !important;
  left: auto !important; bottom: auto !important;
  float: none !important;
  width: 32px !important; height: 32px !important;
  min-width: 32px; min-height: 32px;
  padding: 0 !important; margin: 0 !important;
  border-radius: 50% !important;
  background: #f0f0f0 !important; border: 1px solid #ddd !important;
  cursor: pointer; display: flex !important; align-items: center !important; justify-content: center !important;
  font-size: 18px !important; color: #1B2A4A !important; line-height: 1 !important;
  font-weight: normal !important;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
  -webkit-appearance: none !important;
  appearance: none !important;
  opacity: 1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
.pcc-panel-card > .pcc-detail-close:hover,
.pcc-panel-card > .pcc-detail-close:focus {
  background: #e0e0e0 !important;
  transform: scale(1.1);
  opacity: 1 !important;
  outline: none;
}

/* Header */
.pd-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.pd-avatar {
  width: 72px; height: 72px; min-width: 72px;
  border-radius: 50%;
  background: var(--cp);
  color: var(--ca);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700;
}
.pd-header-info { flex: 1; min-width: 0; }
.pd-name {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--cp);
  margin-bottom: 0.5rem;
}
.pd-badge {
  display: inline-block;
  background: #f5f6f8;
  color: var(--ct2);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 1.5rem;
  font-weight: 600;
}
.pd-badge.badge-nutzung { margin-left: 6px; }
.pd-badge.badge-nutzung-eigen { background: #fffbeb; color: #d97706; }
.pd-badge.badge-nutzung-miet  { background: #f0fafa; color: #4A8B8C; }

/* Grid (3-column masonry-like: tiles sized by content) */
.pd-grid {
  column-count: 3;
  column-gap: 1.25rem;
}

/* Section card */
.pd-section {
  background: #f5f6f8;
  border-radius: var(--r);
  padding: 1.25rem;
  break-inside: avoid;
  margin-bottom: 1.25rem;
}
.pd-section-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cp);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ca);
  margin-bottom: 1rem;
}

/* Rows */
.pd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--cbrl);
}
.pd-row:last-child { border-bottom: none; }
.pd-label { color: var(--ct2); flex-shrink: 0; }
.pd-value { color: var(--cp); font-weight: 600; text-align: right; word-break: break-word; flex-grow: 1; }
.pd-value a { color: var(--ca); text-decoration: none; }
.pd-value a:hover { text-decoration: underline; }

/* Firmen table */
.firmen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.5rem;
  table-layout: auto;
}
.firmen-table thead th {
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--cp);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--ca);
  background: rgba(201, 168, 76, 0.06);
  white-space: nowrap;
}
.firmen-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.firmen-table tbody tr:hover { background: rgba(201, 168, 76, 0.08); }
.firmen-table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--cbr);
  color: var(--cp);
  vertical-align: middle;
}
.firmen-table tbody tr:last-child td { border-bottom: none; }
.firmen-table-name { font-weight: 700; white-space: nowrap; }
.firmen-table-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  background: rgba(201, 168, 76, 0.14);
  color: var(--ca);
}

/* Loading / empty states */
.pd-loading { text-align: center; padding: 2rem; color: var(--ctm); font-size: 1.5rem; }
.pcc-empty  { text-align: center; padding: 40px; color: var(--ctm); font-style: italic; font-size: 1.5rem; }

/* Document rows (Personal-Data) */
.pd-doc-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0.5rem 0;
  font-size: 1.5rem;
}
.pd-doc-divider {
  border: none;
  border-top: 1px solid var(--cbrl);
  margin: 0.25rem 0;
}
.pd-doc-type { font-weight: 600; color: var(--cp); }
.pd-doc-meta { color: var(--ct2); font-size: 1.5rem; }
.pd-no-docs  { color: var(--ctm); font-size: 1.5rem; font-style: italic; }
/* No last-child full-span — all cards stay uniform 1/3 width */

/* Owner separator (multiple Eigentümer per Immobilie) */
.pd-owner-sep {
  border: none;
  border-top: 2px dashed var(--ca);
  margin: 0.75rem 0;
}

/* Section loading spinner */
.pd-section-loading { color: var(--ct2); font-size: 1.5rem; padding: .5rem 0; display: flex; align-items: center; gap: .5rem; }
.pd-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--cbr); border-top-color: var(--ca); border-radius: 50%; animation: pd-spin .7s linear infinite; flex-shrink: 0; }
@keyframes pd-spin { to { transform: rotate(360deg); } }

.pd-doc-btn {
  display: block;
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--cp);
  color: #fff;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pd-doc-btn:hover { background: var(--cp-light); color: #fff; text-decoration: none; }

/* ============================================================
   DETAIL PAGES – Responsive
   ============================================================ */
@media (max-width: 900px) {
  .pd-grid { column-count: 1; }
}
/* Personal-Data specific: 3 cols → 2 cols → 1 col */
@media (max-width: 1024px) {
  #pdGrid { column-count: 2; }
}
@media (max-width: 600px) {
  #pdGrid { column-count: 1; }
}
@media (max-width: 600px) {
  .pcc-section        { padding: 1rem; }
  .pcc-panel-card     { padding: 1rem; }
  .pd-header          { flex-direction: column; text-align: center; gap: 0.75rem; }
  .pd-avatar          { width: 56px; height: 56px; min-width: 56px; font-size: 1.5rem; }
  .pd-name            { font-size: 1.5rem; }
  .pd-row             { font-size: 1.5rem; flex-wrap: wrap; }
  .fc-card            { min-width: 180px; max-width: 240px; padding: 14px 16px; }
  .fc-name            { font-size: 1.5rem; }
  .fc-role            { font-size: 1.5rem; }
  .fc-avatar          { width: 42px; height: 42px; font-size: 1.5rem; }
}

/* ============================================================
   Legal Pages (Impressum, Datenschutz, Compliance)
   ============================================================ */
.legal-page {
  max-width: 1680px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
  color: var(--cp);
  line-height: 1.8;
}
.legal-page h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cp);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ca);
}
.legal-section {
  margin-bottom: 2rem;
}
.legal-section h3 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--cp);
  margin-bottom: 0.75rem;
}
.legal-section p {
  font-size: 1.5rem;
  color: var(--cp);
  margin-bottom: 0.75rem;
}
.legal-section ul {
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
  color: var(--cp);
  font-size: 1.5rem;
}
.legal-section ul li {
  margin-bottom: 0.4rem;
}
.legal-section a {
  color: var(--ca);
  text-decoration: none;
}
.legal-section a:hover {
  text-decoration: underline;
}

/* ================================================================
   WILLIBOT – Chat-Interface Styles
   (Quelle: index.css von azure.plattes.group, hier lokal integriert,
    damit kein externes CSS die PCC-Header-Styles ueberschreibt)
   ================================================================ */

/* --- PlattesGroup Branding-Variablen --- */
.pcc-willidesk {
  --pg-primary: #284259;
  --pg-accent: #AD966B;
}

/* --- Markdown-Hervorhebungen in Chat-Bubbles --- */
.pcc-willidesk .mk-strong {
  font-weight: 700;
  color: var(--pg-primary);
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
}

/* Hauptueberschrift (erste Zeile der Bubble) */
.pcc-willidesk .bubble > p:first-child > .mk-strong:only-child {
  display: block;
  font-size: 1.5rem;
  color: var(--pg-accent);
  margin-bottom: .75rem;
}

/* Sekundaere Ueberschriften */
.pcc-willidesk .bubble .mk-header {
  margin-top: 1.25rem;
  margin-bottom: .35rem;
  padding-top: .75rem;
  border-top: 2px solid transparent;
  border-image: linear-gradient(to right, var(--pg-accent), transparent 80%) 1;
}
.pcc-willidesk .bubble > .mk-header:first-child,
.pcc-willidesk .bubble > p:first-child + .mk-header {
  border-top: none;
  border-image: none;
  padding-top: 0;
  margin-top: 0;
}
.pcc-willidesk .bubble .mk-header .mk-strong {
  display: inline-block;
  font-size: 1.5rem;
  color: var(--pg-accent);
}
.pcc-willidesk .bubble .mk-h1 .mk-strong { font-size: 1.5rem; }
.pcc-willidesk .bubble .mk-h2 .mk-strong { font-size: 1.5rem; }
.pcc-willidesk .bubble .mk-h3 .mk-strong { font-size: 1.5rem; }

.pcc-willidesk .bubble .mk-subheader {
  margin: .75rem 0 .25rem 0;
  font-weight: 700;
}
.pcc-willidesk .bubble .mk-subheader .mk-strong {
  color: var(--pg-accent);
  font-size: 1.5rem;
}

/* --- Nummerierte Zeilen --- */
.pcc-willidesk .mk-numbered {
  margin: .5rem 0 .2rem 0;
  line-height: 1.5;
}
.pcc-willidesk .mk-numbered .mk-num {
  font-weight: 700;
  color: var(--pg-accent);
  margin-right: .25rem;
}

/* --- Listen --- */
.pcc-willidesk .mk-list {
  margin: .2rem 0 .4rem 1.5rem;
  padding-left: 0;
  list-style: none;
}
.pcc-willidesk .mk-list li {
  margin: .2rem 0;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.pcc-willidesk .mk-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--pg-accent);
  font-weight: bold;
}
.pcc-willidesk .mk-list li > .mk-strong:first-child { display: inline; }
.pcc-willidesk .mk-list li { text-indent: 0; }
.pcc-willidesk .mk-list li br + * { display: block; margin-top: .15rem; }
.pcc-willidesk .mk-list .mk-list {
  margin-left: 0;
  margin-top: .2rem;
  padding-left: 1.25rem;
}

/* --- Bubble & Paragraphen --- */
.pcc-willidesk .bubble p { margin: .4rem 0; line-height: 1.6; }
.pcc-willidesk .bubble { max-width: 140ch; }
.pcc-willidesk .bubble hr,
.pcc-willidesk .bubble .mk-divider {
  border: none;
  height: 2px;
  background: linear-gradient(to right, var(--pg-accent), transparent 80%);
  margin: 1rem 0;
}

/* --- Chips & Buttons --- */
.pcc-willidesk .chip {
  padding: .35rem .8rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-size: 1.5rem;
  text-align: left;
}
.pcc-willidesk .btn {
  padding: .5rem 1rem;
  border-radius: .75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.07);
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}
.pcc-willidesk .btn:disabled,
.pcc-willidesk .btn[disabled],
.pcc-willidesk button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  border-color: #d1d5db;
  background-color: #f9fafb;
  color: #9ca3af;
}
.pcc-willidesk input[disabled],
.pcc-willidesk textarea[disabled] {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* --- Mono, Progress, Thinking --- */
.pcc-willidesk .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pcc-willidesk .progress { position: relative; height: 3px; overflow: hidden; border-radius: 9999px; background: #e5e7eb; }
.pcc-willidesk .progress::after { content: ""; position: absolute; left: -40%; top: 0; height: 100%; width: 40%; background: #60a5fa; animation: wb-load 1s linear infinite; }
@keyframes wb-load { 0% { left: -40%; } 100% { left: 100%; } }

.pcc-willidesk .thinking-bar { display: none; }
.pcc-willidesk .thinking-dot { display: inline-block; width: .35rem; height: .35rem; border-radius: 9999px; background: #3b82f6; margin-left: .25rem; animation: wb-bounce 1s infinite ease-in-out; }
.pcc-willidesk .thinking-dot:nth-child(2) { animation-delay: .15s; }
.pcc-willidesk .thinking-dot:nth-child(3) { animation-delay: .3s; }
@keyframes wb-bounce { 0%,80%,100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-3px); opacity: 1; } }

/* --- Skeleton-Shimmer --- */
.pcc-willidesk .skeleton { position: relative; overflow: hidden; }
.pcc-willidesk .skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%); animation: wb-shimmer 1.4s infinite;
}
@keyframes wb-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* --- Drawer (rechts, mobil) --- */
.pcc-willidesk .drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 22rem; max-width: 100%;
  background: #fff; border-left: 1px solid #e5e7eb;
  transform: translateX(100%); transition: transform .2s ease;
  z-index: 50; box-shadow: -8px 0 24px rgba(0,0,0,.08);
}
.pcc-willidesk .drawer.open { transform: translateX(0); }
.pcc-willidesk .backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 40;
}
.pcc-willidesk .backdrop.show { opacity: 1; pointer-events: auto; }

/* --- Quellen-Favicons --- */
.pcc-willidesk .src-icons {
  position: absolute; right: .5rem; bottom: -.35rem; z-index: 20;
  display: flex; gap: .3rem; background: #fff; padding: .25rem .35rem;
  border: 1px solid #e5e7eb; border-radius: .6rem; box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.pcc-willidesk .src-icons a {
  display: inline-flex; width: 18px; height: 18px; border-radius: 9999px; overflow: hidden;
  border: 1px solid #e5e7eb; background: #fff;
}
.pcc-willidesk .src-icons img { width: 100%; height: 100%; display: block; }

.pcc-willidesk .src-strip {
  margin-top: .5rem; padding: .35rem .45rem;
  border-top: 1px dashed rgba(30,64,175,.18);
  display: flex; gap: .35rem; align-items: center; flex-wrap: wrap;
  background: rgba(255,255,255,.35); border-radius: .5rem;
}

/* --- Feedback-Buttons (Daumen) --- */
.pcc-willidesk .feedback-buttons { border-top: 1px dashed rgba(30,64,175,.18); padding-top: .5rem; }
.pcc-willidesk .feedback-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  border: 1px solid #e5e7eb; border-radius: 6px;
  background: #fff; color: #6b7280; cursor: pointer; transition: all 0.15s ease;
}
.pcc-willidesk .feedback-btn:hover { background: #f3f4f6; border-color: #d1d5db; color: #374151; }
.pcc-willidesk .feedback-btn.active { background: #dbeafe; border-color: #3b82f6; color: #2563eb; }
.pcc-willidesk .feedback-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.pcc-willidesk .feedback-btn svg { width: 14px; height: 14px; }

/* --- Quellen-Tooltips --- */
.pcc-willidesk .src-icon-wrap { position: relative; }
.pcc-willidesk .src-tip {
  position: absolute; left: 50%; bottom: 2.0rem; transform: translateX(-50%);
  z-index: 9999; background: #111; color: #fff;
  font-size: 1.5rem; line-height: 1.25; padding: .45rem .6rem; border-radius: .5rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  white-space: nowrap; max-width: 90vw;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; display: none;
}
.pcc-willidesk .src-tip::before {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -6px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 6px solid #111;
}
.pcc-willidesk .src-icon {
  display: inline-flex; width: 18px; height: 18px; border-radius: 9999px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.08); opacity: .65; transition: opacity .15s ease; background: #fff;
}
.pcc-willidesk .src-icon:hover { opacity: 1; }
.pcc-willidesk .src-more {
  font-size: 1.5rem; padding: .05rem .4rem; border-radius: .5rem;
  background: rgba(255,255,255,.6); border: 1px solid rgba(0,0,0,.08); color: #1e40af; opacity: .75;
}

/* --- Composer --- */
.pcc-willidesk .chat-composer {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 96rem;
  padding: 0.75rem 0.75rem 0.9rem 0.75rem;
  background: linear-gradient(to top, rgba(249,250,251,0.98), rgba(249,250,251,0.92));
  z-index: 30;
}
.pcc-willidesk .chat-composer textarea {
  width: 100%; min-height: 2.5rem; max-height: 10rem; resize: vertical;
}
.pcc-willidesk #mainShell { padding-bottom: 12rem; }

/* Composer-Buttons responsive */
.pcc-willidesk #feedbackBtn .feedback-label-short { display: none; }
.pcc-willidesk #voiceBtn .voice-icon { margin-right: .25rem; }
.pcc-willidesk #voiceBtn .voice-label { display: inline; }

@media (max-width: 640px) {
  .pcc-willidesk .chat-composer input,
  .pcc-willidesk .chat-composer textarea { width: 100%; }
  .pcc-willidesk .chat-composer .actions-row { justify-content: center; flex-wrap: nowrap; }
  .pcc-willidesk .chat-composer .actions-row .btn { width: auto; flex: 0 0 auto; font-size: 1.5rem; padding-inline: .75rem; white-space: nowrap; }
  .pcc-willidesk #voiceBtn .voice-label { display: none; }
  .pcc-willidesk #feedbackBtn .feedback-label-long { display: none; }
  .pcc-willidesk #feedbackBtn .feedback-label-short { display: inline; }
  .pcc-willidesk #aiWarning { margin-top: .5rem; text-align: center; }
}

/* --- Quellenbereich --- */
.pcc-willidesk #sourcesBox { max-height: none; overflow-y: visible; padding-right: 0; }
.pcc-willidesk #sourcesBox ul li { display: flex; align-items: flex-start; gap: .35rem; }
.pcc-willidesk #sourcesBox a,
.pcc-willidesk #sourcesBox button { word-break: break-word; overflow-wrap: anywhere; white-space: normal; display: inline-block; max-width: 100%; }
.pcc-willidesk #sourcesBox ul { text-align: left; }
.pcc-willidesk #sourcesBox li,
.pcc-willidesk #sourcesBox a,
.pcc-willidesk #sourcesBox button { text-align: left; }
.pcc-willidesk .src-type-icon { flex: 0 0 auto; font-size: 1.5rem; line-height: 1.4; margin-top: .05rem; opacity: .85; }
.pcc-willidesk .src-type-doc { color: #1d4ed8; }
.pcc-willidesk .src-type-web { color: #6b7280; }

/* --- Left Sidebar (ChatGPT-like) --- */
.pcc-willidesk .sidebar-left {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: 19rem; max-width: 100%;
  background: #fff; border-right: 1px solid #e5e7eb;
  transform: translateX(-100%); transition: transform .2s ease;
  z-index: 60; box-shadow: 8px 0 24px rgba(0,0,0,.08);
  display: flex; flex-direction: column;
}
.pcc-willidesk .sidebar-left.open { transform: translateX(0); }
.pcc-willidesk .sidebar-left .nav-header {
  padding: .75rem; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; gap: .5rem;
}
.pcc-willidesk .sidebar-left .nav-body {
  display: flex; flex-direction: column; gap: .5rem;
  padding: .75rem; height: calc(100vh - 56px);
}
.pcc-willidesk #myChatList { overflow-y: auto; }
.pcc-willidesk .sidebar-left.collapsed { width: 3.75rem; }
.pcc-willidesk .sidebar-left.collapsed .nav-brand-text,
.pcc-willidesk .sidebar-left.collapsed .nav-section-title,
.pcc-willidesk .sidebar-left.collapsed .nav-search,
.pcc-willidesk .sidebar-left.collapsed #myChatList,
.pcc-willidesk .sidebar-left.collapsed .nav-language-section { display: none; }
.pcc-willidesk .sidebar-left.collapsed .sb-label,
.pcc-willidesk .sidebar-left.collapsed .nav-close-label { display: none; }
.pcc-willidesk .sidebar-left.collapsed .nav-close-btn { padding: .4rem; }
.pcc-willidesk .sidebar-left.collapsed .btn { justify-content: center; }
.pcc-willidesk .sidebar-left.collapsed .nav-header { justify-content: center; }

@media (min-width: 1024px) {
  body.sidebar-expanded .pcc-willidesk { padding-left: 19rem; }
  body.sidebar-collapsed .pcc-willidesk { padding-left: 3.75rem; }
  .pcc-willidesk #sidebarBackdrop { display: none; }
}
@media (min-width: 1024px) {
  body.sidebar-expanded .pcc-willidesk .chat-composer { left: calc(50% + 9.5rem); }
  body.sidebar-collapsed .pcc-willidesk .chat-composer { left: calc(50% + 1.875rem); }
}

/* Mobile Sidebar-Toggle */
.pcc-willidesk #mobileSidebarToggleBar {
  position: fixed; top: .75rem; left: .75rem; z-index: 35; pointer-events: none;
}
.pcc-willidesk #mobileSidebarToggleBar > button { pointer-events: auto; }
@media (min-width: 1024px) {
  .pcc-willidesk #mobileSidebarToggleBar { position: static; top: auto; left: auto; z-index: auto; pointer-events: auto; }
}

/* --- Hero-Modus (neuer Chat, keine Nachrichten) --- */
body.hero-mode .pcc-willidesk #thinkingBar { display: none; }
body.hero-mode .pcc-willidesk #chat { display: none; }
body.hero-mode .pcc-willidesk #shelf,
body.hero-mode .pcc-willidesk #sourcesBox { display: none; }
body.hero-mode .pcc-willidesk #heroIntro { display: block; }
body.hero-mode .pcc-willidesk #mainShell {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; padding-bottom: 0;
}
body.hero-mode .pcc-willidesk #heroIntro,
body.hero-mode .pcc-willidesk .chat-composer { width: 100%; max-width: 84rem; }
body.hero-mode .pcc-willidesk #heroIntro { margin-top: 0; margin-bottom: 1.5rem; }
body.hero-mode .pcc-willidesk .chat-composer {
  position: static; left: auto; transform: none;
  background: transparent; box-shadow: none; padding: 0; margin: 0 auto;
}
body.hero-mode .pcc-willidesk .chat-composer textarea { min-height: 3rem; }

/* --- Cookie-Banner (innerhalb WilliBOT) --- */
.pcc-willidesk #cookieBanner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999; background: #111; color: #fff; }
.pcc-willidesk #cookieBanner .box { max-width: 56rem; margin: 0 auto; padding: 1rem; display: flex; gap: .75rem; align-items: center; }
.pcc-willidesk #cookieBanner .btn { background: #fff; color: #111; border-radius: .5rem; padding: .5rem .75rem; }
.pcc-willidesk #cookieBanner .btn.primary { background: #AD966B; color: #1A2A37; }

/* --- AI Provider Select verstecken --- */
.pcc-willidesk #aiProviderSelect { display: none; }

/* ================================================================
   WILLIBOT – Tailwind-Utility-Ersatz
   (Nur die Klassen die im Template genutzt werden)
   ================================================================ */
.pcc-willidesk .wb-hidden { display: none; }
.pcc-willidesk .wb-flex { display: flex; }
.pcc-willidesk .wb-inline-flex { display: inline-flex; }
.pcc-willidesk .wb-flex-col { flex-direction: column; }
.pcc-willidesk .wb-flex-1 { flex: 1 1 0%; }
.pcc-willidesk .wb-flex-wrap { flex-wrap: wrap; }
.pcc-willidesk .wb-items-center { align-items: center; }
.pcc-willidesk .wb-justify-between { justify-content: space-between; }
.pcc-willidesk .wb-justify-end { justify-content: flex-end; }
.pcc-willidesk .wb-justify-center { justify-content: center; }
.pcc-willidesk .wb-gap-2 { gap: 0.5rem; }
.pcc-willidesk .wb-gap-3 { gap: 0.75rem; }
.pcc-willidesk .wb-w-full { width: 100%; }
.pcc-willidesk .wb-text-center { text-align: center; }
.pcc-willidesk .wb-text-xs { font-size: 1.5rem; line-height: 1rem; }
.pcc-willidesk .wb-text-sm { font-size: 1.5rem; line-height: 1.25rem; }
.pcc-willidesk .wb-text-lg { font-size: 1.5rem; line-height: 1.75rem; }
.pcc-willidesk .wb-font-semibold { font-weight: 600; }
.pcc-willidesk .wb-font-bold { font-weight: 700; }
.pcc-willidesk .wb-text-gray-500 { color: #6b7280; }
.pcc-willidesk .wb-text-gray-700 { color: #374151; }
.pcc-willidesk .wb-text-gray-800 { color: #1f2937; }
.pcc-willidesk .wb-text-red-600 { color: #dc2626; }
.pcc-willidesk .wb-text-white { color: #fff; }
.pcc-willidesk .wb-bg-white { background-color: #fff; }
.pcc-willidesk .wb-bg-gray-50 { background-color: #f9fafb; }
.pcc-willidesk .wb-rounded-xl { border-radius: 0.75rem; }
.pcc-willidesk .wb-rounded-2xl { border-radius: 1rem; }
.pcc-willidesk .wb-rounded-full { border-radius: 9999px; }
.pcc-willidesk .wb-border { border: 1px solid #e5e7eb; }
.pcc-willidesk .wb-shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.pcc-willidesk .wb-shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1); }
.pcc-willidesk .wb-space-y-1 > * + * { margin-top: 0.25rem; }
.pcc-willidesk .wb-space-y-2 > * + * { margin-top: 0.5rem; }
.pcc-willidesk .wb-uppercase { text-transform: uppercase; }
.pcc-willidesk .wb-tracking-wide { letter-spacing: 0.05em; }
.pcc-willidesk .wb-ml-auto { margin-left: auto; }
.pcc-willidesk .wb-mr-auto { margin-right: auto; }
.pcc-willidesk .wb-mx-auto { margin-left: auto; margin-right: auto; }
.pcc-willidesk .wb-max-w-2xl { max-width: 42rem; }
.pcc-willidesk .wb-max-w-3xl { max-width: 48rem; }
.pcc-willidesk .wb-max-w-md { max-width: 28rem; }
.pcc-willidesk .wb-p-3 { padding: 0.75rem; }
.pcc-willidesk .wb-p-4 { padding: 1rem; }
.pcc-willidesk .wb-px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.pcc-willidesk .wb-px-4 { padding-left: 1rem; padding-right: 1rem; }
.pcc-willidesk .wb-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.pcc-willidesk .wb-pt-2 { padding-top: 0.5rem; }
.pcc-willidesk .wb-pt-0 { padding-top: 0; }
.pcc-willidesk .wb-mt-2 { margin-top: 0.5rem; }
.pcc-willidesk .wb-mt-3 { margin-top: 0.75rem; }
.pcc-willidesk .wb-mt-4 { margin-top: 1rem; }
.pcc-willidesk .wb-mt-6 { margin-top: 1.5rem; }
.pcc-willidesk .wb-mt-20 { margin-top: 5rem; }
.pcc-willidesk .wb-mb-2 { margin-top: 0.5rem; }
.pcc-willidesk .wb-mb-4 { margin-bottom: 1rem; }
.pcc-willidesk .wb-mb-6 { margin-bottom: 1.5rem; }
.pcc-willidesk .wb-order-1 { order: 1; }
.pcc-willidesk .wb-order-2 { order: 2; }

@media (min-width: 768px) {
  .pcc-willidesk .wb-md-justify-end { justify-content: flex-end; }
  .pcc-willidesk .wb-md-order-1 { order: 1; }
  .pcc-willidesk .wb-md-order-2 { order: 2; }
  .pcc-willidesk .wb-md-w-auto { width: auto; }
  .pcc-willidesk .wb-md-ml-auto { margin-left: auto; }
  .pcc-willidesk .wb-md-text-left { text-align: left; }
  .pcc-willidesk .wb-md-mt-0 { margin-top: 0; }
}

@keyframes wb-spin { to { transform: rotate(360deg); } }
.pcc-willidesk .wb-animate-spin { animation: wb-spin 1s linear infinite; }

/* ========== Global minimum font-size 1.5rem ========== */
/* Catch-all: ensure no text element renders below 1.5rem (24px) */
body {
  font-size: 1.5rem;
}
.footer-custom-style *,
.pcc-willidesk .willibot-header-status,
.pcc-willidesk .ereignisse-header-title,
.pcc-willidesk .willibot-header-title,
.pcc-willidesk .ereignisse-footer-link,
.pcc-willidesk .ereignisse-empty,
.pcc-willidesk .chat-time,
.pcc-willidesk .ereignis-tage,
.pcc-willidesk .ereignis-name,
.pcc-willidesk .ereignis-date {
  font-size: 1.5rem !important;
}
