/* Modul 1: Hauptseite Unternehmenswebsite */
:root {
  --color-bg: #f6f8fb;
  --color-surface: #ffffff;
  --color-text: #152033;
  --color-muted: #5c6678;
  --color-primary: #0b4f6c;
  --color-primary-dark: #08384d;
  --color-accent: #2aa7a1;
  --color-border: #dce5ef;
  --color-soft: #eaf4f6;
  --shadow: 0 18px 50px rgba(13, 32, 52, 0.12);
  --radius: 22px;
  --radius-small: 14px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

a:hover {
  color: var(--color-primary);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(42, 167, 161, 0.55);
  outline-offset: 4px;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.35rem, 7vw, 4.85rem);
  line-height: 1.22;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1.2rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-label,
.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-head p {
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.large-text,
.hero-text {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--color-muted);
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  background: var(--color-primary-dark);
  color: #ffffff;
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(220, 229, 239, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 800;
}

.logo-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 12px 30px rgba(11, 79, 108, 0.2);
}

.brand-text {
  display: grid;
  gap: 0.1rem;
}

.brand-kicker {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-name {
  font-size: 0.98rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: var(--color-soft);
  color: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--color-soft);
  color: var(--color-primary-dark);
  cursor: pointer;
}

.nav-toggle-line,
.nav-toggle-line::before,
.nav-toggle-line::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle-line {
  position: relative;
}

.nav-toggle-line::before,
.nav-toggle-line::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-line::before {
  top: -7px;
}

.nav-toggle-line::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line::after {
  top: 0;
  transform: rotate(-45deg);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(42, 167, 161, 0.17), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -12rem;
  bottom: -18rem;
  width: 34rem;
  height: 34rem;
  background: rgba(11, 79, 108, 0.09);
  border-radius: 999px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-content {
  max-width: 780px;
}

.hero-text {
  max-width: 690px;
  margin-top: 1.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(11, 79, 108, 0.24);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--color-primary-dark);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-soft);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.hero-facts li {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.48rem 0.7rem;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-facts span {
  color: var(--color-accent);
}

.hero-card {
  margin: 0;
  padding: 1.4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}

.hero-visual {
  display: grid;
  min-height: 280px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(11, 79, 108, 0.96), rgba(42, 167, 161, 0.9)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0 8px, transparent 8px 16px);
  border-radius: var(--radius);
  color: #ffffff;
}

.visual-icon {
  display: grid;
  width: 110px;
  height: 110px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 4rem;
  font-weight: 900;
}

.hero-card figcaption {
  display: grid;
  gap: 0.3rem;
  margin-top: 1rem;
}

.hero-card span {
  color: var(--color-muted);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.lead-panel,
.content-panel {
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(13, 32, 52, 0.06);
}

.card-grid,
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card,
.benefit-item {
  padding: clamp(1.2rem, 2.4vw, 1.6rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(13, 32, 52, 0.06);
}

.service-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.card-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--color-soft);
  color: var(--color-primary-dark);
  font-weight: 900;
}

.service-card p,
.benefit-item p {
  color: var(--color-muted);
}

.text-link {
  margin-top: auto;
  color: var(--color-primary);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.trust-section {
  background: #ffffff;
}

.benefit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.owner-card {
  display: grid;
  min-height: 360px;
  place-items: center;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.26), transparent 13rem),
    linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.owner-card span {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 4rem;
  font-weight: 900;
}

.contact-section {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #ffffff;
}

.contact-section h2,
.contact-section .section-label {
  color: #ffffff;
}

.contact-section p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-card {
  display: grid;
  gap: 0.7rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: #ffffff;
  color: var(--color-text);
  border-radius: var(--radius);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.16);
  font-style: normal;
}

