/* =====================================================================
   Lux Zentrale · Desktop-Ansicht v2 für /app/agent (Entwurf 21.11.2026, NICHT deployt)
   ---------------------------------------------------------------------
   Reines Aussehen. Greift nur ab 901 px (= Gegenstück zu MOBILE_Q im
   Seiten-JS); Handy, Telegram-Blatt, IDs, Datenattribute und JS-Logik
   bleiben unberührt. Wird NACH js/workplace-design.css geladen.

   Bildsprache = die freigegebene CEO-Startseite + Handy-Oberfläche:
   warmes Papier statt Grau, tiefes Lux-Grün, Goldkante als Marker,
   Georgia für Seitentitel, ruhige Haarlinien statt harter Rahmen.

   Hell- und Dunkelmodus folgen wie bisher der Systemeinstellung.
   Rückbau: <link … zentrale-desktop.css> in zentrale.html entfernen.
   ===================================================================== */

@media (min-width: 901px) {
  /* ---------- Farben & Maße (hell; Dunkel-Variante weiter unten) ---------- */
  :root {
    --bg: #f5f4ee; --surface: #fffefa; --surface-2: #f0f0e8;
    --line: #dddfd5; --line-soft: #e9eae2;
    --fg: #223b34; --fg-muted: #5b6a63; --fg-faint: #66716b;
    --accent: #214f42; --accent-soft: #e7ede5; --on-accent: #fff; --accent-hover: #1a4237;
    --red: #b3382c; --red-soft: #fbefec; --amber: #8f5a12; --amber-soft: #f7efdc; --on-amber: #fff;
    --green: #2f6b4f; --green-soft: #e9f1e8; --gray: #78817b; --on-gray: #fff;
    --gold: #d8bd85; --sand: #eee4d0; --sand-fg: #6b5426;
    --side: #1f3b33; --side-2: #2b4a40; --side-3: #345145;
    --hover: #f3f4ec; --hover-line: #cfd4c8; --row-hover: #f6f6ef; --input: #fbfbf6; --zebra: #f4f4ed; --seg: #ebece4;
    --bar: #2c5b4d; --bar-hover: #214f42; --we-shade: #213b340b; --ring: #fffefa;
    --status-red-line: #ecd2cc; --status-green-line: #d3e2d3;
    --radius: 12px; --sidebar-w: 252px; --header-h: 68px;
    --shadow-1: 0 1px 2px #213b340d, 0 1px 1px #213b3408;
    --shadow-2: 0 2px 6px #213b3412, 0 12px 32px #213b3414;
    --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
    --pad-x: 40px;
  }
  body { font-size: 14.5px; line-height: 1.5; background: var(--bg); }
  ::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

  /* ---------- Seitenleiste ---------- */
  .side { background: var(--side); color: #eef2ea; }
  .brand { padding: 24px 22px 22px; border-color: #ffffff14; font-family: var(--serif); font-weight: 400; font-size: 19px; letter-spacing: .04em; }
  .brand .mark { width: 38px; height: 38px; border-radius: 10px; background: transparent; color: var(--gold);
    border: 1px solid #d8bd8599; font-family: var(--serif); font-size: 14px; font-weight: 400; letter-spacing: .06em; }
  .brand small { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; letter-spacing: .02em; color: #b6c5bb; font-size: 12px; margin-top: 2px; }
  .nav { padding: 6px 14px 24px; }
  .nav-label { color: #9fb2a6; font-size: 10px; letter-spacing: .16em; padding: 22px 12px 8px; }
  .nav button { min-height: 40px; margin: 2px 0; padding: 0 12px; gap: 11px; border-radius: 8px; color: #d3ddd5; font-size: 14px; position: relative; }
  .nav button:hover { background: var(--side-2); color: #fff; }
  .nav button[aria-current] { background: var(--side-3); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
  .nav .i { width: 17px; height: 17px; opacity: .9; }
  .nav .count { min-width: 22px; height: 20px; font-size: 11px; background: #c4493a; color: #fff; }
  .nav .count.mute, .nav button[aria-current] .count.mute { background: #ffffff1c; color: #e6ece6; }
  /* 0 offen = guter Zustand: ruhiger grüner Punkt statt Zahl */
  .nav .count.zero { min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: #8cc49c; }
  .nav button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

  /* ---------- Kopfleiste ---------- */
  .topbar { height: var(--header-h); padding: 0 var(--pad-x); gap: 18px; border-bottom: 1px solid var(--line);
    background: var(--bg); }
  .topbar h1 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -.01em; }
  .topbar .right { gap: 10px; }
  .topbar .btn.small { min-height: 40px; border-radius: 9px; background: var(--surface); border-color: var(--line); font-weight: 500; box-shadow: var(--shadow-1); }
  .topbar .btn.small:hover { background: var(--hover); border-color: var(--hover-line); }
  /* Suchen wirkt wie ein Suchfeld (öffnet weiterhin den Such-Drawer) */
  #search-top { width: 260px; justify-content: flex-start; padding-left: 38px; color: var(--fg-muted);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23879790' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px 50%; }
  #search-top:hover { background-color: var(--hover); }
  .stamp { padding: 7px 12px; border-radius: 999px; background: var(--surface-2); color: var(--fg-muted); font-size: 12px; white-space: nowrap; }

  /* ---------- Inhaltsfläche ---------- */
  .scroll { padding: 34px var(--pad-x) 110px; }
  .wrap { max-width: 1320px; margin: 0 auto; }
  .block { margin-bottom: 30px; }
  .block > h2 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; color: var(--fg); margin: 0 0 14px; gap: 12px; }
  .block > h2 .sub { font-size: 13px; color: var(--fg-muted); font-weight: 400; }
  .eyebrow { font-size: 10.5px; letter-spacing: .15em; color: var(--fg-muted); }
  .workspace-heading { margin: 0 0 28px; align-items: flex-end; }
  .workspace-heading h2 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.12; letter-spacing: -.02em; margin: 6px 0 8px; }
  .workspace-heading p { font-size: 14px; }
  .workspace-heading .eyebrow { font-size: 10.5px; letter-spacing: .15em; margin-bottom: 4px; }
  .workspace-source { font-size: 11.5px; color: var(--fg-faint); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 28px; }
  .caption, .note { color: var(--fg-muted); }

  /* ---------- Knöpfe, Chips, Listen ---------- */
  .btn { min-height: 42px; border-radius: 9px; background: var(--surface); border-color: var(--line); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-1); transition: background 140ms, border-color 140ms, box-shadow 140ms; }
  .btn:hover { background: var(--hover); border-color: var(--hover-line); }
  .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); filter: none; }
  .btn.small { min-height: 36px; font-size: 13px; }
  .chip { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 6px; background: var(--surface-2); border-color: transparent; }
  .chip.red, .chip.amber, .chip.green, .chip.accent { border-color: transparent; }
  .seg { background: var(--seg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
  .seg button { min-height: 32px; border-radius: 6px; font-size: 12.5px; }
  .seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px #213b3418; color: var(--fg); }

  .rows, .tasks, .ticker, .aptcard, .cal, .kpi, .workspace-card, .attention-strip, .apartment-entry, .vg-row {
    border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-1);
  }
  .rows, .tasks, .ticker { border-radius: var(--radius); }
  .row { min-height: 56px; padding: 13px 18px; gap: 14px; border-bottom-color: var(--line-soft); transition: background 120ms; }
  .row:hover { background: var(--row-hover); }
  .row .t { font-size: 14.5px; font-weight: 550; }
  .row .m { font-size: 12.5px; color: var(--fg-muted); margin-top: 3px; }
  .row .tail { gap: 8px; }
  .moreline { background: var(--surface-2); }

  .status { border-radius: var(--radius); padding: 15px 20px; gap: 14px; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-1); border-left-width: 3px; }
  .status.red { background: var(--red-soft); border-color: var(--status-red-line); border-left-color: var(--red); }
  .status.green { background: var(--green-soft); border-color: var(--status-green-line); border-left-color: var(--green); }
  .status .txt { font-size: 15px; }
  .status .txt small { font-size: 12.5px; margin-top: 3px; }

  .kpis { gap: 14px; margin-bottom: 26px; }
  .kpi { border-radius: var(--radius); padding: 16px 18px; gap: 4px; }
  .kpi:hover { border-color: var(--hover-line); box-shadow: var(--shadow-2); }
  .kpi .k { font-size: 10.5px; letter-spacing: .13em; color: var(--fg-muted); }
  .kpi .v { font-family: var(--serif); font-weight: 400; font-size: 32px; letter-spacing: -.02em; line-height: 1.2; }
  .kpi .s { font-size: 12px; }

  details > summary { color: var(--fg); }
  details > summary::marker { color: var(--fg-faint); }

  /* ---------- Heute: Kopf + Meldungsband ---------- */
  .home-quick { display: flex; gap: 10px; }
  .attention-strip { border-radius: var(--radius); padding: 14px 18px 14px 16px; margin-bottom: 26px; border-left: 3px solid var(--line); }
  .attention-strip[data-tone="warn"] { border-left-color: var(--amber); }
  .attention-strip[data-tone="ok"] { border-left-color: var(--green); }
  .attention-strip > div > .i { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); }
  .attention-strip[data-tone="ok"] > div > .i { background: var(--green-soft); color: var(--green); }
  .attention-strip strong { font-size: 15.5px; font-weight: 600; }

  /* ---------- Heute: Karten ---------- */
  .workspace-grid { gap: 22px; }
  .workspace-card { border-radius: var(--radius); padding: 22px 24px 18px; }
  .workspace-card header { padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
  .workspace-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
  .workspace-card header > .i { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
  .workspace-card .eyebrow { margin-bottom: 5px; }
  .home-work > [data-work-state] { font-size: 12.5px; margin: 12px 0 4px; }
  .home-work-list { min-height: 0; }
  .home-task, .home-transition { padding-left: 10px; padding-right: 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 9px; border-top-color: var(--line-soft); transition: background 120ms; }
  .home-task { padding-top: 15px; padding-bottom: 15px; }
  .home-task strong { font-size: 15px; font-weight: 600; }
  .home-task small { margin: 5px 0; font-size: 12.5px; line-height: 1.55; }
  .task-next { font-size: 12.5px; }
  .task-arrow { align-self: center; transition: transform 140ms, color 140ms; }
  .home-task:hover .task-arrow { transform: translateX(3px); color: var(--accent); }
  .workspace-link:hover, .home-task:hover, .home-transition:hover { background: var(--row-hover); }
  .workspace-link { border-top-color: var(--line-soft); padding: 13px 10px 6px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 0 0 9px 9px; font-size: 13.5px; }
  .day-counts { gap: 12px; margin: 16px 0 10px; }
  .day-counts > div { flex: 1; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); }
  .day-counts strong { font-family: var(--serif); font-weight: 400; font-size: 34px; }
  .day-counts span { font-size: 10.5px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-muted); }
  .home-transition .chip { background: var(--sand); color: var(--sand-fg); }
  .home-admin > p { color: var(--fg-muted); }
  .home-admin header { border-bottom: 0; padding-bottom: 6px; }

  /* ---------- Wohnungen ---------- */
  .apartment-search { max-width: 420px; font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
  .apartment-search input { min-height: 44px; border-radius: 10px; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14.5px; color: var(--fg); box-shadow: var(--shadow-1);
    padding-left: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23879790' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50%; }
  .workspace-apartments [data-count] { margin: 18px 0 12px; font-size: 12.5px; }
  .apartment-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
  .apartment-entry { border-radius: var(--radius); padding: 18px 20px 14px; gap: 10px 8px; transition: box-shadow 160ms, transform 160ms, border-color 160ms; }
  .apartment-entry:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); border-color: var(--hover-line); }
  .apartment-symbol { width: 34px; height: 34px; border-radius: 9px; }
  .apartment-symbol .i { width: 18px; height: 18px; }
  .apartment-entry > strong { font-family: var(--serif); font-weight: 400; font-size: 21px; letter-spacing: -.01em; margin-top: 4px; }
  .apartment-address { min-height: 0; font-size: 12.5px; }
  .apartment-booking { min-height: 0; font-size: 13px; color: var(--fg-muted); padding: 9px 12px; border-radius: 9px; background: var(--surface-2); }
  .apartment-booking.is-occupied { color: var(--fg); font-weight: 600; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
  .apartment-entry .chip:not(.amber):not(.red) { background: transparent; color: var(--fg-faint); font-weight: 500; padding-right: 0; }
  .apartment-open { border-top-color: var(--line-soft); padding-top: 12px; margin-top: 4px; font-size: 13.5px; }

  /* ---------- Belegung ---------- */
  .cal { border-radius: var(--radius); padding: 20px 22px 18px; }
  .cal-head { margin-bottom: 16px; }
  .cal-head .t { font-size: 14px; }
  .calscale, .calrow { grid-template-columns: 176px 1fr; gap: 14px; }
  .calscale .ticks span { font-size: 11px; }
  .calscale .ticks span.we { color: var(--fg); }
  .calgrid { gap: 5px; }
  .calrow .nm { justify-content: flex-start; font-size: 13.5px; font-weight: 550; color: var(--fg); min-height: 34px; }
  .calrow .nm:hover { color: var(--accent); }
  .track { height: 34px; border-radius: 8px; background: var(--surface-2); }
  .calrow:nth-child(even) .track { background: var(--zebra); }
  .track .we { background: var(--we-shade); }
  .track .today { width: 2px; background: var(--gold); opacity: 1; }
  .bar { top: 4px; bottom: 4px; border-radius: 6px; background: var(--bar); color: #fff; font-size: 12px; font-weight: 600; padding: 0 9px; box-shadow: 0 1px 2px #213b3426; }
  .bar:hover { background: var(--bar-hover); filter: none; box-shadow: 0 3px 10px #213b3433; }
  .barprice { font-weight: 400; opacity: .8; }
  .cal .caption { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 14px; }
  .cal .caption span:first-child i { background: var(--bar) !important; } /* Legende = Balkenfarbe (Inline-Stil im JS) */

  /* ---------- Aufgaben & Notizen ---------- */
  .block > .acts { display: flex; gap: 10px; }
  .work-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.3fr); gap: 16px; margin: 18px 0 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
  .work-filters label { font-size: 10.5px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-muted); gap: 7px; }
  .work-filters input, .work-filters select { font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; min-height: 40px; border-radius: 8px; background: var(--input); color: var(--fg); }
  [data-state] { font-size: 12.5px; color: var(--fg-muted); }
  .work-note .t { font-weight: 550; }

  /* ---------- Formulare im Drawer ---------- */
  .work-form { gap: 16px; }
  .work-form label { font-size: 13px; }
  .work-form input, .work-form textarea, .work-form select, .work-search-label input { border-radius: 9px; background: var(--input); font-weight: 400; }

  /* ---------- Reinigung & Team ---------- */
  .cleaning-date { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); gap: 8px; align-items: center; width: fit-content; }
  .cleaning-date label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
  .cleaning-date input { min-height: 40px; border-radius: 8px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--fg); }
  .cleaning-date .btn { min-height: 40px; box-shadow: none; }
  .cleaning-overview h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; }
  .cleaning-summary { gap: 10px; border: 0; padding: 4px 0 18px; }
  .cleaning-summary > span { padding: 10px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--fg-muted); }
  .cleaning-summary strong { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--fg); margin-right: 4px; }
  [data-teams] { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; margin-bottom: 18px; }
  .aptcard { border-radius: var(--radius); padding: 18px 20px 6px; margin-bottom: 0; }
  .aptcard > .h .n { font-size: 16px; font-weight: 600; }
  .aptcard > p { padding: 0; margin: 0 0 12px; color: var(--fg-muted); font-size: 13px; }
  .aptcard .rows { box-shadow: none; border-color: var(--line-soft); }
  .aptcard > details { padding: 0; }
  .cleaning-workspace + .block > .rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .cleaning-workspace + .block > .rows > .row { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-1); }

  /* ---------- Nachrichten: Zweispalter (AP6) breiter & als Karte ---------- */
  :root { --inbox-list-w: 400px; }
  body[data-view="inbox"] .wrap { margin: 0; }
  body[data-view="inbox"] .scroll { padding: 26px 24px 110px var(--pad-x); }
  body[data-view="inbox"] .scroll::after { left: calc(var(--sidebar-w) + var(--pad-x) + var(--inbox-list-w) + 24px); top: calc(var(--header-h) + 1px);
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='%23b9c2b8' stroke-width='1.3'%3E%3Crect x='3' y='4.5' width='18' height='15' rx='2.5'/%3E%3Cpath d='M3 13h5l1.5 2.5h5L16 13h5'/%3E%3C/svg%3E") no-repeat 50% calc(50% - 34px);
    padding-top: 40px; color: var(--fg-muted); }
  body[data-view="inbox"] .drawer[data-open] { left: calc(var(--sidebar-w) + var(--pad-x) + var(--inbox-list-w) + 24px); top: calc(var(--header-h) + 1px); border-left: 1px solid var(--line); }
  .vg-list { gap: 10px; }
  .vg-row { border-radius: 11px; padding: 13px 15px; gap: 12px; transition: border-color 120ms, box-shadow 120ms; }
  .vg-row:hover { border-color: #c9d3c6; box-shadow: var(--shadow-2); }
  .vg-name { font-size: 15px; font-weight: 600; }
  .vg-apt { border-radius: 5px; }
  .vg-badge { border-radius: 5px; background: var(--sand); color: var(--sand-fg); }
  .vg-badge.vg-new { background: var(--amber); color: #fff; }
  .vg-sect { font-size: 10.5px; letter-spacing: .15em; font-weight: 650; color: var(--fg-muted); padding-top: 18px; }

  /* ---------- Drawer (Schublade) ---------- */
  .drawer { width: 480px; background: var(--surface); border-left-color: var(--line); box-shadow: -18px 0 50px #213b3424; }
  .drawer-head { padding: 22px 24px 16px; border-bottom-color: var(--line-soft); }
  .drawer-head h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -.01em; }
  .drawer-head .meta { font-size: 12.5px; color: var(--fg-muted); margin-top: 4px; }
  .drawer-body { padding: 20px 24px 28px; }
  .drawer .sect { font-size: 10.5px; letter-spacing: .15em; color: var(--fg-muted); margin-top: 6px; }
  .drawer dl { gap: 10px 18px; }
  .x, .headtool { border-radius: 9px; background: var(--surface-2); }
  .scrim { background: #1f3b3347; }

  /* ---------- Preise ---------- */
  .stripwrap { padding-bottom: 6px; }
  .strip { grid-auto-columns: minmax(40px, 1fr); gap: 3px; }
  .cell { border-radius: 7px; }
  .cell.today { box-shadow: inset 0 0 0 2px var(--gold); }

  /* ---------- Universal-Knopf ---------- */
  .notefab { right: 28px; bottom: 26px; width: 54px; height: 54px; background: var(--accent); box-shadow: 0 8px 24px #213b3440, 0 0 0 4px var(--ring); }
  .notefab:hover { background: var(--accent-hover); filter: none; }
}

/* ---------- Breite Schirme: mehr Spalten statt mehr Leerraum ---------- */
@media (min-width: 1360px) {
  .workspace-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); }
  .home-work { grid-column: 1; grid-row: 1 / span 2; }
  .home-day { grid-column: 2; grid-row: 1; }
  .home-clean { grid-column: 3; grid-row: 1; }
  .home-admin { grid-column: 2 / span 2; grid-row: 2; }
  body { --inbox-list-w: 440px; }
}
@media (min-width: 1680px) {
  .wrap { max-width: 1480px; }
  :root { --pad-x: 48px; }
}
/* Schmaler Desktop (Tablet quer / kleines Fenster): luftig, aber kompakter */
@media (min-width: 901px) and (max-width: 1150px) {
  :root { --pad-x: 24px; --sidebar-w: 228px; --inbox-list-w: 340px; }
  #search-top { width: 180px; }
  .workspace-heading h2 { font-size: 32px; }
  [data-teams] { grid-template-columns: 1fr; }
}

/* ---------- Dunkelmodus (Systemeinstellung), gleiche Bildsprache ---------- */
@media (min-width: 901px) and (prefers-color-scheme: dark) {
  :root {
    --bg: #13211f; --surface: #1a2a26; --surface-2: #233631;
    --line: #364a42; --line-soft: #2a3d36;
    --fg: #edf2e9; --fg-muted: #c0cec1; --fg-faint: #afbfaf;
    --accent: #a3d8bd; --accent-soft: #2a453a; --on-accent: #13211f; --accent-hover: #b8e4cc;
    --red: #f19084; --red-soft: #3a211d; --amber: #e5b764; --amber-soft: #382c16; --on-amber: #1a1205;
    --green: #93d3ab; --green-soft: #1d382b; --gray: #9aa59f; --on-gray: #12161b;
    --sand: #3b3424; --sand-fg: #ead8ab;
    --side: #0f1b19; --side-2: #1b2d29; --side-3: #26403a;
    --hover: #22342f; --hover-line: #4a6158; --row-hover: #20322d; --input: #15241f; --zebra: #1e2f2b; --seg: #172622;
    --bar: #3d7562; --bar-hover: #478670; --we-shade: #ffffff0a; --ring: #13211f;
    --status-red-line: #5a2f29; --status-green-line: #2f5040;
    --shadow-1: 0 1px 2px #0000004d; --shadow-2: 0 4px 18px #00000066;
  }
  .apartment-entry:hover { box-shadow: var(--shadow-2); }
  .nav .count.zero { background: #6fae84; }
}


/* =====================================================================
   Belegung · Mehrfachkalender (Smoobu-Stil), nur Schreibtisch.
   Markup aus paintCalendarDesk() in js/business-calendar.js.
   Prefix .bc.mc: schlaegt die allgemeinen .bc-Regeln aus business-calendar.css.
   ===================================================================== */
@media (min-width: 901px) {
  :root {
    --mc-nw: 176px; --mc-rh: 36px;
    --mc-we: #f3f2ea; --mc-today: #fbf1d9; --mc-past: #f4f4ef;
    --ch-booking: #2f5d9e; --ch-airbnb: #c24a55; --ch-direct: #2c5b4d; --ch-expedia: #85650f; --ch-block: #6c746f; --ch-block-2: #5f6762;
  }
  body[data-view="belegung"] .wrap { max-width: none; }
  body[data-view="belegung"] .scroll { padding-top: 14px; padding-bottom: 14px; }
  /* Der runde Notiz-Knopf verdeckte rechts unten Kalender und Legende; "Notiz" steht oben in der Kopfleiste. */
  body[data-view="belegung"] .notefab { display: none; }
  .bc.mc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; color: var(--fg); }
  .bc.mc .mc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
  .bc.mc .mc-tools { display: flex; align-items: center; gap: 10px 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .bc.mc .mc-range { margin-right: auto; flex: 1 1 260px; min-width: 0; }
  .bc.mc .mc-tools { flex-wrap: nowrap; }
  .bc.mc .mc-range span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bc.mc .mc-tools input[type=date] { width: 140px; }
  .bc.mc .mc-nav, .bc.mc .mc-seg { flex: none; }
  .bc.mc .mc-range b { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; letter-spacing: -.01em; white-space: nowrap; }
  .bc.mc .mc-range span { display: block; font-size: 12px; color: var(--fg-muted); margin-top: 1px; }
  .bc.mc .mc-stand { margin: 0; font-size: 11.5px; color: var(--fg-faint); }
  .bc.mc .mc-tools input[type=date] { width: 150px; }
  .bc.mc .mc-nav { display: flex; gap: 6px; align-items: center; }
  .bc.mc .mc-tools button, .bc.mc .mc-tools input[type=date] { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--fg); font-size: 13.5px; font-weight: 600; }
  .bc.mc .mc-nav button[data-back], .bc.mc .mc-nav button[data-next], .bc.mc .mc-nav button[data-refresh] { min-width: 38px; font-size: 16px; }
  .bc.mc .mc-tools input[type=date] { font-weight: 500; }
  .bc.mc .mc-tools button:hover:not(:disabled) { background: var(--hover); border-color: var(--hover-line); }
  .bc.mc .mc-seg { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--seg); }
  .bc.mc .mc-seg button { min-height: 32px; font-size: 13px; border: 0; background: transparent; font-weight: 500; color: var(--fg-muted); padding: 4px 12px; border-radius: 6px; }
  .bc.mc .mc-seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); font-weight: 650; box-shadow: 0 1px 3px #213b3418; }
  .bc.mc .mc-cancel { font-size: 12.5px; color: var(--fg-muted); display: flex; align-items: center; gap: 6px; }
  .bc.mc .mc-alert { margin: 0; padding: 10px 18px; color: var(--red); background: var(--red-soft); font-size: 13px; }
  .bc.mc .mc-scroll { overflow: auto; position: relative; overscroll-behavior: contain; border: 0; border-radius: 0; background: var(--surface);
    max-height: max(400px, calc(100dvh - var(--header-h) - 132px)); scrollbar-color: var(--hover-line) transparent; }
  .bc.mc .mc-scroll:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
  .bc.mc .bc-grid { width: max-content; }

  /* Kopf: bleibt beim vertikalen Scrollen stehen, Ecke auch beim horizontalen */
  .bc.mc .mc-head { display: flex; position: sticky; top: 0; z-index: 6; width: max-content; background: var(--surface); border-bottom: 1px solid var(--line); }
  .bc.mc .mc-corner { position: sticky; left: 0; z-index: 7; flex: none; width: var(--mc-nw); background: var(--surface); border-right: 1px solid var(--line);
    display: flex; align-items: flex-end; padding: 0 14px 8px; font-size: 10.5px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-muted); }
  .bc.mc .mc-cols { width: calc(var(--days) * var(--dw)); }
  .bc.mc .mc-months { display: grid; grid-template-columns: repeat(var(--days), var(--dw)); height: 22px; border-bottom: 1px solid var(--line-soft); }
  .bc.mc .mc-months span { border-left: 2px solid var(--line); white-space: nowrap; min-width: 0; }
  .bc.mc .mc-months span:first-child { border-left: 0; }
  .bc.mc .mc-months b { position: sticky; left: calc(var(--mc-nw) + 4px); display: inline-block; padding: 3px 8px 0; font-size: 12px; font-weight: 650; color: var(--fg); }
  .bc.mc .mc-days { display: grid; grid-template-columns: repeat(var(--days), var(--dw)); height: 34px; }
  .bc.mc .mc-days span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-left: 1px solid var(--line-soft); line-height: 1.1; color: var(--fg-muted); min-width: 0; overflow: hidden; }
  .bc.mc .mc-days small { font-size: 10px; }
  .bc.mc .mc-days b { font-size: 12.5px; font-weight: 600; color: var(--fg); padding: 0 3px; border-radius: 5px; }
  .bc.mc .mc-days span.we { background: var(--mc-we); }
  .bc.mc .mc-days span.we small { color: var(--fg); font-weight: 600; }
  .bc.mc .mc-days span.ms { border-left: 2px solid var(--line); }
  .bc.mc .mc-days span.past b { color: var(--fg-muted); font-weight: 500; }
  .bc.mc .mc-days span.today { background: var(--mc-today); }
  .bc.mc .mc-days span.today small { color: var(--accent); font-weight: 700; }
  .bc.mc .mc-days span.today b { background: var(--accent); color: var(--on-accent); }

  /* Zeilen */
  .bc.mc .mc-body { width: max-content; }
  .bc.mc .mc-row { display: flex; height: var(--mc-rh); border-bottom: 1px solid var(--line); }
  .bc.mc .mc-row:last-child { border-bottom: 0; }
  .bc.mc .mc-name { position: sticky; left: 0; z-index: 5; flex: none; width: var(--mc-nw); display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 0 14px; line-height: 1.2;
    background: var(--surface); border-right: 1px solid var(--line); white-space: nowrap; }
  .bc.mc .mc-name strong { font-size: 13px; font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
  .bc.mc .mc-name small { font-size: 10.5px; color: var(--amber); overflow: hidden; text-overflow: ellipsis; }
  .bc.mc .mc-row:hover .mc-name { background: var(--row-hover); }
  .bc.mc .mc-track { position: relative; display: grid; grid-template-columns: repeat(var(--days), var(--dw)); width: calc(var(--days) * var(--dw)); background: none; min-height: 0; }
  .bc.mc .mc-row.is-unknown .mc-track { background: repeating-linear-gradient(135deg, transparent 0 7px, var(--line-soft) 7px 8px); }
  .bc.mc button.mc-cell { display: block; margin: 0; padding: 0; min-height: 0; height: 100%; border: 0; border-left: 1px solid var(--line-soft); border-radius: 0; background: transparent; min-width: 0; cursor: pointer; }
  .bc.mc button.mc-cell:disabled { cursor: default; }
  .bc.mc button.mc-cell.past { background: var(--mc-past); }
  .bc.mc button.mc-cell.we { background: var(--mc-we); }
  .bc.mc button.mc-cell.ms { border-left: 2px solid var(--line); }
  .bc.mc button.mc-cell.today { background: var(--mc-today); box-shadow: inset 1px 0 0 var(--gold), inset -1px 0 0 var(--gold); }
  .bc.mc button.mc-cell:hover:not(:disabled) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
  .bc.mc button.mc-cell:hover:not(:disabled)::after { content: "+"; color: var(--accent); font-size: 16px; font-weight: 600; }

  /* Balken: Mitte Anreise bis Mitte Abreise, schraege Enden wie in Smoobu */
  .bc.mc button.mc-bar { position: absolute; top: 3px; bottom: 3px; z-index: 2; display: flex; align-items: center; gap: 7px; min-height: 0; height: auto; padding: 0 10px 0 12px;
    border: 0; border-radius: 4px; color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1; text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; box-shadow: none;
    clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); transition: filter 120ms; text-decoration: none; }
  .bc.mc button.mc-bar.cut-l { clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%); padding-left: 8px; }
  .bc.mc button.mc-bar.cut-r { clip-path: polygon(7px 0, 100% 0, 100% 100%, 0 100%); }
  .bc.mc button.mc-bar.cut-l.cut-r { clip-path: none; }
  .bc.mc .mc-bar .mc-g { font-weight: 650; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .bc.mc .mc-bar .mc-m { flex: none; font-size: 11.5px; opacity: .88; font-variant-numeric: tabular-nums; }
  .bc.mc .mc-bar.sm .mc-m { display: none; }
  .bc.mc button.mc-bar.xs { padding: 0; }
  .bc.mc .mc-bar.xs .mc-g, .bc.mc .mc-bar.xs .mc-m { display: none; }
  .bc.mc button.mc-bar:hover:not(:disabled) { filter: brightness(1.1) saturate(1.05); }
  .bc.mc button.mc-bar:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; clip-path: none; border-radius: 6px; }
  .bc.mc .k-booking, .mc-legend .k-booking { background: var(--ch-booking); }
  .bc.mc .k-airbnb, .mc-legend .k-airbnb { background: var(--ch-airbnb); }
  .bc.mc .k-direct, .mc-legend .k-direct { background: var(--ch-direct); }
  .bc.mc .k-expedia, .mc-legend .k-expedia { background: var(--ch-expedia); }
  .bc.mc .k-block, .mc-legend .k-block { background: repeating-linear-gradient(135deg, var(--ch-block) 0 7px, var(--ch-block-2) 7px 14px); }
  .bc.mc button.mc-bar.k-cancelled, .mc-legend .k-cancelled { background: var(--surface); color: var(--red); outline: 1.5px dashed var(--red); outline-offset: -2px; text-decoration: line-through; clip-path: none; }
  .bc.mc button.mc-bar.k-unknown, .mc-legend .k-unknown { background: var(--surface-2); color: var(--fg-muted); outline: 1.5px dotted var(--fg-faint); outline-offset: -2px; clip-path: none; }

  /* Freie Luecke zwischen zwei Eintraegen: nur Anzeige, Klick geht an die Zelle darunter */
  .bc.mc .mc-gap { position: absolute; top: 7px; bottom: 7px; z-index: 1; display: flex; align-items: center; justify-content: center; pointer-events: none;
    border: 1.5px dashed var(--amber); border-radius: 6px; color: var(--amber); font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden;
    background: repeating-linear-gradient(135deg, var(--amber-soft) 0 5px, color-mix(in srgb, var(--amber-soft) 35%, transparent) 5px 10px); }
  .bc.mc[data-zoom="eng"] .mc-days small { display: none; }
  .bc.mc[data-zoom="eng"] .mc-days b { font-size: 11px; padding: 0; }
  .bc.mc[data-zoom="eng"] .mc-gap span { display: none; }
  /* Nachladen am Rand: schmaler Lichtstreifen statt Sprung */
  .bc.mc.is-loading-l .mc-scroll { box-shadow: inset 4px 0 0 var(--gold); }
  .bc.mc.is-loading-r .mc-scroll { box-shadow: inset -4px 0 0 var(--gold); }
  .bc.mc .mc-legend .mc-cancel { margin-left: auto; }

  .bc.mc .mc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-muted); }
  .bc.mc .mc-legend span { display: inline-flex; align-items: center; gap: 7px; }
  .bc.mc .mc-legend i { width: 20px; height: 11px; border-radius: 3px; display: inline-block; }
  .bc.mc .mc-legend i.k-gap { border: 1.5px dashed var(--amber); background: repeating-linear-gradient(135deg, var(--amber-soft) 0 4px, transparent 4px 8px); }
  .bc.mc .mc-legend i.k-today { background: var(--mc-today); border: 1px solid var(--gold); }
  .bc.mc .mc-legend .mc-hint { color: var(--fg-faint); }

  /* Dialoge des Kalenders an die Bildsprache anpassen (Inhalt/Logik unveraendert) */
  .bc-dialog { background: var(--surface); color: var(--fg); border-color: var(--line); border-radius: 14px; }
  .bc-dialog h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; }
  .bc-dialog button, .bc-dialog input, .bc-dialog select, .bc-dialog textarea { background: var(--input); color: var(--fg); border-color: var(--line); }
  .bc-dialog .bc-commit, .bc-form button[type=submit] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
  /* Geschaeftstermine (gleiche Datei) */
  body[data-view="geschaeftstermine"] .bc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-1); color: var(--fg); }
  body[data-view="geschaeftstermine"] .bc h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; }
  body[data-view="geschaeftstermine"] .bc p { color: var(--fg-muted); }
  body[data-view="geschaeftstermine"] .bc button, body[data-view="geschaeftstermine"] .bc input, body[data-view="geschaeftstermine"] .bc select { background: var(--surface); color: var(--fg); border-color: var(--line); }
}
@media (min-width: 901px) and (prefers-color-scheme: dark) {
  :root {
    --mc-we: #1f302b; --mc-today: #33301f; --mc-past: #172521;
    --ch-booking: #36629f; --ch-airbnb: #b0434d; --ch-direct: #3a6f5d; --ch-expedia: #7f600e; --ch-block: #4f5753; --ch-block-2: #5b635f;
  }
}

