:root {
      --green: #004544;
      --green-light: #006462;
      --cream: #eacfa0;
      --sand: #f6f4f2;
      --white: #ffffff;
      --line: #dcd6cd;
      --text: #2b2b2b;
      --text-soft: #6b6560;
      --ok: #2e9e5b;
      --warn: #e0a100;
      --bad: #d6453d;
      --off: #b8b2aa;
    }

    *, *::before, *::after {
      box-sizing: border-box;
    }

    html, body {
      margin: 0;
      padding: 0;
      width: 100%;
      min-height: 100%;
      background: var(--sand);
      color: var(--text);
      font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      font-size: 15px;
      line-height: 1.45;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }

    /* Tastaturfokus */
    button:focus-visible,
    a:focus-visible,
    input:focus-visible {
      outline: 2px solid var(--green-light);
      outline-offset: 2px;
    }

    /* Knöpfe */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 38px;
      padding: 0 16px;
      border-radius: 10px;
      font-family: inherit;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      text-decoration: none;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
      box-sizing: border-box;
    }

    .btn-primary {
      background: var(--green);
      color: var(--white);
      border: 1px solid var(--green);
    }

    .btn-primary:hover {
      background: var(--green-light);
      border-color: var(--green-light);
    }

    .btn-secondary {
      background: var(--white);
      color: var(--text);
      border: 1px solid var(--line);
    }

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

    .btn-block {
      width: 100%;
    }

    /* Karten */
    .card {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 20px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    .card-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      margin: 0 0 16px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    /* Ampelpunkte */
    .status-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }

    .status-dot.ok { background: var(--ok); }
    .status-dot.warn { background: var(--warn); }
    .status-dot.bad { background: var(--bad); }
    .status-dot.off { background: var(--off); }

    @keyframes dot-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.35; transform: scale(0.85); }
    }

    .dot-pulsing {
      background: var(--off) !important;
      animation: dot-pulse 1s infinite ease-in-out;
    }

    /* Seitenkopf */
    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 24px;
      gap: 16px;
    }

    .page-title {
      font-size: 26px;
      font-weight: 600;
      color: var(--text);
      margin: 0 0 4px 0;
      line-height: 1.2;
    }

    .page-subtitle {
      font-size: 13px;
      color: var(--text-soft);
      line-height: 1.4;
    }

    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--white);
      border: 1px solid var(--line);
      padding: 6px 14px;
      border-radius: 9999px;
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      flex-shrink: 0;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    }

    /* Kennzahlen */
    .metric-value {
      font-size: 28px;
      font-weight: 600;
      line-height: 1.15;
      color: var(--text);
      font-variant-numeric: tabular-nums;
    }

    .metric-value.small {
      font-size: 20px;
    }

    .metric-label {
      font-size: 13px;
      color: var(--text-soft);
      margin-top: 4px;
    }

    .metric-subtext {
      font-size: 12px;
      color: var(--text-soft);
      margin-top: 2px;
    }

    /* Kennzahlen-Stapel */
    .metrics-stack {
      display: flex;
      flex-direction: column;
    }

    .metric-item {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      padding-bottom: 16px;
      margin-bottom: 16px;
      border-bottom: 1px solid var(--line);
    }

    .metric-item:last-child {
      padding-bottom: 0;
      margin-bottom: 0;
      border-bottom: none;
    }

    .metric-icon-box {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: var(--sand);
      color: var(--green);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .metric-body {
      flex: 1;
      min-width: 0;
    }

    /* Nächste 14 Tage */
    .next14-content {
      display: flex;
      align-items: center;
      gap: 28px;
      flex-wrap: wrap;
    }

    .ring-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex-shrink: 0;
    }

    .ring-label {
      font-size: 13px;
      color: var(--text-soft);
      margin-top: 6px;
      text-align: center;
    }

    .top-courses-col {
      flex: 1;
      min-width: 0;
    }

    .top-courses-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 12px;
    }

    .top-courses-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .top-course-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .top-course-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      font-size: 13px;
    }

    .top-course-name {
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding-right: 8px;
    }

    .top-course-count {
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      flex-shrink: 0;
    }

    .bar-track {
      width: 100%;
      height: 6px;
      background: var(--sand);
      border-radius: 3px;
      overflow: hidden;
    }

    .bar-fill {
      height: 100%;
      background: var(--green);
      border-radius: 3px;
    }

    /* Handlungsbedarf */
    .count-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      height: 20px;
      padding: 0 6px;
      border-radius: 10px;
      background: var(--sand);
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
    }

    .action-items-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .action-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-left: 3px solid var(--warn);
      border-radius: 8px;
      text-decoration: none;
      color: inherit;
      transition: background 0.15s ease;
    }

    .action-item:hover {
      background: #fbf9f6;
    }

    .action-item-body {
      flex: 1;
      min-width: 0;
    }

    .action-item-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.3;
    }

    .action-item-detail {
      font-size: 12px;
      color: var(--text-soft);
      margin-top: 2px;
      line-height: 1.3;
    }

    .action-item-arrow {
      color: var(--text-soft);
      margin-top: 2px;
      flex-shrink: 0;
    }

    .card-divider {
      height: 1px;
      background: var(--line);
      margin: 16px 0;
    }

    .section-subtitle {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 12px;
    }

    .activity-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .activity-item {
      background: var(--sand);
      padding: 10px 12px;
      border-radius: 8px;
    }

    /* Termine Heute und morgen */
    .appointments-list {
      display: flex;
      flex-direction: column;
    }

    .appointment-row {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 12px 0;
      border-bottom: 1px solid var(--line);
    }

    .appointment-row:first-child {
      padding-top: 0;
    }

    .appointment-row:last-child {
      padding-bottom: 0;
      border-bottom: none;
    }

    .appointment-time-col {
      display: flex;
      flex-direction: column;
      width: 76px;
      flex-shrink: 0;
    }

    .appointment-day {
      font-size: 12px;
      color: var(--text-soft);
    }

    .appointment-time {
      font-size: 14px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
    }

    .appointment-main-col {
      flex: 1.6;
      min-width: 140px;
    }

    .appointment-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
    }

    .appointment-room {
      font-size: 12px;
      color: var(--text-soft);
      margin-top: 1px;
    }

    .appointment-capacity-col {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 120px;
      flex-shrink: 0;
    }

    .capacity-bar-track {
      flex: 1;
      height: 6px;
      background: var(--sand);
      border-radius: 3px;
      overflow: hidden;
    }

    .capacity-bar-fill {
      height: 100%;
      background: var(--green);
      border-radius: 3px;
    }

    .capacity-text {
      font-size: 13px;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      white-space: nowrap;
    }

    .appointment-channels-col {
      flex: 1.2;
      font-size: 12px;
      color: var(--text-soft);
      text-align: right;
    }

    /* Automatiken heute (Karte auf Startseite) */
    .today-automations-summary-title {
      font-size: 20px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.25;
      margin-bottom: 4px;
    }

    .today-automations-summary-sub {
      font-size: 13px;
      color: var(--text-soft);
      margin-bottom: 16px;
    }

    .today-automations-list {
      display: flex;
      flex-direction: column;
    }

    .today-automation-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid var(--line);
      gap: 12px;
    }

    .today-automation-row:first-child {
      padding-top: 0;
    }

    .today-automation-row:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .today-automation-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      flex: 1;
    }

    .today-automation-info {
      min-width: 0;
    }

    .today-automation-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .today-automation-result {
      font-size: 12px;
      color: var(--text-soft);
      margin-top: 2px;
    }

    .today-automation-right {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-shrink: 0;
      text-align: right;
    }

    .today-automation-times {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
    }

    .today-automation-last {
      font-size: 13px;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: var(--text);
    }

    .today-automation-next {
      font-size: 11px;
      font-variant-numeric: tabular-nums;
      color: var(--text-soft);
      margin-top: 1px;
    }

    /* Letzte Läufe (Karte auf Startseite) */
    .runs-list {
      display: flex;
      flex-direction: column;
    }

    .run-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 9px 8px;
      border-bottom: 1px solid var(--line);
      border-left: 3px solid transparent;
      border-radius: 4px;
    }

    .run-row:first-child {
      padding-top: 6px;
    }

    .run-row:last-child {
      border-bottom: none;
      padding-bottom: 6px;
    }

    .run-row.is-warn {
      border-left-color: var(--warn);
      background: rgba(224, 161, 0, 0.05);
    }

    .run-time {
      font-size: 13px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      width: 44px;
      flex-shrink: 0;
    }

    .run-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      width: 220px;
      flex-shrink: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .run-result {
      font-size: 13px;
      color: var(--text-soft);
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .run-dot {
      flex-shrink: 0;
      margin-left: 8px;
    }

    /* Kompakte Termine (Heute und morgen auf Startseite) */
    .compact-appointments-list {
      display: flex;
      flex-direction: column;
    }

    .compact-appointment-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 11px 0;
      border-bottom: 1px solid var(--line);
      gap: 12px;
    }

    .compact-appointment-row:first-child {
      padding-top: 0;
    }

    .compact-appointment-row:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .compact-appointment-left {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      min-width: 0;
      flex: 1;
    }

    .compact-appointment-time-box {
      display: flex;
      flex-direction: column;
      width: 58px;
      flex-shrink: 0;
    }

    .compact-appointment-day {
      font-size: 11px;
      color: var(--text-soft);
    }

    .compact-appointment-time {
      font-size: 13px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
    }

    .compact-appointment-info {
      min-width: 0;
      flex: 1;
    }

    .compact-appointment-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .compact-appointment-room {
      font-size: 12px;
      color: var(--text-soft);
      margin-top: 1px;
    }

    .compact-appointment-capacity {
      font-size: 13px;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      flex-shrink: 0;
      white-space: nowrap;
    }

    /* Mehr-Menü für Mobilgeräte */
    .mobile-more-menu {
      position: fixed;
      bottom: 68px;
      right: 12px;
      width: 170px;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 6px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
      z-index: 150;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .mobile-more-menu.hidden {
      display: none;
    }

    .mobile-more-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      text-decoration: none;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .mobile-more-item:hover,
    .mobile-more-item:focus-visible {
      background: var(--sand);
      color: var(--green);
    }

    .mobile-more-item.active {
      background: var(--sand);
      color: var(--green);
      font-weight: 600;
    }

    .mobile-more-divider {
      height: 1px;
      background: var(--line);
      margin: 4px 6px;
    }

    .mobile-nav-btn {
      background: none;
      border: none;
      font-family: inherit;
      cursor: pointer;
    }

    .bar-fill.warn,
    .capacity-bar-fill.warn {
      background: var(--warn);
    }

    /* Buchungen */
    .bookings-side-col {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .booking-day-header {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-soft);
      margin-top: 18px;
      margin-bottom: 8px;
    }

    .booking-day-group:first-child .booking-day-header {
      margin-top: 0;
    }

    .booking-row {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 10px 0;
      border-bottom: 1px solid var(--line);
    }

    .booking-day-group:last-child .booking-row:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .booking-time-col {
      width: 52px;
      flex-shrink: 0;
    }

    .booking-main-col {
      flex: 1.8;
      min-width: 130px;
    }

    .booking-capacity-col {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 120px;
      flex-shrink: 0;
    }

    .booking-channels-col {
      flex: 1.2;
      font-size: 12px;
      color: var(--text-soft);
      text-align: right;
    }

    .booking-badge-col {
      width: 96px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      flex-shrink: 0;
    }

    .booking-badge-text {
      font-size: 12px;
      font-weight: 500;
      color: var(--text);
      white-space: nowrap;
    }

    .booking-badge-text.text-soft {
      color: var(--text-soft);
    }

    .stat-bar-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .stat-bar-row:last-child {
      margin-bottom: 0;
    }

    .stat-bar-label {
      font-size: 13px;
      color: var(--text);
      width: 58px;
      flex-shrink: 0;
    }

    .stat-bar-value {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      font-variant-numeric: tabular-nums;
      width: 44px;
      text-align: right;
      flex-shrink: 0;
    }

    .channel-bar-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .channel-bar-row:last-child {
      margin-bottom: 0;
    }

    .channel-bar-label {
      font-size: 13px;
      color: var(--text);
      width: 95px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex-shrink: 0;
    }

    .channel-bar-value {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      font-variant-numeric: tabular-nums;
      width: 68px;
      text-align: right;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .channel-footer-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 13px;
    }

    .channel-footer-label {
      color: var(--text-soft);
    }

    .channel-footer-value {
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
    }

    .card-footer-link {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid var(--line);
      text-align: right;
    }

    .text-link {
      color: var(--green);
      font-size: 13px;
      font-weight: 600;
      text-decoration: none;
    }

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

    /* Auth Seiten (Login und Code) */
    .auth-wrapper {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--sand);
      padding: 20px;
      box-sizing: border-box;
    }

    .auth-card {
      width: 100%;
      max-width: 390px;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 32px 28px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    .auth-brand {
      text-align: center;
      margin-bottom: 24px;
    }

    .auth-title {
      font-size: 20px;
      font-weight: 600;
      color: var(--text);
      margin: 0 0 20px 0;
      text-align: center;
    }

    .form-group {
      margin-bottom: 16px;
    }

    .form-label {
      display: block;
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
      margin-bottom: 6px;
    }

    .form-input {
      width: 100%;
      height: 40px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-family: inherit;
      font-size: 14px;
      color: var(--text);
      background: var(--white);
      box-sizing: border-box;
      transition: border-color 0.15s ease;
    }

    .form-input:focus {
      border-color: var(--green);
      outline: 2px solid var(--green-light);
      outline-offset: 1px;
    }

    .code-input {
      font-size: 24px;
      letter-spacing: 6px;
      text-align: center;
      font-variant-numeric: tabular-nums;
      height: 50px;
    }

    .checkbox-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      color: var(--text);
      cursor: pointer;
    }

    .demo-note {
      font-size: 12px;
      color: var(--text-soft);
      text-align: center;
      margin: 18px 0 0 0;
    }

    /* Toast */
    .toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--green);
      color: var(--white);
      padding: 10px 20px;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 500;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
      z-index: 9999;
      pointer-events: none;
      max-width: 90vw;
      text-align: center;
    }

    .toast.toast-visible {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }

    /* Desktop Layout (ab 1024 px) */
    @media (min-width: 1024px) {
      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        background: var(--white);
        border-right: 1px solid var(--line);
        display: flex;
        flex-direction: column;
        padding: 24px 16px;
        box-sizing: border-box;
        z-index: 100;
      }

      .sidebar-brand {
        margin-bottom: 24px;
        padding: 0 8px;
      }

      .brand-name {
        font-size: 16px;
        font-weight: 600;
        color: var(--green);
        line-height: 1.2;
      }

      .brand-sub {
        font-size: 12px;
        color: var(--text-soft);
        margin-top: 2px;
      }

      .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
      }

      .nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 9px 12px;
        border-radius: 8px;
        color: var(--text);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        border-left: 3px solid transparent;
        transition: background 0.15s ease, color 0.15s ease;
      }

      .nav-link:hover {
        background: #fbf9f7;
      }

      .nav-link.active {
        background: var(--sand);
        color: var(--green);
        border-left: 3px solid var(--green);
        font-weight: 600;
      }

      .nav-divider {
        height: 1px;
        background: var(--line);
        margin: 12px 8px;
      }

      .nav-link.disabled {
        opacity: 0.45;
        cursor: not-allowed;
      }

      .nav-link.disabled:hover {
        background: transparent;
      }

      .sidebar-footer {
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid var(--line);
      }

      .user-profile {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 4px;
      }

      .user-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--cream);
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 13px;
        flex-shrink: 0;
      }

      .user-info {
        display: flex;
        flex-direction: column;
      }

      .user-name {
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
        line-height: 1.2;
      }

      .user-logout {
        font-size: 12px;
        color: var(--text-soft);
        text-decoration: none;
        margin-top: 2px;
      }

      .user-logout:hover {
        color: var(--bad);
      }

      .main-wrapper {
        margin-left: 240px;
        padding: 32px;
        max-width: 1240px;
        box-sizing: border-box;
      }

      .dashboard-grid {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr) 300px;
        gap: 20px;
        align-items: start;
      }

      .col-span-2-desk {
        grid-column: span 2;
      }

      .col-span-3-desk {
        grid-column: 1 / -1;
      }
    }

    /* Desktop breit (ab 1280 px) */
    @media (min-width: 1280px) {
      .dashboard-grid {
        grid-template-columns: 280px minmax(0, 1fr) 330px;
      }
    }

    @media (min-width: 768px) and (max-width: 1279px) {
      .bookings-side-col {
        grid-column: span 2;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
      }
    }

    /* Tablet Layout (768 bis 1023 px) */
    @media (min-width: 768px) and (max-width: 1023px) {
      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 64px;
        background: var(--white);
        border-right: 1px solid var(--line);
        display: flex;
        flex-direction: column;
        padding: 20px 8px;
        box-sizing: border-box;
        align-items: center;
        z-index: 100;
      }

      .sidebar-brand {
        margin-bottom: 20px;
        text-align: center;
      }

      .brand-name {
        font-size: 16px;
        font-weight: 600;
        color: var(--green);
      }

      .brand-sub {
        display: none;
      }

      .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        align-items: center;
        flex: 1;
      }

      .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        color: var(--text);
        text-decoration: none;
        transition: background 0.15s ease, color 0.15s ease;
      }

      .nav-link:hover {
        background: #fbf9f7;
      }

      .nav-link.active {
        background: var(--sand);
        color: var(--green);
      }

      .nav-text {
        display: none;
      }

      .nav-divider {
        width: 32px;
        height: 1px;
        background: var(--line);
        margin: 8px 0;
      }

      .nav-link.disabled {
        opacity: 0.45;
        cursor: not-allowed;
      }

      .sidebar-footer {
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid var(--line);
      }

      .user-profile {
        display: flex;
        justify-content: center;
      }

      .user-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--cream);
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 13px;
        text-decoration: none;
      }

      .user-info {
        display: none;
      }

      .main-wrapper {
        margin-left: 64px;
        padding: 24px;
        box-sizing: border-box;
      }

      .dashboard-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
      }

      .col-span-2-desk,
      .col-span-3-desk {
        grid-column: span 2;
      }
    }

    /* Handy Layout (unter 768 px) */
    @media (max-width: 767px) {
      .card {
        padding: 16px;
      }

      .metric-value {
        font-size: 22px;
      }

      .metric-value.small {
        font-size: 18px;
      }

      .sidebar {
        display: none;
      }

      .mobile-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        position: sticky;
        top: 0;
        z-index: 90;
      }

      .mobile-brand-title {
        font-size: 16px;
        font-weight: 600;
        color: var(--green);
        line-height: 1.2;
      }

      .mobile-brand-sub {
        font-size: 11px;
        color: var(--text-soft);
      }

      .mobile-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--cream);
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 12px;
        text-decoration: none;
      }

      .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--white);
        border-top: 1px solid var(--line);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 100;
        padding: 0 4px;
      }

      .mobile-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--text-soft);
        text-decoration: none;
        font-size: 11px;
        font-weight: 500;
        padding: 6px 2px;
        border-radius: 8px;
        flex: 1;
        min-width: 0;
      }

      .mobile-nav-link span {
        white-space: nowrap;
        font-size: 10px;
        letter-spacing: -0.1px;
      }

      .mobile-nav-link.active {
        color: var(--green);
        font-weight: 600;
      }

      .main-wrapper {
        padding: 16px;
        padding-bottom: 84px;
        box-sizing: border-box;
      }

      .dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
      }

      .metrics-stack {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
      }

      .metric-item {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
        flex-direction: column;
        gap: 8px;
      }

      .next14-content {
        flex-direction: column;
        gap: 20px;
      }

      .today-automation-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
      }

      .today-automation-right {
        width: 100%;
        justify-content: space-between;
        text-align: left;
        padding-left: 22px;
      }

      .today-automation-times {
        align-items: flex-start;
      }

      .run-row {
        flex-wrap: wrap;
        gap: 4px 8px;
      }

      .run-name {
        width: auto;
        flex: 1;
      }

      .run-result {
        width: 100%;
        flex-basis: 100%;
        padding-left: 56px;
      }

      .compact-appointment-row {
        align-items: flex-start;
      }

      .appointment-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
      }

      .appointment-time-col {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
      }

      .appointment-capacity-col {
        width: 100%;
      }

      .appointment-channels-col {
        text-align: left;
        width: 100%;
      }

      .booking-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
      }

      .booking-time-col {
        width: 100%;
      }

      .booking-capacity-col {
        width: 100%;
      }

      .booking-channels-col {
        text-align: left;
        width: 100%;
      }

      .booking-badge-col {
        width: 100%;
        justify-content: flex-start;
      }

      .bookings-side-col {
        gap: 16px;
      }

      .toast {
        bottom: 74px;
      }

      /* Makery Handy-Layout */
      .makery-card-body {
        grid-template-columns: 1fr;
        gap: 14px;
      }

      .makery-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
      }

      .makery-card-footer > .btn {
        width: 100%;
      }

      .makery-footer-right {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
      }

      .makery-footer-right > .btn {
        width: 100%;
      }

      .makery-select {
        width: 100%;
        max-width: 100%;
      }

      .makery-audit-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
    }

    @media (min-width: 768px) {
      .mobile-top-bar,
      .mobile-bottom-bar {
        display: none !important;
      }
    }

    /* Makery-Prüfansicht */
    .makery-wrapper {
      max-width: 760px;
    }

    .makery-explanation {
      font-size: 14px;
      color: var(--text-soft);
      max-width: 760px;
      margin: 0 0 20px 0;
      line-height: 1.45;
    }

    .makery-cards-list {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .makery-card {
      position: relative;
    }

    .makery-card.border-bad {
      border-left: 3px solid var(--bad);
    }

    .makery-card.border-warn {
      border-left: 3px solid var(--warn);
    }

    .makery-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }

    .makery-card-header-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .makery-card-time {
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      font-variant-numeric: tabular-nums;
    }

    .makery-card-subject {
      font-size: 13px;
      color: var(--text-soft);
    }

    .makery-card-body {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    .makery-col {
      display: flex;
      flex-direction: column;
    }

    .makery-col-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 6px;
      padding: 0 4px;
    }

    .makery-col-rows {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .makery-data-row {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      padding: 6px 8px;
      min-height: 30px;
      gap: 8px;
      border-radius: 6px;
    }

    .makery-data-row.is-mismatch {
      background: #fbeceb;
    }

    .makery-row-label {
      font-size: 13px;
      color: var(--text-soft);
      flex-shrink: 0;
      word-break: normal;
      overflow-wrap: normal;
      hyphens: none;
    }

    .makery-row-value {
      font-size: 13px;
      color: var(--text);
      font-weight: 500;
      text-align: right;
      word-break: normal;
      overflow-wrap: normal;
      hyphens: none;
    }

    .makery-audit-row {
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .makery-audit-items {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
    }

    .makery-audit-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: var(--text);
    }

    .makery-audit-reason {
      font-size: 13px;
      color: var(--text-soft);
      line-height: 1.3;
    }

    .makery-card-footer {
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .makery-footer-right {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .makery-assign-group {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 1;
      min-width: 0;
      justify-content: flex-end;
    }

    .makery-assign-group .makery-select {
      flex: 1;
      min-width: 0;
      max-width: none;
      width: auto;
    }

    .makery-assign-group .btn {
      white-space: nowrap;
      flex-shrink: 0;
    }

    .makery-select {
      height: 38px;
      padding: 0 10px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: var(--white);
      font-family: inherit;
      font-size: 13px;
      color: var(--text);
      box-sizing: border-box;
      max-width: 260px;
    }

    .makery-select:focus {
      border-color: var(--green);
      outline: 2px solid var(--green-light);
      outline-offset: 1px;
    }

    .btn-bad-text {
      color: var(--bad);
    }

    .makery-verified-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: var(--text-soft);
      font-weight: 500;
    }

    .makery-resolved-text {
      font-size: 13px;
      color: var(--text-soft);
      font-weight: 500;
    }

    .makery-incorrect-notice {
      margin-top: 12px;
      padding: 8px 12px;
      background: #fbeceb;
      border-radius: 8px;
      font-size: 13px;
      color: var(--text);
      line-height: 1.4;
    }

    /* Original-Mail Modal */
    .modal-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.45);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      z-index: 1000;
      opacity: 1;
      visibility: visible;
      transition: opacity 0.2s ease, visibility 0.2s;
    }

    .modal-backdrop.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .modal-card {
      width: 100%;
      max-width: 520px;
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 24px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      box-sizing: border-box;
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }

    .modal-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text);
      margin: 0;
      line-height: 1.3;
    }

    .modal-close-btn {
      background: none;
      border: none;
      padding: 6px;
      cursor: pointer;
      color: var(--text-soft);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      transition: color 0.15s ease, background 0.15s ease;
      flex-shrink: 0;
    }

    .modal-close-btn:hover {
      color: var(--text);
      background: var(--sand);
    }

    .modal-close-btn:focus-visible {
      outline: 2px solid var(--green-light);
      outline-offset: 2px;
    }

    .modal-body {
      font-size: 14px;
      line-height: 1.5;
      color: var(--text);
    }

    .modal-sender {
      font-size: 13px;
      color: var(--text-soft);
      margin-bottom: 14px;
    }

    .modal-body p {
      margin: 0 0 12px 0;
    }

    .modal-body p:last-child {
      margin-bottom: 0;
    }

    /* Automatiken-Seite */
    .header-right-col {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
      flex-shrink: 0;
    }

    .maintenance-box {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
      margin-top: 4px;
    }

    .toggle-control {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      user-select: none;
    }

    .toggle-label-text {
      font-size: 13px;
      font-weight: 500;
      color: var(--text);
    }

    .toggle-switch {
      position: relative;
      width: 38px;
      height: 22px;
      display: inline-block;
    }

    .toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
      position: absolute;
    }

    .toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--line);
      border-radius: 11px;
      transition: background 0.2s ease;
    }

    .toggle-slider::before {
      position: absolute;
      content: "";
      height: 16px;
      width: 16px;
      left: 3px;
      bottom: 3px;
      background: var(--white);
      border-radius: 50%;
      transition: transform 0.2s ease;
    }

    .toggle-switch input:checked + .toggle-slider {
      background: var(--warn);
    }

    .toggle-switch input:checked + .toggle-slider::before {
      transform: translateX(16px);
    }

    .toggle-switch input:focus-visible + .toggle-slider {
      outline: 2px solid var(--green-light);
      outline-offset: 2px;
    }

    .maintenance-hint {
      font-size: 12px;
      color: var(--text-soft);
      text-align: right;
    }

    .maintenance-banner {
      border-left: 3px solid var(--warn);
      background: var(--white);
      padding: 14px 18px;
      border-radius: 14px;
      border-top: 1px solid var(--line);
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      margin-bottom: 20px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    .automations-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    .automation-card {
      display: flex;
      flex-direction: column;
    }

    .automation-card.border-warn {
      border-left: 3px solid var(--warn);
    }

    .automation-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
      flex-wrap: wrap;
    }

    .automation-header-left {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .automation-name {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      margin: 0;
      line-height: 1.3;
    }

    .automation-state-tag {
      font-size: 12px;
      color: var(--text-soft);
      font-weight: 500;
      white-space: nowrap;
    }

    .automation-desc {
      font-size: 13px;
      color: var(--text-soft);
      margin-bottom: 16px;
      line-height: 1.45;
    }

    .automation-steps {
      margin: -6px 0 16px;
      font-size: 13px;
    }

    .automation-steps summary {
      cursor: pointer;
      color: var(--green);
      font-weight: 600;
      list-style: none;
    }

    .automation-steps summary::-webkit-details-marker { display: none; }

    .automation-steps summary::before {
      content: '+';
      display: inline-block;
      width: 14px;
      font-weight: 700;
    }

    .automation-steps[open] summary::before { content: '\2013'; }

    .automation-steps ol {
      margin: 10px 0 0;
      padding-left: 22px;
      color: var(--text);
      line-height: 1.5;
    }

    .automation-steps li + li { margin-top: 4px; }

    .automation-meta-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      padding-bottom: 14px;
      margin-bottom: 14px;
      border-bottom: 1px solid var(--line);
    }

    .automation-meta-label {
      font-size: 12px;
      color: var(--text-soft);
      margin-bottom: 2px;
    }

    .automation-meta-value {
      font-size: 14px;
      font-weight: 500;
      color: var(--text);
      white-space: nowrap;
    }

    .automation-result-box {
      font-size: 13px;
      color: var(--text);
      margin-bottom: 12px;
      line-height: 1.4;
    }

    .automation-makery-link {
      margin-bottom: 14px;
    }

    .automation-card-footer {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: auto;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      flex-wrap: wrap;
    }

    .automation-card-footer .btn {
      flex: 1;
      min-width: 100px;
    }

    .automation-protocol-box {
      margin-top: 16px;
      padding-top: 12px;
      border-top: 1px solid var(--line);
    }

    .automation-protocol-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-soft);
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .automation-protocol-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .automation-protocol-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 6px 8px;
      background: var(--sand);
      border-radius: 6px;
      font-size: 13px;
    }

    .automation-protocol-time {
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      flex-shrink: 0;
    }

    .automation-protocol-result {
      flex: 1;
      min-width: 0;
      color: var(--text-soft);
      text-align: left;
      padding: 0 8px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* DIY-Shop Seite */
    .shop-header-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .shop-header-left {
      min-width: 0;
    }

    .shop-header-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 4px;
    }

    .shop-header-sub {
      font-size: 13px;
      color: var(--text-soft);
    }

    .shop-header-right {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-shrink: 0;
    }

    .shop-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
    }

    .shop-card-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .shop-change-item {
      display: flex;
      align-items: baseline;
      gap: 8px;
      font-size: 13px;
      line-height: 1.4;
    }

    .shop-tag {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 4px;
      flex-shrink: 0;
    }

    .shop-tag-new {
      background: var(--sand);
      color: var(--green);
    }

    .shop-tag-price {
      background: var(--sand);
      color: var(--text);
    }

    .shop-change-text {
      color: var(--text);
      flex: 1;
      min-width: 0;
    }

    .shop-hidden-item {
      display: flex;
      flex-direction: column;
      gap: 2px;
      font-size: 13px;
    }

    .shop-hidden-name {
      font-weight: 600;
      color: var(--text);
    }

    .shop-hidden-reason {
      color: var(--text-soft);
    }

    .shop-product-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 13px;
    }

    .shop-product-left {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .shop-product-name {
      font-weight: 500;
      color: var(--text);
    }

    .shop-product-detail {
      font-size: 12px;
      color: var(--text-soft);
    }

    .shop-product-price {
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      flex-shrink: 0;
      text-align: right;
    }

    .shop-empty-state {
      font-size: 13px;
      color: var(--text-soft);
    }

    /* Handy-Anpassungen (unter 768 px) */
    @media (max-width: 767px) {
      /* Makery A1 & A3 */
      .makery-card-body {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
      }

      .makery-col {
        width: 100% !important;
      }

      .makery-col-rows {
        width: 100% !important;
      }

      .makery-data-row {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: baseline !important;
        gap: 12px !important;
      }

      .makery-row-label {
        flex-shrink: 0 !important;
        text-align: left !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
      }

      .makery-row-value {
        flex: 1 !important;
        text-align: right !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
      }

      .makery-assign-group {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
      }

      .makery-assign-group .makery-select {
        width: 100% !important;
        max-width: 100% !important;
      }

      .makery-assign-group .btn {
        width: 100% !important;
      }

      /* Automatiken Handy */
      .automations-grid {
        grid-template-columns: 1fr;
      }

      .header-right-col {
        align-items: flex-start;
        width: 100%;
      }

      .page-header {
        flex-wrap: wrap;
      }

      .page-header > *:last-child {
        flex: 1 1 100%;
        min-width: 0;
      }

      .maintenance-box {
        align-items: flex-start;
        margin-top: 10px;
        width: 100%;
      }

      .maintenance-hint {
        text-align: left;
        white-space: normal;
      }

      .automation-card-footer {
        flex-direction: column;
        width: 100%;
        gap: 8px;
      }

      .automation-card-footer .btn {
        width: 100%;
      }

      /* Shop Handy */
      .shop-header-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
      }

      .shop-header-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
      }

      .shop-header-right .btn {
        width: 100%;
      }

      .shop-header-right a {
        text-align: center;
      }

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

    /* Überarbeitung 23.09.2026: Arbeitsbereich und Plattformmarke. */
    :root { --sand:#f5f5f2; --line:#dfe3dd; --text:#243531; --text-soft:#606d66; --ok:#287347; --warn:#a6710a; --off:#737b76; }
    ::selection { background:#eacfa0; color:#243531; }
    :focus-visible { outline:3px solid var(--green-light); outline-offset:4px; }
    a { text-underline-offset:3px; }
    .btn { min-height:44px; height:auto; padding:10px 16px; border-radius:8px; }
    .card { border-radius:12px; box-shadow:none; padding:24px; min-width:0; }
    .page-title { font-size:28px; letter-spacing:-.025em; font-weight:650; line-height:1.25; }
    .page-subtitle { font-size:14px; margin-top:8px; }
    .page-header { margin-bottom:28px; align-items:center; }
    .status-pill { font-size:12px; padding:9px 12px; box-shadow:none; }
    .customer-brand { display:flex; flex-direction:column; align-items:flex-start; gap:13px; color:var(--text-soft); font-size:12px; text-decoration:none; }
    .customer-brand img { display:block; width:160px; height:64px; object-fit:contain; background:var(--green); padding:8px 10px; border-radius:7px; box-sizing:content-box; }
    .customer-brand>span { padding-left:2px; }
    .sidebar-brand { padding:0 4px; margin-bottom:30px; }
    .nav-link { min-height:44px; border-left:0; border-radius:7px; }
    .nav-link.active { background:#e7eeea; border-left:0; }
    .nav-link:hover { background:#eef1ed; }
    .nav-link.disabled { opacity:1; color:#727b75; }
    .nav-future-label { font-size:11px; color:var(--text-soft); padding:0 12px 8px; }
    .preview-notice { display:flex; gap:12px; align-items:center; color:var(--text-soft); font-size:12px; padding-bottom:18px; margin-bottom:24px; border-bottom:1px solid var(--line); }
    .preview-notice strong { color:var(--green); font-size:12px; font-weight:600; }
    .today-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr); gap:20px; align-items:start; }
    .card-title { gap:12px; margin-bottom:10px; }
    .card-title h2 { margin:0; font-size:17px; font-weight:650; line-height:1.35; }
    .section-description { margin:0 0 20px; font-size:13px; color:var(--text-soft); line-height:1.55; }
    .count-badge { background:#f3e9d6; color:#78530d; min-width:26px; min-height:26px; display:inline-flex; align-items:center; justify-content:center; }
    .action-items-list { display:block; }
    .action-item { display:flex; margin:0; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:18px 0; background:transparent; }
    .action-item:first-child { padding-top:0; }
    .action-item:last-child { border-bottom:0; padding-bottom:0; }
    .action-item:hover { background:transparent; }
    .action-item:hover .task-action { text-decoration:underline; }
    .action-item-body { display:flex; flex-direction:column; gap:7px; }
    .task-label { font-size:11px; color:#795716; }
    .action-item-title { font-size:15px; font-weight:600; line-height:1.4; }
    .action-item-detail { font-size:13px; line-height:1.5; color:var(--text-soft); }
    .task-action { display:inline-flex; align-items:center; gap:9px; margin-top:4px; color:var(--green); font-weight:600; font-size:13px; min-height:24px; }
    .healthy-count { font-size:11px; color:var(--ok); white-space:nowrap; font-weight:500; }
    .overview-automation { display:flex; align-items:center; gap:11px; padding:15px 0; border-bottom:1px solid var(--line); color:inherit; text-decoration:none; }
    .overview-automation:first-child { padding-top:0; }
    .overview-automation:last-child { border:0; padding-bottom:0; }
    .overview-automation:hover strong { text-decoration:underline; text-underline-offset:3px; }
    .overview-automation-copy { display:flex; flex:1; flex-direction:column; gap:5px; min-width:0; }
    .overview-automation-copy strong { font-size:13px; font-weight:600; line-height:1.4; }
    .overview-automation-copy>span { color:var(--text-soft); font-size:12px; line-height:1.45; }
    .overview-automation-status { display:flex; flex-direction:column; align-items:flex-end; gap:5px; font-size:11px; white-space:nowrap; }
    .overview-automation-status small { font-size:11px; color:var(--text-soft); }
    .status-text.ok { color:var(--ok); }.status-text.warn { color:#855b0a; }.status-text.off { color:var(--text-soft); }
    .text-link { display:inline-flex; align-items:center; gap:8px; min-height:30px; }
    .card-footer-link { margin-top:20px; padding-top:14px; }
    .appointments-panel,.activity-panel { grid-column:1/-1; }
    .appointment-overview { display:grid; grid-template-columns:1fr 1fr; gap:0 30px; }
    .compact-appointment-row { padding:18px 0; }.compact-appointment-title { font-weight:550; }
    .compact-appointment-capacity small { display:block; font-size:11px; color:var(--text-soft); font-weight:400; margin-top:3px; }
    .activity-panel { padding:0 24px; background:transparent; }
    .activity-panel summary { cursor:pointer; padding:20px 0; font-size:14px; font-weight:600; }
    .activity-hint { float:right; color:var(--text-soft); font-weight:400; font-size:12px; }
    .activity-panel .runs-list { padding-bottom:20px; }
    .automation-result-status { display:block; font-size:12px; font-weight:650; margin-bottom:5px; }
    .platform-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:10px 32px; background:#f5f5f2; border-top:1px solid var(--line); font-size:11px; }
    .platform-credit { display:inline-flex; align-items:center; gap:9px; margin-left:auto; text-decoration:none; color:var(--text-soft); }
    .levoro-wordmark { position:relative; font-size:18px; line-height:1; letter-spacing:-.7px; font-weight:650; color:#000010; padding-bottom:6px; }
    .levoro-wordmark svg { position:absolute; width:6px; height:5px; fill:#ccff00; left:22px; bottom:0; }
    .support-link { display:inline-flex; align-items:center; gap:8px; color:var(--green); text-decoration:none; min-height:32px; }
    .support-link:hover { text-decoration:underline; }
    .auth-brand { margin-bottom:28px; }.auth-brand .customer-brand { align-items:center; }
    .auth-wrapper { min-height:calc(100dvh - 67px); }.auth-card { border-radius:14px; box-shadow:0 8px 30px rgba(20,40,30,.05); }
    @media(min-width:1024px) {
      .sidebar { width:224px; padding:26px 18px 20px; overflow-y:auto; background:#fbfcfa; }
      .main-wrapper { margin-left:224px; max-width:1480px; padding:28px 32px 106px; }
      .platform-footer { position:fixed; bottom:0; left:224px; right:0; z-index:80; }
      #app>.platform-footer { left:0; }
      .sidebar-footer { margin-top:36px; }.sidebar-nav { min-height:440px; }
      .dashboard-grid { grid-template-columns:minmax(180px,.85fr) minmax(0,1.5fr) minmax(190px,1fr); }
    }
    @media(min-width:768px) and (max-width:1023px) {
      .sidebar { width:180px; align-items:stretch; padding:20px 12px; overflow-y:auto; }
      .sidebar-brand { padding:0; }.customer-brand img { width:132px; height:53px; padding:8px; }
      .sidebar-nav { align-items:stretch; }.nav-link { width:auto; justify-content:flex-start; gap:9px; padding:10px; font-size:13px; }
      .nav-text { display:inline; }.nav-divider { width:auto; }.nav-future-label { padding-left:10px; }
      .main-wrapper { margin-left:180px; padding:24px 24px 100px; }.today-grid { grid-template-columns:1fr; }
      .appointment-overview { grid-template-columns:1fr; }.platform-footer { position:fixed; bottom:0; left:180px; right:0; z-index:80; padding:14px 24px; }
      #app>.platform-footer { left:0; }.user-info { display:flex; flex-direction:column; }.user-profile { justify-content:flex-start; gap:8px; }
      .page-header { flex-wrap:wrap; }.sidebar-nav { min-height:440px; }
    }
    @media(max-width:767px) {
      .customer-brand { flex-direction:row; align-items:center; gap:12px; }.customer-brand img { width:110px; height:44px; padding:5px 8px; border-radius:5px; }
      .customer-brand>span { font-size:11px; }.mobile-top-bar { padding:10px 16px; }
      .main-wrapper { padding:20px 16px 88px; }.preview-notice { align-items:flex-start; font-size:11px; margin-bottom:22px; padding-bottom:14px; gap:10px; }
      .page-title { font-size:25px; }.page-header { gap:16px; flex-wrap:wrap; margin-bottom:22px; }.page-subtitle { font-size:13px; }
      .today-grid { grid-template-columns:1fr; gap:16px; }.card { padding:20px; }.card-title h2 { font-size:16px; }
      .appointment-overview { grid-template-columns:1fr; }.appointments-panel .card-title { align-items:flex-start; flex-direction:column; }
      .overview-automation { flex-wrap:wrap; gap:9px; }.overview-automation-copy { min-width:140px; }.overview-automation-status { width:100%; flex-direction:row; justify-content:space-between; padding-left:19px; }
      .healthy-count { white-space:normal; text-align:right; max-width:80px; }.activity-panel { padding:0 20px; }.activity-hint { font-size:11px; }
      .platform-footer { margin:28px 0 0; padding:20px 0 8px; flex-wrap:wrap; gap:10px; }.platform-credit { gap:10px; font-size:11px; }
      .support-link { font-size:11px; }#app>.platform-footer { padding:16px; margin:0; }
      .auth-brand .customer-brand { flex-direction:column; }.auth-brand .customer-brand img { width:160px; height:64px; }
      .mobile-bottom-bar { padding-bottom:env(safe-area-inset-bottom,0px); }.mobile-nav-link { min-height:56px; }
      .auth-wrapper { min-height:calc(100dvh - 90px); }
    }
    @media(min-width:768px) {
      :root { --footer-height:64px; }
      .platform-footer { height:var(--footer-height); padding-block:10px; }
      .sidebar { padding-bottom:calc(var(--footer-height) + 16px); overflow:hidden; }
      .sidebar-brand { flex-shrink:0; }
      .sidebar-nav { min-height:0; overflow-y:auto; }
      .sidebar-nav>* { flex-shrink:0; }
      .sidebar-footer { position:absolute; left:0; right:0; bottom:0; height:var(--footer-height); margin:0; padding:0 22px; display:flex; align-items:center; background:#fbfcfa; }
      .user-profile { padding:0; }
    }
    @media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Ergänzungen für die echte Anwendung (Stufe 1) */
.link-button { background:none; border:0; padding:0; font:inherit; color:inherit; cursor:pointer; text-align:left; }
.mobile-more-menu form { margin:0; }
.mobile-more-menu .link-button { width:100%; }
.form-error { background:#fbeceb; color:var(--bad); border-radius:8px; padding:10px 12px; font-size:14px; margin:0 0 16px; }
.form-submit { margin-top:20px; }
.form-center { text-align:center; }
.form-back { margin-top:14px; }
.auth-title-small { font-size:17px; }
.auth-card-wide { max-width:460px; }
.setup-intro { color:var(--text-soft); font-size:14px; line-height:1.5; margin:0 0 16px; }
.setup-step { font-size:15px; margin:24px 0 12px; color:var(--text); }
.setup-qr { display:flex; justify-content:center; margin:8px 0 12px; }
.setup-qr svg { background:#fff; }
.setup-secret { font-size:13px; color:var(--text-soft); text-align:center; line-height:1.6; }
.setup-secret code { font-size:14px; color:var(--text); letter-spacing:.04em; word-break:break-all; }
.automation-card-footer form { margin:0; display:inline; }
.automation-protocol-box summary { cursor:pointer; }
.shop-header-right form { margin:0; }
.shop-change-text small { color:var(--text-soft); margin-left:6px; }
.protocol-grid { display:grid; gap:20px; }
@media (min-width:1024px) { .protocol-grid { grid-template-columns:3fr 2fr; align-items:start; } }
.invite-new { margin-bottom:20px; border-left:3px solid var(--green); }
.invite-text { width:100%; box-sizing:border-box; font-size:13px; line-height:1.5; resize:vertical; white-space:pre-wrap; margin:4px 0 12px; }
.invite-actions { display:flex; flex-wrap:wrap; gap:16px; align-items:center; }
.invite-code-small { font-size:13px; color:var(--text-soft); }
.invite-code-small strong { color:var(--green); letter-spacing:.06em; }
.user-row { display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; align-items:flex-start; padding:14px 0; border-bottom:1px solid var(--line); }
.user-row:last-child { border-bottom:0; }
.user-row-main { display:flex; gap:10px; align-items:flex-start; }
.user-row-main .status-dot { margin-top:7px; }
.user-row-meta { color:var(--text-soft); font-size:13px; }
.user-row-actions { display:flex; flex-wrap:wrap; gap:8px; }
.user-row-actions form { margin:0; }
.btn-small { padding:6px 10px; font-size:13px; }
.setup-list { color:var(--text-soft); font-size:14px; line-height:1.6; padding-left:20px; margin:0 0 16px; }
.setup-list li { margin-bottom:8px; }

/* Statuspille springt zur Automatik mit dem Problem */
a.status-pill { text-decoration:none; }
a.status-pill:hover { border-color:var(--green); }
a.status-pill:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
.automation-card { scroll-margin-top:24px; }
.automation-card:target { box-shadow:0 0 0 2px var(--warn); }