.contact-card a {
  color: var(--color-primary);
  font-weight: 800;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-button {
  width: fit-content;
  margin-top: 0.8rem;
  color: #ffffff !important;
}

.page-hero {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  background:
    radial-gradient(circle at top left, rgba(42, 167, 161, 0.14), transparent 25rem),
    linear-gradient(180deg, #ffffff, var(--color-bg));
}

.page-hero-content {
  max-width: 820px;
}

.page-hero p:not(.section-label) {
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 1.1rem;
}

.content-list {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.content-list li {
  padding-left: 1.6rem;
  position: relative;
}

.content-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 900;
}

.placeholder-box,
.legal-note {
  padding: 1rem;
  border: 1px dashed var(--color-primary);
  border-radius: var(--radius-small);
  background: var(--color-soft);
  color: var(--color-primary-dark);
  font-weight: 700;
}

.site-footer {
  padding: 3rem 0 1.2rem;
  background: #0d1726;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 0.8rem;
}

.footer-heading {
  margin-bottom: 0.9rem;
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 0;
}

.footer-links {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 0.9rem;
}

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

@media (max-width: 980px) {
  .hero-grid,
  .split-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .benefit-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    max-width: 620px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 74px;
  }

  .brand-name {
    max-width: 170px;
  }

  .nav-toggle {
    display: grid;
  }

  #main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  }

  .site-nav {
    display: grid;
    grid-template-rows: 0fr;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border);
    transition: grid-template-rows 0.22s ease;
  }

  .site-nav.is-open {
    grid-template-rows: 1fr;
  }

  .nav-list {
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
    padding: 0;
  }

  .site-nav.is-open .nav-list {
    padding: 0.75rem 0 1rem;
  }

  .nav-list a {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero-actions,
  .btn {
    width: 100%;
  }

  .hero-facts {
    align-items: stretch;
    flex-direction: column;
  }

  .card-grid,
  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 220px;
  }

  .owner-card {
    min-height: 260px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Loginseite: statischer Portal-Prototyp */
.login-hero {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.login-section {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: clamp(1.4rem, 4vw, 2.5rem);
  align-items: start;
}

.login-card,
.portal-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

.login-card {
  overflow: hidden;
}

.login-card-head {
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2.2rem) 0;
}

.login-card-head p:not(.section-label),
.portal-info p,
.login-field-note,
.login-note {
  color: var(--color-muted);
}

.login-form {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.login-field {
  display: grid;
  gap: 0.45rem;
}

.login-field label {
  font-weight: 800;
  color: var(--color-text);
}

.login-field input {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-field input::placeholder {
  color: rgba(92, 102, 120, 0.72);
}

.login-field input:focus-visible {
  border-color: var(--color-accent);
  outline: 3px solid rgba(42, 167, 161, 0.35);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(42, 167, 161, 0.1);
}

.login-field-note {
  margin: 0;
  font-size: 0.9rem;
}

.login-submit {
  width: fit-content;
  margin-top: 0.2rem;
  cursor: pointer;
}

.login-status {
  min-height: 64px;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-soft);
  color: var(--color-primary-dark);
}

.login-status p {
  margin: 0;
}

.login-status a {
  color: var(--color-primary-dark);
  font-weight: 800;
}

.login-status.is-success {
  border-color: rgba(42, 167, 161, 0.55);
  background: rgba(42, 167, 161, 0.12);
}

.login-status.is-warning {
  border-color: rgba(11, 79, 108, 0.28);
  background: #f4f8fb;
}

.login-status.is-error {
  border-color: rgba(11, 79, 108, 0.34);
  background: #ffffff;
}

.login-note {
  margin: 0;
  padding: 1rem;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-small);
  background: #f8fbfc;
}

.portal-info {
  display: grid;
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2rem);
}

.portal-info h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.portal-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--color-muted);
}

.portal-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 900;
}

.portal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: center;
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .portal-info {
    order: -1;
  }
}

@media (max-width: 640px) {
  .login-card-head,
  .login-form,
  .portal-info {
    padding-inline: 1rem;
  }

  .login-submit {
    width: 100%;
  }

  .portal-links {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-links .btn,
  .portal-links .text-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}


/* Modul 3/4: Geschäftsführer-Dashboard, Kundenverwaltung und Kundendatenverwaltung */
/* Ergänzung für den statischen Portal-Prototyp. */

.portal-body,
.dashboard-body,
.customer-body,
.admin-body,
.portal-login-body {
  background:
    radial-gradient(circle at top left, rgba(42, 167, 161, 0.1), transparent 30rem),
    var(--color-bg);
}

.portal-header .nav-list a[aria-current="page"] {
  background: var(--color-soft);
  color: var(--color-primary-dark);
}

.portal-header .nav-list a[href="login.html"] {
  border-color: rgba(11, 79, 108, 0.18);
}

.portal-login-hero,
.dashboard-hero,
.customer-hero,
.admin-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(42, 167, 161, 0.2), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg) 100%);
}