@media (min-width: 901px) {
  /* Links im Knopf-Look (z. B. "In der Preis-App öffnen") sahen aus wie rohe Links */
  a.btn { color: var(--fg); text-decoration: none; }
  a.btn.primary { color: var(--on-accent); }
}


/* Die freigegebene CEO-Startseite (Heute) ist bewusst nur hell und setzt dafuer
   einen Teil der Farben am body. Die uebrigen Variablen hier ebenfalls hell
   halten, sonst entstehen im Dunkelmodus dunkle Knoepfe/Pillen auf hellem Grund
   (Befund: Suchen/Notiz in der Kopfleiste waren im Dunkelmodus unlesbar). */
@media (min-width: 901px) and (prefers-color-scheme: dark) {
  body[data-view="lage"] {
    --surface-2: #f0f0e8; --line-soft: #e9eae2; --fg-faint: #66716b;
    --on-accent: #fff; --accent-hover: #1a4237;
    --red: #b3382c; --red-soft: #fbefec; --amber: #8f5a12; --amber-soft: #f7efdc; --on-amber: #fff;
    --green: #2f6b4f; --green-soft: #e9f1e8; --gray: #78817b; --on-gray: #fff;
    --sand: #eee4d0; --sand-fg: #6b5426;
    --hover: #f3f4ec; --hover-line: #cfd4c8; --row-hover: #f6f6ef; --input: #fbfbf6; --zebra: #f4f4ed; --seg: #ebece4; --ring: #fffefa;
    --status-red-line: #ecd2cc; --status-green-line: #d3e2d3;
    --shadow-1: 0 1px 2px #213b340d, 0 1px 1px #213b3408; --shadow-2: 0 2px 6px #213b3412, 0 12px 32px #213b3414;
  }
}

