/* vbba jugend Hub – Modulgestaltung (Phase 4). Gekapselt unter .hub-ui.
   Quellen und Entscheidungen je Modul: DESIGN_OPEN_SOURCE_REFERENCES.md. */

/* =====================================================================
   KALENDER
   Muster: EventCalendar (vkurko/calendar, MIT) und FullCalendar (MIT) – Monatsraster mit Haarlinien,
   Zeitraster „timeGrid“ mit Stundenlinien, Spuren für Überlappungen und Jetzt-Linie; Tabler-Toolbar.
   Umsetzung: eigener Renderer in app.js (bestehende Terminmodelle, Rechte und Dialoge), nur Gestaltung hier.
   ===================================================================== */
.hub-ui #calendar{
  --cal-hub:var(--vb-accent);--cal-hub-soft:var(--vb-accent-soft);--cal-hub-text:var(--vb-accent-text);
  --cal-google:#2a66b8;--cal-google-soft:#e5eefb;--cal-apple:#17734a;--cal-apple-soft:#e3f4ea;
  --cal-outlook:#0e6f86;--cal-outlook-soft:#e0f2f6;--cal-other:#5f5d66;--cal-other-soft:#eeedf1;
  --cal-hour:48px;
}
.hub-ui[data-scheme="dark"] #calendar{
  --cal-google:#7aa8ec;--cal-google-soft:rgba(122,168,236,.14);--cal-apple:#4cc38a;--cal-apple-soft:rgba(76,195,138,.14);
  --cal-outlook:#5cc8dd;--cal-outlook-soft:rgba(92,200,221,.14);--cal-other:#aeaab6;--cal-other-soft:rgba(174,170,182,.12);
}
.hub-ui #calendar .calendar-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.hub-ui #calendar .calendar-actions{display:flex;flex-wrap:wrap;gap:8px}
.hub-ui #calendar .calendar-period-nav{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:center;gap:8px;margin:4px 0 12px}
.hub-ui #calendar .calendar-period-nav button{min-width:40px;width:40px;padding:0;font-size:18px;color:var(--vb-text-muted)}
.hub-ui #calendar .calendar-period-nav h3{margin:0;text-align:center;font:600 var(--vb-text-xl)/1.2 var(--hx-font);color:var(--vb-text)}
.hub-ui #calendar .calendar-period-nav h3::first-letter{text-transform:uppercase}

/* Monat: zusammenhängendes Raster mit Haarlinien */
.hub-ui #calendar .calendar-month{border:1px solid var(--vb-border);border-radius:var(--vb-radius-lg);overflow:hidden;background:var(--vb-border)}
.hub-ui #calendar .calendar-month .calendar-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--vb-border)}
.hub-ui #calendar .calendar-month .calendar-weekdays b{padding:8px 10px;background:var(--vb-surface-2);color:var(--vb-text-subtle);font:600 var(--vb-text-xs)/1 var(--hx-font);text-align:left}
.hub-ui #calendar .calendar-month .calendar-days{gap:1px;background:var(--vb-border)}
.hub-ui #calendar .calendar-month .calendar-day{border:0;border-radius:0;background:var(--vb-surface);padding:6px 6px 4px;box-shadow:none;transition:background-color var(--vb-dur-fast) var(--vb-ease-out)}
.hub-ui #calendar .calendar-month .calendar-day:hover{background:var(--vb-surface-2)}
.hub-ui #calendar .calendar-month .calendar-blank{background:var(--vb-surface-2)}
.hub-ui #calendar .calendar-month .calendar-day-number{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 6px;margin:0 0 2px;border:0;border-radius:var(--vb-radius-sm);background:transparent;color:var(--vb-text);font:500 var(--vb-text-sm)/1 var(--hx-font);font-variant-numeric:tabular-nums;cursor:pointer}
.hub-ui #calendar .calendar-month .calendar-day-number:hover{background:var(--vb-surface-sunken)}
.hub-ui #calendar .calendar-month .calendar-day.today{background:var(--vb-surface);box-shadow:inset 0 0 0 2px var(--vb-accent);border:0}
.hub-ui #calendar .calendar-month .calendar-day.today .calendar-day-number{background:var(--vb-accent);color:var(--vb-accent-fg);font-weight:600}
/* Termin-Chips: farbige Quellkante, ruhige Fläche */
.hub-ui #calendar .calendar-chip,.hub-ui #calendar .calendar-tg-allday .calendar-chip{border:0;border-left:3px solid var(--cal-hub);border-radius:var(--vb-radius-sm);background:var(--cal-hub-soft);color:var(--vb-text);font:500 12px/14px var(--hx-font);text-align:left;padding:3px 6px;transition:filter var(--vb-dur-fast) var(--vb-ease-out)}
.hub-ui #calendar .calendar-chip:hover{filter:brightness(.97)}
.hub-ui #calendar .calendar-source-google{--cal-hub:var(--cal-google);--cal-hub-soft:var(--cal-google-soft)}
.hub-ui #calendar .calendar-source-apple{--cal-hub:var(--cal-apple);--cal-hub-soft:var(--cal-apple-soft)}
.hub-ui #calendar .calendar-source-outlook{--cal-hub:var(--cal-outlook);--cal-hub-soft:var(--cal-outlook-soft)}
.hub-ui #calendar .calendar-source-other{--cal-hub:var(--cal-other);--cal-hub-soft:var(--cal-other-soft)}
.hub-ui #calendar .calendar-month .calendar-more{border:0;background:none;color:var(--vb-text-muted);font:500 11px/14px var(--hx-font);text-align:left;padding:2px 6px;min-height:22px}
.hub-ui #calendar .calendar-month .calendar-more:hover{color:var(--vb-accent-text)}

/* Woche (Telefon): Tage als Liste */
.hub-ui #calendar .calendar-week:not(.calendar-timegrid-host){display:grid;gap:8px}
.hub-ui #calendar .calendar-week-day{min-height:0;border:1px solid var(--vb-border);border-radius:var(--vb-radius-lg);background:var(--vb-surface);padding:8px;box-shadow:none}
.hub-ui #calendar .calendar-week-day.today{box-shadow:inset 3px 0 0 var(--vb-accent)}
.hub-ui #calendar .calendar-week-heading{display:flex;gap:8px;align-items:baseline;border:0;background:none;padding:4px 4px 8px;color:var(--vb-text);font:600 var(--vb-text-md)/1.2 var(--hx-font)}
.hub-ui #calendar .calendar-week-heading span{color:var(--vb-text-muted);font-weight:400}
.hub-ui #calendar .calendar-week-day .calendar-event:not(.calendar-block){display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:baseline;width:100%;margin:2px 0;padding:8px 10px;border:0;border-left:3px solid var(--vb-accent);border-radius:var(--vb-radius-sm);background:var(--vb-accent-soft);color:var(--vb-text);text-align:left;font:500 var(--vb-text-md)/1.3 var(--hx-font)}
.hub-ui #calendar .calendar-week-day .calendar-event time{color:var(--vb-text-muted);font-size:var(--vb-text-sm);font-variant-numeric:tabular-nums}
.hub-ui #calendar .calendar-empty{color:var(--vb-text-subtle);font-size:var(--vb-text-sm);padding:4px}