.portal-login-hero::after,
.dashboard-hero::after,
.customer-hero::after,
.admin-hero::after {
  content: "";
  position: absolute;
  right: -10rem;
  bottom: -15rem;
  width: 30rem;
  height: 30rem;
  border-radius: 999px;
  background: rgba(11, 79, 108, 0.08);
  pointer-events: none;
}

.portal-login-layout code,
.portal-list code {
  padding: 0.08rem 0.28rem;
  border-radius: 0.45rem;
  background: var(--color-soft);
  color: var(--color-primary-dark);
  font-size: 0.94em;
}

.dashboard-main {
  min-height: 60vh;
}

.dashboard-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: stretch;
}

.dashboard-hero-content {
  max-width: 820px;
}

.dashboard-hero-content p:not(.section-label) {
  max-width: 720px;
  margin-top: 1.2rem;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(42, 167, 161, 0.35);
  border-radius: 999px;
  background: rgba(42, 167, 161, 0.1);
  color: var(--color-primary-dark);
  font-weight: 800;
}

.dashboard-status-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 6px rgba(42, 167, 161, 0.16);
  flex: 0 0 auto;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.dashboard-profile-card {
  display: grid;
  gap: 1rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid rgba(220, 229, 239, 0.95);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.dashboard-profile-card h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: -0.035em;
}

.dashboard-profile-card p:not(.section-label) {
  color: var(--color-muted);
}

.dashboard-profile-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  box-shadow: 0 16px 34px rgba(11, 79, 108, 0.23);
}

.dashboard-meta-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-border);
}

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

.dashboard-meta-list strong {
  text-align: right;
  color: var(--color-primary-dark);
}

.dashboard-section {
  padding-top: clamp(3.5rem, 7vw, 6rem);
}

.dashboard-section-compact {
  padding-top: 0;
}

.dashboard-section-head {
  max-width: 780px;
  margin-bottom: 1.5rem;
}

.dashboard-section-head p:not(.section-label) {
  margin-top: 0.9rem;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-card {
  min-width: 0;
  padding: clamp(1.15rem, 2.4vw, 1.55rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 10px 30px rgba(13, 32, 52, 0.06);
}

.dashboard-card h3,
.dashboard-card-title {
  display: block;
  margin: 0;
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.dashboard-card p,
.dashboard-card-description,
.dashboard-widget-meta {
  color: var(--color-muted);
}

.dashboard-feature-link {
  text-decoration: none;
}

.dashboard-feature-link:hover {
  color: inherit;
}

.dashboard-feature-link:focus-visible {
  outline: 3px solid rgba(42, 167, 161, 0.55);
  outline-offset: 5px;
}

.dashboard-card-primary {
  grid-column: span 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.15rem;
  align-items: center;
  min-height: 100%;
  border: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 18rem),
    linear-gradient(135deg, var(--color-primary-dark), var(--color-primary) 58%, var(--color-accent));
  color: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(13, 32, 52, 0.18);
}

.dashboard-card-primary .dashboard-card-title,
.dashboard-card-primary .dashboard-card-description,
.dashboard-card-primary .dashboard-widget-meta {
  color: #ffffff;
}

.dashboard-card-primary .dashboard-card-description {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.04rem;
}

.dashboard-card-primary .dashboard-widget-meta {
  display: block;
  margin-top: 0.7rem;
  opacity: 0.82;
  font-size: 0.94rem;
}

.dashboard-card-primary .dashboard-card-kicker {
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-card-primary .dashboard-card-action {
  grid-column: 2;
  justify-self: start;
  background: #ffffff;
  color: var(--color-primary-dark);
  box-shadow: none;
}

.dashboard-card-primary .dashboard-card-action:hover {
  background: var(--color-soft);
  color: var(--color-primary-dark);
}

.dashboard-card-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.dashboard-card-icon-soft {
  margin-bottom: 1rem;
  background: var(--color-soft);
  color: var(--color-primary-dark);
}

.dashboard-card-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-placeholder-card {
  display: grid;
  gap: 0.35rem;
}

.dashboard-placeholder-card p {
  margin: 0;
}

.dashboard-placeholder-value {
  align-self: end;
  margin-top: 0.8rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-primary-dark) !important;
  font-weight: 800;
}

.dashboard-prototype-note {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}

.dashboard-prototype-note p:not(.section-label) {
  color: var(--color-muted);
}

.dashboard-check-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-check-list li {
  position: relative;
  padding-left: 1.55rem;
  color: var(--color-muted);
}

.dashboard-check-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 900;
}

/* Kundenverwaltung-Landingpage */

.customer-section {
  padding-top: clamp(3.5rem, 7vw, 6rem);
}

.customer-module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(240px, 0.75fr));
  gap: 1rem;
  align-items: stretch;
}