/* v3: Name im Balken bleibt sichtbar, wenn der Balken links unter der
   fixierten Namensspalte beginnt (vorher stand dort nur "7 N · 5 P"). */
@media (min-width: 901px) {
  .bc.mc button.mc-bar { overflow: hidden; overflow: clip; }
  .bc.mc .mc-bar .mc-l { position: sticky; left: calc(var(--mc-nw) + 18px); display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; overflow: hidden; }
  .bc.mc .mc-cancel input { min-height: 0; height: 14px; width: 14px; padding: 0; margin: 0; }
  .bc.mc .mc-legend { min-height: 0; }
}

/* v3 · Kontrast (Andy 21.11.): Raster hebt sich deutlich vom Grund ab,
   Zebra-Zeilen, Zeilen-Hover, Heute-Spalte durchgehend markiert, Wochenenden
   leicht getoent. Toenungen sind halbtransparent, damit sie sich mit dem
   Zebra-Grund mischen statt ihn zu ueberdecken. Hell und dunkel. */
@media (min-width: 901px) {
  :root {
    --mc-grid: #d3d7ca;        /* Spaltenlinien (vorher #e9eae2) */
    --mc-grid-row: #c3c9ba;    /* Zeilenlinien */
    --mc-grid-month: #8f9a90;  /* Monatswechsel */
    --mc-zebra: #f1f2ea;       /* jede zweite Zeile */
    --mc-row-hover: #e3ebdf;   /* Zeile unter der Maus */
    --mc-we: rgba(33, 59, 52, .06);
    --mc-past: rgba(33, 59, 52, .035);
    --mc-today: rgba(216, 189, 133, .30);
    --mc-today-line: #c9a55c;
  }
  .bc.mc .mc-row { border-bottom: 1px solid var(--mc-grid-row); }
  .bc.mc .mc-row:nth-child(even) .mc-track, .bc.mc .mc-row:nth-child(even) .mc-name { background-color: var(--mc-zebra); }
  .bc.mc .mc-row:hover .mc-track, .bc.mc .mc-row:hover .mc-name { background-color: var(--mc-row-hover); }
  .bc.mc .mc-row:hover .mc-name strong { color: var(--accent); }
  .bc.mc .mc-name { border-right: 1px solid var(--mc-grid-row); }
  .bc.mc .mc-head { border-bottom: 1px solid var(--mc-grid-row); }
  .bc.mc .mc-corner { border-right: 1px solid var(--mc-grid-row); }
  .bc.mc .mc-days span { border-left: 1px solid var(--mc-grid); }
  .bc.mc button.mc-cell { border-left: 1px solid var(--mc-grid); background: transparent; }
  .bc.mc button.mc-cell.past { background: var(--mc-past); }
  .bc.mc button.mc-cell.we, .bc.mc .mc-days span.we { background: var(--mc-we); }
  .bc.mc .mc-days span.ms, .bc.mc button.mc-cell.ms, .bc.mc .mc-months span { border-left: 2px solid var(--mc-grid-month); }
  .bc.mc .mc-months span:first-child { border-left: 0; }
  .bc.mc button.mc-cell.today, .bc.mc .mc-days span.today { background: var(--mc-today); box-shadow: inset 2px 0 0 var(--mc-today-line), inset -2px 0 0 var(--mc-today-line); }
  .bc.mc .mc-row.is-unknown .mc-track { background-image: repeating-linear-gradient(135deg, transparent 0 7px, var(--mc-grid) 7px 8px); }
  .bc.mc .mc-legend i.k-today { background: var(--mc-today); border: 2px solid var(--mc-today-line); }
}
@media (min-width: 901px) and (prefers-color-scheme: dark) {
  :root {
    --mc-grid: #33463f;
    --mc-grid-row: #44594f;
    --mc-grid-month: #7d9187;
    --mc-zebra: #1e2f2a;
    --mc-row-hover: #284139;
    --mc-we: rgba(255, 255, 255, .045);
    --mc-past: rgba(0, 0, 0, .18);
    --mc-today: rgba(216, 189, 133, .17);
    --mc-today-line: #b8954f;
  }
}
