:root {
  --bg: #f1f5f2;
  --surface: #ffffff;
  --surface-2: #f7faf7;
  --ink: #101a14;
  --muted: #647064;
  --line: #dbe5dc;
  --nav: #050806;
  --accent: #008f45;
  --accent-dark: #006e35;
  --electric: #f1e900;
  --blue: #285dd9;
  --amber: #b7791f;
  --red: #c4452d;
  --green-soft: #def7e8;
  --blue-soft: #e7efff;
  --amber-soft: #fffad1;
  --red-soft: #ffe8e2;
  --shadow: 0 16px 42px rgba(0, 20, 10, 0.1);
  --shadow-strong: 0 28px 80px rgba(0, 24, 12, 0.16);
  --shadow-soft: 0 10px 24px rgba(0, 20, 10, 0.075);
  --ring: 0 0 0 4px rgba(0, 143, 69, 0.12);
}

/* Kunden-Papierkorb: nachvollziehbares Soft-Delete für Kundenakten. */
.recycle-bin-panel {
  display: grid;
  gap: 20px;
}

.recycle-bin-head,
.recycle-bin-head-actions,
.recycle-bin-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.recycle-bin-head-actions {
  flex: 0 0 auto;
}

.recycle-bin-notice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recycle-bin-notice > div,
.recycle-bin-danger-zone {
  border: 1px solid rgba(15, 138, 78, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(255, 253, 231, 0.76));
  padding: 16px 18px;
}

.recycle-bin-notice strong,
.recycle-bin-notice span,
.recycle-bin-danger-zone strong,
.recycle-bin-danger-zone span {
  display: block;
}

.recycle-bin-notice span,
.recycle-bin-danger-zone span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.recycle-bin-list {
  display: grid;
  gap: 12px;
}

.recycle-bin-card {
  display: grid;
  grid-template-columns: minmax(250px, 1.25fr) minmax(270px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(13, 107, 66, 0.18);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(7, 42, 27, 0.06);
}

.recycle-bin-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.recycle-bin-card-main > div,
.recycle-bin-card-main strong,
.recycle-bin-card-main span,
.recycle-bin-card-main small,
.recycle-bin-meta span {
  display: block;
}

.recycle-bin-card-main span,
.recycle-bin-card-main small,
.recycle-bin-meta {
  color: var(--muted);
}

.recycle-bin-card-main span,
.recycle-bin-card-main small {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.recycle-bin-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #087443, #10a55f);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(8, 116, 67, 0.2);
}

.recycle-bin-meta {
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
}

.recycle-bin-meta b {
  color: var(--text);
}

.recycle-bin-actions {
  display: flex;
  justify-content: flex-end;
}

.recycle-bin-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  gap: 6px;
  border: 1px dashed rgba(13, 107, 66, 0.25);
  border-radius: 18px;
  background: rgba(244, 250, 247, 0.75);
  color: var(--muted);
  text-align: center;
  padding: 30px;
}

.recycle-bin-empty strong {
  color: var(--text);
  font-size: 1.05rem;
}

.recycle-bin-danger-zone {
  border-color: rgba(201, 68, 54, 0.2);
  background: rgba(255, 247, 245, 0.92);
}

#emptyCustomerRecycleBinButton {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .recycle-bin-notice,
  .recycle-bin-card {
    grid-template-columns: 1fr;
  }

  .recycle-bin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .recycle-bin-head,
  .recycle-bin-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .recycle-bin-head-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.outbox-review-panel {
  display: grid;
  gap: 18px;
}

.outbox-review-summary {
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.09), rgba(250, 204, 21, 0.08));
  color: var(--text);
  font-weight: 700;
  padding: 14px 16px;
}

.outbox-log-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.outbox-log-filter {
  border: 1px solid rgba(2, 111, 63, 0.18);
  cursor: pointer;
}

.outbox-log-filter.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(2, 111, 63, 0.18);
}

.status-pill.neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #334155;
}

.status-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.smtp-session-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(40, 93, 217, 0.2);
  border-radius: 14px;
  background: var(--blue-soft);
  padding: 14px 16px;
}

.smtp-session-form p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.smtp-session-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.smtp-session-form input {
  width: 100%;
}

.smtp-session-form .account-form-status {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 980px) {
  .smtp-session-form {
    grid-template-columns: 1fr;
  }
}

.outbox-review-table-wrap {
  overflow-x: auto;
}

.outbox-review-table-wrap table {
  min-width: 1080px;
}

.outbox-review-subject {
  max-width: 360px;
  white-space: normal;
}

.outbox-cancel-button {
  white-space: nowrap;
}

.outbox-send-button {
  white-space: nowrap;
}

.outbox-review-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.outbox-detail-card {
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
}

.outbox-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.outbox-detail-grid > div,
.outbox-detail-content,
.outbox-detail-attachments {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 12px;
}

.outbox-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.outbox-detail-grid strong {
  overflow-wrap: anywhere;
}

.outbox-detail-content h3,
.outbox-detail-attachments h3 {
  margin: 0 0 10px;
}

.outbox-detail-content pre {
  margin: 0;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.outbox-detail-attachments ul {
  margin: 0;
  padding-inline-start: 20px;
}

.outbox-detail-card menu {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

@media (max-width: 640px) {
  .outbox-detail-grid {
    grid-template-columns: 1fr;
  }
}

.help-ai-panel {
  max-width: 980px;
  padding: 20px;
}

.help-ai-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.help-ai-status {
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--accent-dark);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 900;
}

.help-ai-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.help-ai-chat {
  min-height: 300px;
  max-height: 430px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 143, 69, 0.04), rgba(255, 255, 255, 0.86)),
    #f8fbf8;
  display: grid;
  align-content: start;
  gap: 12px;
}

.help-ai-message {
  max-width: min(720px, 86%);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.help-ai-message.user {
  justify-self: end;
  background: var(--blue-soft);
  border-color: #cfe0ff;
}

.help-ai-message.ai {
  justify-self: start;
  border-color: rgba(0, 143, 69, 0.2);
  background: #eefbf3;
}

.help-ai-message strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
}

.help-ai-message p {
  margin: 0;
  line-height: 1.58;
  color: var(--ink);
}

.help-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: end;
}

.help-ai-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.help-ai-form textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}

.help-ai-form textarea:focus {
  outline: none;
  border-color: rgba(0, 143, 69, 0.45);
  box-shadow: var(--ring);
}

.help-ai-form .primary-button {
  min-height: 48px;
}

.help-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-ai-suggestions button {
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--accent-dark);
  background: #fff;
  font-weight: 800;
}

.help-ai-suggestions button:hover {
  background: var(--green-soft);
  border-color: rgba(0, 143, 69, 0.3);
}

.help-ai-playbook {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.help-ai-playbook button {
  min-height: 92px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  text-align: start;
  background: linear-gradient(135deg, #ffffff, #f3fbf6);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(17, 52, 35, 0.055);
}

.help-ai-playbook button:hover {
  border-color: rgba(0, 143, 69, 0.34);
  transform: translateY(-1px);
}

.help-ai-playbook span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent-dark);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 900;
}

.help-ai-playbook strong,
.help-ai-playbook small {
  display: block;
}

.help-ai-playbook strong {
  font-size: 13px;
  font-weight: 900;
}

.help-ai-playbook small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.optional-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

body.locked {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(560px, 1.08fr) minmax(500px, 0.92fr);
  background:
    radial-gradient(circle at 70% 18%, rgba(241, 233, 0, 0.11), transparent 25%),
    radial-gradient(circle at 91% 68%, rgba(0, 143, 69, 0.34), transparent 33%),
    radial-gradient(circle at 20% 100%, rgba(0, 143, 69, 0.16), transparent 34%),
    linear-gradient(112deg, rgba(2, 7, 5, 0.99) 0%, rgba(4, 17, 10, 0.98) 48%, rgba(5, 42, 23, 0.96) 100%),
    url("./assets/brand/amv-netz-pattern.webp?v=20260806-initial-render-02") center / cover,
    #050806;
  overflow: auto;
  isolation: isolate;
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-screen::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(241, 233, 0, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 143, 69, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.62;
}

.login-screen::after {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 45%, rgba(5, 8, 6, 0.32)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.3));
}

.login-screen.hidden {
  display: none;
}

.login-art {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: clamp(34px, 4.4vw, 64px);
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent);
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: clamp(18px, 2.3vh, 28px);
  overflow: hidden;
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 15%, rgba(241, 233, 0, 0.08), transparent 28%),
    linear-gradient(130deg, rgba(241, 233, 0, 0.07), transparent 34%),
    linear-gradient(315deg, rgba(0, 143, 69, 0.18), transparent 42%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.login-art > * {
  position: relative;
  z-index: 1;
}

.network-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

.login-art > .network-canvas {
  position: absolute;
  z-index: 0;
}

.login-brand,
.side-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-cover-area {
  width: min(830px, 100%);
  display: block;
}

.login-brand {
  position: relative;
  width: min(830px, 100%);
  aspect-ratio: 16 / 8.6;
  padding: 0;
  border: 1px solid rgba(241, 233, 0, 0.3);
  border-radius: 8px;
  background: rgba(5, 8, 6, 0.62);
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(0, 143, 69, 0.2);
  margin-bottom: 0;
}

.login-brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 34%;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #2d55ff 12%, var(--electric) 48%, var(--accent) 78%, transparent);
  filter: drop-shadow(0 0 5px rgba(45, 85, 255, 0.55));
  offset-path: inset(0 round 8px);
  offset-anchor: left center;
  animation: amvOuterFrameLinePath 5.2s linear infinite;
}

.login-brand::after {
  content: none;
}

.login-brand-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  filter: saturate(1.08) contrast(1.06) brightness(1.02);
  transform: none;
  animation: none;
  will-change: auto;
}

@keyframes amvImageLightSweep {
  0%,
  32% {
    background-position: -160% 0, 0 0, 0 0;
  }

  68%,
  100% {
    background-position: 160% 0, 0 0, 0 0;
  }
}

@keyframes amvImageGlobeDrift {
  0%,
  100% {
    object-position: center 50%;
    transform: scale(1.012) translate3d(0, 0, 0);
    filter: saturate(1.08) contrast(1.06) brightness(1.02);
  }

  50% {
    object-position: 54% 50%;
    transform: scale(1.032) translate3d(-1.1%, 0.35%, 0);
    filter: saturate(1.12) contrast(1.08) brightness(1.035);
  }
}

.login-brand strong,
.side-brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
}

.login-brand span,
.side-brand span {
  color: #d7e7d9;
  font-size: 13px;
  line-height: 1.3;
}

.login-feature-cards {
  width: min(830px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(34px, 4.4vh, 56px);
  clear: both;
}

.login-feature-cards article {
  position: relative;
  min-height: 116px;
  border: 1px solid rgba(241, 233, 0, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(2, 15, 8, 0.56);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.login-feature-cards article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 38%;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #2d55ff 12%, var(--electric) 48%, var(--accent) 78%, transparent);
  filter: drop-shadow(0 0 4px rgba(45, 85, 255, 0.48));
  offset-path: inset(0 round 8px);
  offset-anchor: left center;
  animation: amvOuterFrameLinePath 4.8s linear infinite;
}

.login-feature-cards article:nth-child(2)::before {
  animation-delay: -1.35s;
}

.login-feature-cards article:nth-child(3)::before {
  animation-delay: -2.7s;
}

.login-feature-cards article > * {
  position: relative;
  z-index: 2;
}

.login-feature-cards strong {
  display: block;
  margin-bottom: 8px;
  color: #f7fff8;
  font-size: 12px;
  line-height: 1.25;
  text-transform: uppercase;
}

.login-feature-cards p {
  margin: 0;
  color: #cbded0;
  font-size: 12px;
  line-height: 1.5;
}

.login-feature-icon {
  position: relative;
  width: 50px;
  height: 50px;
  color: var(--electric);
  display: grid;
  place-items: center;
  justify-self: center;
}

.login-feature-icon::before,
.login-feature-icon::after {
  content: "";
  position: absolute;
}

.login-feature-icon[data-icon="team"]::before {
  width: 40px;
  height: 24px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 28px 28px;
  bottom: 7px;
}

.login-feature-icon[data-icon="team"]::after {
  width: 34px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 5px, transparent 6px),
    radial-gradient(circle at 5px 50%, currentColor 0 4px, transparent 5px),
    radial-gradient(circle at 29px 50%, currentColor 0 4px, transparent 5px);
  top: 8px;
}

.login-feature-icon[data-icon="document"]::before {
  width: 30px;
  height: 38px;
  border: 3px solid currentColor;
  border-radius: 4px;
  transform: translateX(2px);
}

.login-feature-icon[data-icon="document"]::after {
  width: 18px;
  height: 14px;
  border-top: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  box-shadow: 0 8px 0 -5px currentColor;
  left: 18px;
  top: 18px;
}

.login-feature-icon[data-icon="shield"]::before {
  width: 34px;
  height: 40px;
  border: 3px solid currentColor;
  border-radius: 18px 18px 8px 8px;
  clip-path: polygon(50% 0, 95% 16%, 82% 78%, 50% 100%, 18% 78%, 5% 16%);
}

.login-feature-icon[data-icon="shield"]::after {
  width: 15px;
  height: 8px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}

.side-brand {
  min-height: 82px;
  padding: 10px;
  border: 1px solid rgba(241, 233, 0, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(0, 143, 69, 0.08)),
    rgba(5, 14, 8, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 28px rgba(0, 0, 0, 0.2);
}

.side-brand .brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  padding: 4px;
}

.side-brand div {
  min-width: 0;
}

.side-brand strong {
  font-size: 17px;
  line-height: 1.08;
  letter-spacing: 0;
  color: #fff;
}

.side-brand span {
  display: block;
  margin-top: 5px;
  color: rgba(238, 243, 251, 0.78);
  font-size: 12px;
  font-weight: 600;
}

.backend-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -6px 8px 18px;
  padding: 10px 12px;
  border: 1px solid rgba(241, 233, 0, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.9);
}

.backend-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--electric);
  box-shadow: 0 0 0 4px rgba(241, 233, 0, 0.12);
}

.backend-status strong,
.backend-status small {
  display: block;
}

.backend-status strong {
  font-size: 13px;
}

.backend-status small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.3;
}

.backend-status.is-online {
  border-color: rgba(0, 220, 120, 0.34);
  background: rgba(0, 143, 69, 0.15);
}

.backend-status.is-online .backend-status-dot {
  background: #17d86f;
  box-shadow: 0 0 0 4px rgba(23, 216, 111, 0.14);
}

.backend-status.is-local {
  border-color: rgba(241, 233, 0, 0.24);
}

.brand-logo {
  width: clamp(76px, 5.5vw, 96px);
  height: clamp(76px, 5.5vw, 96px);
  border-radius: 8px;
  object-fit: contain;
  background: #07100a;
  box-shadow: 0 0 0 1px rgba(241, 233, 0, 0.22), 0 12px 32px rgba(0, 0, 0, 0.24);
}

.login-brand .brand-logo {
  width: clamp(72px, 5.2vw, 92px);
  height: clamp(72px, 5.2vw, 92px);
  flex: 0 0 clamp(72px, 5.2vw, 92px);
}

.login-hero-copy {
  align-self: start;
  max-width: 690px;
  display: grid;
  gap: 14px;
  margin-top: clamp(2px, 0.6vh, 8px);
}

.login-hero-copy > span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(241, 233, 0, 0.34);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--electric);
  background: rgba(0, 143, 69, 0.14);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.login-hero-copy h2 {
  margin: 0;
  max-width: 660px;
  font-size: clamp(40px, 4.2vw, 58px);
  line-height: 1.05;
}

.login-hero-copy p {
  margin: 0;
  max-width: 640px;
  color: #dbeede;
  font-size: 18px;
  line-height: 1.72;
}

.login-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 14px;
}

.login-trust-row span {
  min-height: 34px;
  color: #dbeede;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-trust-row i {
  position: relative;
  width: 32px;
  height: 32px;
  color: var(--electric);
  flex: 0 0 32px;
}

.login-trust-row i::before,
.login-trust-row i::after {
  content: "";
  position: absolute;
}

.login-trust-row i[data-icon="lock"]::before {
  left: 7px;
  top: 14px;
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.login-trust-row i[data-icon="lock"]::after {
  left: 10px;
  top: 4px;
  width: 12px;
  height: 15px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.login-trust-row i[data-icon="shield"]::before {
  inset: 3px 5px;
  border: 2px solid currentColor;
  border-radius: 14px 14px 6px 6px;
  clip-path: polygon(50% 0, 96% 16%, 82% 78%, 50% 100%, 18% 78%, 4% 16%);
}

.login-trust-row i[data-icon="shield"]::after {
  left: 11px;
  top: 14px;
  width: 10px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.login-trust-row i[data-icon="bolt"]::before {
  left: 10px;
  top: 2px;
  width: 13px;
  height: 28px;
  background: currentColor;
  clip-path: polygon(60% 0, 18% 48%, 52% 48%, 35% 100%, 88% 38%, 55% 38%);
}

.login-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin-top: 2px;
}

.login-proof b {
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  display: grid;
  align-content: space-between;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.login-proof strong {
  color: var(--electric);
  font-size: 21px;
  line-height: 1;
}

.login-proof span {
  color: #dbeede;
  font-size: 12px;
  line-height: 1.35;
}

.mock-window {
  align-self: end;
  width: min(640px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.login-about-card {
  align-self: end;
  width: min(700px, 100%);
  border: 1px solid rgba(241, 233, 0, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(5, 14, 8, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 16px;
}

.login-about-card .kicker {
  color: var(--electric);
}

.login-about-card h3 {
  margin: 0;
  max-width: 620px;
  color: #fff;
  font-size: clamp(26px, 3.5vw, 40px);
  line-height: 1.08;
}

.login-about-card p {
  max-width: 660px;
  color: rgba(238, 247, 239, 0.82);
  font-size: 16px;
  line-height: 1.65;
}

.login-about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-about-grid b {
  min-height: 86px;
  border: 1px solid rgba(241, 233, 0, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
}

.login-about-grid span {
  color: rgba(238, 247, 239, 0.68);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
}

.login-about-grid strong {
  color: var(--electric);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.1;
}

.login-about-card ul {
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.login-about-card li {
  position: relative;
  padding-left: 22px;
  color: rgba(238, 247, 239, 0.82);
  line-height: 1.45;
}

.login-about-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 143, 69, 0.16);
}

.mock-titlebar {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.1);
}

.mock-titlebar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.mock-body {
  display: grid;
  grid-template-columns: 122px 1fr;
  min-height: 214px;
}

.mock-sidebar {
  position: relative;
  background: rgba(0, 0, 0, 0.26);
}

.mock-sidebar::before,
.mock-sidebar::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  height: 9px;
  border-radius: 99px;
  background: rgba(241, 233, 0, 0.36);
}

.mock-sidebar::before {
  top: 28px;
}

.mock-sidebar::after {
  top: 54px;
  width: 52px;
  background: rgba(0, 143, 69, 0.7);
}

.mock-content {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.mock-content i,
.mock-content em,
.mock-cards b {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.mock-content i {
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-style: normal;
  color: #dbeede;
}

.mock-content i strong {
  color: var(--electric);
}

.mock-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mock-cards b {
  min-height: 58px;
  padding: 10px;
  display: grid;
  align-content: space-between;
  color: #fff;
  font-weight: 800;
}

.mock-cards b span {
  color: #dbeede;
  font-size: 12px;
  font-weight: 700;
}

.mock-cards b strong {
  color: var(--electric);
  font-size: 24px;
}

.mock-content em {
  min-height: 30px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eef7ef;
  font-style: normal;
  font-size: 13px;
}

.mock-content em span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 0 4px rgba(241, 233, 0, 0.1);
}

.login-panel {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: clamp(32px, 5vw, 72px);
  background:
    radial-gradient(circle at 30% 20%, rgba(241, 233, 0, 0.1), transparent 24%),
    linear-gradient(270deg, rgba(0, 143, 69, 0.16), rgba(5, 8, 6, 0.08) 58%, transparent);
  display: grid;
  place-items: center;
  gap: 18px;
  box-shadow: inset 1px 0 0 rgba(241, 233, 0, 0.08);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(241, 233, 0, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 143, 69, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.45;
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  padding: clamp(30px, 3.5vw, 44px);
  border: 1px solid rgba(241, 233, 0, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(10, 22, 14, 0.94), rgba(5, 12, 8, 0.84)),
    rgba(5, 8, 6, 0.88);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(0, 143, 69, 0.16);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(241, 233, 0, 0.1), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(0, 143, 69, 0.18), transparent 34%);
  pointer-events: none;
}

.login-card > * {
  position: relative;
  z-index: 3;
}

@keyframes amvLoginCardPerimeterFlow {
  0% {
    background-position:
      0 0,
      48px 100%,
      0 48px,
      100% 0;
  }

  100% {
    background-position:
      48px 0,
      0 100%,
      0 0,
      100% 48px;
  }
}

@keyframes amvOuterFrameLinePath {
  0% {
    offset-distance: 0%;
  }

  100% {
    offset-distance: 100%;
  }
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 34%;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #2d55ff 12%, var(--electric) 48%, var(--accent) 78%, transparent);
  filter: drop-shadow(0 0 5px rgba(45, 85, 255, 0.55));
  offset-path: inset(0 round 8px);
  offset-anchor: left center;
  animation: amvOuterFrameLinePath 4.2s linear infinite;
}

.login-card-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(241, 233, 0, 0.14);
}

.login-card-brand .brand-logo {
  width: clamp(70px, 5vw, 86px);
  height: clamp(70px, 5vw, 86px);
  background: #07100a;
  box-shadow: 0 0 0 1px rgba(241, 233, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.22);
}

.login-card-brand strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

.forgot-password-link {
  justify-self: flex-start;
  margin-top: -8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--electric);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.forgot-password-link:hover,
.forgot-password-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.forgot-password-card {
  width: min(460px, calc(100vw - 28px));
}

.forgot-password-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.forgot-password-card input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
}

.login-panel h1 {
  margin: 6px 0 -2px;
  color: #fff;
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.08;
}

.login-panel p,
.login-panel small {
  margin: 0;
  color: #c8d9cb;
  line-height: 1.6;
}

.login-panel p {
  max-width: 430px;
  font-size: 15px;
}

.login-panel small {
  padding-top: 4px;
  font-size: 12px;
}

.login-panel label,
#ticketForm label,
#customerForm label,
#brokerForm label,
#teamForm label,
#legalCompanyForm label,
#healthFundForm label,
.application-tools label,
.billing-form label,
.compare-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.login-panel label {
  color: #eef7ef;
  font-weight: 800;
}

.login-panel input,
#ticketForm input,
#ticketForm select,
#customerForm input,
#customerForm select,
#customerForm textarea,
#brokerForm input,
#brokerForm select,
#teamForm input,
#teamForm select,
#legalCompanyForm input,
#healthFundForm input,
#healthFundForm select,
.application-tools input,
.billing-form input,
.billing-form select,
.billing-form textarea,
.compare-form input,
.compare-form select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline-color: var(--accent);
}

.login-panel input {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(219, 229, 220, 0.26);
  min-height: 50px;
  padding: 0 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.login-panel input::placeholder {
  color: rgba(238, 247, 239, 0.58);
}

.login-panel input:focus {
  border-color: rgba(241, 233, 0, 0.74);
  box-shadow: 0 0 0 4px rgba(241, 233, 0, 0.12);
}

.login-panel .primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 0;
  font-size: 15px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-panel .primary-button:hover {
  box-shadow: 0 12px 28px rgba(241, 233, 0, 0.28);
  transform: translateY(-1px);
}

#customerForm textarea {
  min-height: 88px;
  padding: 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.billing-form textarea {
  min-height: 190px;
  padding: 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.login-error {
  min-height: 18px;
  color: var(--red) !important;
  font-size: 13px;
}

.login-external-link {
  min-height: 42px;
  border: 1px solid rgba(241, 233, 0, 0.38);
  border-radius: 8px;
  color: var(--electric);
  background: rgba(241, 233, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
}

.login-register-link {
  min-height: 44px;
  border: 1px solid rgba(0, 143, 69, 0.44);
  border-radius: 8px;
  color: #eef7ef;
  background: rgba(0, 143, 69, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.login-register-link:hover {
  background: rgba(0, 143, 69, 0.25);
  border-color: rgba(0, 143, 69, 0.68);
  transform: translateY(-1px);
}

.login-external-link:hover {
  background: rgba(241, 233, 0, 0.12);
  border-color: rgba(241, 233, 0, 0.62);
}

.login-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.login-support span {
  color: var(--electric);
  font-size: 12px;
  font-weight: 800;
}

.login-support small {
  color: rgba(238, 247, 239, 0.66);
  text-align: right;
}

.kicker {
  color: var(--electric);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .kicker,
.panel .kicker,
.admin-page-head .kicker,
.legal-card .kicker {
  color: var(--accent-dark);
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

body.locked .portal-shell {
  display: none;
}

.side {
  position: relative;
  overflow: hidden;
  width: 272px;
  color: #eef3fb;
  background:
    linear-gradient(180deg, rgba(5, 8, 6, 0.94), rgba(5, 8, 6, 0.98)),
    url("./assets/brand/amv-netz-pattern.webp?v=20260806-initial-render-02") center top / cover,
    var(--nav);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 18px 0 38px rgba(0, 20, 10, 0.12);
  transition: width 0.2s ease, padding 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.side > :not(.network-canvas) {
  position: relative;
  z-index: 1;
}

.side > .network-canvas {
  position: absolute;
  z-index: 0;
  opacity: 0.76;
}

.side-nav {
  display: grid;
  gap: 7px;
}

.nav-section {
  margin: 16px 0 6px;
  color: rgba(241, 233, 0, 0.86);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-link {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.nav-icon,
.module-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #9aa8bd;
  background: rgba(255, 255, 255, 0.06);
  flex: 0 0 34px;
  border: 1px solid rgba(241, 233, 0, 0.12);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-link .nav-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.nav-icon::before,
.nav-icon::after,
.module-icon::before,
.module-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.nav-icon[data-icon="overview"]::before,
.module-icon[data-icon="overview"]::before {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 10px 0 0 currentColor, 0 10px 0 currentColor, 10px 10px 0 currentColor;
}

.nav-icon[data-icon="customers"]::before,
.nav-icon[data-icon="team"]::before,
.module-icon[data-icon="customers"]::before,
.module-icon[data-icon="team"]::before {
  top: 7px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.nav-icon[data-icon="customers"]::after,
.nav-icon[data-icon="team"]::after,
.module-icon[data-icon="customers"]::after,
.module-icon[data-icon="team"]::after {
  bottom: 7px;
  width: 17px;
  height: 8px;
  border: 2px solid currentColor;
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  border-bottom: 0;
}

.nav-icon[data-icon="calculator"]::before,
.module-icon[data-icon="calculator"]::before {
  width: 16px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon[data-icon="calculator"]::after,
.module-icon[data-icon="calculator"]::after {
  width: 8px;
  height: 2px;
  top: 12px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.nav-icon[data-icon="orders"]::before,
.nav-icon[data-icon="invoices"]::before,
.nav-icon[data-icon="documents"]::before,
.module-icon[data-icon="orders"]::before,
.module-icon[data-icon="invoices"]::before,
.module-icon[data-icon="documents"]::before {
  width: 15px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon[data-icon="orders"]::after,
.nav-icon[data-icon="invoices"]::after,
.nav-icon[data-icon="documents"]::after,
.module-icon[data-icon="orders"]::after,
.module-icon[data-icon="invoices"]::after,
.module-icon[data-icon="documents"]::after {
  width: 8px;
  height: 2px;
  top: 13px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.nav-icon[data-icon="tickets"]::before,
.module-icon[data-icon="tickets"]::before {
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(-12deg);
}

.nav-icon[data-icon="partners"]::before,
.module-icon[data-icon="partners"]::before {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 11px -5px 0 currentColor, 11px 8px 0 currentColor;
}

.nav-icon[data-icon="partners"]::after,
.module-icon[data-icon="partners"]::after {
  width: 15px;
  height: 14px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: skewY(-22deg);
}

.nav-icon[data-icon="billing"]::before,
.module-icon[data-icon="billing"]::before {
  bottom: 8px;
  left: 9px;
  width: 4px;
  height: 7px;
  background: currentColor;
  box-shadow: 6px -4px 0 currentColor, 12px -9px 0 currentColor;
  border-radius: 2px 2px 0 0;
}

.nav-icon[data-icon="health"]::before,
.module-icon[data-icon="health"]::before {
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.nav-icon[data-icon="health"]::after,
.module-icon[data-icon="health"]::after {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: currentColor;
}

.nav-icon[data-icon="ai"]::before,
.module-icon[data-icon="ai"]::before {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.nav-icon[data-icon="ai"]::after,
.module-icon[data-icon="ai"]::after {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 6px 0 0 currentColor, 12px 0 0 currentColor, 3px 7px 0 currentColor, 9px 7px 0 currentColor;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 143, 69, 0.28), rgba(0, 143, 69, 0.12));
  border-color: rgba(241, 233, 0, 0.14);
  box-shadow: inset 4px 0 0 var(--electric);
}

.nav-link:hover {
  transform: translateX(2px);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(241, 233, 0, 0.25);
}

.account-box {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(241, 233, 0, 0.2);
  border-radius: 8px;
  background: rgba(0, 143, 69, 0.12);
  display: grid;
  gap: 8px;
}

.account-box span {
  color: #aab5c7;
  font-size: 13px;
}

.main {
  padding: clamp(20px, 3vw, 32px);
  overflow: hidden;
}

.topbar,
.top-actions,
.section-bar,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 5px;
  font-size: clamp(28px, 4vw, 40px);
}

h2 {
  font-size: 18px;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.search {
  width: min(360px, 40vw);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search:focus-within {
  border-color: rgba(0, 143, 69, 0.42);
  box-shadow: var(--ring), var(--shadow-soft);
  transform: translateY(-1px);
}

.search span {
  width: 16px;
  height: 16px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  position: relative;
  flex: 0 0 16px;
}

.search span::before,
.search span::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.search span::before {
  width: 11px;
  height: 11px;
  border: 2px solid var(--muted);
  border-radius: 999px;
  left: 0;
  top: 0;
}

.search span::after {
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  right: 0;
  bottom: 1px;
  transform: rotate(45deg);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.primary-button {
  color: #07100a;
  background: var(--electric);
  font-weight: 800;
  padding: 0 16px;
  box-shadow: 0 8px 22px rgba(241, 233, 0, 0.22);
}

.primary-button:hover {
  background: #fff45c;
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  padding: 0 14px;
  box-shadow: var(--shadow-soft);
}

.secondary-button:hover {
  border-color: rgba(0, 143, 69, 0.35);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.portal-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.portal-refresh-icon {
  display: inline-block;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.portal-refresh-button.is-system-loading .portal-refresh-icon {
  animation: system-action-spin 0.7s linear infinite;
}

.portal-refresh-button.is-system-loading::after {
  display: none;
}

.customer-load-failure {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #7a5300;
  text-align: center;
}

.customer-load-failure strong {
  color: #765000;
}

.customer-load-failure span {
  max-width: 680px;
}

.text-button {
  color: var(--accent);
  background: transparent;
  padding: 0;
}

.icon-button {
  width: 38px;
  background: #fff;
  border-color: var(--line);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

#overviewView {
  position: relative;
  isolation: isolate;
}

#overviewView::before {
  content: "";
  position: fixed;
  right: clamp(20px, 5vw, 72px);
  bottom: clamp(18px, 4vw, 62px);
  width: min(760px, 58vw);
  aspect-ratio: 16 / 8.2;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(241, 245, 242, 0.24), rgba(241, 245, 242, 0.72)),
    url("./assets/brand/amv-netz-identity-reference.jpg?v=20260806-initial-load-01") center / cover no-repeat;
  opacity: 0.22;
  filter: saturate(1.08);
  pointer-events: none;
  z-index: -1;
}

.hero-band {
  min-height: 230px;
  padding: 30px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5, 8, 6, 0.94), rgba(0, 96, 48, 0.84)),
    url("./assets/brand/amv-netz-pattern.webp?v=20260806-initial-render-02") center / cover,
    #050806;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 22px 52px rgba(0, 23, 11, 0.18);
  position: relative;
  overflow: hidden;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(241, 233, 0, 0.08), transparent 32%),
    radial-gradient(circle at 86% 24%, rgba(255, 255, 255, 0.12), transparent 18%);
}

.hero-band > * {
  position: relative;
  z-index: 1;
}

.hero-band h2 {
  margin: 8px 0;
  font-size: clamp(28px, 5vw, 48px);
  max-width: 780px;
}

.hero-band p {
  max-width: 650px;
  color: #dbeede;
}

.hero-status {
  min-width: 160px;
  padding: 18px;
  border: 1px solid rgba(241, 233, 0, 0.34);
  border-radius: 8px;
  background: rgba(0, 143, 69, 0.2);
}

.hero-status span {
  display: block;
  color: #fffad1;
}

.hero-status strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.overview-hero-actions {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  flex: 0 0 min(360px, 38%);
}

.overview-hero-actions .hero-status {
  min-width: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.overview-hero-actions .hero-status strong {
  margin: 0;
  font-size: 18px;
}

.overview-new-customer-button {
  width: 100%;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 10px;
  color: #062b18;
  background: linear-gradient(135deg, #ffffff 0%, #f2ffec 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.overview-new-customer-button:hover {
  transform: translateY(-2px);
  border-color: #f1e900;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
}

.overview-new-customer-button:focus-visible {
  outline: 3px solid #f1e900;
  outline-offset: 3px;
}

.overview-new-customer-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #00a653, #006f37);
  box-shadow: 0 8px 18px rgba(0, 126, 62, 0.28);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
}

.overview-new-customer-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.overview-new-customer-copy strong {
  font-size: 16px;
  line-height: 1.25;
}

.overview-new-customer-copy small {
  color: #5d7064;
  font-size: 12px;
}

.overview-new-customer-arrow {
  color: #008f45;
  font-size: 23px;
  font-weight: 800;
  transition: transform 160ms ease;
}

.overview-new-customer-button:hover .overview-new-customer-arrow {
  transform: translateX(3px);
}

.overview-compare-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 22px;
  margin-top: 16px;
  padding: 24px 26px;
  border: 1px solid rgba(0, 143, 69, 0.42);
  border-left: 4px solid var(--electric);
  border-radius: 8px;
  color: #effff4;
  background:
    linear-gradient(110deg, rgba(3, 26, 14, 0.98), rgba(0, 79, 42, 0.92)),
    url("./assets/brand/amv-netz-pattern.webp?v=20260806-initial-render-02") center / cover;
  box-shadow: 0 16px 36px rgba(0, 57, 28, 0.16);
}

.overview-compare-copy h2 {
  margin: 6px 0 8px;
  font-size: clamp(25px, 3vw, 38px);
}

.overview-compare-copy p {
  max-width: 610px;
  margin: 0;
  color: #d7ebdc;
}

.overview-compare-actions {
  display: grid;
  gap: 10px;
}

.overview-compare-launch .kasse-direct-search {
  width: 100%;
  max-width: none;
  margin: 0;
  background: rgba(255, 255, 255, 0.96);
}

.overview-compare-button {
  width: 100%;
  min-height: 46px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.overview-top-metrics {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin: -4px 0 18px;
}

.overview-top-metrics .metric {
  min-height: 112px;
}

.metric,
.panel,
.table-card,
.info-card,
.ticket-card,
.doc-card,
.payout-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric:hover,
.info-card:hover,
.ticket-card:hover,
.doc-card:hover,
.payout-card:hover {
  border-color: rgba(0, 143, 69, 0.22);
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.metric {
  min-height: 126px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.metric span,
.metric small,
.info-card small,
.ticket-card small,
.doc-card small {
  color: var(--muted);
}

.metric strong {
  font-size: 30px;
}

.portal-shortcuts {
  min-height: 54px;
  margin-top: 16px;
  border: 1px solid rgba(241, 233, 0, 0.18);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(5, 8, 6, 0.96), rgba(0, 55, 28, 0.92));
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
}

.portal-shortcut {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #eef7ef;
  background: transparent;
  padding: 0 16px;
  font-weight: 800;
  white-space: nowrap;
}

.portal-shortcut:hover,
.portal-shortcut.active {
  color: #07100a;
  background: var(--electric);
}

.kasse-direct-search {
  max-width: 820px;
  min-height: 56px;
  margin: 16px auto 0;
  padding: 6px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) 48px;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.kasse-direct-search span {
  padding: 0 18px;
  color: var(--accent-dark);
  font-weight: 900;
  white-space: nowrap;
}

.kasse-direct-search input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-left: 1px solid var(--line);
  outline: 0;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.kasse-direct-search .icon-button {
  color: var(--ink);
  background: var(--electric);
  border-color: transparent;
  font-weight: 900;
}

.vgk-benefit-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.vgk-benefit-strip article {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.vgk-benefit-strip strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.vp-office-hero {
  min-height: 180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 20px;
  padding: 28px;
  color: #eef7ef;
  background:
    linear-gradient(90deg, rgba(0, 26, 12, 0.94), rgba(0, 83, 40, 0.86)),
    url("./assets/brand/amv-netz-identity-reference-large.jpg?v=20260806-initial-load-01") center / cover;
  border-color: rgba(241, 233, 0, 0.18);
  overflow: hidden;
}

.vp-office-hero h2 {
  margin: 8px 0 10px;
  max-width: 760px;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.vp-office-hero p {
  max-width: 720px;
  color: rgba(238, 247, 239, 0.82);
  line-height: 1.7;
}

.vp-office-status {
  min-height: 110px;
  border: 1px solid rgba(241, 233, 0, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.vp-office-status span {
  color: var(--electric);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.vp-office-status strong {
  color: #fff;
  font-size: 24px;
}

.vp-office-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.vp-office-tile {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 10px 14px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.vp-office-tile:hover {
  border-color: rgba(0, 143, 69, 0.28);
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.vp-office-tile .module-icon {
  grid-row: 1 / span 2;
}

.vp-office-tile strong {
  font-size: 18px;
}

.vp-office-tile small {
  color: var(--muted);
  line-height: 1.5;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-grid .panel {
  padding: 22px;
}

.profile-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.profile-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: minmax(130px, 0.36fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.profile-list span {
  color: var(--muted);
}

.profile-list strong {
  color: var(--ink);
}

.personal-data-panel {
  padding: 0;
  overflow: hidden;
}

.own-team-agreement-card {
  margin: 18px 18px 0;
  border: 1px solid rgba(0, 143, 69, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, #f3fbf6, #ffffff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}

.own-team-agreement-card[hidden] {
  display: none;
}

.own-team-agreement-card h3,
.own-team-agreement-card p {
  margin: 4px 0 0;
}

.own-team-agreement-card p {
  color: var(--muted);
  font-size: 13px;
}

.profile-tabs {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}

.profile-tabs button {
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  padding: 0 22px;
  font-weight: 800;
  white-space: nowrap;
}

.profile-tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 -2px 0 #fff;
}

.personal-data-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding: 26px;
}

.personal-data-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.personal-data-form label {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: var(--accent-dark);
  font-weight: 900;
}

.personal-data-form input,
.personal-data-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(0, 143, 69, 0.42);
  border-radius: 3px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.split-fields,
.phone-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.compact-first {
  grid-template-columns: 112px minmax(0, 1fr);
}

.phone-fields {
  grid-template-columns: 112px minmax(0, 1fr) 40px;
}

.icon-action {
  min-height: 40px;
  border: 1px solid rgba(0, 143, 69, 0.28);
  border-radius: 3px;
  color: #fff;
  background: #8f9690;
  font-weight: 900;
}

.personal-data-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.personal-data-actions .primary-button {
  width: auto;
  min-width: 220px;
}

.profile-tab-panel[hidden] {
  display: none !important;
}

.profile-workspace-form,
.profile-documents-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.profile-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.profile-workspace-head h2,
.profile-workspace-head p {
  margin: 5px 0 0;
}

.profile-workspace-head p {
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
}

.profile-security-badge,
.profile-lock-note {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 143, 69, 0.24);
  border-radius: 999px;
  background: #eefaf3;
  color: var(--accent-dark);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.profile-lock-note {
  border-color: rgba(199, 144, 0, 0.3);
  background: #fff9dc;
  color: #765600;
}

.profile-form-grid,
.profile-settings-grid,
.profile-document-upload {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.profile-workspace-form label,
.profile-document-upload label {
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--accent-dark);
  font-weight: 900;
}

.profile-workspace-form input,
.profile-workspace-form select,
.profile-workspace-form textarea,
.profile-document-upload input,
.profile-document-upload select {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 143, 69, 0.34);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
}

.profile-workspace-form textarea {
  resize: vertical;
}

.profile-iban-input {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-wide-field {
  grid-column: 1 / -1;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 4px;
}

.profile-form-actions .primary-button,
.profile-document-upload .primary-button {
  width: auto;
  min-width: 220px;
}

.profile-toggle {
  display: flex !important;
  align-items: flex-start;
  gap: 12px !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 14px;
}

.profile-toggle input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.profile-toggle span {
  display: grid;
  gap: 4px;
}

.profile-toggle small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.profile-document-upload {
  align-items: end;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 14px;
  background: #f7fbf8;
  padding: 18px;
}

.profile-document-upload .account-form-status {
  align-self: center;
}

.profile-document-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.profile-document-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.profile-document-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #eaf8ef;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 950;
}

.profile-document-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-document-copy strong,
.profile-document-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-document-copy small {
  color: var(--muted);
}

.profile-document-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.profile-document-actions .mini-action {
  width: 100%;
  min-width: 0;
}

.profile-empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 780px) {
  .profile-workspace-form,
  .profile-documents-panel {
    padding: 18px;
  }

  .profile-workspace-head,
  .profile-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-form-grid,
  .profile-settings-grid,
  .profile-document-upload {
    grid-template-columns: 1fr;
  }

  .profile-wide-field {
    grid-column: 1;
  }

  .profile-form-actions .primary-button,
  .profile-document-upload .primary-button {
    width: 100%;
  }
}

.account-actions-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.account-top-menu {
  min-height: 54px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(5, 8, 6, 0.96), rgba(0, 55, 28, 0.92));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  overflow-x: auto;
}

.account-top-menu button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #eef7ef;
  background: transparent;
  padding: 0 16px;
  font-weight: 800;
  white-space: nowrap;
}

.account-top-menu button:hover,
.account-top-menu button.active {
  color: #07100a;
  background: var(--electric);
}

.account-settings-panel {
  padding: 24px;
}

.mandatory-password-notice {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #f0c36a;
  border-radius: 14px;
  background: #fff8e7;
  color: #6b4800;
}

.mandatory-password-notice[hidden] {
  display: none;
}

.mandatory-password-notice strong {
  font-size: 1rem;
}

.password-change-required .side-nav,
.password-change-required .topbar .top-actions {
  pointer-events: none;
  opacity: 0.35;
}

.invitation-delivery-status {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef8f1;
  color: #176b3a;
  font-weight: 700;
}

.account-settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 24px;
  margin-top: 18px;
}

.account-access-card,
.account-password-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.account-access-card label,
.account-password-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.account-access-card input,
.account-password-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.account-access-card input[readonly] {
  color: var(--muted);
  background: #f3f7f4;
}

.account-confirmed {
  margin: -4px 0 6px;
  color: var(--accent-dark);
  font-weight: 800;
}

.account-option-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.account-option-row strong,
.account-option-row span {
  display: block;
}

.account-option-row span,
.account-muted,
.account-reset-box p {
  color: var(--muted);
}

.account-hint {
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff7f5;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  color: var(--ink);
}

.account-hint span {
  color: var(--muted);
}

.password-rules {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px 16px;
}

.password-rules span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.password-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.6;
}

.password-rules li {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 5px 0;
  border-radius: 7px;
  padding: 5px 7px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.password-rules li b {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid #bdc9c1;
  border-radius: 50%;
  color: #7b8980;
  background: #fff;
  font-size: 13px;
}

.password-rules li.is-valid {
  color: #126b38;
  background: #eaf8ef;
  font-weight: 800;
  transform: translateX(2px);
}

.password-rules li.is-valid b {
  border-color: #1b9a50;
  color: #fff;
  background: #1b9a50;
}

.password-rules li.is-invalid {
  color: #8a2c20;
  background: #fff1ee;
}

.account-password-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 143, 69, 0.12);
  outline: none;
}

.account-save-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.verification-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 8px;
}

.account-save-button {
  min-height: 46px;
}

.account-form-status {
  min-height: 20px;
  margin: 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.trusted-devices-card {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.trusted-devices-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.trusted-devices-head h3,
.trusted-devices-head p {
  margin: 5px 0 0;
}

.trusted-devices-head p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.trusted-devices-head .secondary-button {
  flex: 0 0 auto;
}

.trusted-devices-note {
  margin: 0;
  border: 1px solid rgba(199, 144, 0, 0.28);
  border-radius: 10px;
  background: #fff9e3;
  color: #6d5200;
  padding: 13px 15px;
  line-height: 1.55;
}

.trusted-devices-status {
  min-height: 0;
}

.trusted-devices-list {
  display: grid;
  gap: 10px;
}

.trusted-devices-list[aria-busy="true"] {
  opacity: 0.72;
}

.trusted-devices-empty {
  border: 1px dashed rgba(0, 143, 69, 0.28);
  border-radius: 10px;
  background: #f7fbf8;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.trusted-device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 15px 16px;
}

.trusted-device-item-main {
  min-width: 0;
  flex: 1 1 auto;
}

.trusted-device-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink);
}

.trusted-device-current {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(0, 143, 69, 0.25);
  border-radius: 999px;
  background: #eaf8ef;
  color: var(--accent-dark);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
}

.trusted-device-platform {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.trusted-device-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px 18px;
  margin: 12px 0 0;
}

.trusted-device-metadata div {
  min-width: 0;
}

.trusted-device-metadata dt,
.trusted-device-metadata dd {
  margin: 0;
}

.trusted-device-metadata dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.trusted-device-metadata dd {
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.trusted-device-remove {
  flex: 0 0 auto;
  color: #8a2c20;
}

.trusted-devices-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.trusted-devices-revoke-all {
  color: #8a2c20;
}

.trusted-devices-card button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.account-reset-box {
  margin-top: 18px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 8px;
  background: #f1f8fb;
  padding: 20px 24px;
}

.account-reset-box h3 {
  margin: 0 0 8px;
  color: var(--accent-dark);
}

/* Inline SVG icon styling and accessibility improvements */
.icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
  stroke: none;
}

.nav-icon.has-svg::before,
.nav-icon.has-svg::after,
.module-icon.has-svg::before,
.module-icon.has-svg::after {
  display: none;
}

.nav-icon .icon,
.module-icon .icon {
  width: 18px;
  height: 18px;
}

/* visible focus outlines for keyboard users */
:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(0, 143, 69, 0.18);
  outline-offset: 3px;
  border-radius: 8px;
}

.vgk-benefit-strip p {
  grid-column: 2;
  margin: -18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.portal-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.overview-flow-grid {
  margin-top: 18px;
}

.portal-feature-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px;
}

.portal-feature-card strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 16px;
}

.portal-feature-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.service-suite-panel {
  margin-top: 16px;
}

.planning-archive,
.overview-more-actions {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.planning-archive > summary,
.overview-more-actions > summary {
  min-height: 58px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 900;
}

.planning-archive > summary::-webkit-details-marker,
.overview-more-actions > summary::-webkit-details-marker {
  display: none;
}

.planning-archive > summary::after,
.overview-more-actions > summary::after {
  content: "+";
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--electric);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.planning-archive[open] > summary::after,
.overview-more-actions[open] > summary::after {
  content: "-";
}

.planning-archive small,
.overview-more-actions small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.planning-archive-body {
  padding: 0 16px 16px;
}

.overview-more-actions .makler-info-grid {
  margin: 0;
  padding: 0 16px 16px;
}

.compact-reason-grid {
  margin-top: 16px;
  padding-top: 2px;
}

.service-suite-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.service-suite-grid article {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px;
}

.service-suite-grid strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.service-suite-grid p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.system-functions-panel {
  margin-top: 16px;
}

.system-functions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.system-functions-grid article {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  background: linear-gradient(180deg, #fff, var(--surface-2));
}

.system-functions-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.system-functions-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.page-map-panel {
  margin-top: 16px;
}

.page-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.page-map-grid article {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  background: linear-gradient(180deg, #fff, var(--surface-2));
}

.page-map-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.page-map-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.page-map-grid b {
  color: var(--ink);
}

.user-roles-panel {
  margin-top: 16px;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.roles-grid article {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  background: linear-gradient(180deg, #fff, var(--surface-2));
}

.roles-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.roles-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.user-flow-panel {
  margin-top: 16px;
}

.user-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.user-flow-steps article {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
  position: relative;
}

.user-flow-steps article > span {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: #07100a;
  background: var(--electric);
  font-weight: 900;
}

.user-flow-steps strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.user-flow-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.build-plan-panel,
.requirements-panel {
  margin-top: 16px;
}

.build-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.build-plan-grid article {
  min-height: 164px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
}

.build-step {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #07100a;
  background: var(--electric);
  font-weight: 900;
}

.build-plan-grid strong,
.requirements-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.build-plan-grid p,
.requirements-grid span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.build-plan-grid small {
  display: block;
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1.45;
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.requirements-grid article {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
}

.strategy-dashboard {
  margin-top: 16px;
  border-color: rgba(0, 143, 69, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 248, 244, 0.96)),
    url("./assets/brand/amv-netz-pattern.webp?v=20260806-initial-render-02") center / cover;
}

.strategy-badge {
  align-self: flex-start;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--accent-dark);
  background: #ecf9f1;
  font-weight: 900;
  font-size: 12px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.strategy-grid article {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 40px rgba(11, 31, 18, 0.06);
}

.strategy-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
}

.strategy-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.strategy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.strategy-tags span {
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--accent-dark);
  background: #f1fbf4;
  font-size: 11px;
  font-weight: 800;
}

.strategy-roadmap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  overflow-x: auto;
}

.strategy-roadmap span {
  white-space: nowrap;
  color: var(--ink);
  font-weight: 900;
  font-size: 13px;
}

.strategy-roadmap i {
  width: 32px;
  height: 2px;
  flex: 0 0 32px;
  background: linear-gradient(90deg, var(--accent), var(--electric));
}

.system-functions-panel,
.page-map-panel,
.user-roles-panel,
.user-flow-panel,
.build-plan-panel,
.requirements-panel {
  display: none;
}

.makler-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.makler-info-panel {
  display: grid;
  gap: 14px;
}

.makler-action-list {
  display: grid;
  gap: 10px;
}

.makler-action-list article {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.makler-action-list strong {
  display: block;
  color: var(--ink);
}

.makler-action-list p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
  margin-top: 16px;
}

.panel {
  padding: 18px;
}

.panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel-head p + p {
  margin-top: 8px;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-row,
.ticket-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.module-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.module-tile {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  font-weight: 800;
}

.module-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  color: var(--accent);
  background: var(--green-soft);
}

.module-tile:hover {
  border-color: rgba(5, 150, 105, 0.35);
  background: #fff;
}

.overview-side-stack {
  display: grid;
  gap: 16px;
}

.popular-funds-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.popular-fund-card {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 26px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.popular-fund-card .fund-logo-wrap {
  width: 46px;
  height: 46px;
}

.popular-fund-card strong,
.kassenwecker-item strong,
.why-vgk-grid strong {
  display: block;
}

.popular-fund-card span,
.popular-fund-card small,
.kassenwecker-item span,
.kassenwecker-item small,
.why-vgk-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.popular-fund-rank {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #07100a;
  background: var(--electric);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.popular-fund-meta {
  text-align: right;
}

.popular-fund-meta b {
  display: block;
  color: var(--accent-dark);
}

.why-vgk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.why-amv-intro {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.why-vgk-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.why-vgk-grid article:last-child {
  grid-column: 1 / -1;
}

.why-vgk-grid .module-icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  color: transparent;
  background-color: transparent;
  border-color: rgba(0, 143, 69, 0.2);
}

.why-vgk-grid .module-icon .icon {
  display: none;
}

.kassenwecker-panel {
  margin-top: 16px;
}

.kassenwecker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 14px;
  margin-top: 14px;
}

.kassenwecker-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  align-items: end;
  gap: 10px;
}

.kassenwecker-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.kassenwecker-form input,
.kassenwecker-form select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline-color: var(--accent);
  background: #fff;
}

.kassenwecker-form .primary-button {
  min-height: 46px;
  grid-column: 1 / -1;
  white-space: nowrap;
}

.kassenwecker-summary {
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-soft), #fff);
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.kassenwecker-summary span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kassenwecker-summary strong {
  font-size: 26px;
}

.kassenwecker-summary p {
  color: var(--muted);
  line-height: 1.55;
}

.kassenwecker-auto-note {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(5, 8, 6, 0.92), rgba(0, 96, 48, 0.84)),
    url("./assets/brand/amv-netz-pattern.webp?v=20260806-initial-render-02") center / cover,
    var(--nav);
  color: #fff;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.kassenwecker-auto-note strong {
  color: var(--electric);
  font-size: 20px;
}

.kassenwecker-auto-note p {
  max-width: 680px;
  color: #dbeede;
  line-height: 1.55;
}

.kassenwecker-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.kassenwecker-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.7fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.kassenwecker-item.missing {
  border-style: dashed;
  background: #fffdf2;
}

.kassenwecker-dates {
  display: grid;
  gap: 3px;
}

.kassenwecker-status {
  min-height: 34px;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #7a4b00;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.ai-kennung-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.22fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(222, 247, 232, 0.68)),
    var(--surface);
}

.ai-kennung-hero h2 {
  margin-top: 6px;
  font-size: clamp(24px, 3vw, 36px);
}

.ai-kennung-hero p {
  max-width: 780px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.ai-kennung-stats {
  min-height: 118px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--green-soft));
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
}

.ai-kennung-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-kennung-stats strong {
  color: var(--accent-dark);
  font-size: 38px;
  line-height: 1;
}

.ki-partner-price-notice {
  margin-bottom: 16px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-left: 6px solid #f59e0b;
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, #fffbeb, #fff 58%, #f0fdf4);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

.ki-partner-price-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f59e0b;
  color: #fff;
  font-size: 30px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.28);
}

.ki-partner-price-content h2 {
  margin: 4px 0 6px;
  font-size: clamp(20px, 2.2vw, 28px);
}

.ki-partner-price-content > p {
  margin: 0;
  color: #7c4a03;
  line-height: 1.6;
}

.ki-partner-price-content > p strong {
  color: #92400e;
}

.ki-partner-price-scale {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}

.ki-partner-price-scale article {
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  background: rgba(255, 255, 255, 0.84);
}

.ki-partner-price-scale span,
.ki-file-price-preview span,
.ki-file-price-preview small {
  color: var(--muted);
  font-size: 12px;
}

.ki-partner-price-scale strong {
  color: #92400e;
  font-size: 17px;
}

.ki-file-price-preview {
  margin-top: 12px;
  border: 1px solid rgba(0, 143, 69, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(240, 253, 244, 0.88);
}

.ki-file-price-preview > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ki-file-price-preview strong {
  overflow-wrap: anywhere;
}

.ki-file-price-total {
  text-align: right;
}

.ki-file-price-total strong {
  color: var(--accent-dark);
  font-size: 24px;
}

@media (max-width: 820px) {
  .ki-partner-price-notice {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px;
  }

  .ki-partner-price-icon {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .ki-partner-price-scale {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ki-file-price-preview {
    align-items: stretch;
    flex-direction: column;
  }

  .ki-file-price-total {
    text-align: left;
  }
}

.ai-kennung-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.ai-kennung-import,
.ai-kennung-guide {
  display: grid;
  gap: 12px;
}

.ai-kennung-import p,
.ai-kennung-guide p {
  color: var(--muted);
  line-height: 1.55;
}

.ai-kennung-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.ai-kennung-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.ai-kennung-form input,
.ai-kennung-form textarea {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  outline-color: var(--accent);
}

.ai-kennung-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.ai-kennung-form .full-span,
.ai-kennung-status {
  grid-column: 1 / -1;
}

.ai-kennung-status {
  color: var(--muted);
  font-size: 13px;
}

.nacharbeit-preview {
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(229, 255, 238, 0.76), rgba(255, 255, 255, 0.94));
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nacharbeit-preview strong {
  margin-right: 8px;
}

.nacharbeit-preview span,
.nacharbeit-meta span {
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 999px;
  background: #f8fffa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.ai-guide-steps {
  display: grid;
  gap: 10px;
}

.ai-guide-steps article {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.ai-guide-steps strong {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #07100a;
  background: var(--electric);
  display: grid;
  place-items: center;
}

.ai-guide-steps span {
  color: var(--ink);
  font-weight: 800;
}

.ai-kennung-table table {
  min-width: 1050px;
}

.ai-kennung-table .status-pill {
  max-width: 180px;
}

/* KI Kennung dashboard: compact imports, transparent costs, bounded tables. */
.ai-kennung-hero {
  grid-template-columns: 1fr;
  gap: 20px;
}

.ai-kennung-stats {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  text-align: left;
}

.ai-kennung-stats article {
  min-width: 0;
  min-height: 94px;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(14, 54, 32, 0.05);
}

.ai-kennung-stats article.pending {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
}

.ai-kennung-stats article.danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fff7f7;
}

.ai-kennung-stats article strong {
  color: var(--accent-dark);
  font-size: 25px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ai-kennung-stats article.danger strong {
  color: #b42318;
}

.ai-kennung-stats article small {
  color: var(--muted);
  font-size: 11px;
}

.ki-dashboard-toolbar {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(170px, 0.7fr));
  gap: 10px;
  padding: 14px;
}

.ki-dashboard-toolbar label,
.ai-kennung-form label {
  min-width: 0;
}

.ki-dashboard-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ki-dashboard-toolbar input,
.ki-dashboard-toolbar select,
.ai-kennung-form select {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  outline-color: var(--accent);
}

.ai-kennung-form label > small {
  margin-top: -4px;
  color: var(--muted);
  font-size: 11px;
}

.ai-kennung-side-stack {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
}

.ki-pricing-disclosure {
  margin-bottom: 0;
  border-left-width: 1px;
  padding: 0;
  display: block;
  grid-template-columns: none;
  gap: 0;
  overflow: clip;
}

.ki-pricing-disclosure > summary,
.ki-category-panel > summary,
.ki-file-batch > summary,
.ki-cost-group > summary {
  list-style: none;
  cursor: pointer;
}

.ki-pricing-disclosure > summary::-webkit-details-marker,
.ki-category-panel > summary::-webkit-details-marker,
.ki-file-batch > summary::-webkit-details-marker,
.ki-cost-group > summary::-webkit-details-marker {
  display: none;
}

.ki-pricing-disclosure > summary {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffbeb, #f0fdf4);
}

.ki-pricing-disclosure > summary span:first-child,
.ki-category-panel > summary > span:first-child,
.ki-file-batch-title,
.ki-cost-group > summary > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ki-pricing-disclosure > summary small,
.ki-category-panel > summary small,
.ki-file-batch-title small,
.ki-file-batch-cost small,
.ki-cost-group summary small,
.ki-cost-user-list small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.ki-pricing-disclosure > summary > span:last-child {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #92400e;
  font-size: 20px;
  font-weight: 900;
  transition: transform 160ms ease;
}

.ki-pricing-disclosure[open] > summary > span:last-child {
  transform: rotate(45deg);
}

.ki-pricing-disclosure-body {
  border-top: 1px solid rgba(245, 158, 11, 0.18);
  padding: 16px 18px 18px;
}

.ki-pricing-disclosure-body p {
  margin: 0;
  color: #7c4a03;
  line-height: 1.55;
}

.ki-pricing-disclosure .ki-partner-price-scale {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ki-file-price-preview.full-span {
  margin-top: 0;
}

.ki-file-queue {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ki-file-queue > span {
  max-width: 290px;
  border: 1px solid rgba(0, 143, 69, 0.15);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 1px;
  padding: 7px 9px;
}

.ki-file-queue > span strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ai-kennung-status.is-error {
  color: #b42318;
  font-weight: 800;
}

.ai-kennung-cost-panel {
  margin-bottom: 18px;
}

.ki-cost-breakdown {
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ki-cost-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: clip;
  background: #fff;
}

.ki-cost-group > summary {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
}

.ki-cost-group > summary > span:last-child {
  text-align: right;
}

.ki-cost-group > summary > span:last-child strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.ki-cost-user-list {
  border-top: 1px solid var(--line);
  display: grid;
}

.ki-cost-user-list > div {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) repeat(3, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  color: var(--muted);
  font-size: 12px;
}

.ki-cost-user-list > div + div {
  border-top: 1px solid var(--line-soft, #eef3ef);
}

.ki-cost-user-list > div > span:first-child {
  display: grid;
}

.ki-import-library {
  display: grid;
  gap: 12px;
}

#aiKennungImportSections {
  display: grid;
  gap: 12px;
}

.ki-category-panel {
  padding: 0;
  overflow: clip;
}

.ki-category-panel > summary {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.9), #fff 70%);
}

.ki-category-panel[open] > summary {
  border-bottom: 1px solid rgba(0, 143, 69, 0.16);
}

.ki-category-panel > summary strong {
  font-size: 18px;
}

.ki-category-summary-metrics,
.ki-file-batch-cost {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.ki-category-summary-metrics em {
  border-radius: 999px;
  background: #edf5ef;
  color: #385146;
  padding: 5px 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.ki-category-summary-metrics em.pending {
  background: #fff3cd;
  color: #7a4b00;
}

.ki-category-summary-metrics em.danger {
  background: #feecec;
  color: #b42318;
}

.ki-category-body {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fbf9;
}

.ki-file-batch {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: clip;
  background: #fff;
}

.ki-file-batch > summary {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, auto);
  align-items: center;
  gap: 18px;
  padding: 13px 15px;
}

.ki-file-batch[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fbfefc;
}

.ki-file-batch-title strong {
  overflow-wrap: anywhere;
}

.ki-file-batch-title em {
  color: var(--accent-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.ki-file-batch-cost > span {
  min-width: 82px;
  display: grid;
  gap: 2px;
  text-align: right;
}

.ki-file-batch-cost > span strong {
  color: var(--ink);
  font-size: 13px;
}

.ki-file-batch-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ki-file-batch-body table {
  min-width: 1040px;
}

.ki-pagination {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.ki-pagination > div {
  display: flex;
  gap: 7px;
}

.ki-pagination .secondary-button {
  min-height: 34px;
  padding: 6px 11px;
}

.ki-customer-records-panel {
  margin-top: 16px;
}

.ki-summary-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ki-pricing-disclosure > summary:focus-visible,
.ki-category-panel > summary:focus-visible,
.ki-file-batch > summary:focus-visible,
.ki-cost-group > summary:focus-visible {
  outline: 3px solid rgba(0, 143, 69, 0.28);
  outline-offset: -3px;
}

@media (max-width: 1080px) {
  .ai-kennung-stats,
  .ki-dashboard-toolbar,
  .ki-cost-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ki-file-batch > summary {
    grid-template-columns: 1fr;
  }

  .ki-file-batch-cost {
    justify-content: flex-start;
  }

  .ki-file-batch-cost > span {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .ai-kennung-stats,
  .ki-dashboard-toolbar,
  .ki-cost-breakdown,
  .ai-kennung-form {
    grid-template-columns: 1fr;
  }

  .ai-kennung-stats article {
    min-height: 78px;
  }

  .ki-category-panel > summary {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .ki-category-summary-metrics {
    justify-content: flex-start;
  }

  .ki-file-price-preview {
    align-items: stretch;
    flex-direction: column;
  }

  .ki-file-price-total {
    text-align: left;
  }

  .ki-cost-user-list > div {
    grid-template-columns: 1fr 1fr;
  }
}

.nav-icon,
.module-icon {
  color: transparent;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.nav-icon.nav-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  background-size: 32px 32px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.32));
}

.module-icon.module-icon {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
}

.nav-icon::before,
.nav-icon::after,
.module-icon::before,
.module-icon::after {
  display: none;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  background-color: rgba(241, 233, 0, 0.08);
  box-shadow: 0 0 0 1px rgba(241, 233, 0, 0.16);
}

.nav-icon[data-icon="overview"],
.module-icon[data-icon="overview"],
.nav-icon[data-icon="partners"],
.module-icon[data-icon="partners"] {
  background-image: url("./assets/icons/network.png");
}

.nav-icon[data-icon="customers"],
.module-icon[data-icon="customers"],
.nav-icon[data-icon="tickets"],
.module-icon[data-icon="tickets"] {
  background-image: url("./assets/icons/consulting.png");
}

.nav-icon[data-icon="calculator"],
.module-icon[data-icon="calculator"],
.nav-icon[data-icon="billing"],
.module-icon[data-icon="billing"],
.nav-icon[data-icon="invoices"],
.module-icon[data-icon="invoices"] {
  background-image: url("./assets/icons/savings.png");
}

.nav-icon[data-icon="orders"],
.module-icon[data-icon="orders"],
.nav-icon[data-icon="documents"],
.module-icon[data-icon="documents"] {
  background-image: url("./assets/icons/contract-review.png");
}

.nav-icon[data-icon="team"],
.module-icon[data-icon="team"] {
  background-image: url("./assets/icons/protection.png");
}

.nav-icon[data-icon="ai"],
.module-icon[data-icon="ai"] {
  background-image: url("./assets/icons/network.png");
}

.nav-icon[data-icon="help"],
.module-icon[data-icon="help"] {
  background-image: url("./assets/icons/protection.png");
}

.nav-icon[data-icon="health"],
.module-icon[data-icon="health"] {
  background-image: url("./assets/icons/insurance.png");
}

@keyframes amvIconNetworkSweep {
  0% {
    transform: translateX(-130%) rotate(-18deg);
    opacity: 0;
  }

  18%,
  70% {
    opacity: 0.72;
  }

  100% {
    transform: translateX(130%) rotate(-18deg);
    opacity: 0;
  }
}

@keyframes amvIconNodePulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.95;
    transform: scale(1.04);
  }
}

@keyframes amvIconFrameFlow {
  0% {
    background-position: 0 0, 0 0, 0 0, center;
  }

  100% {
    background-position: 42px 0, 0 42px, 0 0, center;
  }
}

@property --amv-login-icon-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes amvLoginIconFrameLines {
  0% {
    --amv-login-icon-angle: 0deg;
  }

  100% {
    --amv-login-icon-angle: 360deg;
  }
}

.nav-icon,
.module-icon,
.login-feature-icon {
  overflow: hidden;
  isolation: isolate;
}

.nav-icon,
.module-icon {
  border-color: rgba(241, 233, 0, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(0, 143, 69, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.22);
  background-color: rgba(2, 19, 10, 0.76);
}

.login-feature-icon {
  border-radius: 14px;
  border: 2px solid rgba(241, 233, 0, 0.28);
  background: rgba(2, 19, 10, 0.84);
  box-shadow:
    inset 0 0 0 1px rgba(0, 143, 69, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.login-feature-cards article:hover .login-feature-icon {
  border-color: rgba(241, 233, 0, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 141, 0.32),
    inset 0 0 22px rgba(0, 143, 69, 0.24),
    0 14px 28px rgba(0, 0, 0, 0.28);
}

.section-bar {
  margin-bottom: 14px;
}

.inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9eef6;
}

.tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--surface-2);
}

tr:last-child td {
  border-bottom: 0;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-cell strong,
td strong {
  line-height: 1.3;
}

.customer-fund-transition {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.customer-fund-transition span {
  overflow: hidden;
  max-width: 112px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-fund-transition b {
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.customer-tags {
  margin-top: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-spouse-line {
  display: block;
  margin-top: 6px;
  max-width: 210px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.muted-line {
  margin-top: 5px;
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.badge {
  min-height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
}

.level-pill {
  min-height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  color: var(--ink);
  background: #eef2f7;
}

.level-admin {
  color: #fff;
  background: var(--nav);
}

.level-high {
  color: var(--accent);
  background: var(--green-soft);
}

.level-mid {
  color: var(--blue);
  background: var(--blue-soft);
}

.level-work,
.level-low {
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.active,
.badge.paid,
.badge.done,
.badge.closed {
  color: var(--accent);
  background: var(--green-soft);
}

.badge.open,
.badge.business,
.badge.progress,
.badge.sent {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.pending,
.badge.service,
.badge.private,
.badge.invited {
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.overdue,
.badge.high,
.badge.paused,
.badge.inactive,
.badge.cancelled {
  color: var(--red);
  background: var(--red-soft);
}

.badge.info {
  color: #475569;
  background: #eef2f6;
  border-color: #d8e0e8;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.info-card,
.doc-card {
  min-height: 168px;
  padding: 16px;
  display: grid;
  align-content: space-between;
}

.info-card header,
.doc-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.company-doc-card {
  border-left: 4px solid var(--accent);
  gap: 12px;
}

.company-doc-card header strong {
  display: block;
  margin-bottom: 4px;
}

.doc-meta-lines {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.doc-meta-lines span:first-child {
  width: fit-content;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent);
  background: var(--green-soft);
  font-weight: 800;
}

.company-template-archive,
.uploaded-document-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.company-template-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.company-template-head strong {
  display: block;
  font-size: 18px;
}

.company-template-head small,
.company-template-head span {
  color: var(--muted);
}

.company-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.company-template-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.company-template-card header,
.company-template-title,
.company-template-contact,
.template-slot,
.template-slot-actions {
  display: flex;
  align-items: center;
}

.company-template-card header {
  justify-content: space-between;
  gap: 12px;
}

.company-template-title {
  min-width: 0;
  gap: 10px;
}

.company-template-title strong,
.template-slot strong {
  display: block;
}

.company-template-title small,
.template-slot small {
  color: var(--muted);
}

.company-template-contact {
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.template-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.template-slot {
  min-height: 118px;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 143, 69, 0.14);
  border-radius: 8px;
  background: #fbfefd;
}

.template-slot.is-ready {
  border-color: rgba(0, 143, 69, 0.3);
  background: var(--green-soft);
}

.template-slot-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.uploaded-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

.orders-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.orders-process-strip {
  margin: -4px 0 16px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(17, 52, 35, 0.045);
}

.orders-process-strip span {
  min-width: 0;
  border-radius: 11px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-dark);
  background: linear-gradient(135deg, #f4fbf7, #ffffff);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.orders-process-strip strong {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
}

.orders-fund-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid #cfe0d7;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3fbf6 0%, #ffffff 65%);
  box-shadow: var(--shadow-soft);
}

.orders-fund-panel h3 {
  margin: 4px 0 0;
  color: var(--ink);
}

.orders-fund-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.orders-fund-filter-label {
  display: grid;
  gap: 6px;
  min-width: min(100%, 310px);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.orders-fund-filter-label select {
  min-width: 250px;
  height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid #a8cbb9;
  border-radius: 9px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
}

.orders-scope-panel {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #cfe0d7;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fcfa 0%, #ffffff 62%, #fffaf0 100%);
  box-shadow: var(--shadow-soft);
}

.orders-scope-head,
.orders-scope-copy,
.orders-scope-totals,
.orders-team-member,
.orders-team-member dl {
  display: flex;
  align-items: center;
}

.orders-scope-head {
  justify-content: space-between;
  gap: 18px;
}

.orders-scope-copy {
  gap: 12px;
  min-width: 0;
}

.orders-scope-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.orders-scope-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.orders-scope-totals {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.orders-scope-totals span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.orders-scope-totals strong {
  color: var(--ink);
}

.orders-team-scope {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.orders-team-member {
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .9);
}

.orders-team-member.current {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

.orders-member-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

.orders-team-member > div {
  min-width: 0;
  flex: 1;
}

.orders-team-member > div strong,
.orders-team-member > div small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-team-member > div small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.orders-team-member dl {
  gap: 8px;
  margin: 0;
}

.orders-team-member dl div {
  min-width: 42px;
  text-align: center;
}

.orders-team-member dt {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.orders-team-member dd {
  margin: 1px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.orders-customer-overview {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.orders-customer-overview > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.orders-customer-overview > header strong,
.orders-customer-overview > header small {
  display: block;
}

.orders-customer-overview > header small {
  margin-top: 3px;
  color: var(--muted);
}

.orders-customer-list {
  display: grid;
  gap: 8px;
}

.orders-customer-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(190px, 1.35fr) minmax(170px, 1.2fr) minmax(135px, .9fr) auto auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.orders-customer-row:hover {
  border-color: #a8cbb9;
  box-shadow: 0 8px 22px rgba(9, 44, 25, .08);
  transform: translateY(-1px);
}

.orders-customer-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.orders-customer-name > span:last-child,
.orders-customer-info {
  min-width: 0;
}

.orders-customer-name strong,
.orders-customer-name small,
.orders-customer-info strong,
.orders-customer-info span,
.orders-customer-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orders-customer-name small,
.orders-customer-info small,
.orders-customer-info span {
  color: var(--muted);
  font-size: 11px;
}

.orders-customer-info strong {
  margin: 2px 0;
  font-size: 13px;
}

.orders-customer-status {
  justify-self: end;
}

@media (max-width: 1180px) {
  .orders-customer-row {
    grid-template-columns: minmax(190px, 1.2fr) minmax(190px, 1.2fr) minmax(150px, 1fr) auto auto;
  }

  .orders-customer-info:nth-of-type(3) {
    display: none;
  }
}

@media (max-width: 760px) {
  .orders-fund-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-fund-filter-label,
  .orders-fund-filter-label select {
    min-width: 100%;
  }

  .orders-scope-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .orders-scope-totals {
    justify-content: flex-start;
  }

  .orders-customer-row {
    grid-template-columns: 1fr auto;
  }

  .orders-customer-info {
    grid-column: 1 / -1;
    padding-left: 44px;
  }

  .orders-customer-info:nth-of-type(3) {
    display: block;
  }

  .orders-customer-status {
    grid-column: 2;
    grid-row: 1;
  }

  .orders-customer-row > .mini-action {
    grid-column: 1 / -1;
    margin-left: 44px;
  }
}

.orders-summary article {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f9fcfa);
  box-shadow: var(--shadow-soft);
  display: grid;
  align-content: space-between;
}

.orders-summary span,
.orders-summary small {
  color: var(--muted);
}

.orders-summary strong {
  font-size: 28px;
  color: var(--ink);
}

.orders-summary-card {
  position: relative;
  overflow: hidden;
}

.orders-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--yellow));
}

#ordersKanban {
  display: block;
}

.orders-horizontal-view {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
}

.orders-horizontal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f7faf8);
}

.orders-horizontal-head strong,
.orders-horizontal-head small {
  display: block;
}

.orders-horizontal-head small {
  margin-top: 3px;
  color: var(--muted);
}

.orders-table-scroll {
  overflow-x: auto;
}

.orders-list-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
}

.orders-list-table th {
  padding: 10px 12px;
  border-bottom: 1px solid #cfd9d3;
  background: #f4f7f5;
  color: #47544d;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}

.orders-list-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
  font-size: 12px;
}

.orders-list-table tbody tr:nth-child(even) {
  background: rgba(241, 246, 243, .58);
}

.orders-list-table tbody tr:hover {
  background: #f2faf5;
  box-shadow: inset 4px 0 0 var(--accent);
}

.orders-list-table tbody tr:last-child td {
  border-bottom: 0;
}

.orders-list-table td strong,
.orders-list-table td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orders-list-table td strong {
  white-space: normal;
  line-height: 1.35;
}

.orders-list-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.orders-list-table th:nth-child(1) { width: 150px; }
.orders-list-table th:nth-child(2) { width: 145px; }
.orders-list-table th:nth-child(3) { width: 160px; }
.orders-list-table th:nth-child(4) { width: 150px; }
.orders-list-table th:nth-child(5) { width: 155px; }
.orders-list-table th:nth-child(6) { width: 155px; }
.orders-list-table th:nth-child(7) { width: 105px; }
.orders-list-table th:nth-child(8) { width: 92px; }
.orders-list-table th:nth-child(9) { width: 96px; }

.order-table-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.order-table-status i {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-top: 2px;
  border-radius: 50%;
  background: #f2b700;
  box-shadow: 0 0 0 3px rgba(242, 183, 0, .12);
}

.order-table-status i.open {
  background: #efb100;
}

.order-table-status i.progress {
  background: #f07900;
}

.order-table-status i.done {
  background: #009846;
}

.order-table-amount strong {
  color: var(--accent-dark);
  font-size: 14px;
  white-space: nowrap !important;
}

.order-table-actions {
  vertical-align: middle;
}

.order-table-actions .mini-action {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 0 4px;
  font-size: 11px;
}

.order-table-actions .mini-action + .mini-action {
  margin-top: 6px;
}

.orders-horizontal-list {
  display: grid;
}

.order-horizontal-row {
  display: grid;
  grid-template-columns: 52px minmax(205px, 1.35fr) minmax(135px, .9fr) minmax(155px, 1fr) minmax(155px, 1fr) 92px 96px 88px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .16s ease, box-shadow .16s ease;
}

.order-horizontal-row:last-child {
  border-bottom: 0;
}

.order-horizontal-row:hover {
  position: relative;
  z-index: 1;
  background: #f8fcfa;
  box-shadow: inset 4px 0 0 var(--accent);
}

.order-horizontal-number {
  text-align: center;
}

.order-horizontal-number span {
  width: 34px;
  height: 34px;
  margin: 0 auto 3px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.order-horizontal-number small,
.order-horizontal-info small,
.order-horizontal-info span,
.order-horizontal-state small,
.order-horizontal-amount small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.order-horizontal-customer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.order-horizontal-customer > div,
.order-horizontal-info {
  min-width: 0;
}

.order-horizontal-customer strong,
.order-horizontal-customer small,
.order-horizontal-info strong,
.order-horizontal-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-horizontal-customer strong {
  font-size: 14px;
}

.order-horizontal-customer small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.order-horizontal-info strong {
  margin: 3px 0;
  font-size: 12px;
}

.order-horizontal-state,
.order-horizontal-amount,
.order-horizontal-actions {
  display: grid;
  gap: 5px;
  justify-items: end;
}

.order-horizontal-amount strong {
  font-size: 16px;
  color: var(--accent-dark);
  white-space: nowrap;
}

.order-horizontal-actions .mini-action {
  width: 100%;
}

@media (max-width: 1180px) {
  .order-horizontal-row {
    grid-template-columns: 46px minmax(190px, 1.3fr) minmax(130px, .9fr) minmax(145px, 1fr) 88px 90px 82px;
  }

  .order-horizontal-info:nth-of-type(5) {
    display: none;
  }
}

@media (max-width: 820px) {
  .order-horizontal-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .order-horizontal-customer {
    grid-column: 2;
  }

  .order-horizontal-info {
    grid-column: 2 / -1;
    padding: 8px 0 0;
    border-top: 1px dashed var(--line);
  }

  .order-horizontal-info:nth-of-type(5) {
    display: block;
  }

  .order-horizontal-state {
    grid-column: 3;
    grid-row: 1;
  }

  .order-horizontal-amount {
    grid-column: 2;
    justify-items: start;
  }

  .order-horizontal-actions {
    grid-column: 3;
  }
}

.lane {
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.lane-head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lane-head h2 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  margin: 0;
}

.lane-head span {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

.order-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfdfb);
  display: grid;
  gap: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.order-card-pro header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.order-card-pro header strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
  letter-spacing: 0;
}

.order-card-pro header p {
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
}

.order-card + .order-card {
  margin-top: 10px;
}

.order-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.order-detail-list div {
  display: grid;
  gap: 4px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  background: rgba(247, 250, 247, 0.8);
}

.order-detail-list dt {
  color: var(--muted);
  font-size: 12px;
}

.order-detail-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.order-card-footer {
  border-radius: 8px;
  border: 1px solid rgba(0, 143, 69, 0.1);
  background: #f4faf6;
  padding: 11px;
  display: grid;
  gap: 8px;
}

.order-card-footer span {
  color: var(--text);
  line-height: 1.4;
}

.order-card-footer strong {
  color: var(--accent-dark);
}

.order-card .muted-line {
  font-size: 12px;
}

.order-card .mini-action {
  width: 100%;
}

.order-contract-card {
  gap: 13px;
  border-color: rgba(0, 143, 69, 0.16);
}

.order-contract-head {
  align-items: center;
}

.order-contract-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.order-contract-title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.order-document-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.order-document-row span {
  border: 1px solid rgba(0, 143, 69, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--accent-dark);
  background: rgba(236, 253, 245, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.order-contract-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-contract-footer span {
  color: var(--muted);
  font-size: 13px;
}

.order-contract-footer strong {
  white-space: nowrap;
  color: var(--accent-dark);
  font-size: 18px;
}

.order-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-empty {
  min-height: 148px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.nacharbeit-list {
  margin-top: 18px;
}

.nacharbeit-card {
  border-left: 4px solid var(--amber);
  align-items: start;
}

.nacharbeit-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.nacharbeit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-page-head {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.merged-team-head {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.compact-action-head {
  justify-content: flex-end;
  margin-bottom: 14px;
}

#krankenkassenView .compact-action-head {
  justify-content: space-between;
  align-items: flex-start;
}

#krankenkassenView .compact-action-head > div {
  max-width: 820px;
}

.fund-readonly-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.partner-team-hero {
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.partner-team-hero.compact-action-head {
  justify-content: space-between;
}

.partner-team-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-page-head h2 {
  font-size: 30px;
}

.admin-page-head p {
  margin-top: 6px;
  color: var(--muted);
}

.commission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.document-stats {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.admin-stat {
  min-height: 112px;
}

.access-strip {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.access-strip span {
  min-height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 13px;
}

.access-strip strong {
  color: var(--ink);
}

.compact-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
}

.admin-toolbar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-search {
  min-height: 42px;
  min-width: min(330px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.admin-search span {
  color: var(--muted);
  font-size: 12px;
}

.admin-search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.inner-table {
  margin-top: 14px;
  box-shadow: none;
}

.inner-table table {
  min-width: 1380px;
}

#krankenkassenAdminView .inner-table {
  overflow-x: hidden;
}

#krankenkassenAdminView .inner-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#krankenkassenAdminView .inner-table th,
#krankenkassenAdminView .inner-table td {
  padding: 11px 8px;
  overflow-wrap: anywhere;
}

#krankenkassenAdminView .inner-table th {
  font-size: 11px;
}

#krankenkassenAdminView .inner-table th:nth-child(1) { width: 18%; }
#krankenkassenAdminView .inner-table th:nth-child(2) { width: 18%; }
#krankenkassenAdminView .inner-table th:nth-child(3) { width: 9%; }
#krankenkassenAdminView .inner-table th:nth-child(4) { width: 14%; }
#krankenkassenAdminView .inner-table th:nth-child(5) { width: 8%; }
#krankenkassenAdminView .inner-table th:nth-child(6) { width: 16%; }
#krankenkassenAdminView .inner-table th:nth-child(7) { width: 7%; }
#krankenkassenAdminView .inner-table th:nth-child(8) { width: 10%; }

#krankenkassenAdminView .fund-logo-wrap {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

#krankenkassenAdminView .fund-email-list,
#krankenkassenAdminView .fund-pdf-list,
#krankenkassenAdminView .row-actions {
  min-width: 0;
}

#krankenkassenAdminView .fund-pdf-item {
  padding: 6px;
}

#krankenkassenAdminView .row-actions {
  justify-content: stretch;
}

#krankenkassenAdminView .health-fund-edit-button {
  width: 100%;
  justify-content: center;
  padding-inline: 6px;
  white-space: normal;
}

.calculator-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.gkv-start-panel {
  max-width: 980px;
  margin-inline: auto;
  padding: 0;
  overflow: hidden;
}

.gkv-start-head {
  background: #087df5;
  color: #fff;
  text-align: center;
  padding: 26px 22px;
}

.gkv-start-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
}

.gkv-start-head p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.9);
}

.gkv-start-panel .case-strip {
  padding: 18px 24px 0;
}

.compare-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 20px 18px;
  padding: 24px 26px 30px;
}

.compare-form .full-span {
  grid-column: 1 / -1;
}

.gkv-choice-block {
  border: 0;
  margin: 0;
  padding: 0;
}

.gkv-choice-block legend,
.compare-form label {
  color: #53606f;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.gkv-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.gkv-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gkv-choice,
.gkv-status {
  min-height: 92px;
  border: 2px solid #dfe5ef;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px 10px;
  text-align: center;
  color: #0f2137;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.gkv-status {
  min-height: 60px;
  font-weight: 900;
  padding-inline: 14px;
}

.gkv-choice input,
.gkv-status input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gkv-choice span {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f3f7fb;
  font-size: 20px;
  line-height: 1;
}

.gkv-choice strong {
  max-width: 100%;
  color: inherit;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.gkv-choice:hover,
.gkv-status:hover,
.gkv-choice.active,
.gkv-status.active,
.gkv-choice:has(input:checked),
.gkv-status:has(input:checked) {
  border-color: #087df5;
  box-shadow: 0 10px 22px rgba(8, 125, 245, 0.12);
}

.gkv-choice.active,
.gkv-status.active,
.gkv-choice:has(input:checked),
.gkv-status:has(input:checked) {
  color: #006ef5;
  background: #f8fbff;
}

.gkv-choice.active span,
.gkv-choice:has(input:checked) span {
  background: #eaf3ff;
}

.euro-input {
  position: relative;
  display: block;
}

.euro-input input {
  padding-right: 54px;
}

.euro-input b {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.compare-advanced-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.compare-advanced-fields label {
  min-width: 0;
  display: grid;
  gap: 7px;
  line-height: 1.25;
}

.compare-advanced-fields input,
.compare-advanced-fields select {
  width: 100%;
}

.gkv-submit {
  min-height: 60px;
  border-radius: 12px;
  background: #087df5;
  box-shadow: 0 10px 24px rgba(8, 125, 245, 0.24);
  font-size: 18px;
}

.gkv-trust-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: #53606f;
  font-size: 13px;
}

.gkv-trust-row span {
  color: var(--accent-dark);
}

.gkv-required {
  display: block;
  text-align: center;
  color: var(--accent);
}

.billing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.billing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  align-items: end;
  gap: 12px;
}

.billing-form .primary-button {
  justify-self: start;
}

.invoices-scope-note {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.invoices-scope-note strong {
  color: var(--text);
  white-space: nowrap;
}

.billing-rules {
  display: grid;
  gap: 12px;
}

.billing-rules span {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  color: var(--text);
}

.billing-rules strong {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  flex: 0 0 26px;
}

.compare-metrics {
  margin-bottom: 16px;
}

.compare-metrics .metric strong {
  font-size: 24px;
}

.kassen-results {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.kassen-results-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.kassen-results-head p {
  margin: 0;
  color: #263653;
}

.wish-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.wish-panel summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
}

.wish-panel summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wish-tags {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
}

.wish-tags span {
  min-height: 28px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.kassen-sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kassen-sort-row span {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.kassen-sort-row button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #263653;
  padding: 0 14px;
  font-weight: 800;
}

.kassen-sort-row button.active {
  color: #fff;
  background: #087df5;
  border-color: #087df5;
}

.kassen-result-list {
  display: grid;
  gap: 16px;
}

.kasse-result-card {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 190px;
  overflow: hidden;
}

.kasse-result-provider,
.kasse-card-center,
.kasse-rating {
  padding: 22px;
}

.kasse-result-provider {
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0, 137, 77, 0.04), rgba(255, 255, 255, 0));
}

.kasse-provider-logo {
  width: 70px;
  height: 70px;
  border: 1px solid rgba(0, 137, 77, 0.18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 43, 24, 0.08);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.kasse-provider-logo .fund-logo-wrap {
  width: 58px;
  height: 58px;
  margin: 0;
}

.kasse-result-provider > strong {
  font-size: 18px;
  color: #0f2137;
}

.kasse-result-provider span,
.kasse-result-provider small,
.kasse-rating span,
.kasse-rating small {
  color: var(--muted);
}

.kasse-result-provider b {
  margin-top: 4px;
  color: #0f2137;
  font-size: 20px;
}

.kasse-price-stack {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.kasse-card-center {
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 18px;
}

.kasse-value-strip {
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(190px, 1.15fr);
  gap: 12px;
}

.kasse-saving {
  border-radius: 12px;
  background: #22c55e;
  color: #fff;
  display: grid;
  gap: 2px;
  padding: 12px;
  min-height: 96px;
}

.kasse-saving span,
.kasse-saving strong,
.kasse-saving small {
  color: #fff;
}

.kasse-family-bonus {
  border: 1px solid rgba(0, 137, 77, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5, #fff);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 96px;
}

.kasse-family-bonus span {
  color: #006b3a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kasse-family-bonus strong {
  color: #003f25;
  font-size: 22px;
}

.kasse-family-bonus small,
.kasse-family-bonus em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.kasse-family-bonus .conditional-bonus {
  color: #995800;
  background: #fff8db;
  border-radius: 999px;
  padding: 3px 8px;
  width: fit-content;
  margin-top: 4px;
}

.kasse-family-bonus.is-empty {
  background: #f8fafc;
  border-style: dashed;
}

.kasse-wishes h3 {
  margin: 0 0 12px;
  color: #1457ff;
  font-size: 13px;
  text-transform: uppercase;
}

.kasse-wishes h3 span {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-style: normal;
  text-transform: none;
}

.kasse-wishes ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.kasse-wishes li {
  display: grid;
  grid-template-columns: 26px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.kasse-wishes li > span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #22c55e;
  font-weight: 900;
}

.kasse-wishes li.is-muted > span {
  background: #cfd6df;
}

.kasse-wishes li strong {
  color: #0f2137;
}

.kasse-wishes li small {
  color: var(--muted);
}

.kasse-rating {
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.kasse-rating .stars {
  color: #f59e0b;
  font-size: 18px;
}

.kasse-rating .stars i {
  color: #d5dce5;
  font-style: normal;
}

.kasse-rating .primary-button,
.kasse-rating .secondary-button {
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  text-decoration: none;
}

.comparison-fund-info-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(860px, calc(100dvh - 28px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 80px rgba(0, 24, 12, 0.34);
}

.comparison-fund-info-dialog::backdrop {
  background: rgba(2, 10, 6, 0.68);
  backdrop-filter: blur(5px);
}

.comparison-fund-info-card {
  display: grid;
  gap: 20px;
  padding: 26px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f4faf6);
}

.comparison-fund-info-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.comparison-fund-info-head h2,
.comparison-fund-info-head p,
.comparison-fund-info-benefits h3,
.comparison-fund-info-note h3,
.comparison-fund-info-note p {
  margin: 0;
}

.comparison-fund-info-head p,
.comparison-fund-info-note p {
  color: var(--muted);
  line-height: 1.55;
}

.comparison-fund-info-logo .fund-logo-wrap {
  width: 72px;
  height: 72px;
}

.comparison-fund-info-content {
  display: grid;
  gap: 16px;
}

.comparison-fund-info-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.comparison-fund-info-facts article,
.comparison-fund-info-benefits,
.comparison-fund-info-emails,
.comparison-fund-info-note {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.comparison-fund-info-facts article {
  display: grid;
  align-content: start;
  gap: 6px;
}

.comparison-fund-info-facts span,
.comparison-fund-info-facts small {
  color: var(--muted);
}

.comparison-fund-info-facts strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.comparison-fund-info-benefits dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 14px 0 0;
}

.comparison-fund-info-benefits dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.comparison-fund-info-benefits dt {
  color: var(--muted);
}

.comparison-fund-info-benefits dd {
  margin: 0;
  font-weight: 800;
}

.comparison-fund-info-emails h3 { margin: 0; }
.comparison-fund-info-emails dl { display: grid; gap: 12px; margin: 14px 0 0; }
.comparison-fund-info-emails dl > div { display: grid; gap: 4px; min-width: 0; }
.comparison-fund-info-emails dt { color: var(--muted); font-size: 12px; }
.comparison-fund-info-emails dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.comparison-fund-info-emails a { color: var(--accent-dark); text-underline-offset: 3px; }
.comparison-fund-info-emails a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.comparison-fund-info-card menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.comparison-fund-website {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 720px) {
  .comparison-fund-info-facts,
  .comparison-fund-info-benefits dl {
    grid-template-columns: 1fr;
  }

  .comparison-fund-info-card {
    padding: 18px;
  }
}

.kasse-rating .primary-button {
  background: #22c55e;
}

.kasse-rating .secondary-button {
  border-color: #087df5;
  color: #087df5;
  background: #fff;
}

#onlineApplicationDialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 90px rgba(15, 23, 42, 0.3);
}

#onlineApplicationDialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.online-application-form {
  padding: 24px;
  display: grid;
  gap: 18px;
  background: #fff;
}

.online-application-head {
  display: grid;
  grid-template-columns: minmax(140px, 0.5fr) minmax(0, 1fr) minmax(170px, 0.5fr);
  gap: 16px;
  align-items: start;
}

.online-application-head h2 {
  margin: 0;
  font-size: 28px;
}

.online-application-head p,
.online-application-company span {
  margin: 4px 0 0;
  color: var(--muted);
}

.online-application-company {
  text-align: right;
  display: grid;
  gap: 4px;
}

.online-application-company strong {
  color: #f59e0b;
  font-size: 18px;
}

.application-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 6px solid #e5eaf0;
  padding-bottom: 10px;
}

.application-stepper span {
  position: relative;
  color: #8b96a8;
  font-weight: 900;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.application-stepper b {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #6b7280;
  background: #e5eaf0;
}

.application-stepper span.active,
.application-stepper span.done {
  color: #0076ff;
}

.application-stepper span.done {
  color: #16a34a;
}

.application-stepper span.active b {
  color: #fff;
  background: #087df5;
}

.application-stepper span.done b {
  color: #fff;
  background: #22c55e;
}

.application-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 28px;
}

.application-step.active {
  display: grid;
}

.application-step h3,
.application-step .full-span {
  grid-column: 1 / -1;
}

.application-step h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.application-step label {
  display: grid;
  gap: 8px;
  color: #0f2137;
  font-weight: 900;
}

.application-step input,
.application-step select {
  min-height: 48px;
  border: 1px solid #d4dce8;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.pill-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-choice-row label,
.stack-choice-row label {
  border: 1px solid #d4dce8;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
}

.pill-choice-row input,
.stack-choice-row input {
  min-height: auto;
}

.stack-choice-row {
  display: grid;
  gap: 10px;
}

.stack-choice-row label:has(input:checked),
.pill-choice-row label:has(input:checked) {
  border-color: #087df5;
  background: #eef6ff;
  color: #006ef5;
}

.stack-choice-row small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.application-info-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.application-info-box.highlight {
  border-left: 5px solid #087df5;
  background: #eef6ff;
}

.application-info-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.application-info-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.application-consents {
  border-top: 1px solid var(--ink);
  display: grid;
  gap: 12px;
  padding-top: 18px;
}

.application-consents label {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
}

.online-application-actions {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 0 0;
}

.online-application-actions button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: wait;
  opacity: 0.82;
}

.online-application-actions button.is-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: online-application-spin 0.7s linear infinite;
}

.online-application-actions button.is-success {
  border-color: rgba(0, 143, 69, 0.55);
  background: #e8f8ef;
  color: #075d31;
}

.online-application-actions button.is-error {
  border-color: #c63e33;
  background: #fff0ee;
  color: #8d211a;
}

#customerQuickSaveButton.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: wait;
  opacity: 0.84;
}

#customerQuickSaveButton.is-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: online-application-spin 0.7s linear infinite;
}

.customer-save-status {
  max-width: 290px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.customer-save-status.is-working { color: #2352be; }
.customer-save-status.is-success { color: var(--accent-dark); }
.customer-save-status.is-error { color: #a32b23; }

.online-application-status {
  margin-top: 12px;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 9px;
  background: #f2faf5;
  padding: 10px 12px;
  line-height: 1.45;
}

.online-application-status.is-working {
  border-color: #c8a400;
  background: #fffbe3;
  color: #665400;
}

.online-application-status.is-success {
  border-color: rgba(0, 143, 69, 0.45);
  background: #e8f8ef;
  color: #075d31;
}

.online-application-status.is-warning {
  border-color: #d69000;
  background: #fff7df;
  color: #765000;
}

.online-application-status.is-error {
  border-color: #d55a50;
  background: #fff0ee;
  color: #8d211a;
}

.kasse-result-card.is-current-fund {
  border-color: rgba(0, 143, 69, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 143, 69, 0.1), var(--shadow-soft);
}

.current-fund-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(0, 143, 69, 0.38);
  border-radius: 999px;
  background: #e8f8ef;
  color: #075d31;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}

@keyframes online-application-spin {
  to { transform: rotate(360deg); }
}

:is(button, input[type="submit"], input[type="button"], [role="button"]).is-system-loading {
  cursor: wait !important;
  pointer-events: none;
  opacity: 0.78;
}

:is(button, [role="button"]).is-system-pressed:not(.is-system-loading) {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.94);
  transition-duration: 70ms !important;
}

:is(button, [role="button"]).is-system-tap-loading:not(.is-system-loading)::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-inline-start: 7px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: system-action-spin 0.7s linear infinite;
}

:is(button, [role="button"]).is-system-loading:not(.is-loading)::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-inline-start: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: system-action-spin 0.7s linear infinite;
}

:is(button, input[type="submit"], input[type="button"], [role="button"]).is-system-complete {
  border-color: rgba(0, 143, 69, 0.62) !important;
  box-shadow: 0 0 0 3px rgba(0, 143, 69, 0.12);
}

:is(button, input[type="submit"], input[type="button"], [role="button"]).is-system-error {
  border-color: #c63e33 !important;
  box-shadow: 0 0 0 3px rgba(198, 62, 51, 0.12);
}

.system-action-feedback {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30000;
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid #c8a400;
  border-radius: 12px;
  background: #fffbe3;
  color: #554600;
  box-shadow: 0 16px 42px rgba(8, 32, 20, 0.22);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.system-action-feedback.is-complete {
  border-color: rgba(0, 143, 69, 0.5);
  background: #e8f8ef;
  color: #075d31;
}

.system-action-feedback.is-error {
  border-color: #c63e33;
  background: #fff0ee;
  color: #8d211a;
}

@keyframes system-action-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .system-action-feedback {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(button, [role="button"]).is-system-loading::after,
  .online-application-actions button.is-loading::before {
    animation-duration: 1.8s;
  }
}

.hidden {
  display: none !important;
}

.compare-table table {
  min-width: 1640px;
}

.fund-logo-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, var(--green-soft));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.fund-logo-fallback {
  max-width: 32px;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.fund-logo-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  background: #fff;
}

.recommendation-tag,
.commission-pill,
.order-pill {
  min-height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.partner-profile-workspace {
  max-width: 1180px;
}

.partner-profile-select-label {
  display: grid;
  gap: 6px;
  min-width: min(100%, 280px);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.partner-profile-select-label select {
  min-width: 260px;
}

.recommendation-tag {
  margin-top: 6px;
  color: var(--blue);
  background: var(--blue-soft);
}

.contracted-fund-label,
.info-fund-label,
.info-only-box {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
}

.contracted-fund-label {
  color: #08743b;
  background: #e0f6e9;
  border: 1px solid #b9e8cc;
}

.info-fund-label,
.info-only-box {
  color: #667169;
  background: #f2f4f3;
  border: 1px solid #dce2de;
}

.info-fund-label {
  margin-top: 6px;
}

.info-only-box {
  border-radius: 8px;
  padding: 9px 10px;
}

.kasse-info-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(130px, .8fr)) minmax(170px, .9fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.kasse-info-provider {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kasse-info-provider > div,
.kasse-info-row > div {
  min-width: 0;
}

.kasse-info-row strong,
.kasse-info-row small {
  display: block;
}

.kasse-info-row small {
  color: var(--muted);
  font-size: 11px;
}

.kasse-info-row > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .kasse-info-row {
    grid-template-columns: 1fr 1fr;
  }

  .kasse-info-provider,
  .kasse-info-row > div:last-child {
    grid-column: 1 / -1;
  }
}

.commission-pill {
  color: var(--blue);
  background: var(--blue-soft);
}

.order-pill {
  color: var(--accent);
  background: var(--green-soft);
}

.benefit-list {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.benefit-chip {
  min-height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 700;
}

.muted-note {
  color: var(--muted);
  font-size: 12px;
}

.contract-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.contract-actions small {
  flex-basis: 100%;
  color: var(--muted);
}

#customersView table {
  min-width: 1280px;
}

.customers-table th,
.customers-table td {
  padding: 14px 14px;
  vertical-align: middle;
}

.customers-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.customers-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #eef7ef;
  background: linear-gradient(180deg, #122018, #07100a);
  border-bottom: 1px solid rgba(241, 233, 0, 0.18);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.customers-table tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.customers-table tbody tr:hover {
  background: rgba(0, 143, 69, 0.045);
}

.customers-table th:nth-child(1) {
  width: 17%;
}

.customers-table th:nth-child(5),
.customers-table th:nth-child(6),
.customers-table th:nth-child(8) {
  width: 136px;
}

.customers-table th:nth-child(7) {
  width: 82px;
  text-align: center;
}

.customers-table th:nth-child(9) {
  width: 138px;
}

.customer-status-legend {
  margin: 12px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.customer-status-legend span {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.legend-open {
  background: var(--red);
}

.legend-ready {
  background: var(--blue);
}

.legend-done {
  background: var(--accent);
}

.customer-cell {
  min-width: 178px;
}

.customer-tags {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.files-cell-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.files-cell-button {
  width: 94px;
  min-height: 78px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 8px;
  color: var(--accent-dark);
  background: linear-gradient(180deg, #fff, var(--green-soft));
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px;
  font-weight: 900;
}

.files-cell-button:hover {
  border-color: rgba(0, 143, 69, 0.45);
  background: #fff;
}

.files-cell-button strong {
  font-size: 20px;
  line-height: 1;
}

.files-cell-button small {
  color: var(--muted);
  font-size: 11px;
}

.files-cell-icon {
  position: relative;
  width: 26px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.files-cell-icon::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: #fff;
  border-bottom-left-radius: 3px;
}

.files-mail-button {
  width: 74px;
  min-height: 78px;
  border: 1px solid rgba(40, 93, 217, 0.22);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 8px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.files-mail-button:hover {
  border-color: currentColor;
  background: #fff;
}

.files-mail-button small {
  color: currentColor;
  font-size: 11px;
  line-height: 1.1;
}

.files-mail-button.files-mail-sent {
  color: var(--accent);
  background: var(--green-soft);
  border-color: rgba(0, 143, 69, 0.26);
}

.files-mail-button.files-mail-missing {
  color: var(--muted);
  background: #f4f7f5;
  border-color: var(--line);
  cursor: not-allowed;
}

.files-mail-icon {
  position: relative;
  width: 28px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.files-mail-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 4px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.files-mail-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  top: -8px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: inset 0 0 0 4px #fff;
}

.signed-file-button {
  width: 64px;
  height: 58px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 8px;
  color: var(--accent);
  background: linear-gradient(180deg, #fff, var(--green-soft));
  display: grid;
  place-items: center;
  gap: 2px;
  margin: 0 auto;
  cursor: pointer;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.signed-file-button:hover {
  border-color: rgba(0, 143, 69, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.signed-file-button.is-open {
  color: var(--muted);
  background: linear-gradient(180deg, #fff, #f4f7f5);
  border-color: var(--line);
}

.signed-file-button .files-cell-icon {
  width: 26px;
  height: 21px;
  border-radius: 3px;
  border-top-width: 7px;
}

.signed-file-button small {
  font-size: 10px;
  color: currentColor;
}

.send-company-button {
  min-width: 118px;
  min-height: 64px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 8px;
  color: var(--muted);
  background: linear-gradient(180deg, #fff, #f4f7f5);
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.send-company-button:hover {
  border-color: currentColor;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.send-company-button strong {
  min-height: 24px;
  border-radius: 6px;
  padding: 5px 10px;
  color: #fff;
  background: #87916d;
  font-size: 12px;
  line-height: 1.2;
}

.send-company-button span {
  font-size: 13px;
  text-transform: lowercase;
}

.send-company-button.files-mail-ready {
  color: var(--blue);
  background: linear-gradient(180deg, #fff, var(--blue-soft));
  border-color: rgba(40, 93, 217, 0.22);
}

.send-company-button.files-mail-ready strong {
  background: var(--blue);
}

.send-company-button.files-mail-sent {
  color: var(--accent);
  background: linear-gradient(180deg, #fff, var(--green-soft));
  border-color: rgba(0, 143, 69, 0.26);
}

.send-company-button.files-mail-sent strong {
  background: var(--accent);
}

.send-company-button.files-mail-missing {
  cursor: not-allowed;
  opacity: 0.72;
}

.check-mark {
  position: relative;
  width: 16px;
  height: 10px;
}

.check-mark::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 10px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.action-grid {
  min-width: 160px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.customer-compare-action {
  display: grid;
  gap: 3px;
  text-align: left;
  border-color: rgba(0, 132, 68, 0.32);
  background: linear-gradient(135deg, rgba(0, 132, 68, 0.1), rgba(255, 255, 255, 0.98));
  color: var(--accent-dark);
}

.customer-compare-action strong,
.customer-compare-action small {
  display: block;
}

.customer-compare-action small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

button.send-company-button {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.send-company-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.signature-stack {
  min-width: 176px;
  display: grid;
  gap: 7px;
}

.signature-icon-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.signature-icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.signature-icon-button:hover {
  transform: translateY(-1px);
  border-color: currentColor;
  background: #fff;
  box-shadow: var(--shadow);
}

.signature-icon-button.mail-sent {
  color: var(--accent);
  background: linear-gradient(180deg, #fff, var(--green-soft));
  border-color: rgba(0, 143, 69, 0.24);
}

.signature-icon-button.mail-unsent,
.signature-icon-button.signature-open {
  color: var(--red);
  background: linear-gradient(180deg, #fff, var(--red-soft));
  border-color: rgba(196, 69, 45, 0.24);
}

.signature-icon-button.signature-signed {
  color: var(--blue);
  background: linear-gradient(180deg, #fff, var(--blue-soft));
  border-color: rgba(40, 93, 217, 0.26);
}

.signature-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.signature-icon-mail::before {
  content: "";
  position: absolute;
  inset: 3px 1px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.signature-icon-mail::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 6px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.signature-icon-pen::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 4px;
  left: 1px;
  top: 8px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-42deg);
}

.signature-icon-pen::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: 0;
  bottom: 1px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.commission-stack {
  min-width: 170px;
  display: grid;
  gap: 6px;
}

.status-pill {
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 9px;
  display: grid;
  gap: 2px;
  border: 1px solid transparent;
}

.status-pill small {
  font-size: 11px;
  color: currentColor;
  opacity: 0.72;
}

.status-pill strong {
  font-size: 12px;
  line-height: 1.2;
}

.status-pill.paid {
  color: var(--accent);
  background: var(--green-soft);
  border-color: rgba(10, 122, 117, 0.18);
}

.status-pill.pending {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(183, 121, 31, 0.18);
}

.status-pill.open {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(40, 93, 217, 0.18);
}

.status-pill.cancelled {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(196, 69, 45, 0.22);
}

.status-pill.mail-sent {
  color: var(--accent);
  background: var(--green-soft);
  border-color: rgba(0, 143, 69, 0.26);
}

.status-pill.mail-unsent {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(196, 69, 45, 0.26);
}

.billing-cancel-commission-button {
  margin-top: 6px;
  padding: 0;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
}

.billing-cancel-commission-button.danger {
  color: var(--red);
}

.status-pill.signature-signed {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(40, 93, 217, 0.26);
}

.status-pill.signature-open {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(196, 69, 45, 0.26);
}

.muted-line.signature-signed {
  color: var(--blue);
  font-weight: 800;
}

.muted-line.signature-open {
  color: var(--red);
  font-weight: 800;
}

.mini-action {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.mini-action:hover {
  border-color: rgba(10, 122, 117, 0.35);
  background: var(--green-soft);
}

.stacked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.public-confirm-page {
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 12%, rgba(0, 140, 68, 0.12), transparent 34%),
    linear-gradient(135deg, #eef4ef 0%, #ffffff 100%);
}

.public-confirm-card {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow-strong);
}

.public-confirm-card h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
}

.public-confirm-card p {
  color: var(--muted);
}

.public-confirm-card dl {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.public-confirm-card dl div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}

.public-confirm-card dt {
  color: var(--muted);
  font-weight: 800;
}

.public-confirm-card dd {
  margin: 0;
  font-weight: 800;
}

.public-signature-label {
  display: block;
  margin: 22px 0 8px;
  font-weight: 800;
}

.public-vollmacht-signature {
  display: block;
  width: 100%;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}

.public-signature-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.ai-approve-button {
  color: #052e16;
  border-color: rgba(0, 143, 69, 0.28);
  background: #e7f8ef;
}

.ai-approve-button:hover {
  background: #d4f3e2;
  border-color: rgba(0, 143, 69, 0.42);
}

.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.icon-mini-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.icon-mini-button:hover {
  border-color: rgba(0, 143, 69, 0.3);
  background: var(--green-soft);
}

.danger-mini-action {
  color: var(--red);
  border-color: rgba(196, 69, 45, 0.24);
  background: var(--red-soft);
}

.danger-mini-action:hover {
  border-color: rgba(196, 69, 45, 0.42);
  background: #fff1ed;
}

.warning-mini-action {
  color: #8a560c;
  border-color: rgba(183, 121, 31, 0.32);
  background: var(--amber-soft);
}

.warning-mini-action:hover {
  border-color: rgba(183, 121, 31, 0.5);
  background: #fff7bf;
}

.success-mini-action {
  color: var(--accent-dark);
  border-color: rgba(0, 143, 69, 0.3);
  background: var(--green-soft);
}

.success-mini-action:hover {
  border-color: rgba(0, 143, 69, 0.48);
  background: #effff5;
}

.signature-body {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.signature-meta,
.application-tools {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  color: var(--muted);
  line-height: 1.5;
}

.signature-meta strong {
  color: var(--text);
}

#signatureCanvas,
.family-signature-canvas {
  width: 100%;
  height: 220px;
  border: 1px dashed #9aa8bd;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.family-signature-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 154, 83, 0.28);
  border-radius: 12px;
  background: rgba(0, 154, 83, 0.05);
}

.family-signature-section[hidden] {
  display: none;
}

.family-signature-heading,
.family-signature-card,
.family-signature-card-head {
  display: grid;
  gap: 5px;
}

.family-signature-heading small,
.family-signature-card small {
  color: var(--muted);
  line-height: 1.4;
}

.family-signature-list {
  display: grid;
  gap: 12px;
}

.family-signature-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.family-signature-card.is-signed {
  border-color: rgba(0, 154, 83, 0.42);
}

.family-signature-canvas {
  height: 150px;
}

.family-signature-clear {
  justify-self: start;
}

.signature-actions,
.application-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.signature-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.signature-workflow article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.signature-workflow article > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.signature-workflow article div {
  display: grid;
  gap: 3px;
}

.signature-workflow article small,
.signed-contract-send-card small {
  color: var(--muted);
  line-height: 1.35;
}

.signature-workflow article.is-active {
  border-color: rgba(0, 154, 83, 0.45);
  background: rgba(0, 154, 83, 0.08);
}

.signature-workflow article.is-done > span,
.signature-workflow article.is-active > span {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.signature-guidance {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.05);
}

.signature-consent-card {
  padding: 16px;
  border: 1px solid rgba(0, 143, 69, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
  display: grid;
  gap: 12px;
}

.signature-consent-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.signature-consent-head > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.signature-consent-head > div {
  display: grid;
  gap: 4px;
}

.signature-consent-head small,
.signature-consent-status {
  color: var(--muted);
  line-height: 1.45;
}

.signature-consent-card details {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
}

.signature-consent-card summary {
  padding: 11px 13px;
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.signature-consent-text {
  padding: 0 13px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.signature-consent-text p {
  margin: 8px 0 0;
}

.signature-consent-confirmation {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 13px;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
}

.signature-consent-confirmation input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.signature-consent-status {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.signature-consent-card.is-signed {
  border-color: rgba(0, 143, 69, 0.55);
  box-shadow: inset 4px 0 0 var(--green);
}

.signature-consent-card.is-signed .signature-consent-status {
  color: var(--green);
}

.signed-contract-send-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.signed-contract-send-card > div {
  display: grid;
  gap: 4px;
}

.signed-contract-send-card .signed-contract-send-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.signed-contract-send-card.is-ready {
  border-color: rgba(0, 154, 83, 0.45);
  background: rgba(0, 154, 83, 0.08);
}

@media (max-width: 720px) {
  .signature-workflow {
    grid-template-columns: 1fr;
  }

  .signed-contract-send-card {
    align-items: stretch;
    flex-direction: column;
  }
}

.application-tools {
  margin: 20px;
}

.application-tools label {
  flex: 1 1 260px;
}

.application-pack {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.application-doc {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 9px;
}

.application-doc h3 {
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.application-doc dl {
  margin: 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 12px;
  font-size: 13px;
}

.application-doc dt {
  color: var(--muted);
}

.application-doc dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.family-doc,
.spouse-doc,
.child-doc {
  border-color: rgba(5, 150, 105, 0.28);
  background: #fbfefd;
}

.documents-doc {
  grid-column: 1 / -1;
}

.family-side-pages {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.family-page-nav {
  position: sticky;
  top: 12px;
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: #f8fffb;
}

.family-page-nav strong {
  color: var(--green);
  font-size: 13px;
  text-transform: uppercase;
}

.family-page-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
}

.family-page-nav a:hover {
  border-color: rgba(5, 150, 105, 0.45);
  color: var(--green);
}

.family-page-content {
  display: grid;
  gap: 12px;
}

.family-page-doc {
  scroll-margin-top: 18px;
}

.customer-folder-dialog-head {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(21, 73, 45, 0.12);
  background: linear-gradient(120deg, #fbfefd, #f0f8f3);
}

.customer-folder-dialog-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.customer-folder-dialog-title h2 {
  margin: 0;
  color: #092817;
  font-size: 24px;
  line-height: 1.15;
}

.customer-folder-dialog-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.customer-folder-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.customer-folder-refresh-action {
  min-height: 36px;
  padding-inline: 14px;
  white-space: nowrap;
}

.files-dialog-body {
  padding: 16px 20px 22px;
  display: grid;
  gap: 14px;
  background: #f7faf8;
}

.customer-folder-overview,
.customer-folder-workspace,
.customer-folder-upload-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}

.customer-folder-overview,
.customer-folder-workspace,
.customer-folder-upload-panel {
  overflow: hidden;
}

#customerFilesDialog #customerFilesMeta {
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, auto);
  align-items: start;
  gap: 16px 20px;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 20%, rgba(0, 143, 69, 0.12), transparent 32%),
    linear-gradient(120deg, #f6fbf8, #eef8f2);
}

.customer-folder-avatar {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(0, 143, 69, 0.24);
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #008f45, #073d24);
  box-shadow: 0 12px 24px rgba(5, 56, 31, 0.16);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.customer-folder-customer-identity,
.customer-folder-contract-number {
  display: grid;
  gap: 3px;
}

.customer-folder-customer-identity strong {
  color: #153c29;
  font-size: 21px;
  line-height: 1.15;
}

.customer-folder-customer-identity > span:last-child,
.customer-folder-contract-number span,
.customer-folder-contract-number small {
  color: var(--muted);
  font-size: 12px;
}

.customer-folder-contract-number {
  border-left: 1px solid rgba(21, 73, 45, 0.12);
  padding-left: 20px;
  min-height: 58px;
  justify-content: center;
}

.customer-folder-contract-number strong {
  color: #08713b;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.customer-folder-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(21, 73, 45, 0.1);
  padding: 14px 18px 16px;
  background: linear-gradient(180deg, #fff, #fbfefd);
}

.customer-folder-workspace {
  display: grid;
  gap: 12px;
  background: #fff;
}

.customer-folder-workspace > .signature-template-toolbar,
.customer-folder-workspace > .customer-files-workflow-status,
.customer-folder-workspace > .customer-files-grid,
.customer-folder-workspace > .customer-internal-documents {
  margin-inline: 16px;
}

.customer-folder-workspace > :last-child {
  margin-bottom: 16px;
}

.customer-folder-page-head h3 {
  margin: 3px 0 5px;
  font-size: 22px;
}

.customer-folder-page-head p {
  margin: 0;
  color: var(--muted);
}

.document-count-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e8f8ef;
  color: #08763c;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.customer-folder-upload-panel {
  background: linear-gradient(135deg, #fbfefd, #f2faf5);
}

.customer-folder-upload-intro {
  padding: 16px 16px 0;
}

.customer-folder-upload-intro h3 {
  margin: 3px 0 5px;
  color: #092817;
  font-size: 20px;
}

.customer-folder-upload-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.customer-folder-upload {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
}

.customer-folder-upload label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.customer-folder-upload select,
.customer-folder-upload input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 9px 11px;
  font: inherit;
}

.customer-folder-upload .ai-import-status {
  grid-column: 1 / -1;
}

.customer-folder-upload-destinations {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 9px;
}

.customer-folder-upload-destinations button {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .customer-folder-upload {
    grid-template-columns: 1fr;
  }

  .customer-folder-upload-destinations {
    grid-template-columns: 1fr;
  }

  .customer-folder-dialog-head {
    padding: 16px;
  }

  .customer-folder-page-head {
    display: grid;
  }

  #customerFilesDialog #customerFilesMeta {
    grid-template-columns: 1fr;
  }

  .customer-folder-contract-number {
    border-top: 1px solid rgba(21, 73, 45, 0.12);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }

  .customer-internal-documents-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.customer-files-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.customer-file-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(21, 73, 45, 0.12);
  border-radius: 14px;
  padding: 13px;
  background: linear-gradient(180deg, #ffffff, #f9fcfa);
  box-shadow: 0 10px 24px rgba(8, 40, 24, 0.05);
}

.customer-file-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.customer-file-group-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.customer-file-group-head strong {
  color: #092817;
  font-size: 16px;
}

.customer-file-group-head small {
  color: #64756d;
  font-size: 12px;
  line-height: 1.35;
}

.customer-file-group-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #08713b;
  background: #e9f8ef;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.03em;
}

.customer-file-group-count {
  margin-left: auto;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  color: #08713b;
  background: #effaf3;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.customer-file-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.customer-file-archive {
  margin-top: 18px;
  border: 1px solid rgba(64, 91, 78, 0.22);
  border-radius: 16px;
  background: rgba(243, 247, 245, 0.82);
  overflow: hidden;
}

.customer-file-archive > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: #405b4e;
  cursor: pointer;
  font-weight: 700;
}

.customer-file-archive-content {
  padding: 0 14px 14px;
  opacity: 0.9;
}

.customer-file-group-bonus .customer-file-group-icon {
  border-color: rgba(200, 145, 0, 0.26);
  color: #845b00;
  background: #fff5cf;
}

.customer-file-group-family .customer-file-group-icon {
  border-color: rgba(44, 93, 217, 0.2);
  color: #234fba;
  background: #eef3ff;
}

.customer-file-group-proof .customer-file-group-icon,
.customer-file-group-authorization .customer-file-group-icon,
.customer-file-group-other .customer-file-group-icon {
  border-color: rgba(91, 107, 99, 0.18);
  color: #44564d;
  background: #f3f6f4;
}

.file-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  min-height: 118px;
}

.file-card strong,
.file-card small {
  display: block;
}

.file-card small {
  margin-top: 4px;
  color: var(--muted);
}

#customerFilesDialog .file-card {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

#customerFilesDialog .file-card > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

#customerFilesDialog .file-card > .stacked-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

#customerFilesDialog .file-card .mini-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  border-radius: 8px;
}

#customerFilesDialog .file-card .danger-mini-action {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 88px;
  margin-top: 4px;
}

#customerFilesDialog .file-card .application-file-lock-note {
  grid-column: 1 / -1;
  max-width: none;
}

#customerFilesDialog .file-card .mini-action:focus-visible {
  outline: 3px solid #3154a4;
  outline-offset: 2px;
}

.customer-internal-documents {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(44, 93, 217, 0.18);
  border-radius: 10px;
  background: #f7f9ff;
  padding: 14px;
}

.customer-internal-documents[hidden] {
  display: none;
}

.customer-internal-documents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-internal-documents-head > div {
  display: grid;
  gap: 3px;
}

.customer-internal-documents-head > div > strong {
  color: #1d376c;
  font-size: 15px;
}

.customer-internal-documents-head > span,
.internal-document-state {
  width: fit-content;
  border-radius: 999px;
  background: #e8eeff;
  color: #294f9b;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 850;
}

.customer-internal-documents > p {
  margin: 0;
  color: #5f6e89;
  font-size: 12px;
  line-height: 1.45;
}

.customer-internal-documents .customer-files-grid {
  grid-template-columns: minmax(0, 1fr);
}

.customer-internal-documents .customer-file-group {
  box-shadow: none;
}

.customer-internal-documents .customer-file-group-grid {
  grid-template-columns: minmax(0, 1fr);
}

.internal-consent-card {
  border-color: rgba(44, 93, 217, 0.18);
  background: #fff;
}

.internal-document-state {
  display: inline-flex;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .customer-internal-documents-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.application-review-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #b7e0c7;
  border-radius: 10px;
  background: #effaf3;
}

.application-review-summary.missing {
  border-color: #f2c48d;
  background: #fff8eb;
}

.application-review-summary > div,
.application-review-summary > div > span,
.application-review-summary > div > strong {
  display: block;
}

.application-review-summary > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.application-review-summary p,
.application-review-summary ul {
  margin: 0;
}

.application-review-summary ul {
  padding-left: 20px;
  columns: 2;
}

.application-issue-list {
  display: grid;
  gap: 8px;
  padding-left: 0 !important;
  columns: auto !important;
  list-style: none;
}

.application-issue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.application-issue-copy {
  position: relative;
  min-width: 0;
  padding-left: 16px;
  color: #31210a;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.application-issue-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.application-issue-fix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(5, 150, 105, 0.32);
  border-radius: 999px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
  color: #006b35;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 68, 32, 0.06);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.application-issue-fix:hover,
.application-issue-fix:focus-visible {
  border-color: rgba(0, 143, 69, 0.58);
  box-shadow: 0 12px 24px rgba(0, 68, 32, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.application-issue-fix-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #008f45;
  color: #ffffff;
  line-height: 1;
}

.compact-application-issues {
  display: grid;
  gap: 8px;
}

.compact-application-issues .application-issue-list {
  gap: 7px;
}

.compact-application-issues .application-issue-item {
  padding: 8px 10px;
  background: rgba(255, 251, 235, 0.82);
}

.compact-application-issues .application-issue-copy {
  font-size: 12px;
}

.compact-application-issues .application-issue-fix {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 11px;
}

.compact-application-issues-more {
  color: #8a5a00;
  font-weight: 800;
}

.customer-field-correction-highlight {
  position: relative;
  border-color: rgba(0, 143, 69, 0.72) !important;
  background: linear-gradient(135deg, #ecfdf5, #ffffff) !important;
  box-shadow: 0 0 0 4px rgba(250, 224, 0, 0.5), 0 18px 36px rgba(0, 68, 32, 0.16) !important;
  transition: box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.application-delivery-status {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(44, 93, 217, 0.2);
  border-radius: 11px;
  padding: 11px 13px;
  background: #f3f7ff;
  color: #244b9a;
}

.application-delivery-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(44, 93, 217, 0.1);
}

.application-delivery-status > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.application-delivery-status strong,
.application-delivery-status small {
  display: block;
}

.application-delivery-status strong {
  font-size: 12px;
  line-height: 1.3;
}

.application-delivery-status small {
  color: inherit;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.86;
}

.application-delivery-status.sent {
  border-color: rgba(0, 143, 69, 0.25);
  background: #e9f9f0;
  color: #08713b;
}

.application-delivery-status.pending {
  border-color: rgba(200, 145, 0, 0.3);
  background: #fff8dc;
  color: #765400;
}

.application-delivery-status.sending {
  border-color: rgba(0, 115, 153, 0.25);
  background: #eaf8fc;
  color: #006782;
}

.application-delivery-status.failed,
.application-delivery-status.rejected {
  border-color: rgba(185, 28, 28, 0.24);
  background: #fff0f0;
  color: #9c2525;
}

.application-delivery-status.open {
  border-color: rgba(91, 107, 99, 0.18);
  background: #f4f6f5;
  color: #5c6b63;
}

.signed-contract-send-card.is-blocked {
  border-color: rgba(200, 145, 0, 0.2);
  background: linear-gradient(135deg, #fffdf0, #ffffff);
}

#sendSignedApplicationButton[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.72;
  filter: saturate(0.75);
}

#sendSignedApplicationButton.is-click-feedback {
  animation: signature-send-click-feedback 0.38s ease;
}

@keyframes signature-send-click-feedback {
  0% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(201, 224, 0, 0.28); }
  45% { transform: translateY(-1px); box-shadow: 0 0 0 6px rgba(201, 224, 0, 0.2); }
  100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(201, 224, 0, 0); }
}

.application-delivery-status.compact {
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 6px;
  margin-top: 6px;
  border-radius: 8px;
  padding: 6px 8px;
}

.application-delivery-status.compact .application-delivery-status-dot {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

.application-delivery-status.compact strong {
  font-size: 9px;
}

.application-delivery-status.compact small {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 8px;
  white-space: nowrap;
}

.application-file-state {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf5ef;
  color: #17603a;
  font-size: 11px;
  font-weight: 850;
}

.application-file-state.missing {
  background: #fff0dd;
  color: #9b4d00;
}

.application-file-state.manual,
.application-file-state.review {
  background: #eef3ff;
  color: #3154a4;
}

.application-review-open {
  border-color: rgba(49, 84, 164, 0.28);
  color: #264c9d;
  background: #f5f7ff;
}

.application-review-confirm {
  border-color: rgba(0, 143, 69, 0.3);
  color: #08713b;
  background: #effaf3;
}

.application-review-confirm.is-confirmed,
.application-review-confirm:disabled {
  cursor: default;
  opacity: 0.72;
}

.application-review-confirm.is-confirmed {
  border-color: rgba(0, 143, 69, 0.34);
  color: #066b37;
  background: #dcf8e8;
  opacity: 1;
}

.application-file-lock-note {
  display: block;
  max-width: 190px;
  border-radius: 7px;
  background: #f3f5f4;
  padding: 7px 8px;
  color: #5f6f66;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.application-file-lock-note.sent-lock {
  background: #eaf7ef;
  color: #0b6b3d;
}

.application-draft-replace {
  cursor: pointer;
}

.application-draft-replace input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.pdf-direct-edit-action {
  border-color: rgba(0, 143, 69, 0.32);
  background: #effaf3;
  color: #006b37;
  font-weight: 850;
}

.pdf-direct-edit-action:hover {
  border-color: #008f45;
  background: #e3f6ea;
}

#pdfFieldEditorForm {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(86vh, 860px);
}

.pdf-editor-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: #f7faf8;
}

.pdf-editor-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 12px;
}

.pdf-editor-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid #d8e6dd;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
}

.pdf-editor-summary small,
.pdf-editor-field-head small {
  color: var(--muted);
  font-size: 10px;
}

.pdf-editor-summary strong {
  overflow-wrap: anywhere;
  color: #10231a;
}

.pdf-editor-safety-note {
  display: grid;
  gap: 4px;
  border-left: 4px solid #008f45;
  border-radius: 8px;
  background: #ecf8f0;
  padding: 12px 14px;
  color: #214b34;
  font-size: 12px;
  line-height: 1.45;
}

.pdf-editor-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.pdf-editor-toolbar label {
  flex: 1;
  display: grid;
  gap: 6px;
  color: #40564a;
  font-size: 11px;
  font-weight: 800;
}

.pdf-editor-toolbar input {
  width: 100%;
  border: 1px solid #cbded1;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.pdf-editor-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.pdf-editor-status.ready { color: #08743c; }
.pdf-editor-status.warning { color: #9b5b00; }
.pdf-editor-status.error { color: #b42318; }
.pdf-editor-status.working { color: #3154a4; }

.pdf-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pdf-editor-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  border: 1px solid #d8e6dd;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.pdf-editor-field[hidden] { display: none; }

.pdf-editor-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pdf-editor-field-head > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pdf-editor-field-head strong,
.pdf-editor-field-head small {
  overflow-wrap: anywhere;
}

.pdf-editor-field-type {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf5ef;
  padding: 4px 7px;
  color: #17603a;
  font-size: 9px;
  font-weight: 850;
}

.pdf-editor-field input[type="text"],
.pdf-editor-field textarea,
.pdf-editor-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbded1;
  border-radius: 8px;
  background: #fbfdfc;
  padding: 9px 10px;
  color: #10231a;
}

.pdf-editor-field textarea {
  resize: vertical;
  min-height: 72px;
}

.pdf-editor-field select[multiple] { min-height: 100px; }

.pdf-editor-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border-radius: 8px;
  background: #f6faf7;
  padding: 9px 10px;
  color: #244432;
  font-size: 12px;
  font-weight: 750;
}

.pdf-editor-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #008f45;
}

.pdf-editor-loading,
.pdf-editor-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 120px;
  border: 1px dashed #bfd3c5;
  border-radius: 10px;
  background: #fff;
  color: #607168;
  text-align: center;
}

@media (max-width: 720px) {
  .pdf-editor-summary,
  .pdf-editor-fields { grid-template-columns: 1fr; }
  .pdf-editor-toolbar { align-items: stretch; flex-direction: column; }
  .pdf-editor-toolbar .document-count-badge { align-self: flex-start; }
}

.document-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-tag {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  color: var(--text);
  background: #f8fafc;
  text-decoration: none;
}

.doc-tag span {
  font-size: 13px;
  font-weight: 800;
}

.doc-tag small {
  color: var(--muted);
}

.signature-preview {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f8fafc;
}

.signature-preview img {
  max-width: 100%;
  max-height: 86px;
}

.file-note {
  color: var(--muted);
  font-size: 13px;
}

.positive-money {
  color: var(--accent);
}

.negative-money {
  color: var(--red);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 138px;
}

.health-fund-edit-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(0, 132, 68, 0.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 132, 68, 0.1), #fff);
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.health-fund-edit-button span {
  font-size: 16px;
  line-height: 1;
}

.health-fund-edit-button strong {
  font-size: 12px;
}

.health-fund-edit-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--green-soft);
}

.danger-action {
  color: var(--red);
  border-color: #ffc7bd;
  background: var(--red-soft);
}

.compact-action {
  padding-inline: 8px;
}

.action-icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.action-icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 143, 69, 0.35);
  background: var(--green-soft);
}

.action-icon-button::before {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.action-icon-button.icon-up::before {
  content: "\2191";
}

.action-icon-button.icon-down::before {
  content: "\2193";
}

.action-icon-button.icon-edit::before {
  content: "\270E";
}

.action-icon-button.icon-disable::before {
  content: "\23FB";
}

.action-icon-button.icon-enable::before {
  content: "\2713";
}

.action-icon-button.is-danger {
  color: var(--red);
  border-color: #ffc7bd;
  background: var(--red-soft);
}

.action-icon-button.is-danger:hover {
  background: #ffdcd5;
  border-color: #ff9a8a;
}

.action-icon-button.is-success {
  color: var(--accent-dark);
  border-color: rgba(0, 143, 69, 0.25);
  background: var(--green-soft);
}

.fund-cell small a {
  color: var(--accent);
  text-decoration: none;
}

.fund-email-list {
  min-width: 210px;
  display: grid;
  gap: 7px;
}

.fund-email-list > div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
}

.fund-email-list small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fund-email-list a,
.fund-email-list span:not(.muted-note) {
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.fund-email-list a {
  color: var(--accent-dark);
  text-decoration: none;
}

.fund-email-list a:hover {
  text-decoration: underline;
}

.fund-contact-phone {
  display: block;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.fund-pdf-list {
  min-width: 270px;
  display: grid;
  gap: 7px;
}

.fund-pdf-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.fund-pdf-item strong,
.fund-pdf-item small {
  display: block;
}

.fund-pdf-item strong {
  color: var(--ink);
  font-size: 12px;
}

.fund-pdf-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.fund-form-audience {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.fund-form-category {
  display: inline-flex;
  width: fit-content;
  margin: 4px 0 0 5px;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(234, 179, 8, 0.13);
  color: #854d0e;
  font-size: 9px;
  font-weight: 800;
}

.fund-form-note {
  margin: 6px 0 0;
  border-left: 3px solid rgba(5, 150, 105, 0.3);
  padding: 6px 8px;
  background: #fff;
  color: #475569;
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.fund-pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fund-pdf-actions .mini-action {
  min-height: 27px;
  padding: 5px 8px;
  font-size: 10px;
}

.health-extra {
  display: block;
  margin-top: 4px;
  max-width: 260px;
  color: var(--muted);
  line-height: 1.4;
}

.payout-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.payout-card {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.payout-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.settings-panel {
  margin-bottom: 16px;
}

.settings-status-grid,
.settings-action-grid,
.settings-roadmap {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.settings-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.settings-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-status-grid article,
.settings-action-grid article,
.settings-roadmap article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.settings-status-grid span,
.settings-roadmap span {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.settings-status-grid strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 28px;
}

.settings-status-grid strong.is-ready {
  color: var(--accent-dark);
}

.settings-status-grid small,
.settings-action-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.settings-action-grid strong,
.settings-roadmap strong {
  display: block;
  margin-bottom: 6px;
}

.settings-action-grid .secondary-button {
  margin-top: 14px;
  width: 100%;
}

.settings-roadmap {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-control-panel {
  border-color: rgba(0, 143, 69, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 249, 243, 0.86));
}

.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.admin-control-card {
  min-height: 132px;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  box-shadow: var(--shadow-soft);
}

.admin-control-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #021209;
  display: inline-grid;
  place-items: center;
  font-weight: 1000;
  box-shadow: 0 10px 24px rgba(0, 143, 69, 0.18);
}

.admin-control-card strong {
  display: block;
  margin-bottom: 6px;
}

.admin-control-card p,
.admin-settings-note {
  color: var(--muted);
  line-height: 1.5;
}

.admin-settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.admin-settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.admin-settings-form input,
.admin-settings-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.admin-settings-form input:disabled,
.admin-settings-form select:disabled {
  background: #f4f7f4;
  color: #7a857d;
  cursor: not-allowed;
}

.admin-settings-note {
  grid-column: span 3;
  align-self: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 143, 69, 0.06);
}

.admin-settings-form .primary-button {
  align-self: end;
}

#adminControlStatus.is-online {
  background: #e8fff2;
  border-color: rgba(0, 143, 69, 0.22);
  color: var(--accent-dark);
}

#adminControlStatus.is-locked {
  background: #fff6db;
  border-color: rgba(240, 190, 0, 0.28);
  color: #7a5d00;
}

#settingsBackendStatus.is-online {
  background: #e8fff2;
  border-color: rgba(0, 143, 69, 0.22);
  color: var(--accent-dark);
}

.partner-detail-panel {
  margin: 0 0 16px;
}

.partner-detail-empty {
  border: 1px dashed rgba(0, 143, 69, 0.24);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.partner-detail-empty.small {
  text-align: left;
  padding: 14px;
}

.partner-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.partner-detail-head,
.partner-detail-id,
.partner-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-detail-head {
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.partner-detail-id > div,
.partner-name-button span:last-child {
  display: grid;
  gap: 3px;
}

.partner-detail-id span:not(.avatar) {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.partner-detail-id strong {
  font-size: 20px;
}

.partner-detail-id small,
.partner-contract-section p,
.partner-contract-card small,
.partner-name-button small {
  color: var(--muted);
}

.partner-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.partner-detail-stats article {
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: #f8fffb;
  display: grid;
  gap: 4px;
}

.partner-detail-stats span,
.partner-contract-card dt {
  color: var(--muted);
  font-size: 12px;
}

.partner-detail-stats strong {
  font-size: 21px;
}

.partner-contract-section {
  display: grid;
  gap: 12px;
}

.partner-contract-section h3 {
  margin: 0 0 4px;
}

.partner-contract-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.partner-contract-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.partner-contract-card header,
.partner-contract-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.partner-contract-card header div {
  display: grid;
  gap: 3px;
}

.partner-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.partner-contract-card header span:first-child {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.partner-contract-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.partner-contract-card dl div {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface-2);
}

.partner-contract-card dd,
.partner-contract-card dt {
  margin: 0;
}

.partner-contract-card dd {
  font-weight: 800;
}

.partner-contract-spouse {
  margin: 0;
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 143, 69, 0.06);
}

.account-customer-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 143, 69, 0.16);
}

.team-file-panel .account-customer-section {
  margin-top: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.account-customer-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-customer-section-head h3 {
  margin: 3px 0 4px;
}

.account-customer-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.account-customer-count {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 999px;
  padding: 7px 11px;
  background: #e9fff3;
  color: #006b3c;
  font-size: 12px;
  font-weight: 900;
}

.account-customer-card footer {
  align-items: center;
}

.account-customer-card footer small {
  color: var(--muted);
}

.partner-name-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.partner-name-button.active strong {
  color: var(--green);
}

#brokersTable tr.is-selected {
  background: rgba(0, 143, 69, 0.05);
}

@media (max-width: 980px) {
  .partner-detail-stats,
  .partner-contract-list {
    grid-template-columns: 1fr;
  }
}

/* Professional customer register layout: preserve all data while improving hierarchy and controls. */
#customersView {
  --customer-card-border: rgba(21, 73, 45, 0.14);
  --customer-card-shadow: 0 10px 28px rgba(17, 52, 35, 0.07);
  --customer-column-line: rgba(21, 73, 45, 0.08);
}

#customersView .customer-register-toolbar {
  margin: 4px 0 14px;
  border: 1px solid rgba(0, 143, 69, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 243, 0.95));
  display: grid;
  grid-template-columns: max-content max-content max-content minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(20, 61, 40, 0.05);
}

#customersView .customer-register-toolbar .section-bar {
  margin: 0;
  padding: 0;
  min-width: max-content;
}

#customersView .customer-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 158px;
  gap: 9px;
  border-color: rgba(0, 143, 69, 0.26);
  border-radius: 10px;
  background: #fff;
  padding: 0 15px 0 9px;
  color: var(--accent-dark);
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(0, 92, 49, 0.08);
}

#customersView .customer-add-button:hover {
  border-color: var(--accent);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.customer-add-symbol {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
}

#customersView .customer-status-legend {
  margin: 0;
  align-items: center;
  gap: 7px;
}

#customersView .customer-status-legend span {
  min-height: 30px;
  gap: 7px;
  border-color: rgba(21, 73, 45, 0.12);
  background: rgba(255, 255, 255, 0.88);
  padding: 0 10px;
  font-size: 10px;
  box-shadow: 0 3px 9px rgba(17, 52, 35, 0.04);
}

#customersView .customer-status-legend .legend-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.035);
}

#customersView .customer-register-filters {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(122px, 1fr)) auto auto;
  gap: 8px;
  align-items: end;
}

#customersView .customer-register-filters[hidden] {
  display: none;
}

#customersView .customer-filter-panel-toggle {
  min-height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  color: var(--accent-dark);
  font-weight: 900;
  white-space: nowrap;
}

#customersView .customer-filter-panel-toggle[aria-expanded="true"] {
  border-color: rgba(0, 143, 69, 0.32);
  background: var(--green-soft);
}

#customersView .customer-filter-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 2px solid currentColor;
  border-inline-width: 0;
  position: relative;
}

#customersView .customer-filter-icon::before,
#customersView .customer-filter-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

#customersView .customer-filter-icon::before {
  top: 3px;
}

#customersView .customer-filter-icon::after {
  bottom: 3px;
}

#customersView .customer-filter-summary--toolbar {
  min-height: 42px;
  align-self: center;
  justify-self: start;
}

#customersView .customer-register-filters label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#customersView .customer-register-filters label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.field-help-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid rgba(0, 143, 69, 0.28);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.92);
  color: var(--green);
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}

.field-help-dot:hover,
.field-help-dot:focus-visible {
  border-color: rgba(0, 143, 69, 0.55);
  background: #fffde7;
  color: #064e3b;
}

.field-help-dot--dark {
  border-color: rgba(241, 233, 0, 0.48);
  background: rgba(241, 233, 0, 0.12);
  color: var(--electric);
}

#customersView .customer-register-filters select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid rgba(21, 73, 45, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 0 32px 0 10px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 3px 9px rgba(17, 52, 35, 0.04);
}

#customersView .customer-register-filters select:focus-visible {
  outline: 3px solid rgba(250, 224, 0, 0.45);
  outline-offset: 2px;
}

#customersView .customer-register-filters label.customer-filter-disabled {
  opacity: 0.64;
}

#customersView .customer-register-filters label.customer-filter-disabled select {
  cursor: not-allowed;
  background: rgba(245, 249, 246, 0.86);
  color: rgba(18, 31, 24, 0.62);
  box-shadow: none;
}

#customersView .customer-filter-reset {
  min-height: 36px;
  align-self: end;
  border-radius: 10px;
  padding: 0 12px;
  white-space: nowrap;
}

#customersView .customer-filter-summary {
  min-height: 36px;
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.88);
  color: var(--green);
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

#customersView .customer-transfer-guide {
  margin: 0 0 14px;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 14px;
  background: linear-gradient(120deg, #082516, #0a3c23);
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(620px, 2.2fr);
  align-items: center;
  gap: 22px;
  padding: 14px 18px;
  color: #fff;
  box-shadow: 0 10px 26px rgba(5, 40, 22, 0.13);
}

#customersView .customer-transfer-guide[hidden] {
  display: none !important;
}

#customersView .customer-transfer-guide > div {
  display: grid;
  gap: 4px;
}

#customersView .customer-transfer-guide .section-kicker {
  color: var(--electric);
}

#customersView .customer-transfer-guide > div > strong {
  font-size: 14px;
}

#customersView .customer-transfer-guide > div > small {
  max-width: 320px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

#customersView .customer-guide-dismiss {
  justify-self: start;
  margin-top: 4px;
  color: var(--electric);
}

#customersView .customer-transfer-guide ol,
.customer-fund-dialog-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

#customersView .customer-transfer-guide li,
.customer-fund-dialog-steps li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#customersView .customer-transfer-guide li > span,
.customer-fund-dialog-steps li > span,
.customer-fund-dialog-steps .customer-workflow-step-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(241, 233, 0, 0.45);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--electric);
  font-size: 11px;
  font-weight: 900;
}

#customersView .customer-transfer-guide li div,
.customer-fund-dialog-steps li div,
.customer-fund-dialog-steps .customer-workflow-step-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#customersView .customer-transfer-guide li strong,
#customersView .customer-transfer-guide li small,
.customer-fund-dialog-steps li strong,
.customer-fund-dialog-steps li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customersView .customer-transfer-guide li strong {
  color: #fff;
  font-size: 10px;
}

#customersView .customer-transfer-guide li small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 8px;
}

#customersView .customers-table {
  border: 1px solid var(--customer-card-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #f5f9f6, #eef4f0);
  box-shadow: var(--customer-card-shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 143, 69, 0.34) transparent;
}

#customersView .customers-table::-webkit-scrollbar {
  height: 8px;
}

#customersView .customers-table::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 143, 69, 0.28);
}

#customersView .customers-table table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0 10px;
  padding: 0 11px 11px;
  table-layout: fixed;
}

#customersView .customers-table thead th {
  top: 0;
  height: 48px;
  border: 0;
  background: linear-gradient(180deg, #10261a, #07130d);
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  letter-spacing: 0.025em;
  box-shadow: inset 0 -1px rgba(241, 233, 0, 0.14);
}

#customersView .customers-table thead th:first-child {
  border-radius: 10px 0 0 10px;
}

#customersView .customers-table thead th:last-child {
  border-radius: 0 10px 10px 0;
}

.customer-column-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.customer-column-heading svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--electric);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#customersView .customers-table th:nth-child(1) { width: 100%; }

#customersView .compact-customer-row td {
  cursor: pointer;
  height: auto;
  min-height: 62px;
  border-top: 1px solid var(--customer-card-border);
  border-bottom: 1px solid var(--customer-card-border);
  background: rgba(255, 255, 255, 0.98);
  padding: 9px 14px;
  vertical-align: middle;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#customersView .compact-customer-row button,
#customersView .compact-customer-row a,
#customersView .compact-customer-row input,
#customersView .compact-customer-row select {
  cursor: pointer;
}

#customersView .compact-customer-row td + td {
  border-left: 1px solid var(--customer-column-line);
}

#customersView .compact-customer-row td:first-child {
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--customer-card-border);
  border-radius: 13px 0 0 13px;
  padding-left: 17px;
}

#customersView .compact-customer-row td:first-child::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--accent), #2c63d7);
}

#customersView .compact-customer-row td:last-child {
  border-right: 1px solid var(--customer-card-border);
  border-radius: 0 13px 13px 0;
}

#customersView .compact-customer-row:hover td {
  border-top-color: rgba(0, 143, 69, 0.28);
  border-bottom-color: rgba(0, 143, 69, 0.28);
  background: #fff;
  box-shadow: 0 9px 22px rgba(17, 52, 35, 0.055);
}

#customersView .compact-customer-row.is-status-danger td {
  border-top-color: rgba(196, 69, 45, 0.28);
  border-bottom-color: rgba(196, 69, 45, 0.28);
  background: linear-gradient(90deg, rgba(255, 241, 242, 0.96), rgba(255, 255, 255, 0.98) 34%);
}

#customersView .compact-customer-row.is-status-ready td {
  border-top-color: rgba(40, 93, 217, 0.24);
  border-bottom-color: rgba(40, 93, 217, 0.24);
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98) 34%);
}

#customersView .compact-customer-row.is-status-done td {
  border-top-color: rgba(0, 143, 69, 0.24);
  border-bottom-color: rgba(0, 143, 69, 0.24);
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.98) 34%);
}

#customersView .compact-customer-row.is-status-waiting td {
  border-top-color: rgba(183, 121, 31, 0.24);
  border-bottom-color: rgba(183, 121, 31, 0.24);
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.98) 34%);
}

#customersView .compact-customer-row.is-status-open td {
  border-top-color: rgba(100, 116, 139, 0.2);
  border-bottom-color: rgba(100, 116, 139, 0.2);
}

#customersView .compact-customer-row.is-status-danger td:first-child::before { background: linear-gradient(180deg, var(--red), #991b1b); }
#customersView .compact-customer-row.is-status-ready td:first-child::before { background: linear-gradient(180deg, var(--blue), #1d4ed8); }
#customersView .compact-customer-row.is-status-done td:first-child::before { background: linear-gradient(180deg, var(--accent), #047857); }
#customersView .compact-customer-row.is-status-waiting td:first-child::before { background: linear-gradient(180deg, var(--amber), #b45309); }
#customersView .compact-customer-row.is-status-open td:first-child::before { background: linear-gradient(180deg, #64748b, #334155); }

#customersView .customer-identity-cell {
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 96px max-content;
}

#customersView .compact-customer-row .avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 11px;
  background: linear-gradient(145deg, #346fe4, #244ab3);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 5px 13px rgba(36, 74, 179, 0.2);
}

#customersView .compact-customer-row.is-status-danger .customer-status-avatar {
  background: linear-gradient(145deg, #ef4444, #991b1b);
  box-shadow: 0 5px 13px rgba(153, 27, 27, 0.2);
}

#customersView .compact-customer-row.is-status-ready .customer-status-avatar {
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 5px 13px rgba(29, 78, 216, 0.18);
}

#customersView .compact-customer-row.is-status-done .customer-status-avatar {
  background: linear-gradient(145deg, #10b981, #047857);
  box-shadow: 0 5px 13px rgba(4, 120, 87, 0.18);
}

#customersView .compact-customer-row.is-status-waiting .customer-status-avatar {
  background: linear-gradient(145deg, #f59e0b, #b45309);
  box-shadow: 0 5px 13px rgba(180, 83, 9, 0.18);
}

#customersView .compact-customer-row.is-status-open .customer-status-avatar {
  background: linear-gradient(145deg, #64748b, #334155);
  box-shadow: 0 5px 13px rgba(51, 65, 85, 0.16);
}

#customersView .customer-identity-cell > div {
  gap: 6px;
}

#customersView .customer-identity-cell > .customer-one-line-summary {
  display: flex;
  flex: 1 1 auto;
}

#customersView .customer-one-line-summary {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}

#customersView .customer-one-line-summary > * {
  flex: 0 0 auto;
  min-width: 0;
}

#customersView .customer-one-line-summary a,
#customersView .customer-one-line-phone,
#customersView .customer-one-line-pill,
#customersView .customer-fund-transition--inline {
  min-height: 24px;
  border: 1px solid rgba(21, 73, 45, 0.1);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: #476156;
  background: #f5faf7;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

#customersView .customer-one-line-summary a {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#customersView .customer-one-line-person {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  flex: 0 0 270px;
  display: grid;
  gap: 2px;
  overflow: hidden;
}

#customersView .customer-one-line-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

#customersView .customer-member-count-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 999px;
  background: rgba(232, 248, 238, 0.88);
  padding: 2px 7px;
  color: #08713b;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
}

#customersView .customer-one-line-person small {
  color: #64746a;
  font-size: 10px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
}

#customersView .customer-one-line-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

#customersView .customer-name-action,
#customersView .customer-fund-side--action {
  appearance: none;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#customersView .customer-name-action:hover .customer-one-line-name,
#customersView .customer-name-action:focus-visible .customer-one-line-name,
#customersView .customer-fund-side--action:hover .customer-fund-name,
#customersView .customer-fund-side--action:focus-visible .customer-fund-name,
#customersView .customer-fund-single.customer-fund-side--action:hover strong,
#customersView .customer-fund-single.customer-fund-side--action:focus-visible strong {
  color: #008f45;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#customersView .customer-name-action:focus-visible,
#customersView .customer-fund-side--action:focus-visible {
  outline: 2px solid rgba(0, 143, 69, 0.34);
  outline-offset: 3px;
  border-radius: 8px;
}

#customersView .customer-fund-transition--inline {
  width: 700px;
  min-width: 700px;
  max-width: 700px;
  flex: 0 0 700px;
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: linear-gradient(90deg, rgba(240, 253, 244, 0.94), rgba(255, 255, 255, 0.92));
}

#customersView .customer-fund-transition--inline .customer-fund-name {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #15492d;
  font-size: 13px;
  font-weight: 950;
}

#customersView .customer-fund-transition--inline .customer-fund-side {
  width: 100%;
  min-width: 0;
  max-width: none;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#customersView .customer-fund-transition--inline .customer-fund-side .fund-logo-wrap {
  grid-column: 1;
  justify-self: start;
}

#customersView .customer-fund-transition--inline .customer-fund-side .customer-fund-name {
  grid-column: 2;
  justify-self: stretch;
}

#customersView .customer-fund-transition--inline .customer-fund-side--from {
  justify-content: flex-start;
}

#customersView .customer-fund-transition--inline .customer-fund-side--to {
  justify-content: flex-start;
}

#customersView .customer-fund-transition--inline .fund-logo-wrap,
#customersView .customer-fund-single .fund-logo-wrap {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  font-size: 8px;
}

#customersView .customer-fund-transition--inline .fund-logo-wrap img,
#customersView .customer-fund-single .fund-logo-wrap img {
  padding: 3px;
}

#customersView .customer-fund-single {
  min-height: 34px;
  padding: 3px 10px 3px 4px;
  gap: 8px;
}

#customersView .customer-fund-single strong {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #15492d;
  font-size: 13px;
  font-weight: 950;
}

#customersView .customer-fund-transition--inline .customer-fund-from {
  text-align: left;
}

#customersView .customer-fund-transition--inline .customer-fund-to {
  text-align: left;
}

#customersView .customer-fund-transition--inline .customer-fund-transfer-mid {
  appearance: none;
  flex: 0 0 auto;
  min-width: 184px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #08713b;
  font-size: 15px;
  font-weight: 950;
}

#customersView .customer-fund-transfer-mid--action {
  cursor: pointer;
}

#customersView .customer-fund-transfer-mid--action:hover em,
#customersView .customer-fund-transfer-mid--action:focus-visible em {
  border-color: rgba(0, 143, 69, 0.62);
  box-shadow: 0 7px 18px rgba(0, 96, 54, 0.2);
  transform: translateY(-1px);
}

#customersView .customer-fund-transfer-mid--action:focus-visible {
  outline: 2px solid rgba(0, 143, 69, 0.34);
  outline-offset: 3px;
  border-radius: 12px;
}

#customersView .customer-fund-transition--inline .customer-fund-transfer-mid em {
  min-width: 112px;
  border: 2px solid rgba(0, 143, 69, 0.32);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #eafaf1 100%);
  box-shadow: 0 5px 12px rgba(0, 96, 54, 0.12);
  padding: 4px 12px 5px;
  font-style: normal;
  line-height: 1.05;
  text-align: center;
}

#customersView .customer-fund-transition--inline .customer-fund-transfer-mid em small,
#customersView .customer-fund-transition--inline .customer-fund-transfer-mid em strong {
  display: block;
}

#customersView .customer-fund-transition--inline .customer-fund-transfer-mid em small {
  margin-bottom: 3px;
  color: #4c6f5d;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#customersView .customer-fund-transition--inline .customer-fund-transfer-mid em strong {
  color: #006b39;
  font-size: 13px;
  font-weight: 1000;
  white-space: nowrap;
}

#customersView .customer-fund-transition--inline .customer-fund-transfer-mid.is-pending em {
  border-color: rgba(222, 157, 0, 0.42);
  background: linear-gradient(180deg, #fffef6 0%, #fff4c7 100%);
  box-shadow: 0 5px 12px rgba(169, 112, 0, 0.13);
}

#customersView .customer-fund-transition--inline .customer-fund-transfer-mid.is-pending em strong {
  color: #8a5900;
}

#customersView .compact-customer-name {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

#customersView .compact-customer-name strong {
  font-size: 15px;
  font-weight: 900;
}

#customersView .compact-customer-name .badge {
  margin-left: auto;
  min-height: 22px;
  padding: 3px 8px;
  font-size: 9px;
}

#customersView .customer-real-status-badge {
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  border: 1px solid transparent;
}

#customersView .customer-real-status-badge.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(196, 69, 45, 0.24);
}

#customersView .customer-real-status-badge.ready {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(40, 93, 217, 0.2);
}

#customersView .customer-real-status-badge.done {
  color: var(--accent);
  background: var(--green-soft);
  border-color: rgba(0, 143, 69, 0.22);
}

#customersView .customer-real-status-badge.waiting {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(183, 121, 31, 0.22);
}

#customersView .customer-real-status-badge.open {
  color: #475569;
  background: #eef2f6;
  border-color: rgba(100, 116, 139, 0.2);
}

#customersView .compact-customer-row.is-delivery-sending .customer-real-status-badge::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: system-action-spin 0.7s linear infinite;
}

#customersView .customer-payment-status {
  width: 96px;
  min-width: 96px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: #f1f5f9;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

#customersView .customer-payment-status.paid {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(4, 120, 87, 0.24);
}

#customersView .customer-payment-status.pending,
#customersView .customer-payment-status.open {
  color: #9a6700;
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.25);
}

#customersView .customer-payment-status.cancelled {
  color: #b42318;
  background: #fff1f2;
  border-color: rgba(180, 35, 24, 0.24);
}

#customersView button.customer-payment-status--action {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

#customersView button.customer-payment-status--action:hover,
#customersView button.customer-payment-status--action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(4, 120, 87, 0.52);
  box-shadow: 0 5px 14px rgba(4, 120, 87, 0.14);
  outline: none;
}

#billingView [data-company-invoice].is-linked-invoice {
  animation: linked-invoice-highlight 3.2s ease both;
}

@keyframes linked-invoice-highlight {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(0, 143, 69, 0); }
  18%, 72% { box-shadow: inset 0 0 0 3px rgba(0, 143, 69, 0.42); background: #ecfdf3; }
}

#customersView .compact-customer-id {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  opacity: 0.9;
}

#customersView .customer-fund-transition {
  width: 100%;
  min-height: 28px;
  justify-content: center;
  gap: 8px;
  margin-top: 1px;
  border-color: rgba(0, 143, 69, 0.24);
  border-radius: 9px;
  padding: 5px 8px;
  background: linear-gradient(90deg, rgba(225, 248, 234, 0.92), rgba(237, 251, 243, 0.92));
}

#customersView .customer-fund-transition:not(.customer-fund-transition--inline) span {
  max-width: 44%;
}

#customersView .compact-contact-lines {
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

#customersView .compact-contact-lines a,
#customersView .compact-contact-lines span {
  font-size: 10px;
  line-height: 1.35;
}

#customersView .compact-customer-meta {
  gap: 5px;
}

#customersView .compact-customer-meta span {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 9px;
}

#customersView .compact-provision-cell {
  background: linear-gradient(180deg, #fbfefc, #f5fbf7);
}

#customersView .compact-provision-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

#customersView .compact-money-card {
  min-width: 0;
  min-height: 78px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 15px;
  padding: 10px 11px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: linear-gradient(135deg, #ffffff, #f3fbf6);
  box-shadow: 0 8px 20px rgba(17, 52, 35, 0.055);
  text-align: left;
}

#customersView .compact-money-card--commission {
  background: linear-gradient(135deg, #f5fcf8, #ffffff);
}

#customersView .compact-provision-head strong {
  color: #00783d;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1;
  letter-spacing: -0.03em;
}

#customersView .compact-provision-head span {
  width: fit-content;
  border-radius: 999px;
  background: #eef4f0;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 850;
  color: #476156;
}

#customersView .compact-family-bonus {
  border-color: rgba(241, 233, 0, 0.34);
  background: linear-gradient(135deg, #fffce8, #ffffff);
}

#customersView .compact-money-card small {
  color: #476156;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

#customersView .compact-family-bonus strong {
  color: #7a5a00;
}

#customersView .compact-status-list {
  margin-top: 10px;
  gap: 7px;
  flex-wrap: wrap;
}

#customersView .compact-status-list .status-pill {
  min-height: 28px;
  gap: 6px;
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 850;
}

#customersView .compact-status-list .status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.75;
}

#customersView .compact-status-list .paid-member-count {
  color: #075f35;
  border-color: rgba(0, 143, 69, 0.22);
  background: #e8f8ef;
}

#customersView .compact-info-dot {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(21, 73, 45, 0.09);
  border-radius: 999px;
  padding: 0;
  background: #fff;
  box-shadow: 0 3px 8px rgba(17, 52, 35, 0.06);
  color: #8a5900;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

#customersView .compact-info-dot:hover,
#customersView .compact-info-dot:focus-visible {
  border-color: rgba(217, 119, 6, 0.48);
  box-shadow: 0 5px 12px rgba(138, 89, 0, 0.14);
  outline: 2px solid rgba(217, 119, 6, 0.16);
}

#customersView .compact-customer-workflow {
  min-height: 158px;
  align-content: start;
  gap: 9px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f7fbf8);
  padding: 11px;
  box-shadow: 0 5px 14px rgba(17, 52, 35, 0.045);
}

#customersView .compact-workflow-head {
  align-items: flex-start;
}

#customersView .compact-workflow-fund-action {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(210, 198, 0, 0.58);
  border-radius: 12px;
  background: linear-gradient(135deg, #fffde6, #f7f2a6);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: #123d28;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(143, 132, 0, 0.08);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#customersView .compact-workflow-fund-action:hover,
#customersView .compact-workflow-fund-action:focus-visible {
  border-color: rgba(0, 143, 69, 0.42);
  background: linear-gradient(135deg, #f6fff9, #eef8c7);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 52, 35, 0.1);
}

#customersView .compact-workflow-fund-action > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#customersView .compact-workflow-fund-action strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customersView .compact-workflow-fund-action small {
  overflow: hidden;
  color: #52685d;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customersView .compact-customer-workflow .customer-transfer-progress {
  border: 1px solid rgba(21, 73, 45, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px;
}

#customersView .customer-next-step-action {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(0, 143, 69, 0.24);
  border-radius: 13px;
  background: linear-gradient(135deg, #008f45, #006b3a);
  color: #fff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(0, 95, 53, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#customersView .customer-next-step-action:hover,
#customersView .customer-next-step-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 95, 53, 0.22);
  filter: saturate(1.04);
}

#customersView .customer-next-step-action.warning {
  border-color: rgba(211, 141, 0, 0.34);
  background: linear-gradient(135deg, #fff8d8, #ffe790);
  color: #5d4300;
  box-shadow: 0 9px 18px rgba(143, 102, 0, 0.12);
}

#customersView .customer-next-step-action.success {
  background: linear-gradient(135deg, #00a85a, #007a42);
}

#customersView .customer-next-step-action.pending,
#customersView .customer-next-step-action.sending,
#customersView .customer-next-step-action.muted,
#customersView .customer-next-step-action:disabled {
  border-color: rgba(91, 107, 99, 0.18);
  background: #f4f7f5;
  color: #5d6c64;
  cursor: not-allowed;
  box-shadow: none;
}

#customersView .customer-next-step-icon {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: currentColor;
  font-size: 16px;
  font-weight: 950;
}

#customersView .customer-next-step-action.warning .customer-next-step-icon,
#customersView .customer-next-step-action:disabled .customer-next-step-icon {
  background: rgba(255, 255, 255, 0.62);
}

#customersView .customer-next-step-action > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

#customersView .customer-next-step-action strong,
#customersView .customer-next-step-action small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customersView .customer-next-step-action strong {
  font-size: 11px;
  font-weight: 950;
  line-height: 1.15;
}

#customersView .customer-next-step-action small {
  color: currentColor;
  opacity: 0.86;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1.25;
}

.customer-folder-workflow-overview {
  margin: 0 0 12px;
}

.customer-folder-workflow-overview[hidden] {
  display: none;
}

.customer-folder-workflow-overview .customer-application-workflow {
  margin: 0;
}

#customersView .compact-workflow-head strong {
  font-size: 12px;
  font-weight: 900;
}

#customersView .compact-workflow-head small {
  color: #66756d;
  font-size: 9px;
  line-height: 1.35;
}

#customersView .workflow-state {
  min-height: 25px;
  border: 1px solid transparent;
  padding: 4px 8px;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
}

#customersView .workflow-state.signature-signed {
  border-color: rgba(0, 143, 69, 0.13);
}

#customersView .workflow-state.signature-open {
  border-color: rgba(190, 144, 0, 0.15);
}

#customersView .compact-workflow-actions {
  gap: 6px;
}

#customersView .compact-workflow-actions--in-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

#customersView .compact-workflow-button {
  min-height: 36px;
  gap: 5px;
  border-color: rgba(21, 73, 45, 0.14);
  border-radius: 9px;
  padding: 6px 7px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(17, 52, 35, 0.035);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#customersView button.compact-workflow-button:hover,
#customersView a.compact-workflow-button:hover {
  border-color: rgba(0, 143, 69, 0.4);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 11px rgba(17, 52, 35, 0.08);
}

#customersView .compact-workflow-button.mail-sent,
#customersView .compact-workflow-button.signature-signed,
#customersView .compact-workflow-button.files-mail-sent {
  border-color: rgba(0, 143, 69, 0.22);
  color: var(--accent-dark);
  background: var(--green-soft);
}

#customersView .compact-workflow-actions--in-actions .customer-workflow-delete {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 4px;
  color: #a51d2d;
  background: #fff1f2;
  border-color: #d69aa2;
}

#customersView .compact-workflow-actions--in-actions .customer-workflow-delete:hover {
  color: #861627;
  background: #ffe4e6;
  border-color: #a51d2d;
}

#customersView .compact-workflow-button.files-mail-ready {
  border-color: rgba(40, 93, 217, 0.18);
  color: #2352be;
  background: var(--blue-soft);
}

#customersView .compact-workflow-button.files-mail-pending,
#customersView .compact-workflow-button.files-mail-sending {
  border-color: rgba(200, 145, 0, 0.28);
  color: #765400;
  background: #fff8dc;
}

#customersView .compact-workflow-button.files-mail-failed,
#customersView .compact-workflow-button.files-mail-rejected {
  border-color: rgba(185, 28, 28, 0.24);
  color: #9c2525;
  background: #fff0f0;
}

#customersView .compact-workflow-button.files-mail-open {
  border-color: rgba(91, 107, 99, 0.18);
  color: #5c6b63;
  background: #f4f6f5;
}

#customersView .compact-send-button {
  background: linear-gradient(180deg, #edf9f2, #e5f6ec);
}

#customersView .compact-workflow-button .signature-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

#customersView .customer-send-arrow {
  width: 17px;
  height: 17px;
  border-radius: 6px;
  background: currentColor;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

#customersView .compact-workflow-note {
  min-height: 14px;
  color: #68776f;
  font-size: 9px;
  line-height: 1.35;
}

#customersView .customer-created-at {
  display: block;
  margin-top: 3px;
  color: #607169;
  font-size: 9px;
  line-height: 1.35;
}

.customer-folder-created-at {
  color: #50645a;
  font-size: 12px;
}

.customer-folder-lifecycle {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.customer-folder-lifecycle span {
  border: 1px solid rgba(21, 73, 45, 0.14);
  border-radius: 9px;
  padding: 7px 9px;
  background: #fff;
  color: #6a756f;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .customer-folder-lifecycle {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .customer-folder-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .customer-file-group-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .customer-file-group-count {
    margin-left: 0;
  }

  .customer-file-group-grid {
    grid-template-columns: 1fr;
  }
}

.customer-folder-lifecycle span.is-complete {
  border-color: rgba(0, 143, 69, 0.2);
  background: var(--green-soft);
  color: var(--accent-dark);
}

.customer-folder-lifecycle span.delivery-pending,
.customer-folder-lifecycle span.delivery-sending {
  border-color: rgba(200, 145, 0, 0.28);
  background: #fff8dc;
  color: #765400;
}

.customer-folder-lifecycle span.delivery-sent {
  border-color: rgba(0, 143, 69, 0.2);
  background: var(--green-soft);
  color: var(--accent-dark);
}

.customer-folder-lifecycle span.delivery-failed,
.customer-folder-lifecycle span.delivery-rejected {
  border-color: rgba(185, 28, 28, 0.24);
  background: #fff0f0;
  color: #9c2525;
}

#customersView .compact-customer-actions-cell {
  background: linear-gradient(180deg, #fbfdfc, #f6faf7);
}

#customersView .compact-customer-actions {
  min-height: 82px;
  align-content: center;
  gap: 8px;
}

#customersView .customer-details-toggle {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(21, 73, 45, 0.14);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(17, 52, 35, 0.045);
}

#customersView .customer-details-chevron-stack {
  width: 24px;
  height: 24px;
  border-radius: 10px;
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 4px;
  background: var(--green-soft);
  color: var(--accent);
  line-height: 1;
}

#customersView .customer-details-chevron-stack i {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

#customersView .customer-details-toggle[aria-expanded="true"] .customer-details-chevron-stack i {
  transform: rotate(225deg);
}

#customersView .customer-details-toggle[aria-expanded="true"] {
  border-color: rgba(0, 143, 69, 0.3);
  background: var(--green-soft);
}

#customersView .customer-details-toggle--identity {
  width: auto;
  min-width: 74px;
  min-height: 30px;
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  color: #063d25;
  background: linear-gradient(135deg, #f1e900, #fffba0);
  border-color: rgba(241, 233, 0, 0.5);
  box-shadow: 0 8px 18px rgba(241, 233, 0, 0.22);
}

#customersView .compact-workflow-summary {
  min-height: 66px;
  border: 1px solid rgba(21, 73, 45, 0.12);
  border-radius: 16px;
  padding: 10px 12px;
  display: grid;
  align-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #ffffff, #f7fbf8);
}

#customersView .compact-workflow-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

#customersView .customer-details-row[hidden] {
  display: none;
}

#customersView .customer-details-row td {
  padding: 0 14px 14px 69px;
  border: 0;
  background: transparent;
}

#customersView .customer-details-drawer {
  margin-top: -5px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 0 0 16px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(244, 252, 247, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 22px rgba(17, 52, 35, 0.055);
}

#customersView .customer-details-drawer__main {
  display: grid;
  gap: 10px;
}

#customersView .customer-details-drawer__side {
  display: grid;
  align-content: start;
  gap: 8px;
}

#customersView .customer-details-drawer__side > span {
  border: 1px solid rgba(21, 73, 45, 0.12);
  border-radius: 12px;
  padding: 9px 10px;
  display: grid;
  gap: 2px;
  background: #fff;
}

#customersView .customer-details-drawer__side strong {
  color: var(--accent-dark);
  font-size: 17px;
}

#customersView .customer-details-drawer__side small {
  color: var(--muted);
  font-size: 10px;
}

#customersView .customer-transfer-progress {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  padding: 0;
}

#customersView .customer-transfer-progress li {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #89958e;
}

#customersView .customer-transfer-progress li > span {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(21, 73, 45, 0.16);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 8px;
  font-weight: 900;
}

#customersView .customer-transfer-progress li small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 6.5px;
  font-weight: 800;
  white-space: nowrap;
}

#customersView .customer-transfer-progress li.done {
  color: #08713b;
}

#customersView .customer-transfer-progress li.done > span {
  border-color: rgba(0, 143, 69, 0.3);
  background: #e8f8ef;
}

#customersView .customer-transfer-progress li.active {
  color: #756300;
}

#customersView .customer-transfer-progress li.active > span {
  border-color: rgba(200, 164, 0, 0.48);
  background: #fff9cc;
  box-shadow: 0 0 0 3px rgba(241, 233, 0, 0.12);
}

#customersView .customer-transfer-progress li.approval {
  color: #8a6100;
}

#customersView .customer-transfer-progress li.approval > span {
  border-color: rgba(200, 145, 0, 0.46);
  background: #fff3bd;
  box-shadow: 0 0 0 3px rgba(200, 145, 0, 0.1);
}

#customersView .customer-transfer-progress li.problem {
  color: #a22828;
}

#customersView .customer-transfer-progress li.problem > span {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff0f0;
}

#customersView .compact-customer-actions > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

#customersView .compact-customer-actions .mini-action {
  min-height: 36px;
  min-width: 0;
  gap: 4px;
  border-color: rgba(21, 73, 45, 0.14);
  border-radius: 9px;
  padding: 5px 4px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 8.5px;
  font-weight: 900;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(17, 52, 35, 0.045);
}

#customersView .compact-customer-actions .mini-action > span:last-child {
  min-width: 0;
  line-height: 1;
}

#customersView .compact-customer-actions .mini-action:hover {
  border-color: rgba(0, 143, 69, 0.38);
  background: var(--green-soft);
  transform: translateY(-1px);
}

#customersView .compact-customer-actions .customer-compare-action {
  min-height: 42px;
  border-color: rgba(0, 143, 69, 0.28);
  background: linear-gradient(135deg, #f2fbf6, #e6f6ed);
  font-size: 10px;
}

#customersView .compact-customer-actions .customer-fund-select-action {
  min-height: 42px;
  border-color: rgba(210, 198, 0, 0.62);
  background: linear-gradient(135deg, #ffffeb, #f7f3a5);
  color: #143d27;
  font-size: 9.5px;
}

.customer-target-fund-icon {
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background: #0a8c4a;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

#customersView .compact-customer-row.is-workflow-active td {
  border-top-color: rgba(210, 198, 0, 0.72);
  border-bottom-color: rgba(210, 198, 0, 0.72);
  background: #fffef2;
}

#customersView .compact-customer-actions .danger-mini-action {
  grid-column: 1 / -1;
  border-color: rgba(196, 69, 45, 0.22);
  color: #b43b27;
  background: #fff8f6;
}

#customersView .compact-customer-actions .danger-mini-action:hover {
  border-color: rgba(196, 69, 45, 0.4);
  background: var(--red-soft);
}

.customer-action-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-delete-icon {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: rgba(196, 69, 45, 0.1);
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
}

#customersView button:focus-visible,
#customersView a:focus-visible {
  outline: 2px solid rgba(0, 143, 69, 0.55);
  outline-offset: 2px;
}

@media (max-width: 1250px) {
  #customersView .customers-table table {
    min-width: 1160px;
  }

  #customersView .compact-customer-row td {
    padding: 13px 11px;
  }

  #customersView .compact-customer-workflow {
    padding: 9px;
  }

  #customersView .compact-workflow-button,
  #customersView .compact-customer-actions .mini-action {
    padding-inline: 5px;
  }

  #customersView .compact-customer-actions .mini-action {
    gap: 3px;
    padding-inline: 3px;
    font-size: 8px;
  }

  #customersView .compact-customer-actions .customer-action-icon {
    width: 12px;
    height: 12px;
    flex-basis: 12px;
  }
}

@media (max-width: 1280px) {
  #customersView .customer-register-toolbar {
    grid-template-columns: repeat(3, max-content) minmax(0, 1fr);
    align-items: stretch;
  }

  #customersView .customer-register-filters {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  #customersView .customer-status-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  #customersView .customer-register-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #customersView .customer-add-button {
    width: 100%;
    justify-content: center;
  }

  #customersView .customer-register-filters {
    grid-template-columns: 1fr;
  }

  #customersView .customer-filter-reset,
  #customersView .customer-filter-summary,
  #customersView .customer-filter-panel-toggle {
    width: 100%;
  }

  #customersView .customer-status-legend {
    justify-content: flex-start;
  }

  #customersView .customers-table table {
    min-width: 1080px;
  }

  #customersView .customer-transfer-guide {
    grid-template-columns: 1fr;
    overflow-x: auto;
  }

  #customersView .customer-transfer-guide ol {
    min-width: 620px;
  }
}

/* Customer table: documents and signature live in one application workflow. */
#customersView table {
  min-width: 1040px;
}

.customers-table th:nth-child(1) {
  width: 30%;
}

.customers-table th:nth-child(2) {
  width: 14%;
}

.customers-table th:nth-child(3) {
  width: 42%;
}

.customers-table th:nth-child(4) {
  width: 14%;
}

.customers-table td {
  vertical-align: top;
}

.customer-identity-cell {
  align-items: flex-start;
}

.customer-identity-cell > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.customer-fund-line {
  color: var(--muted);
  line-height: 1.35;
}

.customer-assignment-line {
  margin-top: 4px;
  border: 1px solid rgba(0, 143, 69, 0.15);
  border-radius: 8px;
  background: var(--green-soft);
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}

.customer-assignment-line span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.customer-assignment-line strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.customer-workflow-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fbf9);
  display: grid;
  gap: 9px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.application-workflow-card {
  border-color: rgba(0, 143, 69, 0.18);
}

.customer-workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.customer-workflow-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.customer-workflow-head > div > span {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.customer-workflow-head > div > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.workflow-state {
  flex: 0 0 auto;
  min-height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 900;
}

.workflow-state.signature-signed {
  color: var(--accent-dark);
  background: var(--green-soft);
}

.workflow-state.signature-open {
  color: #9a6700;
  background: #fff7d6;
}

.customer-signature-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.signature-icon-button.customer-signature-action {
  width: 100%;
  min-height: 42px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 9px;
}

.customer-signature-action small {
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.workflow-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.workflow-meta-line span {
  border-radius: 999px;
  background: #eef3f0;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.signed-file-button.customer-file-primary {
  width: 100%;
  height: auto;
  min-height: 56px;
  margin: 0;
  grid-template-columns: 28px minmax(0, 1fr);
  place-items: center start;
  gap: 9px;
  padding: 9px 10px;
  text-align: left;
}

.customer-file-primary > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.customer-file-primary strong,
.customer-file-primary small {
  display: block;
  overflow: hidden;
  color: currentColor;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.customer-file-primary strong {
  font-size: 12px;
}

.customer-file-primary small {
  font-size: 10px;
  font-weight: 700;
}

.customer-workflow-card .send-company-button.customer-mail-action {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px 7px 11px;
  text-align: left;
}

.customer-mail-action span {
  min-width: 0;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: none;
}

.customer-mail-action strong {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  font-size: 10px;
  white-space: nowrap;
}

.customers-table .action-grid {
  min-width: 118px;
  position: sticky;
  top: 62px;
}

/* Compact customer register: optimized for a large customer base. */
#customersView table {
  min-width: 820px;
  table-layout: fixed;
}

.customers-table th,
.customers-table td {
  padding: 9px 10px;
}

.customers-table th:nth-child(1) { width: 100%; }

.compact-customer-row td {
  height: 62px;
  vertical-align: middle;
}

.compact-customer-row .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 13px;
}

.compact-customer-name,
.compact-provision-head,
.compact-workflow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.compact-customer-name strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-customer-name .badge {
  flex: 0 0 auto;
  min-height: 20px;
  padding: 2px 7px;
  font-size: 9px;
}

.compact-customer-id {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-contact-lines {
  display: flex;
  gap: 5px 10px;
  min-width: 0;
}

.compact-contact-lines a,
.compact-contact-lines span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-contact-lines a {
  color: var(--accent-dark);
}

.compact-customer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.compact-customer-meta span {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #eef5f0;
  padding: 3px 7px;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-provision-cell > div {
  min-width: 0;
}

.compact-provision-head {
  align-items: baseline;
}

.compact-provision-head strong {
  color: var(--accent-dark);
  font-size: 17px;
}

.compact-provision-head span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.compact-status-list {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
}

.compact-status-list .status-pill {
  min-height: 24px;
  padding: 4px 7px;
  font-size: 9px;
  line-height: 1.15;
}

.compact-info-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #edf2ef;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.compact-customer-workflow {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.compact-workflow-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.compact-workflow-head strong {
  font-size: 11px;
}

.compact-workflow-head small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-workflow-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.compact-bonus-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-workflow-button {
  min-width: 0;
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 6px;
  color: var(--ink);
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.compact-workflow-button:hover {
  border-color: rgba(0, 143, 69, 0.4);
  background: var(--green-soft);
}

.compact-workflow-button:disabled,
.compact-workflow-button.files-mail-missing {
  cursor: not-allowed;
  opacity: 0.55;
}

.compact-workflow-button .signature-icon {
  width: 14px;
  height: 14px;
}

.compact-workflow-button .files-cell-icon {
  width: 14px;
  height: 17px;
  transform: scale(0.68);
}

.compact-send-button {
  color: var(--accent-dark);
  background: var(--green-soft);
}

.compact-workflow-note {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-customer-actions {
  display: grid;
  gap: 6px;
}

.compact-customer-actions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.compact-customer-actions .mini-action {
  min-width: 0;
  min-height: 30px;
  padding: 5px 6px;
  font-size: 9px;
}

.compact-customer-actions .customer-compare-action {
  min-height: 34px;
}

.team-hierarchy-hint {
  margin: 0 22px 14px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 9px;
  background: var(--green-soft);
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.team-hierarchy-hint strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.team-hierarchy-hint span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.team-file-panel {
  margin: 0 0 16px;
  border: 1px solid rgba(0, 120, 67, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcfa, #eef7f2);
  overflow: hidden;
}

.team-file-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.team-file-head,
.team-file-actions,
.agreement-party-row,
.agreement-sign-actions {
  display: flex;
  align-items: center;
}

.team-file-head {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 120, 67, 0.13);
  background: rgba(255, 255, 255, 0.72);
}

.agreement-status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff7df;
  color: #71560b;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.agreement-status-pill.signed {
  background: #ddf7e9;
  color: #006b3c;
}

.team-file-contract-card {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.1fr) auto;
  gap: 18px;
  align-items: center;
}

.team-file-contract-card h3,
.agreement-contract-preview h3 {
  margin: 3px 0 5px;
  color: var(--ink);
}

.team-file-contract-card p,
.agreement-contract-preview p,
.agreement-contract-preview li {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.agreement-parties,
.agreement-signature-status {
  display: grid;
  gap: 7px;
}

.agreement-party-row {
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 8px 10px;
}

.agreement-party-row > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff7df;
  color: #806000;
  font-weight: 900;
}

.agreement-party-row.is-signed > span {
  background: #ddf7e9;
  color: #007843;
}

.agreement-party-row div {
  min-width: 0;
  display: grid;
}

.agreement-party-row strong,
.agreement-party-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agreement-party-row small {
  color: var(--muted);
  font-size: 9px;
}

.team-file-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

#teamAgreementDialog {
  width: min(1050px, calc(100vw - 28px));
}

.team-agreement-dialog-body {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.agreement-scope-banner {
  border: 1px solid rgba(0, 120, 67, 0.22);
  border-radius: 11px;
  background: #eef7f2;
  padding: 12px 14px;
  display: grid;
  gap: 3px;
}

.agreement-scope-banner strong { color: #007843; }
.agreement-scope-banner span { color: var(--muted); font-size: 11px; }

.agreement-dialog-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
}

.agreement-contract-preview,
.agreement-signature-side {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
}

.agreement-contract-preview ul {
  margin: 12px 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.agreement-pdf-link,
.agreement-docx-link {
  display: inline-flex;
  margin: 4px 6px 0 0;
  text-decoration: none;
}

.agreement-signature-side {
  display: grid;
  gap: 12px;
}

.agreement-confirmation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.agreement-confirmation input { margin-top: 2px; }

#teamAgreementCanvas {
  width: 100%;
  height: 170px;
  border-radius: 10px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.agreement-sign-actions {
  justify-content: space-between;
  gap: 9px;
}

@media (max-width: 900px) {
  .team-file-contract-card,
  .agreement-dialog-grid { grid-template-columns: 1fr; }
  .team-file-head { align-items: flex-start; flex-direction: column; }
}

.ki-file-format-list {
  margin: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ki-file-format-list span {
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 999px;
  background: var(--green-soft);
  padding: 5px 9px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  #customersView table { min-width: 1030px; }
  .compact-contact-lines { display: grid; gap: 2px; }
}

@media (max-width: 1180px) {
  #customersView table {
    min-width: 1000px;
  }

  .customers-table th,
  .customers-table td {
    padding: 11px 10px;
  }

  .customer-workflow-card {
    padding: 10px;
  }
}

#ticketDialog,
#customerDialog,
#signatureDialog,
#applicationPackDialog,
#customerFundSelectionDialog,
#customerFilesDialog,
#pdfFieldEditorDialog,
#invoiceDialog,
#brokerDialog,
#teamDialog,
#teamEditDialog,
#teamAgreementDialog,
#legalCompanyDialog,
#billingSettingsDialog,
#healthFundDialog,
#credentialsDialog,
#outboxDetailDialog {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 90px rgba(15, 23, 42, 0.3);
}

#healthFundDialog {
  width: min(760px, calc(100vw - 28px));
}

#outboxDetailDialog {
  width: min(760px, calc(100vw - 28px));
}

#customerDialog {
  width: min(1040px, calc(100vw - 28px));
}

#signatureDialog,
#applicationPackDialog,
#customerFilesDialog {
  width: min(980px, calc(100vw - 28px));
}

#pdfFieldEditorDialog {
  width: min(920px, calc(100vw - 28px));
}

#customerFundSelectionDialog {
  width: min(760px, calc(100vw - 28px));
}

#ticketDialog::backdrop,
#customerDialog::backdrop,
#signatureDialog::backdrop,
#applicationPackDialog::backdrop,
#customerFundSelectionDialog::backdrop,
#customerFilesDialog::backdrop,
#pdfFieldEditorDialog::backdrop,
#invoiceDialog::backdrop,
#brokerDialog::backdrop,
#teamDialog::backdrop,
#teamEditDialog::backdrop,
#teamAgreementDialog::backdrop,
#legalCompanyDialog::backdrop,
#billingSettingsDialog::backdrop,
#healthFundDialog::backdrop,
#credentialsDialog::backdrop,
#outboxDetailDialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

#ticketForm,
#customerForm,
#invoiceForm,
#brokerForm,
#teamForm,
#teamEditForm,
#legalCompanyForm,
#billingSettingsForm,
#healthFundForm {
  padding: 20px;
  display: grid;
  gap: 14px;
}

#customerFundSelectionForm {
  display: grid;
  gap: 0;
}

#customerFundSelectionForm .dialog-head > div {
  display: grid;
  gap: 3px;
}

#customerFundSelectionForm .dialog-head h2 {
  margin: 0;
}

.customer-fund-selection-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.customer-target-fund-field {
  display: grid;
  gap: 7px;
  color: #153c29;
  font-weight: 850;
}

.customer-target-fund-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(0, 143, 69, 0.26);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  font: inherit;
}

.customer-target-fund-summary {
  min-height: 78px;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, #f1faf5, #fbfdfb);
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  color: #315443;
  line-height: 1.45;
}

.customer-target-fund-summary strong {
  color: #073d21;
  font-size: 15px;
}

.customer-target-fund-summary small {
  color: #617268;
}

.customer-fund-dialog-steps {
  border: 1px solid rgba(21, 73, 45, 0.1);
  border-radius: 12px;
  background: #f8fbf9;
  padding: 12px;
}

.customer-fund-dialog-steps li {
  color: #7d8a83;
}

.customer-workflow-step-button {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  text-align: left;
  font: inherit;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.customer-workflow-step-button:not(:disabled) {
  cursor: pointer;
}

.customer-workflow-step-button:not(:disabled):hover {
  background: rgba(0, 143, 69, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 143, 69, 0.13);
  transform: translateY(-1px);
}

.customer-workflow-step-button:focus-visible {
  outline: 3px solid rgba(16, 91, 174, 0.28);
  outline-offset: 2px;
}

.customer-workflow-step-button:disabled {
  cursor: default;
  opacity: 0.78;
}

.customer-fund-dialog-steps li > span,
.customer-fund-dialog-steps .customer-workflow-step-number {
  border-color: rgba(21, 73, 45, 0.16);
  color: #65756c;
}

.customer-fund-dialog-steps li strong {
  color: #183b29;
  font-size: 10px;
}

.customer-fund-dialog-steps li small {
  color: #728078;
  font-size: 8px;
}

.customer-fund-dialog-steps li.done > span,
.customer-fund-dialog-steps li.done .customer-workflow-step-number {
  border-color: rgba(0, 143, 69, 0.35);
  background: #e8f8ef;
  color: #08713b;
}

.customer-fund-dialog-steps li.active > span,
.customer-fund-dialog-steps li.active .customer-workflow-step-number {
  border-color: rgba(200, 164, 0, 0.52);
  background: #fff9cc;
  color: #746100;
}

.customer-fund-dialog-steps li.available .customer-workflow-step-number {
  border-color: rgba(0, 143, 69, 0.28);
  background: #f1faf5;
  color: #08713b;
}

.customer-fund-dialog-steps li.locked .customer-workflow-step-number {
  background: #f3f5f4;
  color: #839087;
}

.customer-files-workflow-status {
  margin: 12px 0 0;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 11px;
  background: #f1faf5;
  color: #135a36;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.customer-files-workflow-status.working::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-inline-end: 8px;
  border: 2px solid rgba(0, 143, 69, 0.24);
  border-top-color: #008f45;
  border-radius: 999px;
  vertical-align: -2px;
  animation: system-action-spin 0.7s linear infinite;
}

.customer-data-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #135a36;
  font-weight: 750;
}

.customer-data-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(0, 143, 69, 0.24);
  border-top-color: #008f45;
  border-radius: 999px;
  animation: system-action-spin 0.7s linear infinite;
}

.customer-loading-row td {
  padding: 12px;
  background: #f1faf5;
}

.customer-files-workflow-status.warning {
  border-color: rgba(194, 131, 0, 0.28);
  background: #fff9df;
  color: #785400;
}

.customer-files-workflow-status.error {
  border-color: rgba(185, 45, 45, 0.26);
  background: #fff0f0;
  color: #9c2525;
}

.customer-application-workflow {
  grid-column: 1 / -1;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, #f2faf5, #ffffff);
  box-shadow: 0 10px 24px rgba(3, 60, 31, 0.06);
  display: grid;
  gap: 12px;
  padding: 15px;
}

.customer-application-workflow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-application-workflow-head > div:first-child {
  display: grid;
  gap: 3px;
}

.customer-application-workflow-head strong {
  color: #083c23;
  font-size: 16px;
}

.customer-application-next-action {
  display: flex;
  justify-content: flex-end;
}

.customer-application-next-action .primary-button {
  min-height: 40px;
  white-space: nowrap;
}

.application-workflow-hint {
  border-radius: 999px;
  background: #e8f7ef;
  color: #13613b;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 750;
}

.application-workflow-hint.warning {
  background: #fff5cf;
  color: #765400;
}

.application-workflow-hint.complete {
  background: #dcf8e8;
  color: #08713b;
}

.application-workflow-hint.approval {
  background: #fff3bd;
  color: #765400;
}

.application-workflow-hint.sending {
  background: #eaf8fc;
  color: #006782;
}

.customer-application-workflow-steps {
  border: 0;
  border-top: 1px solid rgba(21, 73, 45, 0.1);
  border-radius: 0;
  background: transparent;
  padding: 12px 0 0;
}

@media (max-width: 760px) {
  .customer-application-workflow-head {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-application-next-action,
  .customer-application-next-action .primary-button {
    width: 100%;
  }
}

#customerFundSelectionForm menu {
  border-top: 1px solid rgba(21, 73, 45, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 16px 20px 20px;
}

@media (max-width: 680px) {
  .customer-fund-dialog-steps {
    grid-template-columns: 1fr;
  }

  #customerFundSelectionForm menu {
    display: grid;
  }
}

#customerDialog {
  max-width: min(1040px, 94vw);
}

.credentials-box {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.credentials-box p {
  color: var(--muted);
  line-height: 1.5;
}

.credential-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
  display: grid;
  gap: 4px;
}

.credential-line span {
  color: var(--muted);
  font-size: 13px;
}

.dialog-head,
#ticketForm menu,
#customerForm menu,
#invoiceForm menu,
#brokerForm menu,
#teamForm menu,
#legalCompanyForm menu,
#healthFundForm menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.dialog-note {
  margin: -2px 0 14px;
  border: 1px solid rgba(5, 150, 105, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f0fdf4;
  color: #516154;
  line-height: 1.45;
  font-size: 13px;
}

.dialog-title-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dialog-title-tabs h2 {
  margin: 0;
}

.dialog-title-tabs span {
  border: 1px solid rgba(5, 150, 105, 0.26);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--green);
  background: #f0fdf4;
  font-size: 13px;
  font-weight: 900;
}

.family-page-preview {
  border: 1px solid rgba(5, 150, 105, 0.24);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, #f8fffb, #ffffff);
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.family-page-preview > * {
  min-width: 0;
}

.family-roster-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.family-roster-actions {
  min-width: 0;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(240, 253, 244, 0.78);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.family-roster-actions strong {
  color: var(--green);
  font-size: 13px;
  text-transform: uppercase;
}

.family-roster-actions small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.family-roster-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.family-roster-actions .secondary-button {
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.family-roster-hint {
  border: 1px solid rgba(250, 224, 0, 0.42);
  border-radius: 14px;
  padding: 9px 12px;
  background: linear-gradient(135deg, #fffbea, #ffffff);
  color: #6b5600;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.family-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.family-step-item {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 68, 32, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.family-step-tab {
  border: 0;
  border-radius: 12px;
  padding: 2px 2px 4px;
  background: transparent;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease;
}

.family-step-item.removable .family-step-tab {
  padding-right: 34px;
}

.family-step-controls {
  display: grid;
  gap: 8px;
}

.family-step-role {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(5, 150, 105, 0.14);
  border-radius: 10px;
  background: rgba(240, 253, 244, 0.66);
}

.family-step-role span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.family-step-role select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  min-width: 0;
}

.family-step-role select:focus-visible {
  outline: 3px solid rgba(250, 224, 0, 0.5);
  outline-offset: 2px;
}

.family-step-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(185, 28, 28, 0.24);
  border-radius: 8px;
  background: #fff7f7;
  color: #b91c1c;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(127, 29, 29, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.family-step-remove:hover,
.family-step-remove:focus-visible {
  border-color: rgba(185, 28, 28, 0.5);
  background: #fee2e2;
  transform: scale(1.05);
  outline: none;
}

.family-step-tab:hover,
.family-step-tab.active,
.family-step-item:hover,
.family-step-item.active {
  border-color: rgba(0, 143, 69, 0.48);
  box-shadow: 0 12px 24px rgba(0, 68, 32, 0.08);
  transform: translateY(-1px);
}

.family-step-item.active {
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.family-step-tab.active {
  background: transparent;
}

.family-step-number {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #f0fdf4);
  color: #07130c;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(0, 143, 69, 0.18);
}

.family-step-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.family-step-tab strong {
  color: var(--green);
  font-size: 13px;
  line-height: 1.25;
}

.family-step-tab small {
  color: var(--muted);
  line-height: 1.35;
  font-size: 12px;
}

@media (max-width: 760px) {
  .family-roster-toolbar {
    grid-template-columns: 1fr;
  }

  .family-roster-actions {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .family-roster-buttons {
    justify-content: flex-start;
  }

  .family-roster-hint {
    max-width: none;
    width: 100%;
  }

  .family-step-grid {
    grid-template-columns: 1fr;
  }
}

.children-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.customer-form-pages {
  display: grid;
  gap: 14px;
}

.customer-family-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.customer-form-page {
  border: 1px solid rgba(5, 150, 105, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: #fbfefd;
}

#customerForm [hidden] {
  display: none !important;
}

.customer-person-page,
.child-editor-card,
.customer-form-page-files {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 16px;
}

#customerForm .customer-person-page > label,
#customerForm .child-editor-card > label,
#customerForm .customer-form-page-files > label {
  min-width: 0;
  align-content: start;
}

#customerForm input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#customerForm select,
#customerForm textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#customerForm select {
  text-overflow: ellipsis;
}

#customerForm label > small {
  display: block;
  min-width: 0;
  margin-top: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#customerCurrentFundSelect,
#customerTeamSelect {
  min-width: 0;
  max-width: 100%;
}

.customer-main-page,
.spouse-editor-card {
  align-content: start;
}

.customer-address-validation {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(71, 85, 105, 0.2);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.employment-detail-card {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid rgba(5, 150, 105, 0.26);
  border-radius: 10px;
  background: linear-gradient(145deg, #f8fffb 0%, #f3faf6 100%);
}

.employment-detail-card.jobcenter-detail-card {
  border-color: rgba(202, 138, 4, 0.34);
  background: linear-gradient(145deg, #fffef4 0%, #fffbeb 100%);
}

.employment-detail-head {
  margin-bottom: 12px;
}

.employment-detail-head strong {
  display: block;
  color: var(--green);
  font-size: 14px;
}

.employment-detail-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.employment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.employment-detail-grid-jobcenter {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .employment-detail-grid,
  .employment-detail-grid-jobcenter {
    grid-template-columns: 1fr;
  }
}

.customer-address-validation.pending {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
  color: #1d4ed8;
}

.customer-address-validation.valid {
  border-color: rgba(5, 150, 105, 0.38);
  background: #ecfdf5;
  color: #047857;
}

.customer-address-validation.invalid,
.customer-address-validation.error {
  border-color: rgba(220, 38, 38, 0.52);
  background: #fef2f2;
  color: #b91c1c;
}

#customerForm input.address-invalid {
  border-color: #dc2626;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

#customerForm input.address-valid {
  border-color: rgba(5, 150, 105, 0.55);
  background: #f4fff9;
}

#customerTeamSelect:disabled {
  opacity: 1;
  color: #065f46;
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.35);
  cursor: not-allowed;
}

.customer-step-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.customer-form-page-ai,
.customer-form-page-files {
  grid-column: 1 / -1;
}

.ki-cost-note {
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  background: rgba(255, 251, 235, 0.95);
  color: #7c4a03;
  font-size: 13px;
  line-height: 1.45;
}

.ki-cost-note strong {
  color: #92400e;
}

.person-page-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(5, 150, 105, 0.18);
}

.person-page-head span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #07130c;
  font-weight: 900;
}

.person-page-head strong {
  color: var(--green);
  font-size: 14px;
  text-transform: uppercase;
}

.person-page-head small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

#customerForm [data-customer-step] > .person-page-head {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#teamDialog,
#teamEditDialog {
  width: min(720px, calc(100vw - 32px));
}

#teamForm .team-create-grid,
#teamEditForm .form-grid {
  align-items: start;
  column-gap: 18px;
  row-gap: 18px;
}

#teamForm .team-create-grid > label,
#teamEditForm .form-grid > label {
  min-width: 0;
  line-height: 1.35;
}

#teamForm .team-create-grid input:not([type="hidden"]),
#teamForm .team-create-grid select,
#teamEditForm .form-grid input,
#teamEditForm .form-grid select {
  width: 100%;
  min-width: 0;
}

.team-create-status-field {
  grid-column: 1 / -1;
  width: min(340px, 100%);
}

#teamForm .delivery-permission-panel,
#teamEditForm .delivery-permission-panel {
  margin-top: 4px;
}

.ai-import-card,
.signature-request-card,
.ai-billing-note {
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-soft), #fff);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.ai-import-card strong,
.signature-request-card strong,
.ai-billing-note strong {
  display: block;
  color: var(--accent-dark);
  font-size: 16px;
}

.fund-documents-card {
  border: 1px solid rgba(5, 150, 105, 0.22);
  border-radius: 8px;
  background: #fbfefd;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.fund-documents-card > strong {
  color: var(--green);
  font-size: 15px;
}

.fund-documents-card p {
  margin: 0;
  color: var(--muted);
}

.fund-documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-application-variants-card,
.categorized-fund-documents-card,
.additional-fund-documents-card {
  border: 1px dashed rgba(5, 150, 105, 0.34);
  border-radius: 8px;
  padding: 12px;
  background: #f7fcf9;
}

.member-application-variants-head,
.categorized-fund-documents-head,
.fund-slot-variants-head,
.additional-fund-documents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-application-variants-head > div,
.categorized-fund-documents-head > div,
.fund-slot-variants-head > div,
.additional-fund-documents-head > div {
  display: grid;
  gap: 3px;
}

.member-application-variants-head small,
.member-application-variant-row label small,
.categorized-fund-documents-head small,
.fund-slot-variants-head small,
.categorized-fund-document-row label small,
.additional-fund-documents-head small,
.additional-fund-document-row label small {
  color: var(--muted);
}

#memberApplicationVariantsList,
#categorizedFundDocumentsList,
[data-categorized-fund-documents-list],
#additionalFundDocumentsList {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.fund-slot-variants {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dfe9e2;
}

.fund-slot-variants-head small {
  line-height: 1.4;
}

.fund-document-category-chip {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #dce6df;
  border-radius: 8px;
  background: #f8fbf9;
}

.fund-document-category-chip small {
  color: var(--muted);
  font-size: 11px;
}

.member-application-variant-row,
.categorized-fund-document-row,
.additional-fund-document-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.member-application-variant-row label,
.categorized-fund-document-row label,
.additional-fund-document-row label {
  display: grid;
  gap: 6px;
}

.member-application-remove,
.categorized-fund-document-remove,
.additional-fund-document-remove {
  grid-column: 1 / -1;
  justify-self: end;
  color: #b42318;
}

@media (max-width: 700px) {
  .member-application-variants-head,
  .categorized-fund-documents-head,
  .fund-slot-variants-head,
  .additional-fund-documents-head {
    align-items: stretch;
    flex-direction: column;
  }

  .member-application-variant-row,
  .categorized-fund-document-row,
  .additional-fund-document-row {
    grid-template-columns: 1fr;
  }
}

.fund-document-note-field {
  border-left: 3px solid rgba(5, 150, 105, 0.24);
  padding-left: 10px;
}

.fund-document-note-field textarea,
.member-application-variant-row textarea,
.categorized-fund-document-row textarea,
.additional-fund-document-row textarea {
  min-height: 58px;
  resize: vertical;
}

/* Structured health-fund editor */
#healthFundDialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
  height: min(900px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  background: #f7faf8;
}

#healthFundForm {
  box-sizing: border-box;
  height: 100%;
  max-height: calc(100dvh - 32px);
  padding: 0;
  gap: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.health-fund-editor-head {
  padding: 20px 24px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.health-fund-editor-head > div {
  display: grid;
  gap: 3px;
}

.health-fund-editor-head h2,
.health-fund-editor-head p {
  margin: 0;
}

.health-fund-editor-head p {
  color: var(--muted);
  font-size: 13px;
}

.health-fund-form-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.health-fund-form-tabs button {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 12px;
  background: transparent;
  color: #5d6b61;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.health-fund-form-tabs button span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  border-radius: 999px;
  background: #edf3ef;
  color: #54635a;
  font-size: 12px;
}

.health-fund-form-tabs button:hover {
  border-color: rgba(5, 150, 105, 0.22);
  background: #f5fbf7;
}

.health-fund-form-tabs button.is-active {
  border-color: rgba(5, 150, 105, 0.32);
  background: #eaf8ef;
  color: var(--green);
}

.health-fund-form-tabs button.is-active span {
  background: var(--green);
  color: #fff;
}

.health-fund-form-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 30px;
  scrollbar-gutter: stable;
}

.health-fund-form-panel {
  display: grid;
  gap: 18px;
  animation: health-fund-panel-in 150ms ease-out;
}

.health-fund-form-panel[hidden] {
  display: none;
}

@keyframes health-fund-panel-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.health-fund-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.health-fund-section-head--sub {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.health-fund-section-head h3,
.health-fund-section-head p {
  margin: 0;
}

.health-fund-section-head h3 {
  color: #13221a;
  font-size: 18px;
}

.health-fund-section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.health-fund-section-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e2f7e9, #f6fbf7);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.health-fund-fields {
  gap: 14px 16px;
}

.health-fund-fields label,
.health-fund-notes-grid label,
.fund-slot-editor label,
.health-fund-benefit-card label,
.health-fund-legacy-file label {
  display: grid;
  gap: 6px;
  color: #2d3b31;
  font-size: 13px;
  font-weight: 700;
}

.health-fund-fields label > small,
.health-fund-benefit-card > small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

#healthFundForm .health-fund-native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.health-fund-file-picker {
  padding: 10px;
  border: 1px dashed #a6b9ad;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

#healthFundForm [data-preserved-fund-source] {
  display: none !important;
}

#healthFundForm .fund-slot-editor-grid > label:has(input[type="file"]) {
  grid-column: 1 / -1;
}

.health-fund-file-trigger {
  flex: 0 0 auto;
  padding: 8px 11px;
}

.health-fund-file-picker.is-drag-over {
  border-color: #008f45;
  background: #e7f7ed;
  outline: 2px solid #008f45;
  outline-offset: 2px;
}

.health-fund-file-drop-hint {
  flex-basis: 100%;
  color: #526358;
  font-size: 11px;
  line-height: 1.4;
}

.health-fund-file-selection {
  flex: 1 1 140px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-fund-fields--metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.health-fund-benefit-groups {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr);
  gap: 14px;
}

.health-fund-benefit-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.health-fund-benefit-card--bonus {
  border-color: rgba(231, 214, 0, 0.55);
  background: linear-gradient(145deg, #fffef1, #fff);
}

.health-fund-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.health-fund-notes-grid textarea {
  min-height: 108px;
  resize: vertical;
}

.health-fund-library-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(5, 150, 105, 0.23);
  border-radius: 10px;
  background: #effaf3;
}

.health-fund-library-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.health-fund-library-summary .file-note {
  overflow: hidden;
  color: #516259;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-fund-library-summary > span {
  align-self: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.health-fund-document-group,
.health-fund-legacy-file {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.health-fund-document-group > summary,
.health-fund-legacy-file > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.health-fund-document-group > summary::-webkit-details-marker,
.health-fund-legacy-file > summary::-webkit-details-marker {
  display: none;
}

.health-fund-document-group > summary::after,
.health-fund-legacy-file > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
}

.health-fund-document-group[open] > summary::after,
.health-fund-legacy-file[open] > summary::after {
  content: "−";
}

.health-fund-document-group > summary > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #edf7f0;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.health-fund-document-group > summary > div {
  display: grid;
  gap: 3px;
}

.health-fund-document-group > summary small {
  color: var(--muted);
  font-weight: 500;
}

.health-fund-document-group-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  border-top: 1px solid #edf1ee;
}

.health-fund-document-group-body > :first-child {
  margin-top: 16px;
}

.fund-slot-editor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.fund-slot-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  background: #fbfdfb;
}

.fund-slot-editor--primary {
  border-color: rgba(5, 150, 105, 0.35);
  background: linear-gradient(145deg, #f3fbf6, #fff);
}

.fund-slot-editor.is-pending-removal {
  border-color: rgba(180, 35, 24, 0.34);
  background: #fff8f7;
}

.fund-slot-editor > header {
  display: grid;
  gap: 4px;
}

.fund-slot-editor > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fund-slot-editor > header span,
.fund-document-row-head span {
  border-radius: 999px;
  padding: 3px 7px;
  background: #def3e5;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fund-slot-editor > header small {
  color: var(--muted);
  line-height: 1.4;
}

.fund-slot-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stored-fund-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid #e6ece8;
}

.stored-fund-file-row small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #607066;
}

.stored-fund-file-row small::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: #8aa096;
}

.stored-fund-file-row small.is-pending-removal {
  color: #9f241b;
}

.stored-fund-file-row small.is-pending-removal::before {
  background: #d92d20;
}

.danger-text {
  color: #b42318 !important;
}

.member-application-variants-card,
.categorized-fund-documents-card,
.additional-fund-documents-card {
  border-style: solid;
  border-color: #dbe7df;
  border-radius: 10px;
  background: #f8fbf9;
}

.member-application-variant-row,
.categorized-fund-document-row,
.additional-fund-document-row {
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(24, 55, 37, 0.04);
}

.member-application-variant-row.is-pending-removal,
.categorized-fund-document-row.is-pending-removal,
.additional-fund-document-row.is-pending-removal {
  border-color: rgba(180, 35, 24, 0.35);
  background: #fff8f7;
  opacity: 0.82;
}

.fund-document-row-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7ede9;
}

.fund-document-row-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.health-fund-legacy-file {
  display: grid;
  gap: 12px;
  padding-bottom: 0;
}

.health-fund-legacy-file > p,
.health-fund-legacy-file > label,
.health-fund-legacy-file > .stored-fund-file-row {
  margin: 0 16px;
}

.health-fund-legacy-file > p {
  color: var(--muted);
  line-height: 1.5;
}

.health-fund-legacy-file > .stored-fund-file-row {
  margin-bottom: 16px;
}

.health-fund-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -8px 25px rgba(20, 45, 29, 0.05);
}

.health-fund-form-footer .account-form-status {
  min-height: 20px;
  margin: 0;
  color: #526259;
}

#healthFundForm .health-fund-form-footer menu {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .health-fund-fields--metrics,
  .health-fund-notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-fund-benefit-groups,
  .fund-slot-editor-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  #healthFundDialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  #healthFundForm {
    max-height: 100dvh;
  }

  .health-fund-editor-head,
  .health-fund-form-body,
  .health-fund-form-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .health-fund-editor-head p {
    display: none;
  }

  .health-fund-form-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 9px 12px;
  }

  .health-fund-form-tabs button {
    display: flex;
    align-items: center;
    min-height: 44px;
    white-space: normal;
  }

  .health-fund-fields,
  .health-fund-fields--metrics,
  .health-fund-notes-grid,
  .fund-slot-editor-grid {
    grid-template-columns: 1fr;
  }

  .health-fund-document-group > summary {
    align-items: flex-start;
  }

  .health-fund-document-group > summary small {
    display: none;
  }

  .health-fund-file-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .health-fund-file-trigger {
    width: 100%;
  }

  .member-application-variants-head,
  .categorized-fund-documents-head,
  .fund-slot-variants-head,
  .additional-fund-documents-head,
  .fund-document-row-head,
  .stored-fund-file-row,
  .health-fund-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .health-fund-form-footer menu,
  .health-fund-form-footer menu button {
    width: 100%;
  }
}

.ai-import-card p,
.signature-request-card p,
.ai-billing-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.signature-request-card {
  grid-template-columns: 1fr;
}

.signature-template-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(5, 150, 105, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.signature-template-toolbar .secondary-button {
  min-height: 38px;
}

.signature-template-toolbar .application-package-refresh-action {
  border-color: rgba(0, 143, 69, 0.24);
  background: linear-gradient(180deg, #ffffff, #effaf4);
  color: #075c34;
}

.signature-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.signature-template-actions button {
  min-height: 38px;
}

.signature-template-actions .application-package-cleanup-action {
  border-color: rgba(202, 138, 4, 0.35);
  background: linear-gradient(180deg, #fffdf4, #fff7d6);
  color: #6f4700;
}

@media (max-width: 760px) {
  .signature-template-actions,
  .signature-template-actions button {
    width: 100%;
  }

  .application-review-summary ul {
    columns: 1;
  }

  .application-issue-item {
    grid-template-columns: 1fr;
  }

  .application-issue-fix {
    width: 100%;
  }
}

.signature-package-grid label {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(5, 150, 105, 0.18);
  border-radius: 8px;
  padding: 10px;
}

.signature-package-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.file-action-card,
.consent-document-card {
  border: 1px solid rgba(5, 150, 105, 0.22);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.file-action-card strong,
.consent-document-card strong {
  color: var(--green);
  font-size: 15px;
}

.file-action-card p,
.consent-document-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.consent-document-card {
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.ai-import-status {
  width: fit-content;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.ai-import-status.ready {
  color: var(--accent-dark);
  border-color: rgba(0, 143, 69, 0.24);
}

.ai-import-status.warning {
  color: var(--amber);
  border-color: rgba(183, 121, 31, 0.24);
}

.ai-billing-note {
  margin: 12px 0;
}

.full-span {
  grid-column: 1 / -1;
}

.checkbox-line {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex !important;
  align-items: center;
  grid-template-columns: none !important;
}

.checkbox-line input {
  width: auto;
  min-height: auto;
}

.delivery-permission-panel {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid rgba(0, 152, 83, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 152, 83, 0.07), rgba(255, 226, 0, 0.07));
}

.delivery-permission-panel legend {
  padding: 0 8px;
  color: #006f3c;
  font-weight: 800;
}

.delivery-permission-panel > p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.ki-access-permission-panel {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid rgba(0, 113, 61, 0.28);
  border-radius: 14px;
  background: rgba(0, 113, 61, 0.045);
}

.ki-access-permission-panel legend {
  padding: 0 8px;
  color: #006f3c;
  font-weight: 800;
}

.ki-access-permission-panel > p,
.ki-access-policy-hint,
.ki-access-request-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.ki-access-policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ki-access-policy-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.ki-access-policy-grid select,
.ki-access-policy-grid input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.ki-access-request-status {
  color: #006f3c;
  font-weight: 750;
}

.delivery-mode-field {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.72fr);
  align-items: center;
  gap: 14px !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 14px;
}

.delivery-mode-field > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.delivery-mode-field small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.delivery-mode-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 750;
}

.delivery-mode-field select:focus {
  border-color: rgba(0, 143, 69, 0.42);
  box-shadow: var(--ring);
  outline: 0;
}

@media (max-width: 720px) {
  .delivery-mode-field,
  .ki-access-policy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.case-strip {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
}

.case-strip label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.case-strip select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline-color: var(--accent);
}

.case-strip div {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  align-content: center;
  padding: 8px 12px;
}

.case-strip span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  min-height: 150px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.legal-admin-head {
  margin-bottom: 16px;
}

#legalCompanyDialog {
  width: min(920px, calc(100vw - 32px));
}

#legalCompanyForm {
  max-height: min(88vh, 920px);
  overflow: auto;
}

.legal-editor-sections {
  display: grid;
  gap: 10px;
}

.legal-editor-sections details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}

.legal-editor-sections summary {
  padding: 14px 16px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.72);
}

.legal-editor-sections details .form-grid {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.billing-page-head {
  justify-content: space-between;
  align-items: flex-start;
}

.billing-page-head > div {
  max-width: 880px;
}

#billingSettingsSummary {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

#billingSettingsDialog {
  width: min(700px, calc(100vw - 32px));
}

#loginMfaDialog,
#mfaStepUpDialog,
#mfaSetupDialog {
  width: min(560px, calc(100vw - 32px));
}

#loginMfaDialog::backdrop,
#mfaStepUpDialog::backdrop,
#mfaSetupDialog::backdrop {
  background: rgba(5, 18, 12, 0.68);
  backdrop-filter: blur(5px);
}

.mfa-card {
  display: grid;
  gap: 18px;
}

.mfa-card form,
.mfa-card label {
  display: grid;
  gap: 9px;
}

.mfa-card input {
  width: 100%;
}

.mfa-card input[inputmode="numeric"] {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
}

.mfa-card .account-form-status:not(:empty) {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid rgba(0, 96, 54, 0.28);
  border-radius: 12px;
  background: #edf9f2;
  color: #063d25;
  line-height: 1.45;
}

.mfa-card .mfa-trust-choice {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: flex-start;
  gap: 11px;
  border: 1px solid rgba(0, 143, 69, 0.24);
  border-radius: 12px;
  background: #f4faf6;
  padding: 13px 14px;
  color: var(--ink);
  cursor: pointer;
}

.mfa-card .mfa-trust-choice input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.mfa-trust-choice span,
.mfa-trust-choice strong,
.mfa-trust-choice small {
  display: block;
  min-width: 0;
}

.mfa-trust-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.mfa-step-up-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.mfa-step-up-actions .primary-button {
  width: auto;
}

@media (max-width: 720px) {
  .trusted-devices-head,
  .trusted-device-item {
    align-items: stretch;
    flex-direction: column;
  }

  .trusted-devices-head .secondary-button,
  .trusted-device-remove,
  .trusted-devices-actions button,
  .mfa-step-up-actions .primary-button,
  .mfa-step-up-actions .text-button {
    width: 100%;
  }

  .trusted-device-metadata {
    grid-template-columns: 1fr;
  }

  .trusted-devices-actions,
  .mfa-step-up-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.mfa-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.mfa-qr-panel {
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.mfa-qr-panel[hidden] {
  display: none;
}

.mfa-qr-panel img {
  display: block;
  width: min(230px, 100%);
  height: auto;
  image-rendering: pixelated;
}

.mfa-secret-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.mfa-secret-row input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mfa-active-note {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(20, 181, 105, 0.28);
  border-radius: 14px;
  background: rgba(20, 181, 105, 0.08);
}

.legal-card {
  display: grid;
  gap: 14px;
}

.legal-card h2 {
  font-size: 22px;
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.legal-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.legal-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-list dd {
  margin: 0;
  font-weight: 800;
}

.legal-note {
  border-left: 4px solid var(--electric);
  border-radius: 8px;
  background: var(--amber-soft);
  color: #5c4300;
  padding: 12px;
  line-height: 1.55;
}

.legal-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legal-text-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.legal-text-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.legal-text-grid p {
  color: var(--muted);
  line-height: 1.6;
}

@media (min-width: 981px) and (max-height: 780px) {
  .login-art {
    padding: 24px 34px;
    gap: 18px;
  }

  .login-hero-copy h2 {
    font-size: 40px;
  }

  .login-hero-copy p {
    font-size: 15px;
    line-height: 1.5;
  }

  .login-brand {
    width: min(620px, 100%);
    aspect-ratio: 16 / 8;
    margin-bottom: 0;
  }

  .login-feature-cards {
    width: min(620px, 100%);
    gap: 10px;
    margin-top: 34px;
  }

  .login-feature-cards article {
    min-height: 82px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .login-feature-icon {
    width: 38px;
    height: 38px;
    transform: scale(0.82);
    transform-origin: left center;
  }

  .login-feature-cards strong,
  .login-feature-cards p {
    font-size: 11px;
  }

  .login-trust-row {
    gap: 10px 18px;
    margin-top: 8px;
  }

  .login-trust-row span {
    font-size: 12px;
  }

  .login-proof {
    display: none;
  }

  .mock-titlebar {
    height: 42px;
  }

  .mock-body {
    min-height: 226px;
  }

  .mock-content {
    gap: 10px;
    padding: 16px;
  }

  .mock-cards b {
    min-height: 72px;
  }

  .login-card {
    gap: 14px;
    padding: 28px 30px;
  }

  .login-panel h1 {
    font-size: 34px;
  }
}

@media (max-width: 1320px) {
  .kanban {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
  }
}

@media (max-width: 980px) {
  .login-screen,
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

  .login-panel {
    min-height: 100dvh;
    padding: 24px;
  }

  .side {
    position: sticky;
    top: 0;
    z-index: 5;
    gap: 14px;
    padding: 14px;
  }

  .side-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    overflow-x: auto;
  }

  .account-box {
    display: none;
  }

  .topbar,
  .top-actions,
  .section-bar,
  .admin-page-head,
  .admin-toolbar,
  .hero-band {
    align-items: stretch;
    flex-direction: column;
  }

  .overview-compare-launch {
    grid-template-columns: 1fr;
  }

  .overview-hero-actions {
    width: 100%;
    flex-basis: auto;
  }

  #overviewView::before {
    width: 92vw;
    right: 4vw;
    bottom: 24px;
    opacity: 0.14;
  }

  .search {
    width: 100%;
  }

  .metrics-grid,
  .commission-grid,
  .makler-info-grid,
  .vgk-benefit-strip,
  .portal-feature-grid,
  .service-suite-grid,
  .system-functions-grid,
  .page-map-grid,
  .roles-grid,
  .user-flow-steps,
  .build-plan-grid,
  .requirements-grid,
  .strategy-grid,
  .overview-grid,
  .orders-summary,
  .kanban,
  .billing-grid,
  .billing-form,
  .compare-form,
  .gkv-choice-grid,
  .gkv-status-grid,
  .compare-advanced-fields,
  .case-strip,
  .kassenwecker-layout,
  .kassenwecker-form,
  .ai-kennung-hero,
  .ai-kennung-layout,
  .ai-kennung-form,
  .why-vgk-grid,
  .legal-grid,
  .legal-text-grid,
  .settings-status-grid,
  .settings-action-grid,
  .admin-control-grid,
  .admin-settings-form,
  .vp-office-grid,
  .profile-grid,
  .personal-data-form,
  .account-settings-grid,
  .settings-roadmap {
    grid-template-columns: 1fr;
  }

  .admin-settings-note {
    grid-column: 1;
  }

  .vp-office-hero {
    grid-template-columns: 1fr;
  }

  .verification-line {
    grid-template-columns: 1fr;
  }

  .personal-data-form label {
    grid-template-columns: 1fr;
  }

  .personal-data-actions {
    justify-content: stretch;
  }

  .personal-data-actions .primary-button {
    width: 100%;
  }

  .gkv-start-panel .case-strip {
    padding-inline: 16px;
  }

  .kasse-result-card {
    grid-template-columns: 1fr;
  }

  .kasse-result-provider,
  .kasse-card-center {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .kasse-value-strip {
    grid-template-columns: 1fr;
  }

  .gkv-trust-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .legal-list div {
    grid-template-columns: 1fr;
  }

  .kassenwecker-form {
    align-items: stretch;
  }

  .kassenwecker-item {
    grid-template-columns: 1fr;
  }

  .portal-shortcuts {
    align-items: stretch;
  }

  .kasse-direct-search {
    max-width: 100%;
  }

  .makler-action-list article {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .makler-action-list article .secondary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .help-ai-form {
    grid-template-columns: 1fr;
  }

  .help-ai-message {
    max-width: 100%;
  }

  .login-card {
    padding: 22px;
  }

  .login-card-brand .brand-logo {
    width: 66px;
    height: 66px;
  }

  .login-panel h1 {
    font-size: 30px;
  }

  .login-panel p {
    font-size: 14px;
  }

  .login-support {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .login-support small {
    text-align: left;
  }

  .main {
    padding: 18px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .kasse-direct-search {
    border-radius: 8px;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .kasse-direct-search span {
    padding: 0 0 8px;
  }

  .kasse-direct-search input {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 0;
  }

  .kasse-direct-search .icon-button {
    width: 100%;
    margin-top: 10px;
  }

  .popular-fund-card {
    grid-template-columns: 26px 42px minmax(0, 1fr);
  }

  .popular-fund-meta {
    grid-column: 3;
    text-align: left;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .customer-family-layout,
  .children-editor,
  .customer-person-page,
  .customer-form-page-files,
  .child-editor-card,
  .customer-file-grid {
    grid-template-columns: 1fr;
  }

  .application-pack {
    grid-template-columns: 1fr;
  }

  .family-side-pages {
    grid-template-columns: 1fr;
  }

  .family-page-nav {
    position: static;
  }

  .customer-files-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .tabs button {
    white-space: nowrap;
  }
}

@media (min-width: 981px) and (max-height: 780px) {
  .login-about-card {
    padding: 22px;
    gap: 12px;
  }

  .login-about-card h3 {
    font-size: 28px;
  }

  .login-about-grid b {
    min-height: 70px;
  }
}

@media (max-width: 620px) {
  .login-about-grid {
    grid-template-columns: 1fr;
  }
}

/* Calm portal motion: keep interiors unchanged and move one thin line on outer edges only. */
@property --amv-login-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.login-brand::before,
.login-feature-cards article::before,
.login-card::before,
.login-panel .primary-button::before,
.login-register-link::before,
.login-external-link::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 2 !important;
  display: block !important;
  width: 34% !important;
  height: 2px !important;
  border-radius: 999px !important;
  pointer-events: none !important;
  background: linear-gradient(90deg, transparent, rgba(241, 233, 0, 0.98) 20%, rgba(0, 255, 141, 0.9) 72%, transparent) !important;
  filter: none !important;
  offset-path: inset(0 round 8px) !important;
  offset-anchor: left center !important;
  animation: amvOuterFrameLinePath 5.4s linear infinite !important;
}

.login-feature-cards article:nth-child(2)::before {
  animation-delay: -1.35s !important;
}

.login-feature-cards article:nth-child(3)::before {
  animation-delay: -2.7s !important;
}

.login-card::before {
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 1px !important;
  border-radius: inherit !important;
  background: conic-gradient(
    from var(--amv-login-border-angle, 0deg),
    transparent 0deg,
    transparent 250deg,
    rgba(0, 255, 141, 0.95) 282deg,
    rgba(241, 233, 0, 1) 308deg,
    transparent 338deg,
    transparent 360deg
  ) !important;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  mask-composite: exclude !important;
  animation: amvLoginOuterBorderSweep 5.6s linear infinite !important;
}

@keyframes amvLoginOuterBorderSweep {
  to {
    --amv-login-border-angle: 360deg;
  }
}

.login-panel .primary-button,
.login-register-link,
.login-external-link {
  position: relative;
  overflow: hidden;
}

.login-panel .primary-button::before,
.login-register-link::before,
.login-external-link::before {
  width: 26% !important;
  height: 1px !important;
  z-index: 1 !important;
  offset-path: inset(0 round 8px) !important;
  animation-duration: 4.6s !important;
}

.login-panel .primary-button > *,
.login-register-link > *,
.login-external-link > * {
  position: relative;
  z-index: 2;
}

:is(.nav-icon, .module-icon)[data-icon="overview"],
:is(.nav-icon, .module-icon)[data-icon="partners"],
:is(.nav-icon, .module-icon)[data-icon="ai"] {
  --amv-icon-image: url("./assets/icons/network.png");
}

:is(.nav-icon, .module-icon)[data-icon="customers"],
:is(.nav-icon, .module-icon)[data-icon="tickets"] {
  --amv-icon-image: url("./assets/icons/consulting.png");
}

:is(.nav-icon, .module-icon)[data-icon="calculator"],
:is(.nav-icon, .module-icon)[data-icon="billing"],
:is(.nav-icon, .module-icon)[data-icon="invoices"] {
  --amv-icon-image: url("./assets/icons/savings.png");
}

:is(.nav-icon, .module-icon)[data-icon="orders"],
:is(.nav-icon, .module-icon)[data-icon="documents"] {
  --amv-icon-image: url("./assets/icons/contract-review.png");
}

:is(.nav-icon, .module-icon)[data-icon="team"],
:is(.nav-icon, .module-icon)[data-icon="help"] {
  --amv-icon-image: url("./assets/icons/protection.png");
}

:is(.nav-icon, .module-icon)[data-icon="health"] {
  --amv-icon-image: url("./assets/icons/insurance.png");
}

@keyframes amvCalmIconEdgeLine {
  0% {
    background-position:
      -46% 0,
      100% -46%,
      146% 100%,
      0 146%,
      center;
  }

  25% {
    background-position:
      100% 0,
      100% -46%,
      146% 100%,
      0 146%,
      center;
  }

  50% {
    background-position:
      100% 0,
      100% 100%,
      146% 100%,
      0 146%,
      center;
  }

  75% {
    background-position:
      100% 0,
      100% 100%,
      0 100%,
      0 146%,
      center;
  }

  100% {
    background-position:
      100% 0,
      100% 100%,
      0 100%,
      0 0,
      center;
  }
}

:is(
  .nav-icon,
  .module-icon,
  .login-feature-icon,
  .login-card-brand .brand-logo,
  .side-brand .brand-logo,
  .action-icon-button,
  .signature-icon-button,
  .icon-button
) {
  background-image:
    linear-gradient(90deg, transparent, rgba(241, 233, 0, 0.96), rgba(0, 255, 141, 0.86), transparent),
    linear-gradient(180deg, transparent, rgba(241, 233, 0, 0.96), rgba(0, 255, 141, 0.86), transparent),
    linear-gradient(270deg, transparent, rgba(241, 233, 0, 0.96), rgba(0, 255, 141, 0.86), transparent),
    linear-gradient(0deg, transparent, rgba(241, 233, 0, 0.96), rgba(0, 255, 141, 0.86), transparent),
    var(--amv-icon-image, none) !important;
  background-repeat: no-repeat !important;
  background-size:
    46% 1px,
    1px 46%,
    46% 1px,
    1px 46%,
    auto !important;
  animation: amvCalmIconEdgeLine 5.8s linear infinite !important;
}

.nav-icon.nav-icon {
  background-size:
    46% 1px,
    1px 46%,
    46% 1px,
    1px 46%,
    32px 32px !important;
}

.module-icon.module-icon {
  background-size:
    46% 1px,
    1px 46%,
    46% 1px,
    1px 46%,
    calc(100% - 8px) calc(100% - 8px) !important;
}

/* Critical navigation icons are already embedded in index.html. Keep them
   visible immediately and do not wait for six decorative PNG requests. */
.nav-icon.has-svg,
.module-icon.has-svg {
  color: transparent;
}

.nav-link:hover .nav-icon.has-svg,
.nav-link.active .nav-icon.has-svg {
  color: var(--electric);
}

.nav-icon.has-svg .icon {
  width: 21px;
  height: 21px;
}

.module-icon.has-svg .icon {
  width: 28px;
  height: 28px;
}

/* Keep the original AMV image identity while avoiding decorative motion. */
.nav-icon.nav-icon,
.module-icon.module-icon {
  background-image: var(--amv-icon-image, none) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  animation: none !important;
}

.nav-icon.nav-icon {
  background-size: 32px 32px !important;
}

.module-icon.module-icon {
  background-size: calc(100% - 8px) calc(100% - 8px) !important;
}

:is(.nav-icon, .module-icon) .icon {
  display: none !important;
}

/* Static WebP textures remain; the CPU/GPU-heavy particle canvas is disabled. */
.network-canvas {
  display: none !important;
}

:is(
  .nav-link:hover .nav-icon,
  .nav-link.active .nav-icon,
  .login-feature-cards article:hover .login-feature-icon,
  .action-icon-button:hover,
  .signature-icon-button:hover,
  .icon-button:hover
) {
  animation-duration: 3.8s !important;
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .nav-icon,
    .module-icon,
    .login-feature-icon,
    .login-card-brand .brand-logo,
    .side-brand .brand-logo,
    .action-icon-button,
    .signature-icon-button,
    .icon-button
  ) {
    animation: none !important;
  }
}
.signature-icon-button.disabled,
.signature-icon-button:disabled,
.mini-action.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.65);
  pointer-events: none;
}

/* Premium login polish: one thin moving line on the outside edge only. */
@property --amv-premium-edge {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes amvPremiumEdgeOrbit {
  to {
    --amv-premium-edge: 360deg;
  }
}

:is(
  .login-brand,
  .login-feature-cards article,
  .login-card,
  .login-card-brand .brand-logo,
  .login-panel .primary-button,
  .login-register-link,
  .login-external-link,
  .login-about-card,
  .login-about-grid b
) {
  position: relative;
  overflow: hidden;
}

:is(
  .login-brand,
  .login-feature-cards article,
  .login-card,
  .login-panel .primary-button,
  .login-register-link,
  .login-external-link,
  .login-about-card,
  .login-about-grid b
)::before,
.login-card-brand .brand-logo::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 4 !important;
  width: auto !important;
  height: auto !important;
  padding: 1px !important;
  border-radius: inherit !important;
  pointer-events: none !important;
  background: conic-gradient(
    from var(--amv-premium-edge),
    transparent 0deg,
    transparent 236deg,
    rgba(0, 255, 141, 0.08) 252deg,
    rgba(0, 255, 141, 0.88) 278deg,
    rgba(241, 233, 0, 1) 304deg,
    rgba(0, 255, 141, 0.7) 326deg,
    transparent 344deg,
    transparent 360deg
  ) !important;
  filter: none !important;
  offset-path: none !important;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  mask-composite: exclude !important;
  animation: amvPremiumEdgeOrbit 6.6s linear infinite !important;
}

.login-brand::before {
  padding: 1.5px !important;
  animation-duration: 7.6s !important;
}

.login-card::before {
  padding: 1.5px !important;
  animation-duration: 7s !important;
}

.login-feature-cards article:nth-child(2)::before,
.login-about-grid b:nth-child(2)::before {
  animation-delay: -1.4s !important;
}

.login-feature-cards article:nth-child(3)::before,
.login-about-grid b:nth-child(3)::before {
  animation-delay: -2.8s !important;
}

.login-panel .primary-button::before,
.login-register-link::before,
.login-external-link::before {
  z-index: 1 !important;
  padding: 1px !important;
  animation-duration: 5.2s !important;
}

.login-panel .primary-button,
.login-register-link,
.login-external-link {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.login-panel .primary-button:hover,
.login-register-link:hover,
.login-external-link:hover {
  transform: translateY(-1px);
}

.login-feature-cards article,
.login-about-grid b,
.login-card,
.login-brand {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.login-feature-cards article:hover,
.login-about-grid b:hover {
  border-color: rgba(241, 233, 0, 0.56);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 255, 141, 0.12);
  transform: translateY(-2px);
}

.login-hero-copy h2,
.login-card h1,
.login-about-card h3 {
  text-shadow: 0 0 26px rgba(0, 255, 141, 0.08);
}

.login-card-brand .brand-logo {
  isolation: isolate;
}

.login-card-brand .brand-logo::after {
  border-radius: 8px !important;
  animation-duration: 4.8s !important;
}

/* Keep the three login benefits compact and horizontal. */
.login-feature-cards {
  gap: 14px;
}

.login-feature-cards article {
  min-height: 92px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 15px;
}

.login-feature-icon {
  width: 42px;
  height: 42px;
}

.login-feature-cards strong {
  margin-bottom: 4px;
  font-size: 11px;
  line-height: 1.18;
}

.login-feature-cards p {
  font-size: 11px;
  line-height: 1.38;
}

@media (max-width: 720px) {
  .login-feature-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .login-feature-cards article {
    min-height: 82px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px 14px;
  }

  .login-feature-icon {
    width: 36px;
    height: 36px;
  }
}

/* Ueber-uns polish: quiet motion for the copy and trust badges only. */
@keyframes amvAboutUnderline {
  0%,
  100% {
    transform: translateX(0) scaleX(0.72);
    opacity: 0.72;
  }
  50% {
    transform: translateX(18px) scaleX(1);
    opacity: 1;
  }
}

@keyframes amvTrustLift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.login-hero-copy {
  position: relative;
}

.login-hero-copy h2 {
  position: relative;
  width: max-content;
  max-width: 100%;
  padding-bottom: 10px;
}

.login-hero-copy h2::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 0;
  width: min(148px, 58%);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--electric), rgba(0, 255, 141, 0.92), transparent);
  box-shadow: 0 0 20px rgba(0, 255, 141, 0.28);
  transform-origin: left center;
  animation: amvAboutUnderline 4.8s ease-in-out infinite;
}

.login-hero-copy p {
  position: relative;
  padding-left: 0;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.18);
}

.login-trust-row {
  gap: 12px;
  margin-top: 18px;
}

.login-trust-row span {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  padding: 7px 14px 7px 9px;
  border: 1px solid rgba(241, 233, 0, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(4, 18, 10, 0.48);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.login-trust-row span::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(
    from var(--amv-premium-edge),
    transparent 0deg,
    transparent 242deg,
    rgba(0, 255, 141, 0.86) 282deg,
    rgba(241, 233, 0, 1) 308deg,
    transparent 338deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: amvPremiumEdgeOrbit 6.4s linear infinite;
}

.login-trust-row span:nth-child(2)::after {
  animation-delay: -1.8s;
}

.login-trust-row span:nth-child(3)::after {
  animation-delay: -3.6s;
}

.login-trust-row span:hover {
  border-color: rgba(241, 233, 0, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 255, 141, 0.12);
  transform: translateY(-2px);
}

.login-trust-row i {
  display: inline-block;
  border-radius: 8px;
  background: rgba(0, 143, 69, 0.08);
  animation: amvTrustLift 4.2s ease-in-out infinite;
}

.login-trust-row span:nth-child(2) i {
  animation-delay: -1.2s;
}

.login-trust-row span:nth-child(3) i {
  animation-delay: -2.4s;
}

/* Full-cover brand pattern layer for the login screen. */
.login-screen::before {
  background:
    linear-gradient(90deg, rgba(241, 233, 0, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 143, 69, 0.042) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px;
  background-blend-mode: normal, normal;
  opacity: 0.34;
  filter: saturate(1.08) contrast(1.04);
}

.login-screen::after {
  background:
    radial-gradient(circle at 72% 18%, rgba(241, 233, 0, 0.08), transparent 27%),
    radial-gradient(circle at 94% 70%, rgba(0, 143, 69, 0.22), transparent 35%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 46%, rgba(5, 8, 6, 0.28)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.3));
}

.login-art,
.login-panel {
  position: relative;
  z-index: 1;
}

/* Vergleich view: AMV dark surface with subtle animated frame lines. */
@keyframes amvCompareEdgeFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 220% 50%;
  }
}

@keyframes amvCompareFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -4px, 0);
  }
}

#vehiclesView {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 22px;
  background:
    radial-gradient(circle at 12% 14%, rgba(0, 255, 141, 0.08), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(241, 233, 0, 0.09), transparent 24%),
    radial-gradient(circle at 86% 78%, rgba(0, 143, 69, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(3, 16, 10, 0.98), rgba(2, 10, 8, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(124, 151, 45, 0.18),
    0 28px 70px rgba(0, 0, 0, 0.18);
}

#vehiclesView::before,
#vehiclesView::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#vehiclesView::before {
  background:
    linear-gradient(90deg, rgba(241, 233, 0, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 143, 69, 0.035) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  opacity: 0.36;
}

#vehiclesView::after {
  background:
    radial-gradient(circle at 82% 10%, rgba(0, 255, 141, 0.08), transparent 18%),
    radial-gradient(circle at 18% 88%, rgba(241, 233, 0, 0.05), transparent 24%);
}

#vehiclesView > * {
  position: relative;
  z-index: 1;
}

#vehiclesView .view-hero,
#vehiclesView > h2,
#vehiclesView > p,
#vehiclesView .view-subtitle {
  color: #f4f8f0;
}

#vehiclesView .view-kicker,
#vehiclesView .eyebrow {
  color: #69de88;
}

#vehiclesView > p {
  color: rgba(222, 236, 226, 0.82);
}

#vehiclesView .calculator-panel,
#vehiclesView .gkv-choice,
#vehiclesView .gkv-status,
#vehiclesView .compare-advanced-fields,
#vehiclesView .compare-metrics .metric,
#vehiclesView .wish-panel,
#vehiclesView .compare-table,
#vehiclesView .case-strip > div {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(150, 188, 65, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 31, 21, 0.9), rgba(8, 19, 13, 0.92));
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#vehiclesView .calculator-panel::before,
#vehiclesView .gkv-choice::before,
#vehiclesView .gkv-status::before,
#vehiclesView .compare-advanced-fields::before,
#vehiclesView .compare-metrics .metric::before,
#vehiclesView .wish-panel::before,
#vehiclesView .compare-table::before,
#vehiclesView .case-strip > div::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 22%,
    rgba(0, 255, 141, 0.82) 42%,
    rgba(241, 233, 0, 0.96) 52%,
    rgba(0, 255, 141, 0.82) 62%,
    transparent 82%,
    transparent 100%
  );
  background-size: 220% 100%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: amvCompareEdgeFlow 7s linear infinite;
  opacity: 0.95;
}

#vehiclesView .gkv-choice:nth-child(2)::before,
#vehiclesView .gkv-status:nth-child(2)::before,
#vehiclesView .compare-metrics .metric:nth-child(2)::before,
#vehiclesView .case-strip > div:nth-child(2)::before {
  animation-delay: -1.6s;
}

#vehiclesView .gkv-choice:nth-child(3)::before,
#vehiclesView .gkv-status:nth-child(3)::before,
#vehiclesView .compare-metrics .metric:nth-child(3)::before,
#vehiclesView .case-strip > div:nth-child(3)::before {
  animation-delay: -3.2s;
}

#vehiclesView .compare-metrics .metric:nth-child(4)::before,
#vehiclesView .case-strip > div:nth-child(4)::before {
  animation-delay: -4.8s;
}

#vehiclesView .gkv-start-panel {
  gap: 0;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(7, 18, 13, 0.92), rgba(5, 14, 10, 0.96));
}

#vehiclesView .gkv-start-head {
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 14% 30%, rgba(0, 255, 141, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(0, 84, 52, 0.96), rgba(4, 48, 33, 0.98) 44%, rgba(20, 73, 26, 0.98) 100%);
  border-bottom: 1px solid rgba(145, 191, 67, 0.18);
}

#vehiclesView .gkv-start-head h3,
#vehiclesView .gkv-start-head p {
  color: #f8fbf7;
  text-shadow: 0 0 28px rgba(0, 255, 141, 0.08);
}

#vehiclesView .gkv-start-panel .case-strip {
  padding: 18px 24px 4px;
}

#vehiclesView .case-strip small,
#vehiclesView .compare-advanced-fields label,
#vehiclesView .gkv-choice-block legend,
#vehiclesView .wish-panel summary span,
#vehiclesView .kassen-sort-row span {
  color: rgba(191, 214, 199, 0.88);
}

#vehiclesView .case-strip strong,
#vehiclesView .metric strong,
#vehiclesView .wish-panel summary,
#vehiclesView .compare-table th,
#vehiclesView .compare-table td {
  color: #f4f8f2;
}

#vehiclesView .gkv-choice,
#vehiclesView .gkv-status {
  min-height: 104px;
  border-width: 1px;
  background:
    linear-gradient(180deg, rgba(14, 31, 22, 0.95), rgba(10, 22, 15, 0.95));
  color: #f3f8f1;
}

#vehiclesView .gkv-choice span,
#vehiclesView .gkv-status span,
#vehiclesView .gkv-choice strong,
#vehiclesView .gkv-status strong {
  color: #f2f8ef;
}

#vehiclesView .gkv-choice:hover,
#vehiclesView .gkv-status:hover,
#vehiclesView .gkv-choice.active,
#vehiclesView .gkv-status.active,
#vehiclesView .gkv-choice:has(input:checked),
#vehiclesView .gkv-status:has(input:checked) {
  border-color: rgba(241, 233, 0, 0.46);
  background:
    linear-gradient(180deg, rgba(19, 44, 31, 0.96), rgba(12, 29, 20, 0.96));
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 255, 141, 0.08);
}

#vehiclesView .gkv-choice.active span,
#vehiclesView .gkv-choice:has(input:checked) span,
#vehiclesView .gkv-status.active span,
#vehiclesView .gkv-status:has(input:checked) span {
  color: #fbffdd;
}

#vehiclesView .compare-form input,
#vehiclesView .compare-form select,
#vehiclesView .compare-form textarea {
  border: 1px solid rgba(177, 208, 185, 0.18);
  background: rgba(245, 250, 246, 0.96);
  box-shadow: none;
}

#vehiclesView .compare-form input:focus,
#vehiclesView .compare-form select:focus,
#vehiclesView .compare-form textarea:focus {
  border-color: rgba(0, 143, 69, 0.56);
  box-shadow: 0 0 0 4px rgba(0, 143, 69, 0.12);
}

#vehiclesView .compare-advanced-fields {
  padding: 16px;
}

#vehiclesView .compare-advanced-fields .field,
#vehiclesView .wish-panel .wish-filter-row,
#vehiclesView .compare-table .table-toolbar {
  position: relative;
  z-index: 1;
}

#vehiclesView .gkv-submit,
#vehiclesView .kassen-sort-row button.active {
  border: 1px solid rgba(241, 233, 0, 0.5);
  background:
    linear-gradient(135deg, #f2e900, #fff256 48%, #e5ff8d 100%);
  color: #101b10;
  box-shadow: 0 14px 28px rgba(241, 233, 0, 0.2);
}

#vehiclesView .gkv-submit:hover,
#vehiclesView .kassen-sort-row button.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(241, 233, 0, 0.24);
}

#vehiclesView .kassen-sort-row button {
  border: 1px solid rgba(160, 195, 170, 0.18);
  background: rgba(9, 25, 17, 0.82);
  color: #eef5ef;
}

#vehiclesView .kassen-sort-row button:not(.active):hover {
  border-color: rgba(0, 255, 141, 0.28);
  background: rgba(14, 34, 23, 0.92);
}

#vehiclesView .compare-table {
  padding: 10px;
}

#vehiclesView .compare-table table {
  border-radius: 16px;
  overflow: hidden;
}

#vehiclesView .compare-table thead th {
  background: rgba(9, 28, 18, 0.96);
  color: #eef8ef;
  border-bottom: 1px solid rgba(133, 176, 80, 0.18);
}

#vehiclesView .compare-table tbody td {
  background: rgba(248, 251, 249, 0.96);
}

#vehiclesView .compare-table tbody tr:nth-child(even) td {
  background: rgba(240, 247, 242, 0.98);
}

#vehiclesView .compare-metrics .metric {
  min-height: 118px;
}

#vehiclesView .compare-metrics .metric strong {
  font-size: 2.2rem;
}

#vehiclesView .wish-panel {
  padding: 12px 16px;
}

#vehiclesView .wish-panel summary {
  list-style: none;
}

#vehiclesView .wish-panel summary::-webkit-details-marker {
  display: none;
}

#vehiclesView .gkv-choice i,
#vehiclesView .gkv-status i,
#vehiclesView .compare-metrics .metric i {
  animation: amvCompareFloat 4.8s ease-in-out infinite;
}

#vehiclesView .gkv-choice:nth-child(2) i,
#vehiclesView .compare-metrics .metric:nth-child(2) i {
  animation-delay: -1.2s;
}

#vehiclesView .gkv-choice:nth-child(3) i,
#vehiclesView .compare-metrics .metric:nth-child(3) i {
  animation-delay: -2.4s;
}

/* Stronger compare-view finish: full AMV dark surface with refined cards. */
#vehiclesView.view.active {
  display: block;
}

#vehiclesView {
  margin: 0 10px 18px;
  min-height: calc(100vh - 140px);
}

#vehiclesView > h2 {
  margin-bottom: 10px;
  font-size: clamp(2.8rem, 4vw, 4.3rem);
  letter-spacing: 0;
}

#vehiclesView > p {
  margin-bottom: 28px;
  max-width: 760px;
}

#vehiclesView .toolbar-actions,
#vehiclesView .view-head-actions,
#vehiclesView .page-actions {
  position: relative;
  z-index: 1;
}

#vehiclesView .toolbar-actions input,
#vehiclesView .toolbar-actions select,
#vehiclesView .toolbar-actions button,
#vehiclesView .view-head-actions input,
#vehiclesView .view-head-actions button,
#vehiclesView > .top-actions input,
#vehiclesView > .top-actions button {
  border-color: rgba(145, 188, 160, 0.18);
  background: rgba(11, 26, 18, 0.9);
  color: #f3f7f2;
}

#vehiclesView .toolbar-actions input::placeholder,
#vehiclesView .view-head-actions input::placeholder,
#vehiclesView > .top-actions input::placeholder {
  color: rgba(206, 224, 210, 0.56);
}

#vehiclesView .toolbar-actions button,
#vehiclesView .view-head-actions button,
#vehiclesView > .top-actions button {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

#vehiclesView .gkv-start-panel,
#vehiclesView .compare-table,
#vehiclesView .wish-panel,
#vehiclesView .compare-advanced-fields {
  backdrop-filter: blur(8px);
}

#vehiclesView .gkv-choice-grid,
#vehiclesView .gkv-status-grid {
  gap: 14px;
}

#vehiclesView .gkv-choice,
#vehiclesView .gkv-status,
#vehiclesView .compare-metrics .metric {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

#vehiclesView .gkv-choice:hover,
#vehiclesView .gkv-status:hover,
#vehiclesView .compare-metrics .metric:hover {
  transform: translateY(-2px);
}

#vehiclesView .compare-advanced-fields {
  margin-top: 14px;
}

#vehiclesView .compare-advanced-fields .field,
#vehiclesView .compare-form .field {
  border-radius: 16px;
}

#vehiclesView .compare-form label,
#vehiclesView .compare-form .field-label,
#vehiclesView .compare-form legend {
  color: #d6e7d9;
}

#vehiclesView .compare-form input,
#vehiclesView .compare-form select,
#vehiclesView .compare-form textarea {
  min-height: 48px;
  border-radius: 14px;
}

#vehiclesView .compare-form .gkv-submit {
  min-height: 58px;
  font-size: 1.9rem;
  font-weight: 800;
}

#vehiclesView .compare-metrics {
  margin-top: 18px;
}

#vehiclesView .compare-metrics .metric small,
#vehiclesView .compare-metrics .metric span {
  color: rgba(209, 226, 212, 0.82);
}

#vehiclesView .wish-panel {
  margin-top: 18px;
}

#vehiclesView .wish-panel summary {
  padding: 4px 0 12px;
}

#vehiclesView .kassen-sort-row {
  margin: 18px 0 16px;
}

#vehiclesView .compare-table {
  margin-top: 14px;
}

#vehiclesView .compare-table .table-toolbar,
#vehiclesView .compare-table .table-actions {
  padding: 8px 10px 14px;
}

#vehiclesView .compare-table tbody td {
  color: #163122;
}

#vehiclesView .compare-table tbody tr:hover td {
  background: rgba(228, 245, 233, 0.98);
}

#vehiclesView .kassen-results,
#vehiclesView .panel {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(148, 194, 92, 0.16);
  border-radius: 22px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(8, 27, 18, 0.88), rgba(7, 20, 14, 0.94)),
    radial-gradient(circle at top right, rgba(29, 108, 72, 0.18), transparent 42%);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

#vehiclesView .kassen-results::before,
#vehiclesView .panel::before,
#vehiclesView .kassen-results-head::before,
#vehiclesView .kassen-result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(242, 234, 0, 0.95) 18%, rgba(0, 255, 159, 0.95) 52%, transparent 82%);
  background-size: 220% 100%;
  animation: amvCompareEdgeFlow 6.2s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.75;
}

#vehiclesView .kassen-results-head {
  position: relative;
  border-radius: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  background: rgba(10, 31, 21, 0.66);
  border: 1px solid rgba(130, 182, 145, 0.12);
  overflow: hidden;
}

#vehiclesView .kassen-results-head h2,
#vehiclesView .panel-head h2 {
  color: #f4fbf5;
}

#vehiclesView .kassen-results-head p,
#vehiclesView .panel-head p,
#vehiclesView .kassen-sort-row span {
  color: rgba(214, 232, 217, 0.8);
}

#vehiclesView .kassen-result-list {
  display: grid;
  gap: 18px;
}

#vehiclesView .kassen-result-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(138, 186, 97, 0.18);
  background:
    linear-gradient(180deg, rgba(247, 251, 248, 0.98), rgba(239, 246, 241, 0.98));
  box-shadow: 0 18px 40px rgba(3, 20, 11, 0.2);
}

#vehiclesView .kassen-result-card > * {
  position: relative;
  z-index: 1;
}

#vehiclesView .kassen-result-card .result-main,
#vehiclesView .kassen-result-card .result-actions,
#vehiclesView .kassen-result-card .result-meta,
#vehiclesView .kassen-result-card .result-bonus {
  color: #173122;
}

#vehiclesView .kassen-result-card .result-logo,
#vehiclesView .kassen-result-card .result-rate,
#vehiclesView .kassen-result-card .result-price,
#vehiclesView .kassen-result-card .result-score {
  color: #133324;
}

#vehiclesView .kassen-result-card .saving-badge,
#vehiclesView .kassen-result-card .bonus-badge {
  box-shadow: 0 14px 28px rgba(9, 112, 54, 0.18);
}

/* Final marine styling pass for the compare page */
#vehiclesView {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(24, 138, 91, 0.12), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(235, 226, 43, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(5, 16, 12, 0.98), rgba(7, 22, 16, 0.98));
}

#vehiclesView::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(145, 191, 67, 0.05) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, rgba(145, 191, 67, 0.035) 0 1px, transparent 1px 72px);
  opacity: 0.26;
}

#vehiclesView > * {
  position: relative;
  z-index: 1;
}

#vehiclesView .page-head h1,
#vehiclesView .page-head p,
#vehiclesView > h1,
#vehiclesView > p {
  color: #f4fbf6;
}

#vehiclesView .page-label,
#vehiclesView .section-label,
#vehiclesView .eyebrow {
  color: #b9ed6b;
}

#vehiclesView .top-actions input,
#vehiclesView .top-actions button,
#vehiclesView .toolbar-actions input,
#vehiclesView .toolbar-actions button {
  background:
    linear-gradient(180deg, rgba(11, 33, 22, 0.96), rgba(8, 25, 17, 0.96));
  color: #f5fbf6;
  border: 1px solid rgba(150, 194, 89, 0.2);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

#vehiclesView .top-actions input::placeholder,
#vehiclesView .toolbar-actions input::placeholder {
  color: rgba(212, 229, 217, 0.62);
}

#vehiclesView .calculator-panel.gkv-start-panel,
#vehiclesView .compare-form,
#vehiclesView .compare-advanced-fields,
#vehiclesView .metrics-grid.compare-metrics .metric,
#vehiclesView .case-strip label,
#vehiclesView .case-strip > div,
#vehiclesView .wish-panel,
#vehiclesView .wish-panel .wish-filter-row,
#vehiclesView .kassen-sort-row,
#vehiclesView .compare-table,
#vehiclesView .compare-table .table-toolbar,
#vehiclesView .compare-table .table-actions {
  position: relative;
  overflow: hidden;
}

#vehiclesView .compare-form {
  padding: 24px;
  border-radius: 0 0 24px 24px;
  background:
    linear-gradient(180deg, rgba(10, 30, 20, 0.94), rgba(7, 21, 15, 0.96));
}

#vehiclesView .compare-form label,
#vehiclesView .compare-form legend,
#vehiclesView .compare-form small,
#vehiclesView .compare-form .gkv-required,
#vehiclesView .compare-form .gkv-trust-row span {
  color: rgba(231, 241, 234, 0.92);
}

#vehiclesView .compare-form input,
#vehiclesView .compare-form select,
#vehiclesView .compare-form textarea,
#vehiclesView .case-strip select,
#vehiclesView .case-strip > div {
  background:
    linear-gradient(180deg, rgba(18, 44, 31, 0.92), rgba(13, 31, 22, 0.96));
  color: #f7fbf8;
  border: 1px solid rgba(159, 204, 111, 0.18);
}

#vehiclesView .compare-form input::placeholder,
#vehiclesView .compare-form textarea::placeholder {
  color: rgba(216, 229, 221, 0.56);
}

#vehiclesView .compare-form input:focus,
#vehiclesView .compare-form select:focus,
#vehiclesView .compare-form textarea:focus,
#vehiclesView .case-strip select:focus {
  border-color: rgba(242, 234, 0, 0.42);
  box-shadow: 0 0 0 4px rgba(181, 219, 55, 0.12);
}

#vehiclesView .metrics-grid.compare-metrics .metric {
  border: 1px solid rgba(146, 192, 95, 0.16);
  background:
    linear-gradient(180deg, rgba(11, 31, 22, 0.92), rgba(8, 22, 16, 0.96));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

#vehiclesView .metrics-grid.compare-metrics .metric span,
#vehiclesView .metrics-grid.compare-metrics .metric small {
  color: rgba(215, 230, 218, 0.78);
}

#vehiclesView .metrics-grid.compare-metrics .metric strong {
  color: #fbfff6;
}

#vehiclesView .compare-form::before,
#vehiclesView .compare-advanced-fields::before,
#vehiclesView .metrics-grid.compare-metrics .metric::before,
#vehiclesView .case-strip label::before,
#vehiclesView .case-strip > div::before,
#vehiclesView .wish-panel::before,
#vehiclesView .kassen-sort-row::before,
#vehiclesView .compare-table::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(242, 234, 0, 0.95) 18%, rgba(0, 255, 159, 0.95) 52%, transparent 82%);
  background-size: 220% 100%;
  animation: amvCompareEdgeFlow 6.2s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.58;
  pointer-events: none;
}

#vehiclesView .case-strip label,
#vehiclesView .case-strip span,
#vehiclesView .case-strip strong {
  color: #eef8ef;
}

#vehiclesView .case-strip select {
  background: rgba(12, 31, 20, 0.94);
  color: #f3faf3;
  border-color: rgba(135, 183, 146, 0.18);
}

#vehiclesView .compare-advanced-fields {
  background: rgba(9, 27, 17, 0.54);
}

#vehiclesView .compare-advanced-fields label,
#vehiclesView .compare-form > label,
#vehiclesView .compare-form fieldset legend,
#vehiclesView .compare-form .gkv-trust-row,
#vehiclesView .compare-form .gkv-required {
  position: relative;
  z-index: 1;
}

#vehiclesView .compare-form > label,
#vehiclesView .compare-advanced-fields label {
  color: #e4f2e5;
}

#vehiclesView .compare-form .euro-input b {
  color: rgba(235, 244, 236, 0.72);
}

#vehiclesView .compare-form input,
#vehiclesView .compare-form select,
#vehiclesView .compare-form textarea {
  background: rgba(10, 31, 20, 0.94);
  color: #f3f8f2;
  border: 1px solid rgba(136, 183, 147, 0.18);
}

#vehiclesView .compare-form input:focus,
#vehiclesView .compare-form select:focus,
#vehiclesView .compare-form textarea:focus {
  border-color: rgba(235, 233, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(241, 233, 0, 0.12);
}

#vehiclesView .compare-form input::placeholder,
#vehiclesView .compare-form textarea::placeholder {
  color: rgba(209, 225, 212, 0.5);
}

#vehiclesView .toolbar-search,
#vehiclesView .top-actions input,
#vehiclesView .top-actions button {
  position: relative;
  z-index: 1;
}

#vehiclesView .toolbar-search input,
#vehiclesView .top-actions input {
  background: rgba(10, 28, 18, 0.92);
  color: #f4faf4;
  border-color: rgba(130, 180, 144, 0.18);
}

#vehiclesView .top-actions button {
  background: rgba(10, 28, 18, 0.92);
  color: #f1f8f2;
  border-color: rgba(130, 180, 144, 0.18);
}
/* Overview priority cleanup */
#overviewView.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#overviewView > .hero-band {
  order: 1;
  margin: 0;
}

#overviewView > .overview-top-metrics {
  order: 2;
  margin: 0;
}

#overviewView > .overview-compare-launch {
  order: 3;
  margin: 0;
}

#overviewView > .overview-grid {
  order: 4;
  margin: 0;
}

#overviewView > .overview-flow-grid {
  order: 5;
  margin: 0;
}

#overviewView > .service-suite-panel {
  order: 8;
  margin-top: 4px;
}

#overviewView > .overview-more-actions {
  order: 9;
  margin-top: 0;
}

#overviewView > .strategy-dashboard {
  order: 10;
  margin-top: 0;
}

#overviewView > .vgk-benefit-strip {
  order: 11;
  margin-top: 0;
}

#overviewView .overview-top-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#overviewView .overview-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 18px;
  align-items: start;
}

#overviewView .overview-side-stack {
  gap: 14px;
}

#overviewView .overview-flow-grid,
#overviewView .service-suite-grid,
#overviewView .overview-more-actions .makler-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

#overviewView .overview-flow-grid > *,
#overviewView .service-suite-grid > *,
#overviewView .overview-more-actions .makler-info-grid > * {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

#overviewView .overview-flow-grid > * > :first-child,
#overviewView .service-suite-grid > * > :first-child,
#overviewView .overview-more-actions .makler-info-grid > * > :first-child {
  flex: 0 0 auto;
}

#overviewView .overview-flow-grid > * > :not(:first-child),
#overviewView .service-suite-grid > * > :not(:first-child),
#overviewView .overview-more-actions .makler-info-grid > * > :not(:first-child) {
  min-width: 0;
}

#overviewView .overview-flow-grid h3,
#overviewView .service-suite-grid h3,
#overviewView .overview-more-actions .makler-info-grid h3 {
  margin-top: 0;
}

@media (max-width: 980px) {
  #overviewView .overview-top-metrics,
  #overviewView .overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #overviewView {
    gap: 14px;
  }

  #overviewView .overview-flow-grid,
  #overviewView .service-suite-grid,
  #overviewView .overview-more-actions .makler-info-grid {
    grid-template-columns: 1fr;
  }

  #overviewView .overview-flow-grid > *,
  #overviewView .service-suite-grid > *,
  #overviewView .overview-more-actions .makler-info-grid > * {
    align-items: flex-start;
    min-height: 0;
  }
}

/* Overview priority cleanup */
#overviewView.overview-priority-layout.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#overviewView.overview-priority-layout > .hero-band {
  order: 1;
  margin-bottom: 0;
}

#overviewView.overview-priority-layout > .overview-top-metrics {
  order: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0;
}

#overviewView.overview-priority-layout > .overview-compare-launch {
  order: 3;
  margin-top: 0;
}

#overviewView.overview-priority-layout > .overview-flow-grid {
  order: 4;
}

#overviewView.overview-priority-layout > .service-suite-panel {
  order: 5;
}

#overviewView.overview-priority-layout > .strategy-dashboard {
  order: 6;
}

#overviewView.overview-priority-layout > .vgk-benefit-strip {
  order: 7;
}

#overviewView.overview-priority-layout > .overview-more-actions {
  order: 99;
  margin-top: 10px;
}

#overviewView.overview-priority-layout > .vgk-benefit-strip,
#overviewView.overview-priority-layout > .strategy-dashboard,
#overviewView.overview-priority-layout > .overview-more-actions {
  opacity: 0.96;
}

#overviewView.overview-priority-layout > .overview-more-actions .service-suite-grid,
#overviewView.overview-priority-layout > .overview-more-actions .makler-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

#overviewView.overview-priority-layout > .overview-flow-grid,
#overviewView.overview-priority-layout > .service-suite-panel,
#overviewView.overview-priority-layout > .vgk-benefit-strip,
#overviewView.overview-priority-layout > .strategy-dashboard,
#overviewView.overview-priority-layout > .overview-more-actions {
  scroll-margin-top: 24px;
}

@media (max-width: 720px) {
  #overviewView.overview-priority-layout {
    gap: 14px;
  }

  #overviewView.overview-priority-layout > .overview-top-metrics {
    grid-template-columns: 1fr;
  }
}
/* Hide duplicated overview comparison launcher; comparison stays in Vergleichen. */
.overview-compare-launch {
  display: none !important;
}

/* Professional task-based portal navigation. */
.side-nav {
  gap: 12px;
  min-height: 0;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group[hidden] {
  display: none !important;
}

.admin-only[hidden],
.nav-link[hidden],
.vp-office-tile[hidden] {
  display: none !important;
}

.nav-group + .nav-group {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-section {
  margin: 0 10px 4px;
  color: rgba(241, 233, 0, 0.76);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.nav-link {
  position: relative;
  min-height: 44px;
  padding: 4px 30px 4px 8px;
  gap: 10px;
  border-radius: 10px;
}

.nav-link .nav-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 9px;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 13px;
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0;
  transform: translateX(-4px) rotate(45deg);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  opacity: 0.7;
  transform: translateX(0) rotate(45deg);
}

.nav-link:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}

.account-box {
  margin-top: auto;
}

.account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.sidebar-auto-hide-toggle {
  min-height: 30px;
  border: 1px solid rgba(241, 233, 0, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--electric);
  background: rgba(241, 233, 0, 0.08);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1;
}

.sidebar-auto-hide-toggle[aria-pressed="true"] {
  color: #05150c;
  background: var(--electric);
}

body.sidebar-auto-hide-enabled .portal-shell {
  grid-template-columns: 12px minmax(0, 1fr);
}

body.sidebar-auto-hide-enabled .side {
  z-index: 20;
  width: 272px;
  padding-inline: 16px;
  transform: translateX(-260px);
  box-shadow: none;
}

body.sidebar-auto-hide-enabled .side:hover,
body.sidebar-auto-hide-enabled .side:focus-within {
  transform: translateX(0);
  width: 272px;
  padding-inline: 16px;
  box-shadow: 22px 0 44px rgba(0, 20, 10, 0.2);
}

body.sidebar-auto-hide-enabled .side::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 12px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, rgba(241, 233, 0, 0.1), rgba(0, 141, 78, 0.18));
  opacity: 0.45;
  pointer-events: none;
}

body.sidebar-auto-hide-enabled .side:hover::after,
body.sidebar-auto-hide-enabled .side:focus-within::after {
  opacity: 0;
}

body.sidebar-auto-hide-enabled .side-brand div,
body.sidebar-auto-hide-enabled .backend-status div,
body.sidebar-auto-hide-enabled .nav-label,
body.sidebar-auto-hide-enabled .nav-section,
body.sidebar-auto-hide-enabled .account-box span,
body.sidebar-auto-hide-enabled .account-box strong,
body.sidebar-auto-hide-enabled .account-box small,
body.sidebar-auto-hide-enabled .brand-logo,
body.sidebar-auto-hide-enabled .nav-icon,
body.sidebar-auto-hide-enabled .nav-chevron,
body.sidebar-auto-hide-enabled .backend-dot,
body.sidebar-auto-hide-enabled .account-actions #logoutButton {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

body.sidebar-auto-hide-enabled .side:hover .side-brand div,
body.sidebar-auto-hide-enabled .side:focus-within .side-brand div,
body.sidebar-auto-hide-enabled .side:hover .backend-status div,
body.sidebar-auto-hide-enabled .side:focus-within .backend-status div,
body.sidebar-auto-hide-enabled .side:hover .nav-label,
body.sidebar-auto-hide-enabled .side:focus-within .nav-label,
body.sidebar-auto-hide-enabled .side:hover .nav-section,
body.sidebar-auto-hide-enabled .side:focus-within .nav-section,
body.sidebar-auto-hide-enabled .side:hover .account-box span,
body.sidebar-auto-hide-enabled .side:focus-within .account-box span,
body.sidebar-auto-hide-enabled .side:hover .account-box strong,
body.sidebar-auto-hide-enabled .side:focus-within .account-box strong,
body.sidebar-auto-hide-enabled .side:hover .account-box small,
body.sidebar-auto-hide-enabled .side:focus-within .account-box small,
body.sidebar-auto-hide-enabled .side:hover .brand-logo,
body.sidebar-auto-hide-enabled .side:focus-within .brand-logo,
body.sidebar-auto-hide-enabled .side:hover .nav-icon,
body.sidebar-auto-hide-enabled .side:focus-within .nav-icon,
body.sidebar-auto-hide-enabled .side:hover .nav-chevron,
body.sidebar-auto-hide-enabled .side:focus-within .nav-chevron,
body.sidebar-auto-hide-enabled .side:hover .backend-dot,
body.sidebar-auto-hide-enabled .side:focus-within .backend-dot,
body.sidebar-auto-hide-enabled .side:hover .account-actions #logoutButton,
body.sidebar-auto-hide-enabled .side:focus-within .account-actions #logoutButton {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

body.sidebar-auto-hide-enabled .side:not(:hover):not(:focus-within) .sidebar-auto-hide-toggle {
  width: 0;
  height: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  font-size: 0;
  opacity: 0;
  pointer-events: none;
}

.list-load-more {
  width: min(420px, 100%);
  justify-self: center;
  margin: 16px auto 0;
}

.customer-load-more-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.customer-load-more-actions .list-load-more,
.customer-load-more-actions .list-load-all {
  width: auto;
  min-width: min(230px, 100%);
  margin: 0;
}

.table-load-more-row td {
  padding: 18px !important;
  text-align: center;
  background: var(--surface-2);
}

@media (min-width: 981px) {
  .side {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: hidden;
    gap: 14px;
    padding: 18px 16px;
  }

  .side-brand,
  .backend-status,
  .account-box {
    flex: 0 0 auto;
  }

  .side-nav {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px 6px 10px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(241, 233, 0, 0.35) transparent;
  }

  .side-nav::-webkit-scrollbar {
    width: 5px;
  }

  .side-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(241, 233, 0, 0.28);
  }
}

@media (max-width: 980px) {
  .side {
    height: auto;
    overflow: hidden;
  }

  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
  }

  .nav-group {
    display: contents;
  }

  .nav-section {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
  }
}

/* Professional health-fund document archive */
#documentsView {
  --fund-document-slot-height: 132px;
}

#documentsView .compact-action-head {
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(0, 143, 69, 0.12);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 248, 243, 0.82));
}

#documentsView .compact-action-head .muted-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

#documentsView .document-stats {
  gap: 10px;
  margin-bottom: 18px;
}

#documentsView .document-stats .admin-stat {
  min-height: 84px;
  padding: 13px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(17, 52, 35, 0.055);
}

#documentsView .document-stats .admin-stat strong {
  font-size: 25px;
  line-height: 1;
}

#documentsView #documentsGrid {
  display: grid;
  gap: 18px;
}

#documentsView .company-template-archive,
#documentsView .consent-download-center {
  gap: 12px;
}

#documentsView .company-template-archive > .company-template-head {
  align-items: center;
  padding: 13px 15px;
  border: 1px solid rgba(0, 143, 69, 0.14);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f2f9f5);
}

#documentsView .company-template-head strong {
  font-size: 16px;
  line-height: 1.2;
}

#documentsView .company-template-head small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
}

#documentsView .company-template-head > span {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
}

#documentsView .company-template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

#documentsView .company-template-card {
  height: 100%;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-color: rgba(0, 143, 69, 0.16);
  border-radius: 14px;
  background: linear-gradient(155deg, #ffffff 0%, #f9fcfa 100%);
  box-shadow: 0 10px 26px rgba(17, 52, 35, 0.065);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#documentsView .company-template-card:hover {
  border-color: rgba(0, 143, 69, 0.3);
  box-shadow: 0 13px 30px rgba(17, 52, 35, 0.09);
  transform: translateY(-1px);
}

#documentsView .company-template-card > header {
  min-height: 46px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(0, 143, 69, 0.1);
}

#documentsView .company-template-title {
  gap: 9px;
}

#documentsView .company-template-title .fund-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
}

#documentsView .company-template-title > div:last-child {
  min-width: 0;
}

#documentsView .company-template-title strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.2;
}

#documentsView .company-template-title small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.2;
}

#documentsView .company-template-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-size: 10px;
}

#documentsView .company-template-contact span {
  min-width: 0;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(0, 143, 69, 0.055);
  overflow-wrap: anywhere;
}

#documentsView .template-slot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
}

#documentsView .template-slot {
  box-sizing: border-box;
  height: var(--fund-document-slot-height);
  min-height: var(--fund-document-slot-height);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: stretch;
  justify-content: initial;
  gap: 6px;
  padding: 9px;
  border-color: rgba(0, 143, 69, 0.15);
  border-radius: 10px;
  background: #fcfefd;
  box-shadow: 0 4px 12px rgba(17, 52, 35, 0.035);
}

#documentsView .template-slot.is-ready {
  border-color: rgba(0, 143, 69, 0.26);
  background: linear-gradient(145deg, #f1fbf5, #e4f6ec);
}

#documentsView .template-slot > div:first-child {
  min-width: 0;
}

#documentsView .template-slot strong {
  overflow-wrap: anywhere;
  font-size: 11.5px;
  line-height: 1.16;
}

#documentsView .template-slot small {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 9.5px;
  line-height: 1.15;
}

#documentsView .template-slot > .badge {
  width: fit-content;
  min-height: 20px;
  padding: 3px 7px;
  font-size: 8.5px;
  line-height: 1;
}

#documentsView .template-slot-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 4px;
}

#documentsView .template-slot-actions .mini-action {
  min-width: 0;
  min-height: 27px;
  padding: 3px 4px;
  border-radius: 6px;
  font-size: 8.5px;
  line-height: 1.05;
  white-space: normal;
}

#documentsView .template-slot-actions .template-download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(0, 143, 69, 0.34);
  background: linear-gradient(135deg, #ffffff, #edf8f2);
  color: #00783c;
  font-weight: 800;
  text-decoration: none;
}

#documentsView .template-slot-actions .template-download-action:not(:disabled):hover,
#documentsView .template-slot-actions .template-download-action:not(:disabled):focus-visible {
  border-color: #008f45;
  background: #008f45;
  color: #ffffff;
}

#documentsView .template-slot-actions .template-download-action:disabled {
  border-style: dashed;
  border-color: rgba(100, 116, 107, 0.24);
  background: #f2f5f3;
  color: #7b8981;
  cursor: not-allowed;
  opacity: 0.74;
}

#documentsView .consent-download-center {
  padding: 14px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f3faf6);
  box-shadow: 0 10px 26px rgba(17, 52, 35, 0.055);
}

#documentsView .consent-download-center .company-template-head {
  align-items: center;
}

#documentsView .consent-download-center .company-doc-card {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(250px, 1.6fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  box-shadow: none;
}

#documentsView .consent-download-center .company-doc-card header {
  margin: 0;
}

#documentsView .consent-download-center .doc-meta-lines {
  grid-template-columns: repeat(3, minmax(0, auto));
  align-items: center;
  gap: 6px;
}

#documentsView .consent-download-center .stacked-actions {
  flex-wrap: nowrap;
  justify-content: end;
}

@media (min-width: 1640px) {
  #documentsView .company-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #documentsView .company-template-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #documentsView .consent-download-center .company-doc-card {
    grid-template-columns: minmax(0, 1fr);
  }

  #documentsView .consent-download-center .stacked-actions {
    justify-content: start;
  }
}

@media (max-width: 620px) {
  #documentsView {
    --fund-document-slot-height: 128px;
  }

  #documentsView .document-stats,
  #documentsView .template-slot-grid,
  #documentsView .company-template-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  #documentsView .company-template-head,
  #documentsView .company-template-card > header {
    align-items: flex-start;
  }

  #documentsView .company-template-head {
    flex-direction: column;
  }
}

/* Restored automatic contract reminder */
#kassenweckerPanel {
  scroll-margin-top: 18px;
  border-color: rgba(0, 143, 69, 0.18);
  background: linear-gradient(145deg, #ffffff 0%, #f5faf7 100%);
  box-shadow: 0 12px 32px rgba(17, 52, 35, 0.07);
}

.kassenwecker-jump-button {
  align-self: flex-start;
  margin-top: 4px;
  padding: 0;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
}

.kassenwecker-panel-head {
  align-items: center;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(0, 143, 69, 0.12);
}

.kassenwecker-panel-head h2 {
  margin-top: 3px;
}

.kassenwecker-panel-head p {
  max-width: 760px;
}

.kassenwecker-head-status {
  min-width: 112px;
  border: 1px solid rgba(0, 143, 69, 0.22);
  border-radius: 12px;
  background: var(--green-soft);
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 9px 12px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.kassenwecker-head-status strong {
  font-size: 23px;
  line-height: 1;
}

.kassenwecker-rule-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.kassenwecker-rule-row span,
.kassenwecker-rule-row b {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px;
  line-height: 1;
}

.kassenwecker-rule-row span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f5fff8;
  background: rgba(255, 255, 255, 0.08);
}

.kassenwecker-rule-row b {
  color: #07170e;
  background: var(--electric);
}

.kassenwecker-summary {
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(17, 52, 35, 0.055);
}

.kassenwecker-summary strong {
  font-size: 21px;
}

.kassenwecker-list {
  gap: 8px;
}

.kassenwecker-item {
  grid-template-columns: minmax(190px, 1.15fr) minmax(180px, 0.75fr) minmax(230px, 0.9fr);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(17, 52, 35, 0.045);
}

.kassenwecker-item.is-due {
  border-color: rgba(218, 143, 0, 0.42);
  background: linear-gradient(135deg, #fffdf6, #fff8df);
}

.kassenwecker-item.is-watched:not(.missing) {
  border-color: rgba(0, 143, 69, 0.2);
}

.kassenwecker-dates strong {
  color: var(--ink);
  font-size: 10px;
  line-height: 1.3;
}

.kassenwecker-item-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.kassenwecker-item-actions .kassenwecker-status {
  grid-column: 1 / -1;
  min-height: 29px;
  padding: 5px 8px;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}

.kassenwecker-item-actions .mini-action {
  min-width: 0;
  min-height: 29px;
  padding: 4px 6px;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

@media (max-width: 1100px) {
  .kassenwecker-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kassenwecker-item-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .kassenwecker-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .kassenwecker-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .kassenwecker-item-actions {
    grid-column: auto;
  }
}
.commission-import-workspace {
  margin-bottom: 22px;
  border: 1px solid rgba(0, 139, 72, .28);
  box-shadow: 0 16px 38px rgba(0, 54, 30, .08);
}

.commission-import-head,
.commission-review-bar {
  align-items: center;
  gap: 18px;
}

.commission-import-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
  margin: 16px 0 20px;
}

.commission-import-form label,
.commission-review-bar label {
  display: grid;
  gap: 6px;
  font-size: .85rem;
  color: var(--muted);
}

.commission-import-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.commission-import-summary article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.commission-import-summary span,
.commission-import-summary strong { display: block; }
.commission-import-summary span { color: var(--muted); font-size: .76rem; }
.commission-import-summary strong { margin-top: 4px; font-size: 1rem; }
.commission-review-table { overflow-x: auto; }
.commission-review-table table { min-width: 1500px; }
.commission-money-negative { color: #a52b20; font-weight: 700; }
.commission-money-positive { color: #087d43; font-weight: 700; }
.commission-sensitive { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }

.login-legal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(148px, 1fr));
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.login-about-legal-links {
  width: min(700px, 100%);
}

.login-legal-links :is(button, a) {
  --legal-accent: #f1e900;
  --legal-icon-bg: linear-gradient(145deg, #fff72d, #d8cf00);
  --legal-icon-color: #064d2a;
  appearance: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  min-width: 0;
  min-height: 56px;
  padding: 9px 13px;
  border: 1px solid color-mix(in srgb, var(--legal-accent) 46%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(11, 43, 27, 0.94), rgba(3, 20, 12, 0.92));
  color: #f7fff9;
  text-decoration: none;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.login-legal-links :is(button, a)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -24px -32px auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--legal-accent) 18%, transparent);
  filter: blur(12px);
  pointer-events: none;
}

.login-legal-links :is(button, a[href*="#erstinformation"]) {
  --legal-accent: #20d876;
  --legal-icon-bg: linear-gradient(145deg, #00a653, #007b3d);
  --legal-icon-color: #f1e900;
}

.login-legal-links :is(button, a[href*="#datenschutz"]) {
  --legal-accent: #67efad;
  --legal-icon-bg: linear-gradient(145deg, #0b2b1b, #06170f);
  --legal-icon-color: #f1e900;
}

.login-legal-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--legal-accent) 72%, transparent);
  border-radius: 11px;
  background: var(--legal-icon-bg);
  color: var(--legal-icon-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 16px rgba(0, 0, 0, 0.28);
}

.login-legal-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-legal-links :is(button, a):hover,
.login-legal-links :is(button, a):focus-visible {
  border-color: var(--legal-accent);
  background: linear-gradient(135deg, rgba(0, 111, 55, 0.5), rgba(3, 28, 16, 0.96));
  color: #fff;
  outline: none;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.26),
    0 0 0 3px color-mix(in srgb, var(--legal-accent) 15%, transparent);
  transform: translateY(-2px);
}

@media (max-width: 560px) {
  .login-legal-links {
    grid-template-columns: 1fr;
  }

  .login-legal-links :is(button, a) {
    justify-content: flex-start;
    font-size: .82rem;
  }
}

.settings-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .settings-head-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.public-legal-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 22px;
}

.public-legal-card {
  padding: 26px;
  background: var(--surface);
  color: var(--text);
}

.public-legal-card > section {
  max-height: 65vh;
  overflow: auto;
  padding-right: 6px;
}

.registration-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 22px;
}

.registration-card {
  display: grid;
  gap: 18px;
  padding: 26px;
  background: var(--surface);
  color: var(--text);
}

.registration-card .dialog-head p {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
}

.registration-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.registration-form-grid label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.registration-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.registration-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.registration-consent input {
  margin-top: 3px;
}

.registration-privacy-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 143, 69, 0.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.registration-card menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
}

#registrationRequestStatus.is-error {
  color: var(--danger);
}

.login-register-link {
  width: 100%;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 640px) {
  .registration-form-grid {
    grid-template-columns: 1fr;
  }

  .registration-card {
    padding: 20px;
  }

  .registration-card menu {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

.public-legal-list div {
  grid-template-columns: minmax(150px, .4fr) minmax(0, 1fr);
}

.public-privacy-copy {
  display: grid;
  gap: 12px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .commission-import-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .commission-import-summary { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 680px) {
  .commission-import-form,
  .commission-import-summary { grid-template-columns: 1fr; }
}

/* 2026 professional system polish: hierarchy, readability and responsive workflows. */
:root {
  --professional-focus: #087d43;
  --professional-card-border: rgba(0, 111, 60, 0.16);
}

:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(8, 125, 67, 0.34);
  outline-offset: 2px;
}

#overviewView.overview-priority-layout > .hero-band {
  order: 1;
}

#overviewView.overview-priority-layout > .overview-top-metrics {
  order: 2;
}

#overviewView.overview-priority-layout > .overview-flow-grid {
  order: 3;
}

#overviewView.overview-priority-layout > #kassenweckerPanel {
  order: 4;
}

#overviewView.overview-priority-layout > .service-suite-panel {
  order: 5;
}

#overviewView.overview-priority-layout > .planning-archive {
  order: 99;
  margin-top: 4px;
}

.kassenwecker-rule-row span,
.kassenwecker-rule-row b,
.kassenwecker-dates strong,
.kassenwecker-item-actions .kassenwecker-status,
.kassenwecker-item-actions .mini-action {
  font-size: 11px;
}

.kassenwecker-item-actions .kassenwecker-status,
.kassenwecker-item-actions .mini-action {
  min-height: 36px;
  padding: 7px 9px;
}

#documentsView {
  --fund-document-slot-height: 144px;
}

#documentsView .template-slot small,
#documentsView .company-template-contact,
#documentsView .company-template-title small {
  font-size: 11px;
}

#documentsView .template-slot > .badge,
#documentsView .template-slot-actions .mini-action {
  font-size: 10.5px;
}

#documentsView .template-slot-actions .mini-action {
  min-height: 34px;
  padding: 6px;
}

.team-permission-line {
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

.team-ki-line {
  color: #087d43;
  font-weight: 800;
}

/* Final CRM usability polish: compact top controls, drawers, and admin-only actions. */
.top-actions [data-customer-top-action][hidden],
#customersView #customerFilterToolbar[hidden] {
  display: none !important;
}

.top-actions .customer-add-button,
.top-actions .customer-filter-panel-toggle {
  min-height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  color: var(--accent-dark);
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(17, 52, 35, 0.06);
}

.top-actions .customer-add-button {
  border-color: rgba(0, 143, 69, 0.28);
  background: #fff;
}

.top-actions .customer-add-button:hover,
.top-actions .customer-filter-panel-toggle:hover,
.top-actions .customer-filter-panel-toggle[aria-expanded="true"] {
  border-color: rgba(0, 143, 69, 0.38);
  background: var(--green-soft);
}

.top-actions .customer-filter-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 2px solid currentColor;
  border-inline-width: 0;
  position: relative;
}

.top-actions .customer-filter-icon::before,
.top-actions .customer-filter-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.top-actions .customer-filter-icon::before {
  top: 3px;
}

.top-actions .customer-filter-icon::after {
  bottom: 3px;
}

.top-actions .customer-filter-summary--topbar {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.92);
  color: var(--green);
  padding: 0 15px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  order: -1;
  box-shadow: 0 10px 22px rgba(17, 52, 35, 0.06);
}

#ticketContextLabel[readonly] {
  cursor: default;
  color: var(--accent-dark);
  background: rgba(240, 253, 244, 0.72);
  border-color: rgba(0, 143, 69, 0.18);
  font-weight: 800;
}

#customersView #customerFilterToolbar {
  grid-template-columns: 1fr;
}

.customer-fund-transition .customer-fund-name {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-fund-transfer-date {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 999px;
  background: #fff;
  padding: 2px 7px;
  color: #08713b;
  font-style: normal;
  font-size: 9px;
  font-weight: 950;
}

#customersView .customer-fund-transition--inline .customer-fund-name {
  max-width: none;
}

#customersView .customer-transfer-progress .customer-workflow-step-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(21, 73, 45, 0.12);
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

#customersView .customer-transfer-progress .customer-workflow-step-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

#customersView .customer-transfer-progress .customer-workflow-step-button:not(:disabled):hover {
  border-color: rgba(0, 143, 69, 0.32);
  background: rgba(240, 253, 244, 0.88);
  transform: translateY(-1px);
}

#customersView .customer-transfer-progress .customer-workflow-step-number {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(21, 73, 45, 0.16);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 10px;
  font-weight: 950;
}

#customersView .customer-transfer-progress .customer-workflow-step-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

#customersView .customer-transfer-progress .customer-workflow-step-copy strong,
#customersView .customer-transfer-progress .customer-workflow-step-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customersView .customer-transfer-progress .customer-workflow-step-copy strong {
  font-size: 10px;
  font-weight: 950;
}

#customersView .customer-transfer-progress .customer-workflow-step-copy small {
  color: currentColor;
  font-size: 8.5px;
  opacity: 0.78;
}

#customersView .customer-transfer-progress li.done .customer-workflow-step-number {
  border-color: rgba(0, 143, 69, 0.34);
  background: #e8f8ef;
}

#customersView .customer-transfer-progress li.active .customer-workflow-step-number,
#customersView .customer-transfer-progress li.approval .customer-workflow-step-number {
  border-color: rgba(200, 164, 0, 0.48);
  background: #fff9cc;
}

#customersView .customer-transfer-progress li.problem .customer-workflow-step-number {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff0f0;
}

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

.ticket-delete-action {
  min-height: 28px;
}

.health-fund-summary-row.is-open td {
  background: rgba(240, 253, 244, 0.55);
}

.health-fund-details-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(0, 143, 69, 0.2);
  border-radius: 12px;
  background: #fff;
  color: var(--accent-dark);
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 7px 10px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.health-fund-details-toggle:hover,
.health-fund-details-toggle[aria-expanded="true"] {
  border-color: rgba(0, 143, 69, 0.38);
  background: var(--green-soft);
}

.health-fund-details-toggle small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.health-fund-details-row > td {
  padding-top: 0;
  background: rgba(248, 252, 249, 0.86);
}

.health-fund-details-drawer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.28fr);
  gap: 14px;
  border: 1px solid rgba(0, 143, 69, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.78));
  padding: 14px;
}

.health-fund-details-main,
.health-fund-details-side {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.health-fund-details-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.health-fund-details-head strong {
  color: var(--accent-dark);
}

.health-fund-details-side {
  align-content: start;
  border: 1px solid rgba(21, 73, 45, 0.1);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.health-fund-details-side span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.health-fund-details-side strong,
.health-fund-details-side small {
  overflow-wrap: anywhere;
}

.team-permission-stack {
  min-width: 190px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.team-permission-pill {
  min-height: 34px;
  border: 1px solid rgba(21, 73, 45, 0.12);
  border-radius: 10px;
  background: #fff;
  display: grid;
  gap: 1px;
  padding: 5px 8px;
}

.team-permission-pill strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 950;
}

.team-permission-pill small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.team-permission-pill.is-direct {
  border-color: rgba(0, 143, 69, 0.22);
  background: rgba(240, 253, 244, 0.92);
}

.team-permission-pill.is-review {
  border-color: rgba(234, 179, 8, 0.26);
  background: rgba(254, 249, 195, 0.62);
}

.team-permission-pill.is-ki {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(239, 246, 255, 0.82);
}

#teamDialog,
#teamEditDialog {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

#teamForm,
#teamEditForm {
  box-sizing: border-box;
  width: 100%;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#teamForm .dialog-head,
#teamEditForm .dialog-head {
  position: sticky;
  z-index: 4;
  top: -20px;
  margin: -20px -20px 0;
  padding: 18px 20px 13px;
  border-bottom: 1px solid rgba(0, 111, 60, 0.12);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
}

#teamForm menu,
#teamEditForm menu {
  position: sticky;
  z-index: 4;
  bottom: -20px;
  margin: 2px -20px -20px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(0, 111, 60, 0.12);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
}

#teamForm .delivery-permission-panel,
#teamEditForm .delivery-permission-panel,
#teamForm .ki-access-permission-panel,
#teamEditForm .ki-access-permission-panel {
  margin-top: 2px;
  padding: 14px;
}

.table-card {
  scrollbar-color: rgba(0, 111, 60, 0.42) rgba(0, 111, 60, 0.06);
  scrollbar-width: thin;
}

.table-card::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.table-card::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(0, 111, 60, 0.42);
  background-clip: padding-box;
}

.table-card::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(0, 111, 60, 0.06);
}

@media (max-width: 1480px) {
  #customersView .customers-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #customersView .customers-table table,
  #krankenkassenView .inner-table table,
  #krankenkassenAdminView .inner-table table {
    width: 100%;
    min-width: 0;
  }

  #customersView .customers-table thead,
  #krankenkassenView .inner-table thead,
  #krankenkassenAdminView .inner-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #customersView .customers-table tbody,
  #krankenkassenView .inner-table tbody,
  #krankenkassenAdminView .inner-table tbody {
    display: grid;
    gap: 14px;
  }

  #customersView .customers-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--professional-card-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(17, 52, 35, 0.07);
  }

  #customersView .customers-table tbody td {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    border: 0;
    border-radius: 0;
    padding: 14px;
  }

  #customersView .customers-table tbody td + td {
    border-left: 0;
    border-top: 1px solid rgba(0, 111, 60, 0.1);
  }

  #customersView .customers-table tbody td:nth-child(odd) {
    border-right: 1px solid rgba(0, 111, 60, 0.1);
  }

  #customersView .customers-table tbody td:nth-child(3),
  #customersView .customers-table tbody td:nth-child(4) {
    grid-column: 1 / -1;
    border-right: 0;
  }

  #customersView .compact-customer-actions {
    min-height: 0;
  }

  #customersView .compact-customer-actions > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #customersView .compact-customer-actions .danger-mini-action {
    grid-column: auto;
  }

  #customersView .compact-customer-actions .mini-action,
  #customersView .compact-workflow-button,
  #customersView .compact-workflow-head small,
  #customersView .compact-workflow-note,
  #customersView .compact-customer-meta span,
  #customersView .compact-customer-id {
    font-size: 10.5px;
  }

  #customersView .compact-customer-actions .mini-action {
    min-height: 40px;
    white-space: normal;
  }

  #krankenkassenView .inner-table,
  #krankenkassenAdminView .inner-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #krankenkassenView .inner-table tbody tr,
  #krankenkassenAdminView .inner-table tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--professional-card-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(17, 52, 35, 0.065);
  }

  #krankenkassenView .inner-table tbody td,
  #krankenkassenAdminView .inner-table tbody td {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    border: 0;
    padding: 12px 14px;
    overflow-wrap: anywhere;
  }

  #krankenkassenView .inner-table tbody td::before,
  #krankenkassenAdminView .inner-table tbody td::before {
    display: block;
    margin-bottom: 5px;
    color: #68776f;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  #krankenkassenView .inner-table tbody td:nth-child(1)::before,
  #krankenkassenAdminView .inner-table tbody td:nth-child(1)::before { content: "Krankenkasse"; }
  #krankenkassenView .inner-table tbody td:nth-child(2)::before,
  #krankenkassenAdminView .inner-table tbody td:nth-child(2)::before { content: "Kontakt"; }
  #krankenkassenView .inner-table tbody td:nth-child(3)::before,
  #krankenkassenAdminView .inner-table tbody td:nth-child(3)::before { content: "Gesamtbeitrag"; }
  #krankenkassenView .inner-table tbody td:nth-child(4)::before { content: "Geöffnet in"; }
  #krankenkassenView .inner-table tbody td:nth-child(5)::before,
  #krankenkassenAdminView .inner-table tbody td:nth-child(4)::before { content: "Bonus"; }
  #krankenkassenView .inner-table tbody td:nth-child(6)::before,
  #krankenkassenAdminView .inner-table tbody td:nth-child(5)::before { content: "Provision"; }
  #krankenkassenView .inner-table tbody td:nth-child(7)::before,
  #krankenkassenAdminView .inner-table tbody td:nth-child(6)::before { content: "PDF-Formulare"; }
  #krankenkassenView .inner-table tbody td:nth-child(8)::before,
  #krankenkassenAdminView .inner-table tbody td:nth-child(7)::before { content: "Status"; }
  #krankenkassenAdminView .inner-table tbody td:nth-child(8)::before { content: "Admin-Aktionen"; }

  #krankenkassenView .inner-table tbody td:nth-child(7),
  #krankenkassenAdminView .inner-table tbody td:nth-child(6) {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  .side {
    gap: 8px;
    padding: 9px 10px;
  }

  .side-brand {
    min-height: 54px;
    padding: 7px 9px;
  }

  .side-brand img {
    width: 38px;
    height: 38px;
  }

  .backend-status {
    min-height: 38px;
    padding: 7px 10px;
  }

  .side-nav {
    gap: 6px;
    padding-bottom: 3px;
  }

  .nav-link {
    min-height: 40px;
    padding: 3px 27px 3px 7px;
  }

  .nav-link .nav-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .main {
    padding: clamp(14px, 3vw, 24px);
  }

  .topbar {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  #customersView .customers-table tbody tr,
  #krankenkassenView .inner-table tbody tr,
  #krankenkassenAdminView .inner-table tbody tr {
    grid-template-columns: minmax(0, 1fr);
  }

  #customersView .customers-table tbody td,
  #customersView .customers-table tbody td:nth-child(3),
  #customersView .customers-table tbody td:nth-child(4),
  #krankenkassenView .inner-table tbody td:nth-child(7),
  #krankenkassenAdminView .inner-table tbody td:nth-child(6) {
    grid-column: auto;
    border-right: 0;
  }

  #customersView .compact-customer-actions > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #teamDialog,
  #teamEditDialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  #teamForm,
  #teamEditForm {
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }

  #teamForm .dialog-head,
  #teamEditForm .dialog-head {
    top: -16px;
    margin: -16px -16px 0;
    padding: 14px 16px 11px;
  }

  #teamForm menu,
  #teamEditForm menu {
    bottom: -16px;
    margin: 2px -16px -16px;
    padding: 12px 16px 16px;
  }

  #teamForm .team-create-grid,
  #teamEditForm .form-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }

  .team-create-status-field {
    grid-column: auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Controlled health-fund source monitoring and Admin review */
.fund-monitoring-overview {
  margin: 0 0 24px;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid rgba(0, 125, 73, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 5%, rgba(246, 235, 0, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(241, 252, 247, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 42px rgba(10, 52, 37, 0.08);
}

.fund-monitoring-overview-head,
.fund-monitoring-section-head,
.fund-monitoring-source-card,
.fund-monitoring-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.fund-monitoring-overview-head h3 {
  margin: 4px 0 5px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.fund-monitoring-overview-head p,
.fund-monitoring-section-head small,
.fund-monitoring-source-card small {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.fund-monitoring-safety {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(0, 125, 73, 0.22);
  border-radius: 999px;
  color: #006f42;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
}

.fund-monitoring-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 16px;
}

.fund-monitoring-metrics article {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid rgba(0, 125, 73, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.fund-monitoring-metrics span,
.fund-monitoring-metrics small {
  color: var(--muted);
  font-size: 0.78rem;
}

.fund-monitoring-metrics strong {
  color: #073f2a;
  font-size: 1.65rem;
  line-height: 1;
}

.fund-monitoring-queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fund-monitoring-queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(82, 101, 92, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
}

.fund-monitoring-queue-item.pending {
  border-color: rgba(210, 137, 0, 0.38);
  background: rgba(255, 248, 229, 0.94);
}

.fund-monitoring-queue-item.due {
  border-color: rgba(191, 85, 52, 0.25);
}

.fund-monitoring-queue-item > div {
  min-width: 0;
}

.fund-monitoring-queue-item strong,
.fund-monitoring-queue-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-monitoring-queue-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.fund-monitoring-queue-item .secondary-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 36px;
}

.fund-monitoring-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
}

.fund-monitoring-status.pending {
  color: #855300;
  background: #fff0bf;
}

.fund-monitoring-status.due {
  color: #9b3e23;
  background: #ffebe4;
}

.fund-monitoring-status.current {
  color: #006d3f;
  background: #ddf7e9;
}

.health-fund-monitoring-button {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 132px;
  padding: 9px 11px;
  border: 1px solid rgba(0, 125, 73, 0.18);
  border-radius: 10px;
  color: #073f2a;
  background: #fff;
  cursor: pointer;
}

.health-fund-monitoring-button.pending {
  border-color: rgba(210, 137, 0, 0.4);
  background: #fffaf0;
}

.health-fund-monitoring-button strong {
  font-size: 0.72rem;
}

.fund-monitoring-dialog {
  width: min(920px, calc(100vw - 24px));
  max-height: min(92vh, 980px);
}

.fund-monitoring-dialog form {
  display: grid;
  gap: 18px;
}

.fund-monitoring-source-card,
.fund-monitoring-candidate,
.fund-monitoring-review-card {
  padding: 17px;
  border: 1px solid rgba(0, 125, 73, 0.18);
  border-radius: 17px;
  background: #f6fcf9;
}

.fund-monitoring-source-card .secondary-button.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.fund-monitoring-settings {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(82, 101, 92, 0.16);
}

.fund-monitoring-candidate {
  display: grid;
  gap: 15px;
  background: #fff;
}

.fund-monitoring-review-card {
  display: grid;
  gap: 15px;
  border-color: rgba(210, 137, 0, 0.34);
  background: #fffaf0;
}

.fund-monitoring-comparison {
  display: grid;
  gap: 9px;
}

.fund-monitoring-change-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 2fr);
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(133, 83, 0, 0.14);
  border-radius: 12px;
  background: #fff;
}

.fund-monitoring-change-row > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.fund-monitoring-change-row span {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 9px;
  color: #39473f;
  background: #f2f5f3;
  overflow-wrap: anywhere;
}

.fund-monitoring-change-row span.new-value {
  color: #005f38;
  background: #e3f7ec;
}

.fund-monitoring-change-row small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fund-monitoring-review-actions {
  justify-content: flex-end;
}

/* Per-account portal language: Arabic uses a full right-to-left workspace. */
html[dir="rtl"] body {
  direction: rtl;
  font-family: Tahoma, Arial, "Segoe UI", sans-serif;
  text-align: right;
}

html[dir="rtl"] .sidebar,
html[dir="rtl"] .main-content,
html[dir="rtl"] dialog,
html[dir="rtl"] form,
html[dir="rtl"] table,
html[dir="rtl"] .panel,
html[dir="rtl"] .modal-card {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[name*="iban" i],
html[dir="rtl"] input[name*="bic" i],
html[dir="rtl"] input[name*="username" i],
html[dir="rtl"] input[name*="password" i],
html[dir="rtl"] code,
html[dir="rtl"] .technical-value {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .nav-icon,
html[dir="rtl"] [data-icon],
html[dir="rtl"] .status-dot,
html[dir="rtl"] canvas,
html[dir="rtl"] svg {
  direction: ltr;
}

html[dir="rtl"] .profile-form-actions,
html[dir="rtl"] .fund-monitoring-review-actions,
html[dir="rtl"] .trusted-devices-actions,
html[dir="rtl"] .mfa-step-up-actions,
html[dir="rtl"] dialog menu {
  justify-content: flex-start;
}

html[dir="rtl"] .trusted-device-item-main,
html[dir="rtl"] .trusted-devices-empty,
html[dir="rtl"] .mfa-trust-choice span {
  min-width: 0;
  text-align: right;
}

html[dir="rtl"] .mfa-card input[inputmode="numeric"] {
  direction: ltr;
  text-align: center;
}

html[dir="rtl"] .fund-monitoring-change-row b {
  transform: scaleX(-1);
}

html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] label,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] button {
  text-align: right;
}

html[dir="rtl"] input[type="number"] {
  direction: ltr;
  text-align: right;
}

@media (max-width: 980px) {
  .fund-monitoring-queue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .fund-monitoring-overview-head,
  .fund-monitoring-section-head,
  .fund-monitoring-source-card,
  .fund-monitoring-review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .fund-monitoring-metrics,
  .fund-monitoring-queue {
    grid-template-columns: 1fr;
  }

  .fund-monitoring-change-row,
  .fund-monitoring-change-row > div {
    grid-template-columns: 1fr;
  }

  .fund-monitoring-change-row b {
    height: 0;
    overflow: hidden;
    font-size: 0;
  }

  .fund-monitoring-review-actions > button,
  .fund-monitoring-source-card .secondary-button {
    width: 100%;
  }
}

/* Übersicht 2026: kompakte operative Arbeitszentrale. */
#overviewView.overview-dashboard {
  width: min(100%, 1480px);
  margin-inline: auto;
  padding-block-end: 36px;
  display: none;
  gap: 24px;
  overflow: visible;
}

#overviewView.overview-dashboard.active {
  display: grid;
}

body:has(#overviewView.active) .topbar {
  margin-bottom: 22px;
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 22px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 96% 0%, rgba(241, 233, 0, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(245, 252, 248, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 42px rgba(17, 52, 35, 0.1);
}

body:has(#overviewView.active) .topbar .kicker {
  width: fit-content;
  border: 1px solid rgba(0, 143, 69, 0.18);
  border-radius: 999px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-dark);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

body:has(#overviewView.active) .topbar .kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 143, 69, 0.12);
}

body:has(#overviewView.active) .topbar h1 {
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.045em;
}

body:has(#overviewView.active) .topbar p {
  max-width: 680px;
  color: #456055;
  font-size: 15px;
  line-height: 1.5;
}

.overview-command-center {
  position: relative;
  isolation: isolate;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(26px, 3.2vw, 48px);
  border: 1px solid rgba(71, 235, 149, 0.2);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(241, 233, 0, 0.16), transparent 28%),
    radial-gradient(circle at 12% 100%, rgba(0, 184, 90, 0.22), transparent 34%),
    linear-gradient(135deg, #051d12 0%, #06351f 58%, #07512d 100%);
  box-shadow: 0 24px 64px rgba(5, 44, 25, 0.2);
}

.overview-command-center::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.overview-command-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 14px;
  text-align: start;
}

.overview-command-copy .kicker,
.overview-panel-heading .kicker,
.overview-section-heading .kicker {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 143, 69, 0.14);
  color: var(--accent-dark);
  background: linear-gradient(135deg, rgba(0, 143, 69, 0.12), rgba(255, 255, 255, 0.92));
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.09em;
  box-shadow: 0 8px 22px rgba(9, 47, 28, 0.07);
}

.overview-panel-heading .kicker::before,
.overview-section-heading .kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 143, 69, 0.12);
}

.overview-command-copy .kicker {
  color: #082b19;
  border-color: rgba(241, 233, 0, 0.44);
  background: linear-gradient(135deg, #f1e900, #fffba0);
  box-shadow: 0 10px 24px rgba(241, 233, 0, 0.24);
}

.overview-command-copy h2 {
  max-width: 760px;
  font-size: clamp(28px, 3.3vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.overview-command-copy > p {
  max-width: 720px;
  color: rgba(239, 250, 244, 0.8);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
}

.overview-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 2px;
}

.overview-live-status,
.overview-scope-status {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.overview-live-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
}

.overview-live-status > i {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  background: #d2bf22;
  box-shadow: 0 0 0 5px rgba(210, 191, 34, 0.15);
}

.overview-live-status.is-online > i {
  background: #31da80;
  box-shadow: 0 0 0 5px rgba(49, 218, 128, 0.16), 0 0 18px rgba(49, 218, 128, 0.5);
}

.overview-live-status.has-warning > i {
  background: #f0b44d;
  box-shadow: 0 0 0 5px rgba(240, 180, 77, 0.16);
}

.overview-live-status.is-local > i {
  background: #d2bf22;
}

.overview-live-status > span,
.overview-live-status strong,
.overview-live-status small {
  min-width: 0;
  display: block;
  text-align: start;
}

.overview-live-status strong {
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
}

.overview-live-status small {
  margin-block-start: 2px;
  color: rgba(240, 250, 244, 0.7);
  font-size: 11px;
}

.overview-scope-status {
  display: inline-flex;
  align-items: center;
  padding-inline: 15px;
  color: rgba(244, 251, 247, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.overview-command-actions {
  display: grid;
  gap: 12px;
}

#overviewView .overview-new-customer-button,
#overviewView .overview-secondary-action {
  width: 100%;
  min-height: 76px;
  border-radius: 18px;
  padding: 14px 16px;
  text-align: start;
}

#overviewView .overview-new-customer-button {
  border: 1px solid rgba(241, 233, 0, 0.5);
  color: #101a14;
  background: linear-gradient(135deg, #fff70a, #e9ef50);
  box-shadow: 0 14px 36px rgba(241, 233, 0, 0.18);
}

#overviewView .overview-new-customer-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(241, 233, 0, 0.26);
}

#overviewView .overview-new-customer-icon {
  width: 44px;
  height: 44px;
  font-size: 25px;
  background: #057239;
  color: #fff;
}

#overviewView .overview-new-customer-copy strong,
#overviewView .overview-secondary-action strong {
  font-size: 15px;
}

#overviewView .overview-new-customer-copy small,
#overviewView .overview-secondary-action small {
  margin-block-start: 3px;
  font-size: 12px;
  line-height: 1.4;
}

#overviewView .overview-secondary-action {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

#overviewView .overview-secondary-action:hover {
  border-color: rgba(88, 235, 156, 0.5);
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}

#overviewView .overview-secondary-action .module-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  background-color: rgba(255, 255, 255, 0.08);
}

#overviewView .overview-secondary-action span:not(.module-icon) {
  min-width: 0;
}

#overviewView .overview-secondary-action strong,
#overviewView .overview-secondary-action small {
  display: block;
  text-align: start;
}

#overviewView .overview-secondary-action small {
  color: rgba(241, 250, 245, 0.68);
}

.overview-kpi-section {
  display: grid;
  gap: 14px;
}

.overview-team-flow {
  border: 1px solid rgba(0, 143, 69, 0.16);
  border-radius: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, #f5fcf8, #ffffff 62%, #fffbe6);
  box-shadow: 0 14px 32px rgba(17, 52, 35, 0.07);
}

.overview-team-flow h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 22px;
}

.overview-team-flow p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.team-flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.team-flow-steps li {
  min-width: 0;
  border: 1px solid rgba(21, 73, 45, 0.12);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 5px;
  background: #fff;
}

.team-flow-steps li > span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 900;
}

.team-flow-steps strong {
  color: var(--ink);
  font-size: 12px;
}

.team-flow-steps small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.overview-section-heading,
.overview-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  text-align: start;
}

.overview-section-heading h2,
.overview-panel-heading h2 {
  margin-block-start: 4px;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 25px);
  letter-spacing: -0.02em;
}

.overview-section-heading > p {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: end;
}

.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.overview-kpi-card {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(17, 84, 51, 0.14);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f7fbf8);
  box-shadow: 0 10px 30px rgba(9, 47, 28, 0.07);
  text-align: start;
}

.overview-kpi-card.is-attention {
  border-color: rgba(197, 137, 25, 0.24);
  background: linear-gradient(145deg, #fff, #fffbea);
}

.overview-kpi-card .overview-kpi-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #0b6640, #063521);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    0 9px 18px rgba(4, 48, 29, 0.2);
}

.overview-kpi-card .overview-kpi-icon::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.overview-kpi-card.is-customers .overview-kpi-icon {
  color: #fff;
  background: linear-gradient(145deg, #075b51, #032f2b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    0 9px 18px rgba(3, 47, 43, 0.2);
}

.overview-kpi-card.is-attention .overview-kpi-icon {
  color: #fff;
  background: linear-gradient(145deg, #a47a10, #654802);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 9px 18px rgba(96, 68, 3, 0.2);
}

.overview-kpi-card.is-tickets .overview-kpi-icon {
  color: #fff;
  background: linear-gradient(145deg, #285653, #123230);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    0 9px 18px rgba(18, 50, 48, 0.2);
}

.overview-kpi-symbol {
  width: 27px;
  height: 27px;
  display: block;
  position: relative;
  z-index: 1;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.overview-kpi-card > div,
.overview-kpi-card span,
.overview-kpi-card strong,
.overview-kpi-card small {
  min-width: 0;
  display: block;
}

.overview-kpi-card > div > span {
  color: #536458;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.overview-kpi-card strong {
  margin-block: 2px;
  color: #07391f;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1;
}

.overview-kpi-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.overview-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

#overviewView .overview-priority-panel,
#overviewView .overview-quick-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: clamp(20px, 2.2vw, 28px);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(9, 47, 28, 0.065);
}

.overview-panel-badge {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 13px;
  border: 1px solid rgba(176, 119, 23, 0.2);
  border-radius: 999px;
  color: #704a0b;
  background: #fff5ca;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.overview-panel-badge.is-clear {
  border-color: rgba(0, 110, 53, 0.18);
  color: var(--accent-dark);
  background: #e5f8ed;
}

.overview-priority-list,
.overview-quick-actions {
  display: grid;
  gap: 10px;
}

.overview-priority-item {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #dce7df;
  border-radius: 16px;
  color: var(--ink);
  background: #fbfdfb;
  text-align: start;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.overview-priority-item:hover {
  border-color: rgba(0, 110, 53, 0.34);
  background: #f2faf5;
  transform: translateY(-1px);
}

.overview-priority-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #06763b, #04582d);
  font-size: 18px;
  font-weight: 900;
}

.overview-priority-copy,
.overview-priority-copy strong,
.overview-priority-copy small {
  min-width: 0;
  display: block;
  text-align: start;
}

.overview-priority-copy strong {
  font-size: 14px;
}

.overview-priority-copy small {
  margin-block-start: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.overview-priority-arrow {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: #e7f7ed;
  font-weight: 900;
}

#overviewView .overview-quick-panel {
  color: #edf8f1;
  border-color: rgba(26, 126, 75, 0.28);
  background: linear-gradient(160deg, #092819, #073b23);
}

#overviewView .overview-quick-panel h2,
#overviewView .overview-quick-panel .kicker {
  color: #fff;
}

#overviewView .overview-quick-panel .kicker {
  color: #e9ef3a;
}

.overview-quick-actions > button {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  text-align: start;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.overview-quick-actions > button:hover {
  border-color: rgba(83, 226, 149, 0.46);
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.overview-quick-actions .module-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.08);
}

.overview-quick-actions span:not(.module-icon),
.overview-quick-actions strong,
.overview-quick-actions small {
  min-width: 0;
  display: block;
  text-align: start;
}

.overview-quick-actions strong {
  font-size: 13px;
}

.overview-quick-actions small {
  margin-block-start: 3px;
  color: rgba(236, 248, 241, 0.65);
  font-size: 11px;
}

.overview-quick-actions b {
  color: #e9ef3a;
  font-size: 18px;
}

.overview-system-note {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(239, 250, 244, 0.72);
  background: rgba(0, 0, 0, 0.14);
  font-size: 11px;
  line-height: 1.45;
  text-align: start;
}

#overviewView #kassenweckerPanel {
  scroll-margin-top: 22px;
  display: grid;
  gap: 18px;
  padding: clamp(20px, 2.3vw, 30px);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(9, 47, 28, 0.065);
}

#overviewView .kassenwecker-panel-head {
  align-items: flex-start;
}

#overviewView .kassenwecker-panel-head h2 {
  margin-block-start: 5px;
  font-size: clamp(19px, 2vw, 25px);
  letter-spacing: -0.02em;
}

#overviewView .kassenwecker-panel-head p {
  max-width: 820px;
  margin-block-start: 7px;
  font-size: 13px;
  line-height: 1.55;
}

#overviewView .kassenwecker-head-status {
  min-width: 118px;
  min-height: 58px;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 12px;
}

#overviewView .kassenwecker-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.65fr);
  gap: 14px;
}

#overviewView .kassenwecker-auto-note,
#overviewView .kassenwecker-summary {
  min-height: 0;
  border-radius: 16px;
  padding: 17px 18px;
}

#overviewView .kassenwecker-auto-note strong,
#overviewView .kassenwecker-summary strong {
  font-size: 16px;
}

#overviewView .kassenwecker-auto-note p,
#overviewView .kassenwecker-summary p {
  font-size: 13px;
  line-height: 1.55;
}

#overviewView .kassenwecker-rule-row span,
#overviewView .kassenwecker-rule-row b,
#overviewView .kassenwecker-dates strong,
#overviewView .kassenwecker-item-actions .kassenwecker-status,
#overviewView .kassenwecker-item-actions .mini-action {
  font-size: 12px;
}

#overviewView .kassenwecker-list {
  gap: 9px;
}

#overviewView .kassenwecker-item {
  min-width: 0;
  min-height: 78px;
  grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.15fr) minmax(210px, auto);
  gap: 14px;
  padding: 13px 14px;
  border-radius: 15px;
}

#overviewView .kassenwecker-item-actions .mini-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 11px;
}

.overview-reminder-toggle {
  min-height: 44px;
  justify-self: center;
  padding-inline: 18px;
  border: 1px solid rgba(0, 110, 53, 0.25);
  border-radius: 12px;
  color: var(--accent-dark);
  background: #f3faf6;
  font-size: 13px;
  font-weight: 800;
}

.overview-reminder-toggle:hover {
  border-color: var(--accent-dark);
  background: #e7f7ed;
}

#overviewView > .planning-archive {
  border: 1px solid #dce6de;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

#overviewView > .planning-archive > summary {
  min-height: 66px;
  padding: 14px 18px;
}

#overviewView > .planning-archive > summary span {
  font-size: 14px;
}

#overviewView > .planning-archive > summary small {
  font-size: 11px;
}

#overviewView button:focus-visible,
#overviewView a:focus-visible,
#overviewView summary:focus-visible {
  outline: 3px solid #006e35;
  outline-offset: 3px;
}

html[dir="rtl"] #overviewView .overview-priority-arrow,
html[dir="rtl"] #overviewView .overview-quick-actions b,
html[dir="rtl"] #overviewView .overview-new-customer-arrow {
  transform: scaleX(-1);
}

html[dir="rtl"] #overviewView .overview-quick-actions > button:hover {
  transform: translateX(-2px);
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .top-actions .search {
    flex: 1 1 300px;
    width: auto;
  }

  .overview-command-center {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 28px;
  }

  .overview-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-workspace-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.8fr);
  }

  #overviewView .kassenwecker-item {
    grid-template-columns: minmax(180px, 0.9fr) minmax(210px, 1fr);
  }

  #overviewView .kassenwecker-item-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .main {
    overflow-x: clip;
  }

  .overview-command-center,
  .overview-team-flow,
  .overview-workspace-grid,
  #overviewView .kassenwecker-layout {
    grid-template-columns: 1fr;
  }

  .overview-command-center {
    min-height: auto;
  }

  .overview-command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #overviewView .overview-new-customer-button,
  #overviewView .overview-secondary-action {
    min-height: 72px;
  }

  #overviewView .overview-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-quick-actions > button {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .overview-quick-actions > button > b {
    display: none;
  }

  #overviewView > .planning-archive > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  #overviewView.overview-dashboard {
    gap: 18px;
  }

  .overview-command-center {
    padding: 22px;
    border-radius: 20px;
  }

  .overview-command-copy h2 {
    font-size: clamp(27px, 9vw, 36px);
  }

  .overview-section-heading,
  .overview-panel-heading,
  #overviewView .kassenwecker-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-section-heading > p {
    max-width: none;
    text-align: start;
  }

  .overview-kpi-grid {
    grid-template-columns: 1fr;
  }

  .overview-kpi-card {
    min-height: 86px;
    padding: 14px 16px;
  }

  #overviewView .overview-quick-actions {
    grid-template-columns: 1fr;
  }

  .team-flow-steps,
  .orders-process-strip,
  .help-ai-playbook {
    grid-template-columns: 1fr;
  }

  #overviewView .kassenwecker-head-status {
    min-width: 0;
    width: 100%;
  }

  #overviewView .kassenwecker-rule-row {
    align-items: flex-start;
    flex-direction: column;
  }

  #overviewView .kassenwecker-item {
    grid-template-columns: 1fr;
  }

  #overviewView .kassenwecker-item-actions {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 16px;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions .search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .top-actions > button {
    width: 100%;
    min-height: 44px;
  }

  .overview-command-actions {
    grid-template-columns: 1fr;
  }

  .overview-status-row,
  .overview-live-status,
  .overview-scope-status {
    width: 100%;
  }

  .overview-scope-status {
    justify-content: center;
  }

  .overview-priority-item {
    min-height: 76px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    padding: 11px;
  }

  .overview-priority-number {
    width: 44px;
    height: 44px;
  }

  .overview-priority-arrow {
    display: none;
  }

  #overviewView .kassenwecker-item-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #overviewView .kassenwecker-item-actions .mini-action {
    width: 100%;
    min-height: 44px;
  }

  #overviewView > .planning-archive > summary {
    min-height: 72px;
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #overviewView.overview-dashboard *,
  #overviewView.overview-dashboard *::before,
  #overviewView.overview-dashboard *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* First-load stability: decorative AMV motion stays static by default.
   Functional spinners (.is-system-loading, PDF loaders) remain animated. */
.login-brand::before,
.login-feature-cards article::before,
.login-card::before,
.login-card-brand .brand-logo::after,
.login-panel .primary-button::before,
.login-register-link::before,
.login-external-link::before,
.login-about-card::before,
.login-about-grid b::before,
.login-hero-copy h2::after,
.login-trust-row span,
#vehiclesView .calculator-panel::before,
#vehiclesView .gkv-choice::before,
#vehiclesView .gkv-status::before,
#vehiclesView .compare-advanced-fields::before,
#vehiclesView .metrics-grid.compare-metrics .metric::before,
#vehiclesView .compare-metrics .metric::before,
#vehiclesView .wish-panel::before,
#vehiclesView .compare-table::before,
#vehiclesView .case-strip label::before,
#vehiclesView .case-strip > div::before,
#vehiclesView .vergleich-compact-action::before,
.nav-icon,
.module-icon,
.login-feature-icon,
.action-icon-button,
.signature-icon-button,
.icon-button {
  animation: none !important;
  will-change: auto !important;
}

.login-brand::before,
.login-feature-cards article::before,
.login-card::before,
.login-panel .primary-button::before,
.login-register-link::before,
.login-external-link::before {
  offset-path: none !important;
  transform: none !important;
}

.login-feature-cards article:hover,
.login-about-grid b:hover,
.login-panel .primary-button:hover,
.login-register-link:hover,
.login-external-link:hover {
  transform: none !important;
}

/* Motion-lite CRM: decorative logo/icon layers stay static across the app.
   This keeps the portal responsive on slower first loads while preserving real loading indicators. */
.brand-logo,
.brand-logo::before,
.brand-logo::after,
.side-brand,
.side-brand::before,
.side-brand::after,
.login-brand,
.login-brand::before,
.login-brand::after,
.login-card-brand,
.login-card-brand::before,
.login-card-brand::after,
.login-feature-cards article::before,
.login-feature-cards article::after,
.login-feature-icon,
.login-feature-icon::before,
.login-feature-icon::after,
.nav-icon,
.nav-icon::before,
.nav-icon::after,
.module-icon,
.module-icon::before,
.module-icon::after {
  animation: none !important;
  transition-duration: 0.01ms !important;
  will-change: auto !important;
}

/* Production stability guard: keep the CRM still by default.
   This prevents decorative logo/login effects from blocking Chrome during
   session restore while leaving the operational UI fully usable. */
body *,
body *::before,
body *::after {
  animation-name: none !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.login-screen,
.side {
  background-image:
    radial-gradient(circle at 70% 18%, rgba(241, 233, 0, 0.07), transparent 24%),
    linear-gradient(112deg, rgba(2, 7, 5, 0.99) 0%, rgba(4, 17, 10, 0.98) 52%, rgba(5, 42, 23, 0.95) 100%) !important;
}

.network-canvas,
.login-brand::before,
.login-brand::after,
.login-card-brand::before,
.login-card-brand::after,
.side-brand::before,
.side-brand::after,
.brand-logo::before,
.brand-logo::after,
.nav-icon::before,
.nav-icon::after,
.module-icon::before,
.module-icon::after {
  display: none !important;
  animation: none !important;
  transform: none !important;
  will-change: auto !important;
}

.login-brand,
.login-card,
.login-card-brand,
.side-brand,
.backend-status,
.account-box,
.panel,
.metric,
.glass-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.signed-contract-send-content {
  display: grid;
  gap: 12px;
  min-width: min(100%, 440px);
}

.application-company-email-note {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.customer-file-delete-confirmation {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #cbded4;
  border-radius: 18px;
  background: #fff;
  color: #142a20;
  box-shadow: 0 24px 80px #08251d40;
}
.customer-file-delete-confirmation::backdrop { background: #071b1466; }
.customer-file-delete-confirmation h2 { margin: 0 0 12px; font-size: 1.2rem; }
.customer-file-delete-confirmation p { line-height: 1.5; }
.customer-file-delete-name { display: block; overflow-wrap: anywhere; padding: 14px; background: #f2f7f4; border-radius: 10px; }
.customer-file-delete-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.customer-file-delete-actions button { padding: 10px 16px; border: 1px solid #b7c9bf; border-radius: 10px; font: inherit; cursor: pointer; }
.customer-file-delete-actions .danger-mini-action { background: #b42318; color: #fff; border-color: #b42318; }
.customer-file-delete-actions button:focus-visible { outline: 3px solid #127a59; outline-offset: 3px; }
.portal-message-dialog input { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #b7c9bf; border-radius: 10px; font: inherit; }
.portal-message-dialog p { overflow-wrap: anywhere; }
.portal-message-dialog {
  background: linear-gradient(145deg, #edf9f1, #dcefe3);
  border-color: #98baa7;
  color: #173b2b;
  box-shadow: 0 24px 80px #08251d40, inset 0 1px 0 #ffffffb3;
}
.portal-message-dialog .portal-message-heading { display: flex; align-items: center; gap: 12px; }
.portal-message-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #467f5d;
  border-radius: 14px;
  background: #245d40;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  box-shadow: 0 4px 12px #245d4026;
}
.portal-message-dialog .customer-file-delete-actions button { background: #f8fcf9; color: #173b2b; }
.portal-message-dialog .customer-file-delete-actions .portal-message-accept { background: #245d40; border-color: #245d40; color: #fff; font-weight: 700; }
.portal-message-dialog .customer-file-delete-actions .portal-message-accept:hover { background: #19472f; }

.application-company-email-note textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #17231d;
  font: inherit;
  font-weight: 500;
}
.dak-application-workflow-notice {
  margin-block: 12px;
  padding: 14px 16px;
  border: 1px solid #aecfc4;
  border-inline-start: 4px solid #16765b;
  border-radius: 12px;
  background: #f0f9f5;
  color: #193d33;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dak-application-workflow-notice ol {
  display: block;
  margin: 8px 0;
  padding-inline-start: 22px;
}

.dak-application-workflow-notice li + li { margin-block-start: 6px; }
.dak-application-workflow-notice p { margin: 8px 0 0; }