.customer-module-card {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-width: 0;
  padding: clamp(1.2rem, 2.6vw, 1.7rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 10px 30px rgba(13, 32, 52, 0.06);
  text-decoration: none;
}

.customer-module-card:hover {
  color: inherit;
}

.customer-module-card h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.customer-module-card p,
.customer-module-description {
  color: var(--color-muted);
}

.customer-module-card-primary {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  border: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.3), transparent 18rem),
    linear-gradient(135deg, var(--color-primary-dark), var(--color-primary) 58%, var(--color-accent));
  color: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.customer-module-card-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(13, 32, 52, 0.18);
}

.customer-module-card-primary .customer-module-title,
.customer-module-card-primary .customer-module-description,
.customer-module-card-primary .dashboard-card-kicker {
  color: #ffffff;
}

.customer-module-title {
  display: block;
  color: var(--color-text);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.customer-module-description {
  display: block;
  margin-top: 0.55rem;
}

.customer-module-action {
  width: fit-content;
  margin-top: 1rem;
  background: #ffffff;
  color: var(--color-primary-dark);
  box-shadow: none;
}

.customer-module-action:hover {
  background: var(--color-soft);
  color: var(--color-primary-dark);
}

.customer-module-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.customer-module-icon-soft {
  background: var(--color-soft);
  color: var(--color-primary-dark);
}

.customer-placeholder-note {
  margin-top: 1.4rem;
}

.customer-placeholder-note p:not(.section-label) {
  color: var(--color-muted);
}

/* Kundendatenverwaltung */

.admin-section {
  padding-top: clamp(2.6rem, 6vw, 4.5rem);
}

.admin-container-wide {
  width: min(100% - 2rem, 1680px);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  align-items: end;
  margin-bottom: 1.2rem;
}

.admin-topbar > div:first-child {
  max-width: 880px;
}

.admin-topbar p:not(.section-label) {
  margin-top: 0.85rem;
  color: var(--color-muted);
}

.admin-topbar-actions,
.admin-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.admin-warning {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(42, 167, 161, 0.35);
  border-radius: var(--radius-small);
  background: rgba(42, 167, 161, 0.1);
  color: var(--color-primary-dark);
}

.admin-controls {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1rem, 2vw, 1.3rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(13, 32, 52, 0.06);
}

.admin-control-group {
  display: grid;
  gap: 0.45rem;
}

.admin-control-group label {
  font-weight: 900;
  color: var(--color-text);
}

.admin-control-group input[type="search"] {
  min-height: 50px;
  width: min(100%, 640px);
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
}

.admin-control-group input[type="search"]:focus-visible {
  border-color: var(--color-accent);
  outline: 3px solid rgba(42, 167, 161, 0.35);
  outline-offset: 2px;
}

.admin-danger-button {
  border-color: rgba(166, 43, 43, 0.25);
  color: #7a1f1f;
}

.admin-add-column-button {
  border-color: rgba(11, 79, 108, 0.22);
}

.admin-column-panel {
  border-top: 1px solid var(--color-border);
  padding-top: 0.9rem;
}

.admin-column-panel summary {
  width: fit-content;
  cursor: pointer;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.admin-column-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.admin-column-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.admin-column-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-column-option input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--color-primary);
}

.admin-column-delete,
.admin-row-delete {
  border: 0;
  border-radius: 999px;
  background: #f7eaeb;
  color: #7a1f1f;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.admin-column-delete {
  padding: 0.25rem 0.55rem;
}

.admin-row-delete {
  min-width: 94px;
  padding: 0.45rem 0.65rem;
}

.admin-column-delete:hover,
.admin-row-delete:hover {
  background: #eed4d6;
}

