/* Kundenportal V2 — Branch feature/kundenportal-v2 */
html.kunde-portal-active #app-nav { display: none !important; }
html.kunde-portal-active #app-panel {
  height: calc(var(--app-vh, 100vh));
  max-height: calc(var(--app-vh, 100vh));
}

.kp-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg);
}
.kp-topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.kp-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.kp-brand-logo {
  display: block;
  flex-shrink: 0;
  width: 150px;
  height: 20px;
  background-color: var(--accent);
  mask-image: url(/app/sectorcert_typo.png);
  -webkit-mask-image: url(/app/sectorcert_typo.png);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-position: left center;
  -webkit-mask-position: left center;
}
.kp-menubar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.kp-menubar-item {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text2);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.kp-menubar-item:hover {
  background: var(--surface2);
  color: var(--text);
}
.kp-menubar-item.is-active {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.kp-main {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 28px 32px;
  box-sizing: border-box;
}
.kp-page {
  max-width: 720px;
  margin: 0 auto;
}
.kp-page--profil,
.kp-page--wide { max-width: var(--portal-shell-width, 90vw); }
.kp-page-title {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.kp-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.kp-page-head .kp-page-title { margin: 0; }
.kp-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.kp-hero-actions { margin-bottom: 24px; }
.kp-section { margin-bottom: 28px; }
.kp-section--muted .kp-lead {
  margin: 0;
  color: var(--text2);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.kp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.kp-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.kp-task-list,
.kp-antrag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kp-task-card,
.kp-antrag-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.kp-task-card:hover,
.kp-antrag-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.kp-antrag-card--aktion,
.kp-antrag-card--entwurf,
.kp-task-card {
  border-color: color-mix(in srgb, #ca8a04 45%, var(--border));
  background: color-mix(in srgb, #ca8a04 6%, var(--surface));
}
.kp-task-card-title,
.kp-antrag-card-title {
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.35;
}
.kp-task-card-meta,
.kp-antrag-card-meta {
  font-size: var(--text-xs);
  color: var(--text3);
  margin-top: 4px;
}
.kp-task-card-action {
  display: block;
  margin-top: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
}
.kp-antrag-card-main { min-width: 0; flex: 1; }
.kp-antrag-card-aside {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.kp-chevron { color: var(--text3); }
.kp-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kp-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
}
.kp-mini-row:hover { background: var(--surface2); }
.kp-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text3);
  font-size: var(--text-sm);
}
.kp-zert-embed .mod-wrap,
.kp-zert-embed .mod-wrap--kunde { min-height: 0; }
.kp-zert-embed .app-tabs { display: none; }
.kp-profil-embed .per-wrap > .app-tabs { display: none; }
.kp-profil-embed .per-wrap--kunde .per-body { display: block; }
.kp-profil-embed .per-sidebar { display: none; }
.kp-profil-embed .per-main { padding: 0; }

@media (max-width: 720px) {
  .kp-topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 12px;
  }
  .kp-brand {
    align-self: flex-start;
  }
  .kp-menubar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .kp-main { padding: 16px; }
}