/* Zeitraster (Woche ab Tablet, Tag) */
.hub-ui #calendar .calendar-tg{border:1px solid var(--vb-border);border-radius:var(--vb-radius-lg);background:var(--vb-surface);overflow:hidden}
.hub-ui #calendar .calendar-tg-header,.hub-ui #calendar .calendar-tg-allday{display:grid;grid-template-columns:56px repeat(var(--days),minmax(0,1fr));border-bottom:1px solid var(--vb-border);background:var(--vb-surface)}
.hub-ui #calendar .calendar-tg-gutter{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;color:var(--vb-text-subtle);font:500 11px/1.2 var(--hx-font)}
.hub-ui #calendar .calendar-tg-head{border-left:1px solid var(--vb-border);padding:6px}
.hub-ui #calendar .calendar-tg-date{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:4px 6px;border:0;border-radius:var(--vb-radius-md);background:none;color:var(--vb-text-muted);font:500 var(--vb-text-sm)/1 var(--hx-font);cursor:pointer}
.hub-ui #calendar .calendar-tg-date:hover{background:var(--vb-surface-2)}
.hub-ui #calendar .calendar-tg-date b{display:inline-grid;place-items:center;min-width:30px;height:30px;border-radius:var(--vb-radius-md);color:var(--vb-text);font:600 var(--vb-text-lg)/1 var(--hx-font);font-variant-numeric:tabular-nums}
.hub-ui #calendar .calendar-tg-head.today .calendar-tg-date{color:var(--vb-accent-text)}
.hub-ui #calendar .calendar-tg-head.today .calendar-tg-date b{background:var(--vb-accent);color:var(--vb-accent-fg)}
.hub-ui #calendar .calendar-tg-allday-cell{border-left:1px solid var(--vb-border);padding:4px;display:grid;gap:2px;align-content:start;min-height:32px}
.hub-ui #calendar .calendar-tg-scroll{max-height:min(68vh,720px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.hub-ui #calendar .calendar-tg-scroll:focus-visible{outline:var(--vb-focus-width) solid var(--vb-accent);outline-offset:-2px}
.hub-ui #calendar .calendar-tg-body{position:relative;display:grid;grid-template-columns:56px repeat(var(--days),minmax(0,1fr));height:calc(var(--cal-hour) * 24)}
.hub-ui #calendar .calendar-tg-hours{display:grid;grid-template-rows:repeat(24,var(--cal-hour))}
.hub-ui #calendar .calendar-tg-hours span{position:relative;top:-7px;padding-right:8px;text-align:right;color:var(--vb-text-subtle);font:500 11px/1 var(--hx-font);font-variant-numeric:tabular-nums}
.hub-ui #calendar .calendar-tg-hours span:first-child{visibility:hidden}
.hub-ui #calendar .calendar-tg-col{position:relative;border-left:1px solid var(--vb-border);background-image:linear-gradient(to bottom,var(--vb-border) 1px,transparent 1px);background-size:100% var(--cal-hour);cursor:default}
.hub-ui #calendar .calendar-tg-col.today{background-color:color-mix(in srgb,var(--vb-accent) 3%,transparent)}
.hub-ui #calendar .calendar-block{position:absolute;top:calc(var(--from) * var(--cal-hour) / 60 + 1px);height:calc(var(--len) * var(--cal-hour) / 60 - 2px);
  left:calc(var(--lane) * 100% / var(--lanes) + 2px);width:calc(100% / var(--lanes) - 4px);display:flex;flex-direction:column;align-items:flex-start;gap:1px;overflow:hidden;
  padding:4px 6px;border:0;border-left:3px solid var(--cal-hub);border-radius:var(--vb-radius-sm);background:var(--cal-hub-soft);color:var(--vb-text);text-align:left;cursor:pointer;
  font:600 12px/1.25 var(--hx-font);box-shadow:0 0 0 1px var(--vb-surface);transition:filter var(--vb-dur-fast) var(--vb-ease-out)}
.hub-ui #calendar .calendar-block:hover{filter:brightness(.96);z-index:2}
.hub-ui #calendar .calendar-block:focus-visible{outline:var(--vb-focus-width) solid var(--vb-accent);outline-offset:1px;z-index:3}
.hub-ui #calendar .calendar-block b{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-weight:600}
.hub-ui #calendar .calendar-block time{color:var(--vb-text-muted);font-weight:500;font-size:11px;font-variant-numeric:tabular-nums}
.hub-ui #calendar .calendar-now{position:absolute;left:0;right:0;top:calc(var(--now) * var(--cal-hour) / 60);height:2px;background:var(--vb-danger);z-index:4;pointer-events:none}
.hub-ui #calendar .calendar-now::before{content:"";position:absolute;left:-5px;top:-4px;width:10px;height:10px;border-radius:50%;background:var(--vb-danger)}
.hub-ui #calendar .calendar-day-view .calendar-tg-scroll{max-height:min(72vh,820px)}

/* Agenda */
.hub-ui #calendar .calendar-agenda{display:grid;gap:12px}
.hub-ui #calendar .calendar-agenda-day{border:1px solid var(--vb-border);border-radius:var(--vb-radius-lg);background:var(--vb-surface);overflow:hidden;box-shadow:none}
.hub-ui #calendar .calendar-agenda-day h3{position:sticky;top:60px;margin:0;padding:10px 14px;background:var(--vb-surface-2);border-bottom:1px solid var(--vb-border);font:600 var(--vb-text-md)/1.2 var(--hx-font);color:var(--vb-text)}
.hub-ui #calendar .calendar-agenda-row{width:100%;border:0;border-bottom:1px solid var(--vb-border);border-radius:0;background:var(--vb-surface);color:var(--vb-text);text-align:left;min-height:52px;transition:background-color var(--vb-dur-fast) var(--vb-ease-out)}
.hub-ui #calendar .calendar-agenda-row:last-child{border-bottom:0}
.hub-ui #calendar .calendar-agenda-row:hover{background:var(--vb-surface-2)}
.hub-ui #calendar .calendar-agenda-row time{color:var(--vb-text-muted);font:500 var(--vb-text-sm)/1.3 var(--hx-font);font-variant-numeric:tabular-nums}
.hub-ui #calendar .calendar-agenda-row b{font-weight:600}
.hub-ui #calendar .calendar-agenda-row small{color:var(--vb-text-muted)}
.hub-ui #calendar .calendar-agenda:empty::before{content:"Keine Termine in diesem Zeitraum.";display:block;padding:32px 16px;text-align:center;color:var(--vb-text-muted);border:1px dashed var(--vb-border-strong);border-radius:var(--vb-radius-lg)}

@media (max-width:720px){
  .hub-ui #calendar .calendar-toolbar{gap:8px}
  .hub-ui #calendar .calendar-views{width:100%;display:grid;grid-template-columns:repeat(4,1fr)}
  .hub-ui #calendar .calendar-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .hub-ui #calendar .calendar-actions #calendarNewBtn{grid-column:1/-1}
  .hub-ui #calendar .calendar-month .calendar-day{padding:3px 2px}
  .hub-ui #calendar .calendar-month .calendar-weekdays b{padding:6px 4px;text-align:center}
  .hub-ui #calendar .calendar-month .calendar-day-number{min-width:22px;height:22px;padding:0 4px;font-size:12px}
  .hub-ui #calendar .calendar-chip{padding:2px 3px;font-size:10.5px;line-height:13px;border-left-width:2px}
  .hub-ui #calendar .calendar-agenda-day h3{top:56px}
}
.hub-ui #calendar .calendar-timegrid-host{display:block;grid-template-columns:none;gap:0}

/* =====================================================================
   BENUTZERVERWALTUNG (Personen › Gruppen & Zugänge)
   Muster: Tabler „table“/„datatables“ (Suche, Filter, sortierbare Kopfzeilen) und „avatar“ (Avatar-Zelle),
   Flowbite „Table“ (Aktionsspalte); mobil als Karten. Eigene Umsetzung, keine Tabellenbibliothek.
   ===================================================================== */