.admin-table-meta {
  margin-bottom: 0.75rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.admin-table-scroll {
  max-height: min(72vh, 840px);
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.admin-table-scroll:focus-visible {
  outline: 3px solid rgba(42, 167, 161, 0.55);
  outline-offset: 4px;
}

.admin-data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.92rem;
}

.admin-data-table th,
.admin-data-table td {
  position: relative;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: #ffffff;
  vertical-align: top;
}

.admin-data-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0;
  background: linear-gradient(180deg, #f8fbfc, var(--color-soft));
  color: var(--color-primary-dark);
  text-align: left;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
}

.admin-header-label {
  display: block;
  overflow: hidden;
  padding: 0.78rem 1.6rem 0.78rem 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: grab;
}

.admin-draggable-header.is-dragging .admin-header-label {
  opacity: 0.62;
}

.admin-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 4;
  width: 9px;
  height: 100%;
  cursor: col-resize;
}

.admin-resize-handle::after {
  content: "";
  position: absolute;
  top: 18%;
  right: 4px;
  width: 2px;
  height: 64%;
  border-radius: 999px;
  background: rgba(11, 79, 108, 0.24);
}

.admin-resize-handle:hover::after {
  background: var(--color-accent);
}

.admin-data-table td {
  padding: 0.28rem;
}

.admin-action-header,
.admin-action-cell {
  position: sticky !important;
  left: 0;
  z-index: 5;
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

.admin-action-cell {
  background: #fbfdfe !important;
}

.admin-action-header {
  z-index: 6;
}

.admin-cell-input {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  line-height: 1.35;
}

.admin-cell-input:hover {
  background: #f8fbfc;
  border-color: var(--color-border);
}

.admin-cell-input:focus {
  background: #ffffff;
  border-color: var(--color-accent);
  outline: 3px solid rgba(42, 167, 161, 0.24);
}

.admin-cell-textarea {
  min-height: 62px;
  resize: vertical;
}

.admin-empty-cell {
  padding: 1.4rem !important;
  color: var(--color-muted);
  text-align: center;
}

.admin-help-text {
  margin: 1rem 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-card-primary {
    grid-column: span 2;
  }

  .customer-module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-hero-grid,
  .dashboard-prototype-note,
  .admin-topbar {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-card {
    max-width: 680px;
  }

  .admin-topbar {
    display: grid;
    align-items: stretch;
  }

  .admin-topbar-actions .btn,
  .admin-topbar-actions button {
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .dashboard-status {
    align-items: flex-start;
    border-radius: var(--radius-small);
  }

  .dashboard-hero-actions,
  .dashboard-hero-actions .btn,
  .admin-topbar-actions .btn,
  .admin-topbar-actions button,
  .admin-button-row .btn,
  .admin-button-row button {
    width: 100%;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card-primary,
  .customer-module-card-primary {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .dashboard-card-primary .dashboard-card-action {
    grid-column: auto;
    justify-self: stretch;
  }

  .dashboard-card-icon,
  .customer-module-icon {
    width: 52px;
    height: 52px;
  }

  .dashboard-meta-list li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .dashboard-meta-list strong {
    text-align: left;
  }

  .admin-container-wide {
    width: min(100% - 1.25rem, 1680px);
  }

  .admin-column-checkboxes {
    grid-template-columns: 1fr;
  }
}


/* Static customer data integration */
.admin-import-status {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.admin-import-status.is-success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(240, 253, 244, 0.92);
  color: #166534;
}

.admin-import-status.is-error {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 242, 242, 0.92);
  color: #991b1b;
}

.dashboard-placeholder-value span,
.dashboard-widget-meta span,
.dashboard-card-description strong {
  font-weight: 800;
}

/* Dashboard appointment manager */
.dashboard-mini-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-mini-link:hover {
  border-color: rgba(42, 167, 161, 0.48);
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(13, 32, 52, 0.1);
}

.appointment-section {
  scroll-margin-top: 96px;
}

.appointment-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  align-items: end;
  margin-bottom: 1.15rem;
}

.appointment-topbar > div:first-child {
  max-width: 920px;
}

.appointment-topbar p:not(.section-label) {
  margin-top: 0.85rem;
  color: var(--color-muted);
}

.appointment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.appointment-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.appointment-summary-item {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 32, 52, 0.05);
}

.appointment-summary-item span {
  display: block;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.appointment-summary-item strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-primary-dark);
  font-size: 1.55rem;
  line-height: 1;
}

.appointment-workload-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.appointment-workload-chip {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-primary-dark);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.appointment-workload-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-workload-chip strong {
  color: var(--color-primary);
  font-size: 1.05rem;
}

.appointment-workload-chip.is-active {
  border-color: rgba(42, 167, 161, 0.56);
  background: rgba(42, 167, 161, 0.12);
  box-shadow: inset 0 0 0 1px rgba(42, 167, 161, 0.15);
}

.appointment-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 0.6fr));
  gap: 0.85rem;
  margin-bottom: 0.9rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(13, 32, 52, 0.06);
}

.appointment-control-field,
.appointment-field {
  display: grid;
  gap: 0.4rem;
}

.appointment-control-field-wide,
.appointment-field-wide,
.appointment-column-panel {
  grid-column: span 2;
}

.appointment-control-field label,
.appointment-field span {
  color: var(--color-text);
  font-weight: 900;
}

.appointment-control-field input,
.appointment-control-field select,
.appointment-field input,
.appointment-field select,
.appointment-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
}

.appointment-field textarea {
  resize: vertical;
}

.appointment-check-field {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.appointment-check-field input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--color-primary);
}

.appointment-control-field input:focus-visible,
.appointment-control-field select:focus-visible,
.appointment-field input:focus-visible,
.appointment-field select:focus-visible,
.appointment-field textarea:focus-visible {
  border-color: var(--color-accent);
  outline: 3px solid rgba(42, 167, 161, 0.34);
  outline-offset: 2px;
}

.appointment-column-panel {
  padding-top: 0.2rem;
}

.appointment-column-panel summary {
  width: fit-content;
  cursor: pointer;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.appointment-column-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.appointment-column-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.appointment-column-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-column-option input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--color-primary);
}

.appointment-rule-panel,
.appointment-nearby-panel,
.appointment-cluster-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #f8fbfc;
}

.appointment-rule-head,
.appointment-nearby-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.appointment-rule-head h3,
.appointment-nearby-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.appointment-rule-head p,
.appointment-nearby-head span {
  margin: 0.25rem 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.appointment-compact-action {
  min-height: 42px;
  padding: 0.6rem 0.8rem;
  white-space: nowrap;
}

.appointment-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.appointment-weekday-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.appointment-weekday-list label {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.appointment-weekday-list input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
}

.appointment-nearby-list,
.appointment-cluster-list {
  display: grid;
  gap: 0.5rem;
  color: var(--color-muted);
}

.appointment-nearby-item,
.appointment-cluster-item {
  display: grid;
  gap: 0.18rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.appointment-nearby-item:hover,
.appointment-cluster-item:hover {
  border-color: rgba(42, 167, 161, 0.5);
  background: var(--color-soft);
}

.appointment-nearby-item strong,
.appointment-cluster-item strong {
  color: var(--color-primary-dark);
}

.appointment-nearby-item span,
.appointment-cluster-item span,
.appointment-cluster-item small {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.appointment-meta {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.appointment-table-scroll {
  max-height: min(70vh, 760px);
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.appointment-table-scroll:focus-visible {
  outline: 3px solid rgba(42, 167, 161, 0.55);
  outline-offset: 4px;
}

.appointment-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.92rem;
}

.appointment-table th,
.appointment-table td {
  position: relative;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: #ffffff;
  vertical-align: top;
}

.appointment-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0;
  background: linear-gradient(180deg, #f8fbfc, var(--color-soft));
  color: var(--color-primary-dark);
  text-align: left;
}

.appointment-sort-button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 1.65rem 0.78rem 0.8rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-sort-button[data-sort-direction="asc"]::after,
.appointment-sort-button[data-sort-direction="desc"]::after {
  position: absolute;
  right: 0.7rem;
  content: "↑";
}

.appointment-sort-button[data-sort-direction="desc"]::after {
  content: "↓";
}

.appointment-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 4;
  width: 9px;
  height: 100%;
  cursor: col-resize;
}

.appointment-resize-handle::after {
  content: "";
  position: absolute;
  top: 18%;
  right: 4px;
  width: 2px;
  height: 64%;
  border-radius: 999px;
  background: rgba(11, 79, 108, 0.24);
}

.appointment-resize-handle:hover::after {
  background: var(--color-accent);
}

.appointment-table td {
  padding: 0.75rem 0.8rem;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.appointment-table[data-density="compact"] td {
  padding: 0.45rem 0.58rem;
  font-size: 0.86rem;
}

.appointment-row {
  cursor: pointer;
}

.appointment-row:hover td,
.appointment-row:focus td {
  background: #f8fbfc;
}

.appointment-row:focus {
  outline: 3px solid rgba(42, 167, 161, 0.42);
  outline-offset: -3px;
}

.appointment-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: var(--color-soft);
  color: var(--color-primary-dark);
  font-weight: 900;
}

.appointment-status-bestätigt {
  background: rgba(42, 167, 161, 0.16);
  color: #075c58;
}

.appointment-status-vorgeschlagen {
  background: #edf4ff;
  color: #1d4f8c;
}

.appointment-status-in-planung {
  background: #fff6dc;
  color: #775500;
}

.appointment-status-erledigt {
  background: #eef7ee;
  color: #236322;
}

.appointment-workload-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: #f3f7fa;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.appointment-workload-aktueller-monat {
  background: rgba(42, 167, 161, 0.16);
  color: #075c58;
}

.appointment-workload-nächster-monat {
  background: #edf4ff;
  color: #1d4f8c;
}

.appointment-workload-dieses-jahr {
  background: #f6f2ff;
  color: #4f3a86;
}

.appointment-workload-überfällig {
  background: #fff0e7;
  color: #8a3a0a;
}

.appointment-workload-erledigt {
  background: #eef7ee;
  color: #236322;
}

.appointment-rule-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: #f3f7fa;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.appointment-rule-badge.is-fixed {
  background: #fff6dc;
  color: #775500;
}

.appointment-action-header,
.appointment-action-cell {
  position: sticky !important;
  right: 0;
  z-index: 5;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

.appointment-action-header {
  z-index: 6;
  padding: 0.78rem 0.8rem !important;
}

.appointment-action-cell {
  background: #fbfdfe !important;
}

.appointment-row-action,
.appointment-icon-button {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-primary-dark);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.appointment-row-action {
  width: 100%;
  min-height: 38px;
  padding: 0.45rem 0.65rem;
}

.appointment-row-action:hover,
.appointment-icon-button:hover {
  background: var(--color-soft);
}

.appointment-empty-cell {
  padding: 1.4rem !important;
  color: var(--color-muted) !important;
  text-align: center;
}

.appointment-dialog-open {
  overflow: hidden;
}

.appointment-dialog {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.appointment-dialog[hidden] {
  display: none;
}

.appointment-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 23, 38, 0.58);
}

.appointment-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: min(100%, 860px);
  max-height: min(92vh, 880px);
  overflow: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.appointment-form-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.appointment-form-head h2 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: 0;
}