.hub-ui #peopleAccessPanel .hx-access-grid{display:grid;grid-template-columns:1fr;gap:16px}
.hub-ui #peopleAccessPanel .hx-access-users{order:-1}
.hub-ui #peopleAccessPanel .card{padding:0;overflow:hidden}
.hub-ui #peopleAccessPanel .card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--vb-border);margin:0}
.hub-ui #peopleAccessPanel .card-head h3{margin:0;font:600 var(--vb-text-lg)/1.3 var(--hx-font)}
.hub-ui #peopleAccessPanel #groupsList{padding:4px 20px 12px}
.hub-ui .hx-table-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 180px 180px;gap:8px;padding:16px 20px 8px}
.hub-ui .hx-table-toolbar label{display:block;margin:0}
.hub-ui .hx-search{position:relative}
.hub-ui .hx-search .hx-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--vb-text-subtle);pointer-events:none}
.hub-ui .hx-search input{padding-left:38px}
.hub-ui .hx-table-summary{margin:0;padding:0 20px 8px;color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui .hx-table-wrap{overflow-x:auto;border-top:1px solid var(--vb-border)}
.hub-ui .hx-table{width:100%;border-collapse:collapse}
.hub-ui .hx-table th{position:sticky;top:0;z-index:1;padding:8px 20px;background:var(--vb-surface-2);border-bottom:1px solid var(--vb-border);color:var(--vb-text-subtle);font:600 var(--vb-text-xs)/1.3 var(--hx-font);text-align:left;white-space:nowrap}
.hub-ui .hx-table td{padding:12px 20px;border-bottom:1px solid var(--vb-border);vertical-align:middle;color:var(--vb-text);font-size:var(--vb-text-md)}
.hub-ui .hx-table tbody tr{transition:background-color var(--vb-dur-fast) var(--vb-ease-out)}
.hub-ui .hx-table tbody tr:hover{background:var(--vb-surface-2)}
.hub-ui .hx-table tbody tr:last-child td{border-bottom:0}
.hub-ui .hx-sort{display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:0 4px;margin-left:-4px;border:0;border-radius:var(--vb-radius-sm);background:none;color:inherit;font:inherit;cursor:pointer}
.hub-ui .hx-sort .hx-icon{width:14px;height:14px;opacity:.35}
.hub-ui .hx-sort.is-active{color:var(--vb-text)}
.hub-ui .hx-sort.is-active .hx-icon{opacity:1;color:var(--vb-accent)}
.hub-ui .hx-sort:hover{background:var(--vb-surface-sunken)}
.hub-ui .hx-user-cell{display:flex;align-items:center;gap:12px;min-width:0}
.hub-ui .hx-user-cell>span:last-child{display:grid;min-width:0}
.hub-ui .hx-user-cell b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-ui .hx-user-cell small{color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui .hx-avatar{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:var(--vb-radius-md);background:var(--vb-accent-soft);color:var(--vb-accent-text);font:600 var(--vb-text-sm)/1 var(--hx-font)}
.hub-ui .hx-role{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:var(--vb-radius-sm);background:var(--vb-surface-sunken);color:var(--vb-text);font:600 var(--vb-text-xs)/1 var(--hx-font)}
.hub-ui .hx-role-admin{background:var(--vb-accent);color:var(--vb-accent-fg)}
.hub-ui .hx-role-bjl{background:var(--vb-accent-soft-strong);color:var(--vb-accent-text)}
.hub-ui .hx-role-ljv{background:var(--vb-info-soft);color:var(--vb-info)}
.hub-ui .hx-badges{display:flex;flex-wrap:wrap;gap:4px}
.hub-ui .hx-cell-actions{text-align:right;white-space:nowrap}
.hub-ui .hx-cell-actions .user-edit{min-height:36px}
.hub-ui .hx-empty-state{display:grid;justify-items:center;gap:6px;padding:32px 16px;text-align:center;color:var(--vb-text-muted)}
.hub-ui .hx-empty-state b{color:var(--vb-text);font-weight:600}
@media (max-width:720px){
  .hub-ui .hx-table-toolbar{grid-template-columns:1fr 1fr;padding:12px}
  .hub-ui .hx-table-toolbar .hx-search{grid-column:1/-1}
  .hub-ui .hx-table-summary{padding:0 12px 8px}
  .hub-ui .hx-user-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .hub-ui .hx-user-table,.hub-ui .hx-user-table tbody{display:block}
  .hub-ui .hx-user-table tr{display:grid;grid-template-columns:1fr auto;gap:6px 12px;padding:12px;border-bottom:1px solid var(--vb-border)}
  .hub-ui .hx-user-table td{display:block;padding:0;border:0}
  .hub-ui .hx-user-table td[data-label="Name"]{grid-column:1/2}
  .hub-ui .hx-user-table td.hx-cell-actions{grid-column:2;grid-row:1}
  .hub-ui .hx-user-table td[data-label="Rolle"],.hub-ui .hx-user-table td[data-label="Status"],.hub-ui .hx-user-table td[data-label="Rechte"]{grid-column:1/-1;font-size:var(--vb-text-sm)}
  .hub-ui .hx-user-table td[data-label="Rechte"]::before{content:"Rechte: ";color:var(--vb-text-subtle)}
  .hub-ui .hx-cell-actions .user-edit span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .hub-ui #peopleAccessPanel .card-head{padding:12px}
  .hub-ui #peopleAccessPanel #groupsList{padding:4px 12px 8px}
}

/* =====================================================================
   CLOUD (Dateimanager)
   Muster: Tabler „file list“/Dokumentenliste und Flowbite „Table“ mit Aktionsspalte und Dropdown;
   Dateityp-Symbole aus @tabler/icons (MIT). Echter Upload-Fortschritt (XMLHttpRequest) in app.js.
   ===================================================================== */
.hub-ui #cloud{--file-pdf:#c22f2b;--file-doc:#2a66b8;--file-xls:#17734a;--file-ppt:#b4520a;--file-img:#7b3fb3;--file-other:var(--vb-text-muted)}
.hub-ui[data-scheme="dark"] #cloud{--file-pdf:#f0716c;--file-doc:#7aa8ec;--file-xls:#4cc38a;--file-ppt:#f0a35e;--file-img:#c39af0}
.hub-ui #cloud .section-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.hub-ui #cloud .section-actions>div:last-child{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.hub-ui #cloud .breadcrumb{display:flex;flex-wrap:wrap;align-items:center;gap:2px;font:500 var(--vb-text-lg)/1.3 var(--hx-font);color:var(--vb-text-muted)}
.hub-ui #cloud .breadcrumb button{min-height:36px;padding:0 6px;border:0;border-radius:var(--vb-radius-sm);background:none;color:var(--vb-text-muted);font:inherit;cursor:pointer}
.hub-ui #cloud .breadcrumb button:hover{background:var(--vb-surface-sunken);color:var(--vb-text)}
.hub-ui #cloud .breadcrumb button[aria-current="location"]{color:var(--vb-text);font-weight:600}
.hub-ui #cloud .cloud-crumb-sep{display:inline-grid;place-items:center;color:var(--vb-text-subtle)}
.hub-ui #cloud .cloud-crumb-sep .hx-icon{width:16px;height:16px}
.hub-ui #cloud .cloud-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin:0 0 12px;color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui #cloud .cloud-hint{display:inline-flex;align-items:center;gap:6px;color:var(--vb-text-muted)}
.hub-ui #cloud .cloud-hint .hx-icon{width:16px;height:16px}
.hub-ui #cloud .cloud-card{padding:0;overflow:hidden;border-radius:var(--vb-radius-lg)}
.hub-ui #cloud .cloud-table-head{background:var(--vb-surface-2);color:var(--vb-text-subtle);font:600 var(--vb-text-xs)/1.3 var(--hx-font);letter-spacing:normal;text-transform:none;border-bottom:1px solid var(--vb-border)}
.hub-ui #cloud .cloud-table-head,.hub-ui #cloud .cloud-row{grid-template-columns:minmax(0,1fr) 110px 90px auto}
.hub-ui #cloud .cloud-row{border-top:0;border-bottom:1px solid var(--vb-border);background:var(--vb-surface)}
.hub-ui #cloud .cloud-row:last-child{border-bottom:0}
.hub-ui #cloud .cloud-row:hover{background:var(--vb-surface-2)}
.hub-ui #cloud .cloud-name{display:flex;align-items:center;gap:12px;min-width:0}
.hub-ui #cloud .cloud-name b{font-weight:600;color:var(--vb-text)}
.hub-ui #cloud .cloud-icon{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:var(--vb-radius-md);background:var(--vb-surface-sunken);color:var(--file-other);font-size:0}
.hub-ui #cloud .cloud-icon .hx-icon{width:20px;height:20px}
.hub-ui #cloud .cloud-icon-folder{background:var(--vb-accent-soft);color:var(--vb-accent)}
.hub-ui #cloud .cloud-icon-doc,.hub-ui #cloud .cloud-kind-docx{color:var(--file-doc);background:color-mix(in srgb,var(--file-doc) 12%,transparent)}
.hub-ui #cloud .cloud-icon-sheet,.hub-ui #cloud .cloud-kind-xlsx,.hub-ui #cloud .cloud-kind-csv{color:var(--file-xls);background:color-mix(in srgb,var(--file-xls) 12%,transparent)}
.hub-ui #cloud .cloud-kind-pdf{color:var(--file-pdf);background:color-mix(in srgb,var(--file-pdf) 12%,transparent)}
.hub-ui #cloud .cloud-kind-pptx{color:var(--file-ppt);background:color-mix(in srgb,var(--file-ppt) 12%,transparent)}
.hub-ui #cloud .cloud-kind-image,.hub-ui #cloud .cloud-kind-video{color:var(--file-img);background:color-mix(in srgb,var(--file-img) 12%,transparent)}
.hub-ui #cloud .cloud-item-meta{font-size:var(--vb-text-sm)}
.hub-ui #cloud .cloud-col-type,.hub-ui #cloud .cloud-col-size{color:var(--vb-text-muted);font-size:var(--vb-text-sm);font-variant-numeric:tabular-nums}
.hub-ui #cloud .cloud-actions-desktop{display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:4px}
.hub-ui #cloud .cloud-actions-desktop .icon-btn{min-width:36px;min-height:36px;padding:0 8px;border-color:transparent;background:transparent}
.hub-ui #cloud .cloud-actions-desktop .icon-btn:hover{background:var(--vb-surface-sunken);border-color:var(--vb-border)}
.hub-ui #cloud .cloud-actions-desktop .open-folder,.hub-ui #cloud .cloud-actions-desktop .open-hub-document,.hub-ui #cloud .cloud-actions-desktop .open-hub-sheet{border-color:var(--vb-border-strong);background:var(--vb-surface);color:var(--vb-text);padding:0 12px}
.hub-ui #cloud .cloud-empty{display:grid;justify-items:center;gap:6px;padding:40px 16px;border:0;border-radius:0;color:var(--vb-text-muted)}
.hub-ui #cloud .cloud-empty b{color:var(--vb-text);font-weight:600;margin:0}
/* Ablagefläche und Upload-Fortschritt */
.hub-ui #cloud .cloud-upload-drop{display:flex;flex-direction:column;align-items:center;gap:4px;margin-bottom:12px;padding:20px 16px;border:1.5px dashed var(--vb-border-strong);border-radius:var(--vb-radius-lg);background:var(--vb-surface);color:var(--vb-text-muted);text-align:center;cursor:pointer;transition:border-color var(--vb-dur-fast) var(--vb-ease-out),background-color var(--vb-dur-fast) var(--vb-ease-out)}
.hub-ui #cloud .cloud-upload-drop.hidden{display:none}
.hub-ui #cloud .cloud-upload-drop .hx-icon{width:28px;height:28px;color:var(--vb-accent)}
.hub-ui #cloud .cloud-upload-drop b{color:var(--vb-text);font-weight:600}
.hub-ui #cloud .cloud-upload-drop:hover,.hub-ui #cloud .cloud-upload-drop.drag-active{border-color:var(--vb-accent);background:var(--vb-accent-soft)}
.hub-ui #cloud .cloud-upload-drop:focus-visible{outline:var(--vb-focus-width) solid var(--vb-accent);outline-offset:2px}
.hub-ui #cloud .cloud-upload-status{margin-bottom:12px;padding:12px 16px;border:1px solid var(--vb-border);border-radius:var(--vb-radius-lg);background:var(--vb-surface)}
.hub-ui .cloud-upload-progress-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:var(--vb-text-sm);color:var(--vb-text-muted)}
.hub-ui .cloud-upload-progress-head b{color:var(--vb-text);font-weight:600}
.hub-ui .cloud-upload-bar{position:relative;height:6px;border-radius:var(--vb-radius-full);background:var(--vb-surface-sunken);overflow:hidden}
/* Fortschritt über scaleX (keine Layout-Animation) */
.hub-ui .cloud-upload-bar span{position:absolute;inset:0;border-radius:inherit;background:var(--vb-accent);transform:scaleX(var(--p,0));transform-origin:left center;transition:transform var(--vb-dur-base) var(--vb-ease-out)}
.hub-ui .cloud-upload-progress.is-processing .cloud-upload-bar span{right:auto;width:35%;transform:none;animation:hx-indeterminate 1.2s var(--vb-ease-inout) infinite}
@keyframes hx-indeterminate{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}
.hub-ui .cloud-upload-result{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:var(--vb-text-sm);color:var(--vb-text)}
.hub-ui .cloud-upload-result b{display:grid;place-items:center}
.hub-ui .cloud-upload-result.ok b{color:var(--vb-success)}
.hub-ui .cloud-upload-result.bad b{color:var(--vb-danger)}
/* Menüs „Mehr“ in Dialogen */
.hub-ui .cloud-more-menu{gap:6px}
.hub-ui .cloud-more-menu>button,.hub-ui .cloud-more-menu>a{justify-content:flex-start;text-align:left}
@media (max-width:720px){
  .hub-ui #cloud .cloud-row.cloud-item-card{border:0!important;border-bottom:1px solid var(--vb-border)!important;border-radius:0!important;box-shadow:none!important;background:var(--vb-surface)!important;padding:12px!important}
  .hub-ui #cloud .cloud-actions-mobile{border-top:0;padding-top:0}
  .hub-ui #cloud .cloud-actions-mobile>*{min-height:44px}
  .hub-ui #cloud .breadcrumb{font-size:var(--vb-text-md)}
}

/* =====================================================================
   AUFGABEN – Ergänzungen (Detail und Liste folgen der Grundlage)
   ===================================================================== */
@media (min-width:721px){.hub-ui #tasks .task-new-fab{display:none!important}}
.hub-ui #tasks .task-new-fab:not(.hidden){border-radius:var(--vb-radius-lg);width:56px;height:56px;box-shadow:var(--vb-shadow-lg)}
@media (prefers-reduced-motion:reduce){.hub-ui .cloud-upload-progress.is-processing .cloud-upload-bar span{animation:none;width:100%;transform:none;opacity:.5}}

/* ---------- Korrekturen nach Sichtprüfung (Runde 3) ---------- */
/* Zeitraster: Kopf und Ganztagszeile reservieren denselben Scrollleisten-Platz wie das Raster (Spalten fluchten) */
.hub-ui #calendar .calendar-tg-header,.hub-ui #calendar .calendar-tg-allday{overflow-y:hidden;scrollbar-gutter:stable}
/* Cloud: feste Aktionsspalte, damit Typ und Größe über alle Zeilen fluchten */
@media (min-width:721px){.hub-ui #cloud .cloud-table-head,.hub-ui #cloud .cloud-row{grid-template-columns:minmax(0,1fr) 100px 80px 288px}}
/* Telefon: Kopfleiste kompakter, Personen-Tabs ohne Abschneiden, Benutzerkarten mit Rolle und Status in einer Zeile */
@media (max-width:720px){
  .hub-ui .hx-bar{gap:8px;padding-right:12px}
  .hub-ui .hx-bar .top-actions{gap:6px}
  .hub-ui .hx-bar .top-actions>button,.hub-ui .hx-bar .top-actions .profile-pill{min-width:40px;height:40px;min-height:40px}
  .hub-ui .hx-bar .top-actions #globalAddBtn{padding:0 12px}
  .hub-ui .hx-brand-logo{height:18px}
  .hub-ui .segmented button{padding:0 10px;font-size:var(--vb-text-sm)}
  .hub-ui .hx-user-table tr{grid-template-columns:auto 1fr auto}
  .hub-ui .hx-user-table td[data-label="Name"]{grid-column:1/3}
  .hub-ui .hx-user-table td.hx-cell-actions{grid-column:3;grid-row:1}
  .hub-ui .hx-user-table td[data-label="Rolle"]{grid-column:1;grid-row:2}
  .hub-ui .hx-user-table td[data-label="Status"]{grid-column:2/4;grid-row:2}
  .hub-ui .hx-user-table td[data-label="Rechte"]{grid-column:1/-1;grid-row:3}
}

/* Login und Start: neues Logo statt Buchstaben-Marke */
.hub-ui .hx-login-brand{display:flex;justify-content:center;margin:0 auto 16px}
.hub-ui .hx-login-logo{display:block;height:56px;width:auto}
.hub-ui .hx-login-brand .hx-brand-dark{display:none}
.hub-ui[data-scheme="dark"] .hx-login-brand .hx-brand-light{display:none}
.hub-ui[data-scheme="dark"] .hx-login-brand .hx-brand-dark{display:block}
.hub-ui .login-card{border:1px solid var(--vb-border);border-radius:var(--vb-radius-lg);box-shadow:var(--vb-shadow-md);background:var(--vb-surface)}
.hub-ui .login-card h1{font:600 var(--vb-text-3xl)/1.15 var(--hx-font);letter-spacing:-.015em}
.hub-ui .login-card .eyebrow{color:var(--vb-text-muted)}

/* Mail: Kopfbereich ruhig statt vollflächig Magenta (Designregel: Magenta nie großflächig) */
.hub-ui #mail .mail-hero{background:var(--vb-surface);color:var(--vb-text);border:1px solid var(--vb-border);border-left:3px solid var(--vb-accent);border-radius:var(--vb-radius-lg);box-shadow:none}
.hub-ui #mail .mail-hero span{color:var(--vb-accent-text);font:600 var(--vb-text-xs)/1.3 var(--hx-font);letter-spacing:normal;text-transform:none}
.hub-ui #mail .mail-hero h2{color:var(--vb-text);font-weight:600}
.hub-ui #mail .mail-hero p{color:var(--vb-text-muted)}

/* Kalender Monat am Telefon: kompakte Zellen */
@media (max-width:720px){
  /* Einheitliche Zellhöhe (ruhiges Raster). Phase 5: 104 px reichten bei 320 px nicht für zwei zweizeilige
     Chips plus „+N“ (gemessen mit scripts/check-calendar-release-ux.mjs) – daher 132 px. */
  .hub-ui #calendar .calendar-month .calendar-day{height:132px;min-height:0;overflow:hidden}
  .hub-ui #calendar .calendar-month .calendar-blank{height:132px}
  .hub-ui #calendar .calendar-month .calendar-more{padding:2px 3px;white-space:nowrap}
}

/* Hub-Suche: Ergebnistitel in Textfarbe, Akzent nur für Fokus/Hover (Altregeln setzen Farben mit !important) */
.hub-ui .hub-search-result{border-radius:var(--vb-radius-md)}
.hub-ui .hub-search-result .hub-search-copy b{color:var(--vb-text)!important;font-weight:600}
.hub-ui .hub-search-result>span:last-child{color:var(--vb-text-subtle)!important;font-weight:400}
.hub-ui .hub-search-result:hover,.hub-ui .hub-search-result:focus{border-color:var(--vb-accent-soft-strong)!important;background:var(--vb-accent-soft)!important}
.hub-ui .hub-search-result:hover .hub-search-copy b,.hub-ui .hub-search-result:focus .hub-search-copy b{color:var(--vb-accent-text)!important}
.hub-ui .hub-search-type{color:var(--vb-accent)}

/* =====================================================================
   KORREKTUREN NACH UNABHÄNGIGEM DESIGN-REVIEW (Phase 4)
   ===================================================================== */
/* Agenda: fixierte Tagesköpfe innerhalb einer Karte mit overflow:hidden überlagerten die eigene Zeile */
.hub-ui #calendar .calendar-agenda-day h3{position:static}
/* Mobile Tab-Leiste: deckend statt durchscheinend (Lesbarkeit beim Scrollen) */
@media (max-width:720px){.hub-ui .mobile-nav{background:var(--vb-surface);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:0 -1px 0 var(--vb-border)}}
/* Kontextzeilen über Titeln: ruhig und neutral statt Akzent */
.hub-ui .eyebrow:where(:not(:is(#hubDocumentEditor,#hubSheetEditor,.pdf-canvas-viewer) *)){color:var(--vb-text-muted);font-weight:500}
.hub-ui .info-banner{color:var(--vb-text)}
.hub-ui .info-banner b,.hub-ui .info-banner h3,.hub-ui .info-banner strong{color:var(--vb-text)}
/* Rollen-Badges: ein neutrales Schema, Admin nur betont */
.hub-ui .hx-role,.hub-ui .hx-role-bjl,.hub-ui .hx-role-ljv{background:var(--vb-surface-sunken);color:var(--vb-text)}
.hub-ui .hx-role-admin{background:var(--vb-surface-sunken);color:var(--vb-text);box-shadow:inset 0 0 0 1px var(--vb-border-strong)}
/* Mail-Kopf ohne Akzentstreifen */
.hub-ui #mail .mail-hero{border-left:1px solid var(--vb-border)}
/* Native Auswahlfelder (WebKit/iOS): einheitlich mit Textfeldern, Tabler-Chevron als Hintergrund (data:-URI, CSP img-src erlaubt data:) */
.hub-ui select:not([multiple]):where(:not(:is(#hubDocumentEditor,#hubSheetEditor,.pdf-canvas-viewer) *)){-webkit-appearance:none;appearance:none;padding-right:36px;background-color:var(--vb-surface);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7a83' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;background-size:16px}
.hub-ui[data-scheme="dark"] select:not([multiple]):where(:not(:is(#hubDocumentEditor,#hubSheetEditor,.pdf-canvas-viewer) *)){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aeaab6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E")}
.hub-ui input[type="date"],.hub-ui input[type="datetime-local"],.hub-ui input[type="time"]{min-height:40px;display:block}
/* Dateiauswahl: Schaltfläche im Stil der sekundären Buttons */
.hub-ui input[type="file"]:where(:not(:is(#hubDocumentEditor,#hubSheetEditor,.pdf-canvas-viewer) *)){font:400 var(--vb-text-sm)/1.4 var(--hx-font);color:var(--vb-text-muted);max-width:100%}
.hub-ui input[type="file"]::file-selector-button{margin-right:10px;min-height:36px;padding:0 12px;border:1px solid var(--vb-border-strong);border-radius:var(--vb-radius-md);background:var(--vb-surface);color:var(--vb-text);font:500 var(--vb-text-sm)/1 var(--hx-font);cursor:pointer}
.hub-ui input[type="file"]::file-selector-button:hover{background:var(--vb-surface-sunken)}
/* Hover nur bei echtem Zeiger: verhindert „hängen gebliebene“ gefüllte Knöpfe nach dem Antippen auf dem iPhone */
@media (hover:none){
  .hub-ui :is(button.secondary,a.secondary,.white-btn):hover{background:var(--vb-surface)}
  .hub-ui :is(.icon-btn):hover{background:var(--vb-surface)}
}
/* Nullwerte neutral statt Alarmrot (Status bleibt über Symbol und Text lesbar) */
.hub-ui .event-response-no.is-zero{background:var(--vb-surface-sunken)!important;color:var(--vb-text-muted)!important}
.hub-ui .event-response-yes .hx-icon,.hub-ui .event-response-no .hx-icon,.hub-ui .badge .hx-icon{width:14px;height:14px;margin-right:2px}
/* Kalender: Woche am Telefon untereinander, Monatschips brechen lange Wörter ohne Wörterbuch um, kompakte Werkzeugleiste */
@media (max-width:720px){
  .hub-ui #calendar .calendar-week:not(.calendar-timegrid-host){grid-template-columns:1fr;overflow:visible}
  .hub-ui #calendar .calendar-month .calendar-chip span{overflow-wrap:anywhere;word-break:normal;-webkit-hyphens:manual;hyphens:manual}
  .hub-ui #calendar .calendar-actions{grid-template-columns:1fr 1.4fr 1fr}
  .hub-ui #calendar .calendar-actions #calendarNewBtn{grid-column:auto}
  .hub-ui #calendar .calendar-actions button{padding:0 8px;font-size:var(--vb-text-sm)}
}
/* Termin-Detail: Kalender-Export als kompakte Zeile statt gestapelter Vollbreiten-Knöpfe */
.hub-ui .event-calendar-links{display:flex;flex-wrap:wrap;gap:6px}
.hub-ui .event-calendar-links .button-link{min-height:36px;padding:0 10px;font-size:var(--vb-text-sm);width:auto;flex:0 0 auto}
/* Mobile Listen: Zeile mit kompakter Aktion statt Vollbreiten-Knöpfen */
@media (max-width:720px){
  .hub-ui #cloud .cloud-actions-mobile{display:flex!important;justify-content:flex-end;gap:8px}
  .hub-ui #cloud .cloud-actions-mobile>*{width:auto!important;flex:0 0 auto;padding:0 14px}
  .hub-ui #events .event-list-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .hub-ui #cloud .breadcrumb{justify-content:flex-start}
  .hub-ui .task-mobile-detail-head>span{display:none}
  .hub-ui .modal-actions{display:flex;flex-wrap:wrap}
  .hub-ui .modal-actions>button,.hub-ui .modal-actions>a{flex:1 1 140px}
}
/* Schwebender Chat-Knopf am Desktop doppelt zur Chat-Schaltfläche in der Kopfleiste */
@media (min-width:721px){.hub-ui #chatLauncher{display:none!important}}

/* Monat: kein Spalt zwischen Wochentagszeile und Raster (alte Grid-Lücke), nur Haarlinie */
.hub-ui #calendar .calendar-grid.calendar-month{gap:1px;row-gap:1px}

/* =====================================================================
   PHASE 5 - Profil, Einstellungen, System & Integrationen, Über den Hub
   Muster: Tabler SettingsLayout (Karte mit gruppierter Bereichsnavigation
   links, Inhalt rechts), Flowbite-Admin-Einstellungszeilen (Beschriftung +
   Wert/Steuerung), Radiokarten für die Darstellung (Tabler form-imagecheck, Web Awesome radio).
   ===================================================================== */
.hub-ui .hx-page{display:grid;gap:var(--vb-space-4);max-width:1080px}
.hub-ui .hx-panel{padding:var(--vb-space-5);min-width:0}
.hub-ui .hx-panel h2,.hub-ui .hx-panel h3,.hub-ui .hx-settings-section h2,.hub-ui .hx-settings-section h3{margin:0 0 var(--vb-space-1);color:var(--vb-text);font-weight:600;letter-spacing:0}
.hub-ui .hx-panel h3{font-size:var(--vb-text-md)}
.hub-ui .hx-panel-intro{margin:0 0 var(--vb-space-4);color:var(--vb-text-muted);font-size:var(--vb-text-sm);line-height:1.5;max-width:62ch}
.hub-ui .hx-panel-note{margin:var(--vb-space-3) 0 0;color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui .hx-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--vb-space-3);margin-top:var(--vb-space-4)}
.hub-ui .hx-form-status{margin-right:auto;color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui .hx-form-actions .hx-icon,.hub-ui .hx-profile-photo .hx-icon,.hub-ui .hx-system-intro>button .hx-icon{width:18px;height:18px;margin-right:6px}
.hub-ui :is(.hx-panel,.hx-settings-section) h2[tabindex="-1"]:focus{outline:none}
.hub-ui :is(.hx-panel,.hx-settings-section) h2[tabindex="-1"]:focus-visible{outline:var(--vb-focus-width,2px) solid var(--vb-focus);outline-offset:4px;border-radius:var(--vb-radius-xs)}

/* Profil */
.hub-ui .hx-profile-head{display:flex;align-items:center;gap:var(--vb-space-5);padding:var(--vb-space-5)}
.hub-ui .hx-profile-head .hx-profile-avatar{width:88px;height:88px;flex:0 0 88px;font-size:28px}
.hub-ui .hx-profile-ident{min-width:0}
.hub-ui .hx-profile-ident h2{margin:0;font-size:var(--vb-text-xl);font-weight:600;color:var(--vb-text);overflow-wrap:anywhere}
.hub-ui .hx-profile-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:6px 0 var(--vb-space-3);color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui .hx-profile-photo{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
.hub-ui .hx-profile-photo-hint{color:var(--vb-text-muted);font-size:var(--vb-text-xs)}
.hub-ui .hx-profile-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:var(--vb-space-4);align-items:start}
.hub-ui .hx-profile-side{display:grid;gap:var(--vb-space-4);min-width:0}
.hub-ui .hx-profile-grid .profile-form-grid{margin:0}
.hub-ui .hx-dl{display:grid;gap:0;margin:var(--vb-space-2) 0 0}
.hub-ui .hx-dl>div{display:flex;justify-content:space-between;gap:var(--vb-space-3);padding:10px 0;border-top:1px solid var(--vb-border)}
.hub-ui .hx-dl>div:first-child{border-top:0}
.hub-ui .hx-dl dt{color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui .hx-dl dd{margin:0;color:var(--vb-text);font-weight:500;text-align:right;overflow-wrap:anywhere}
.hub-ui .hx-link-panel{padding:var(--vb-space-2)}
.hub-ui .hx-link-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:8px 12px;border:0;border-radius:var(--vb-radius-md);background:transparent;color:var(--vb-text);text-align:left;font:inherit;cursor:pointer}
.hub-ui .hx-link-row:hover{background:var(--vb-surface-sunken)}
.hub-ui .hx-link-row>span:not(.hx-status){display:grid;gap:2px;flex:1;min-width:0}
.hub-ui .hx-link-row b{font-weight:500}
.hub-ui .hx-link-row small{color:var(--vb-text-muted);font-size:var(--vb-text-xs)}
.hub-ui .hx-link-row>.hx-icon{width:20px;height:20px;flex:0 0 auto;color:var(--vb-text-muted)}

/* Einstellungen: Tabler SettingsLayout */
.hub-ui .hx-settings{display:grid;grid-template-columns:240px minmax(0,1fr);padding:0;overflow:hidden}
.hub-ui .hx-settings-nav{display:flex;flex-direction:column;gap:2px;padding:var(--vb-space-4) var(--vb-space-3);border-right:1px solid var(--vb-border);background:var(--vb-surface)}
.hub-ui .hx-settings-group{margin:var(--vb-space-3) 10px 6px;color:var(--vb-text-muted);font-size:var(--vb-text-xs);font-weight:500}
.hub-ui .hx-settings-group:first-child{margin-top:0}
.hub-ui .hx-settings .hx-settings-nav :is(a,button){display:flex;align-items:center;gap:10px;min-height:40px;padding:0 10px;border:0;border-radius:var(--vb-radius-md);background:transparent;color:var(--vb-text);font:500 var(--vb-text-sm)/1.2 var(--hx-font,inherit);text-decoration:none;text-align:left;cursor:pointer}
.hub-ui .hx-settings-nav :is(a,button) .hx-icon{width:18px;height:18px;color:var(--vb-text-muted);flex:0 0 auto}
.hub-ui .hx-settings-nav :is(a,button):hover{background:var(--vb-surface-sunken)}
.hub-ui .hx-settings .hx-settings-nav a[aria-current="true"]{background:var(--vb-surface-sunken);color:var(--vb-text);box-shadow:inset 3px 0 0 var(--vb-accent)}
.hub-ui .hx-settings-nav a[aria-current="true"] .hx-icon{color:var(--vb-accent-text)}
.hub-ui .hx-settings-body{min-width:0}
.hub-ui .hx-settings-section{padding:var(--vb-space-6);border-top:1px solid var(--vb-border);scroll-margin-top:calc(var(--vb-topbar-h,64px) + 16px)}
.hub-ui .hx-settings-section:first-child{border-top:0}
.hub-ui .hx-settings-section h2{font-size:var(--vb-text-lg)}
.hub-ui .hx-settings-section h3{margin-top:var(--vb-space-6);font-size:var(--vb-text-md)}
.hub-ui .hx-setting-list{display:grid;border:1px solid var(--vb-border);border-radius:var(--vb-radius-md);background:var(--vb-surface)}
.hub-ui .hx-setting-list>.hx-panel-note{margin:0;padding:12px 14px}
.hub-ui .hx-setting-row{display:flex;align-items:center;justify-content:space-between;gap:var(--vb-space-4);padding:12px 14px;border-top:1px solid var(--vb-border)}
.hub-ui .hx-setting-row:first-child{border-top:0}
.hub-ui .hx-setting-text{min-width:0}
.hub-ui .hx-setting-label{color:var(--vb-text);font-size:var(--vb-text-sm);font-weight:500}
.hub-ui .hx-setting-hint{margin:2px 0 0;color:var(--vb-text-muted);font-size:var(--vb-text-xs);line-height:1.45;max-width:52ch}
.hub-ui .hx-setting-value{flex:0 1 auto;color:var(--vb-text);font-size:var(--vb-text-sm);text-align:right;overflow-wrap:anywhere}

/* Darstellung als Radiokarten */
.hub-ui .hx-theme-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--vb-space-3);margin:0;padding:0;border:0;min-width:0}
.hub-ui .hx-theme-card{position:relative;display:grid;gap:10px;padding:10px;border:1px solid var(--vb-border-strong);border-radius:var(--vb-radius-lg);background:var(--vb-surface);cursor:pointer}
.hub-ui .hx-theme-card input{position:absolute;opacity:0;pointer-events:none}
.hub-ui .hx-theme-card:has(input:checked){border-color:var(--vb-accent);box-shadow:0 0 0 1px var(--vb-accent)}
.hub-ui .hx-theme-card:has(input:focus-visible){outline:var(--vb-focus-width,2px) solid var(--vb-focus);outline-offset:2px}
.hub-ui .hx-theme-text{display:grid;gap:2px;padding:0 2px 2px}
.hub-ui .hx-theme-text b{font-weight:500;color:var(--vb-text);font-size:var(--vb-text-sm)}
.hub-ui .hx-theme-text small{color:var(--vb-text-muted);font-size:var(--vb-text-xs);line-height:1.4}
.hub-ui .hx-theme-preview{display:grid;grid-template-columns:28% 1fr;grid-template-rows:12px 1fr;gap:5px;height:72px;padding:7px;border-radius:var(--vb-radius-md);background:#f6f5f8;border:1px solid #e4e1e8}
.hub-ui .hx-theme-preview i{display:block;border-radius:3px;background:#ffffff;border:1px solid #e4e1e8}
.hub-ui .hx-theme-preview i:first-child{grid-column:1/-1;background:#ffffff}
.hub-ui .hx-theme-preview i:nth-child(2){background:#c3006b;border-color:#c3006b;opacity:.85}
.hub-ui .hx-theme-preview-dark{background:#131116;border-color:#2b2731}
.hub-ui .hx-theme-preview-dark i{background:#1d1a22;border-color:#2b2731}
.hub-ui .hx-theme-preview-dark i:first-child{background:#1d1a22}
.hub-ui .hx-theme-preview-auto{background:linear-gradient(135deg,#f6f5f8 50%,#131116 50%);border-color:#c9c4d0}
.hub-ui .hx-theme-preview-auto i{background:rgba(255,255,255,.7);border-color:rgba(120,112,130,.35)}

/* Statuskennzeichen: eingebaut / konfiguriert / erreichbar / nicht geprüft */
.hub-ui .hx-status{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:0 9px;border-radius:var(--vb-radius-sm);font-size:var(--vb-text-xs);font-weight:500;line-height:1.2;white-space:nowrap}
.hub-ui .hx-status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 auto}
.hub-ui .hx-status-neutral{background:var(--vb-surface-sunken);color:var(--vb-text)}
.hub-ui .hx-status-neutral::before{background:var(--vb-text-muted)}
.hub-ui .hx-status-info{background:var(--vb-info-soft);color:var(--vb-text)}
.hub-ui .hx-status-info::before{background:var(--vb-info)}
.hub-ui .hx-status-ok{background:var(--vb-success-soft);color:var(--vb-text)}
.hub-ui .hx-status-ok::before{background:var(--vb-success)}
.hub-ui .hx-status-warn{background:var(--vb-warning-soft);color:var(--vb-text)}
.hub-ui .hx-status-warn::before{background:var(--vb-warning)}
.hub-ui .hx-status-danger{background:var(--vb-danger-soft);color:var(--vb-text)}
.hub-ui .hx-status-danger::before{background:var(--vb-danger)}
.hub-ui .hx-status-muted{background:transparent;color:var(--vb-text-muted);box-shadow:inset 0 0 0 1px var(--vb-border-strong)}
.hub-ui .hx-status-muted::before{background:transparent;box-shadow:inset 0 0 0 1.5px var(--vb-text-muted)}

/* System & Integrationen */
.hub-ui .hx-system-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--vb-space-3) var(--vb-space-4);align-items:start}
.hub-ui .hx-system-intro h2{font-size:var(--vb-text-lg)}
.hub-ui .hx-system-intro .hx-panel-intro{margin-bottom:0}
.hub-ui .hx-status-legend{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 20px;margin:0;padding:0;list-style:none;color:var(--vb-text-muted);font-size:var(--vb-text-xs)}
.hub-ui .hx-status-legend li{display:flex;align-items:center;gap:8px}
.hub-ui .hx-integrations{display:grid;margin-top:var(--vb-space-3);border:1px solid var(--vb-border);border-radius:var(--vb-radius-md)}
.hub-ui .hx-integration{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:var(--vb-space-3);align-items:start;padding:14px;border-top:1px solid var(--vb-border)}
.hub-ui .hx-integration:first-child{border-top:0}
.hub-ui .hx-integration-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:var(--vb-radius-md);background:var(--vb-surface-sunken);color:var(--vb-text-muted)}
.hub-ui .hx-integration-icon .hx-icon{width:20px;height:20px}
.hub-ui .hx-integration h4{margin:0;font-size:var(--vb-text-sm);font-weight:600;color:var(--vb-text)}
.hub-ui .hx-integration-main p{margin:2px 0 0;color:var(--vb-text-muted);font-size:var(--vb-text-sm);line-height:1.45}
.hub-ui .hx-integration-details{margin:8px 0 0;padding:0;list-style:none;display:grid;gap:3px;color:var(--vb-text);font-size:var(--vb-text-xs)}
.hub-ui .hx-integration-chips{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:330px}

/* Über den Hub */
.hub-ui .hx-about-hero{display:flex;align-items:center;gap:var(--vb-space-6);padding:var(--vb-space-6)}
.hub-ui .hx-about-logo{flex:0 0 auto}
.hub-ui .hx-about-logo img{width:150px;height:auto}
.hub-ui .hx-about-hero h2{margin:0;font-size:var(--vb-text-xl);font-weight:600;color:var(--vb-text)}
.hub-ui .hx-about-version{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:6px 0 var(--vb-space-3);color:var(--vb-text-muted);font-size:var(--vb-text-sm)}
.hub-ui .hx-about-hero .hx-panel-intro{margin:0}
.hub-ui .hx-about-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--vb-space-4);align-items:start}
.hub-ui .hx-release-list{display:grid;gap:2px;margin:0 -6px}
.hub-ui .hx-check-list,.hub-ui .hx-oss-list{display:grid;gap:10px;margin:var(--vb-space-2) 0 0;padding:0;list-style:none;font-size:var(--vb-text-sm);color:var(--vb-text)}
.hub-ui .hx-check-list li{display:flex;gap:10px;line-height:1.45}
.hub-ui .hx-check-list .hx-icon{width:18px;height:18px;flex:0 0 auto;margin-top:1px;color:var(--vb-success)}
.hub-ui .hx-oss-list{gap:0}
.hub-ui .hx-oss-list li{display:flex;justify-content:space-between;gap:var(--vb-space-3);padding:8px 0;border-top:1px solid var(--vb-border)}
.hub-ui .hx-oss-list li:first-child{border-top:0}
.hub-ui .hx-oss-list b{font-weight:500}
.hub-ui .hx-oss-list span{color:var(--vb-text-muted)}

/* Kontomenü: Symbole und Trennlinien */
.hub-ui .account-menu-panel{width:240px}
.hub-ui .account-menu-panel button{display:flex;align-items:center;gap:10px;text-align:left}
.hub-ui .account-menu-panel button>.hx-icon{width:18px;height:18px;flex:0 0 auto;color:var(--vb-text-muted)}
.hub-ui .account-menu-panel .hx-menu-sep{margin-top:5px;position:relative}
.hub-ui .account-menu-panel .hx-menu-sep::before{content:"";position:absolute;left:6px;right:6px;top:-3px;border-top:1px solid var(--vb-border)}
.hub-ui .account-menu-panel .release-badge{margin-left:auto}

/* Kalender: Export als Menü statt drei Knöpfe */
.hub-ui details.hx-export-menu.event-calendar-links{position:relative;display:inline-block}
.hub-ui .hx-export-menu>summary{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 12px;list-style:none;cursor:pointer;width:auto}
.hub-ui .hx-export-menu>summary::-webkit-details-marker{display:none}
.hub-ui .hx-export-menu>summary .hx-icon{width:18px;height:18px}
.hub-ui .hx-export-menu[open]>summary .hx-icon:last-child{transform:rotate(180deg)}
.hub-ui .hx-export-menu:not([open])>.hx-export-menu-panel{display:none}
.hub-ui .hx-export-menu-panel{position:absolute;z-index:var(--vb-z-dropdown,30);top:calc(100% + 6px);left:0;display:grid;gap:2px;min-width:260px;padding:6px;border:1px solid var(--vb-border);border-radius:var(--vb-radius-lg);background:var(--vb-surface);box-shadow:var(--vb-shadow-lg)}
.hub-ui .hx-export-menu .hx-export-menu-panel a{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:48px;padding:6px 10px;border-radius:var(--vb-radius-md);color:var(--vb-text);text-align:left;text-decoration:none;font-weight:400}
.hub-ui .hx-export-menu-panel a:hover,.hub-ui .hx-export-menu-panel a:focus-visible{background:var(--vb-surface-sunken)}
.hub-ui .hx-export-menu-panel a>span{display:grid;gap:1px}
.hub-ui .hx-export-menu .hx-export-menu-panel b{font-weight:500;font-size:var(--vb-text-sm);color:var(--vb-text)}
.hub-ui .hx-export-menu-panel small{color:var(--vb-text-muted);font-size:var(--vb-text-xs)}
.hub-ui .hx-export-menu-panel .hx-icon{width:18px;height:18px;color:var(--vb-text-muted);flex:0 0 auto}

/* Kalenderkacheln: lange Wörter ohne Silbentrennungswörterbuch zuverlässig umbrechen */
.hub-ui #calendar .calendar-chip span{overflow-wrap:anywhere;word-break:normal;-webkit-hyphens:manual;hyphens:manual}

/* Mobil: gestapelt, Bereichsnavigation als horizontale Leiste */
@media (max-width:900px){
  .hub-ui .hx-profile-grid,.hub-ui .hx-about-grid{grid-template-columns:1fr}
}
@media (max-width:720px){
  .hub-ui .hx-page{gap:var(--vb-space-3)}
  .hub-ui .hx-panel{padding:var(--vb-space-4)}
  .hub-ui .hx-profile-head{flex-direction:column;align-items:flex-start;gap:var(--vb-space-3);padding:var(--vb-space-4)}
  .hub-ui .hx-profile-head .hx-profile-avatar{width:72px;height:72px;flex-basis:72px}
  .hub-ui .hx-settings{grid-template-columns:1fr}
  .hub-ui .hx-settings-nav{flex-direction:row;gap:6px;padding:10px;border-right:0;border-bottom:1px solid var(--vb-border);overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .hub-ui .hx-settings-nav::-webkit-scrollbar{display:none}
  .hub-ui .hx-settings-group{display:none}
  .hub-ui .hx-settings-nav :is(a,button){flex:0 0 auto;min-height:40px;white-space:nowrap;border:1px solid var(--vb-border)}
  .hub-ui .hx-settings-nav a[aria-current="true"]{box-shadow:none;border-color:var(--vb-accent)}
  .hub-ui .hx-settings-section{padding:var(--vb-space-4)}
  .hub-ui .hx-theme-choice{grid-template-columns:1fr}
  .hub-ui .hx-theme-card{grid-template-columns:96px minmax(0,1fr);align-items:center}
  .hub-ui .hx-theme-preview{height:56px}
  .hub-ui .hx-setting-row{flex-direction:column;align-items:flex-start;gap:6px}
  .hub-ui .hx-setting-value{text-align:left}
  .hub-ui .hx-system-intro{grid-template-columns:1fr}
  .hub-ui .hx-integration{grid-template-columns:36px minmax(0,1fr)}
  .hub-ui .hx-integration-icon{width:36px;height:36px}
  .hub-ui .hx-integration-chips{grid-column:2;justify-content:flex-start;max-width:none}
  .hub-ui .hx-about-hero{flex-direction:column;align-items:flex-start;gap:var(--vb-space-4);padding:var(--vb-space-4)}
  .hub-ui .hx-about-logo img{width:120px}
  .hub-ui .hx-form-actions>button{flex:1 1 100%}
  .hub-ui .hx-form-status{flex:1 1 100%}
  .hub-ui details.hx-export-menu.event-calendar-links,.hub-ui .hx-export-menu>summary{width:100%;display:block}
  .hub-ui .hx-export-menu>summary{display:flex}
  .hub-ui .hx-export-menu>summary{justify-content:center}
  .hub-ui .hx-export-menu-panel{left:0;right:0;min-width:0}
}
/* Sehr schmale Telefone: sichtbar nur „+N“; Name bleibt über aria-label und Textinhalt vollständig */
@media (max-width:400px){.hub-ui #calendar .calendar-month .calendar-more-word{display:none}}
/* Phase-5-Abschluss: Auf schmalen Telefonen (320–389 px) ragte "+ Neu" aus der Kopfzeile (endete bei 373 px).
   Dort zeigt die Kopfzeile nur das Bildzeichen statt der Wortmarke; alle Aktionen bleiben vollständig sichtbar. */
@media (max-width:389px){
  .hub-ui .hx-brand .hx-brand-logo{display:none!important}
  .hub-ui .hx-brand .hx-brand-mark{display:block}
  /* Kontomenü an der rechten Kante der Aktionsleiste statt am (jetzt weiter links stehenden) Avatar ausrichten,
     sonst ragt das 240 px breite Menü links aus dem Bildschirm. */
  .hub-ui .top-actions{position:relative}
  .hub-ui .top-actions .account-menu{position:static}
  .hub-ui .account-menu-panel{right:0;width:min(240px,calc(100vw - 24px))}
}

/* Chat-Kopf auf schmalen Telefonen (≤ 360 px, z. B. iPhone SE/mini): Titel nur visuell ausgeblendet, Status nutzt die
   Breite, Schaltflächen behalten 44 px Tippfläche. Vorher lag „Schließen“ bei 320 px außerhalb des Bildschirms (x 336–380). */
@media (max-width:360px){
  .hub-ui .chat-head{padding-left:10px;padding-right:8px;gap:8px}
  /* Titel nur sichtbar ausblenden (Bildschirmleser lesen ihn weiter; das Fenster trägt zusätzlich aria-label) */
  .hub-ui .chat-head>div:first-child{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  .hub-ui .chat-head-actions{flex:1;min-width:0}
  .hub-ui .chat-head-actions .status-select-wrap{flex:1;min-width:0}
  .hub-ui .chat-head-actions select{max-width:none;width:100%;min-width:0}
}