.appointment-icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
}

.appointment-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.appointment-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.appointment-form-spacer {
  flex: 1 1 auto;
}

.appointment-danger-action {
  border-color: rgba(166, 43, 43, 0.25);
  color: #7a1f1f;
}

@media (max-width: 1080px) {
  .appointment-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .appointment-workload-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .appointment-topbar {
    display: grid;
    align-items: stretch;
  }

  .appointment-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .appointment-table-scroll {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .appointment-table,
  .appointment-table thead,
  .appointment-table tbody,
  .appointment-table tr,
  .appointment-table td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .appointment-table thead {
    position: absolute;
    width: 1px !important;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .appointment-row {
    margin-bottom: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(13, 32, 52, 0.06);
    overflow: hidden;
  }

  .appointment-table td {
    display: grid;
    grid-template-columns: minmax(92px, 0.45fr) minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    border-right: 0;
    padding: 0.7rem 0.8rem;
  }

  .appointment-table td::before {
    content: attr(data-label);
    color: var(--color-muted);
    font-weight: 900;
  }

  .appointment-action-cell {
    position: static !important;
    display: block !important;
    padding: 0.8rem !important;
  }

  .appointment-action-cell::before {
    content: none !important;
  }
}

@media (max-width: 640px) {
  .appointment-actions,
  .appointment-actions .btn,
  .appointment-controls,
  .appointment-compact-action,
  .appointment-form-actions .btn {
    width: 100%;
  }

  .appointment-controls,
  .appointment-form-grid,
  .appointment-rule-grid,
  .appointment-summary {
    grid-template-columns: 1fr;
  }

  .appointment-control-field-wide,
  .appointment-field-wide,
  .appointment-column-panel {
    grid-column: auto;
  }

  .appointment-column-options {
    grid-template-columns: 1fr;
  }

  .appointment-rule-head,
  .appointment-nearby-head {
    display: grid;
  }

  .appointment-workload-bar {
    grid-template-columns: 1fr;
  }

  .appointment-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .appointment-form-spacer {
    display: none;
  }
}
