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

    :root {
      --bg:       #f4f5f7;
      --surface:  #ffffff;
      --nav:      #002454;
      --border:   #e1e4e8;
      --accent:   #1a56db;
      --text:     #1a1d23;
      --muted:    #6b7280;
      --light:    #f9fafb;
      --success:  #059669;
      --warning:  #d97706;
      --danger:   #dc2626;
      --info:     #2563eb;
      --radius:   8px;
      --sh:       0 1px 3px rgba(0,0,0,.08);
      --sh-md:    0 4px 12px rgba(0,0,0,.1);
    }

    body { background:var(--bg); color:var(--text); font-family:'Inter',sans-serif; font-size:14px; min-height:100vh; }

    /* ── Modul-Grid-System ── */
    .sar-module-grid {
      display:grid;
      grid-template-columns:repeat(12, 1fr);
      gap:16px;
      padding:0;
    }
    .sar-module { background:var(--surface); border-radius:var(--radius); box-shadow:var(--sh); overflow:hidden; display:flex; flex-direction:column; margin-bottom:16px; }
    .sar-module-grid > .sar-module { margin-bottom:0; }
    .sar-module-body { padding:16px 18px; flex:1; }
    .sar-module-body-wrap { flex:1; display:flex; flex-direction:column; }
    .sar-module-full    { grid-column: span 12; }
    .sar-module-half    { grid-column: span 6; }
    .sar-module-third   { grid-column: span 4; }
    .sar-module-quarter { grid-column: span 3; }
    @media (max-width:1100px) {
      .sar-module-quarter { grid-column: span 6; }
    }
    @media (max-width:900px) {
      .sar-module-half, .sar-module-third, .sar-module-quarter { grid-column: span 12; }
    }
    .sar-module-header {
      display:flex; align-items:center; justify-content:space-between;
      padding:14px 18px 10px; border-bottom:1px solid var(--border);
    }
    .sar-module-header-left { display:flex; align-items:center; gap:8px; }
    .sar-module-header-right { display:flex; align-items:center; gap:6px; }
    .sar-module-title { font-size:.92rem; font-weight:600; color:var(--text); margin:0; }
    .sar-module-subtitle { font-size:.75rem; color:var(--muted); }
    .sar-module-icon { font-size:1rem; }
    .sar-module-loading { display:flex; align-items:center; gap:8px; padding:20px; color:var(--muted); font-size:.85rem; }

    /* ── Modul-Collapse ── */
    .sar-module-collapse-arrow {
      display:inline-flex; align-items:center; justify-content:center;
      width:24px; height:24px; border-radius:4px;
      font-size:.85rem; color:var(--muted); cursor:pointer;
      transition: color .15s, background .15s;
      user-select:none; flex-shrink:0; margin-left:4px;
    }
    .sar-module-collapse-arrow:hover { color:var(--text); background:var(--light); }
    .sar-module-header { cursor:pointer; user-select:none; }
    .sar-module-collapsed .sar-module-body-wrap { display:none; }
    .sar-module-collapsed .sar-module-header { border-bottom:none; }

    /* ── Modul: KPI Grid ── */
    .kpi-grid-mod { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:12px; }
    .kpi-card-mod {
      background:var(--light); border-radius:8px; padding:14px 16px;
      display:flex; flex-direction:column; gap:4px;
    }
    .kpi-card-icon { font-size:1.1rem; }
    .kpi-card-value { font-size:1.6rem; font-weight:700; color:var(--text); }
    .kpi-card-label { font-size:.75rem; color:var(--muted); }

    /* ── Views ── */
    .view { display:none; }
    .view.active { display:block; }
    #view-login.active { display:flex; }
    #view-app.active, #view-bookings.active { display:flex; flex-direction:column; min-height:100vh; }

    /* ── LOGIN ── */
    #view-login { align-items:center; justify-content:center; min-height:100vh; background:var(--nav); }
    .login-wrap { background:white; border-radius:12px; padding:40px; width:100%; max-width:380px; box-shadow:0 20px 60px rgba(0,0,0,.3); }
    .login-header { display:flex; flex-direction:column; align-items:center; gap:12px; margin-bottom:32px; }
    .login-logo { width:64px; height:64px; object-fit:contain;  }
    .login-title { font-size:1.3rem; font-weight:700; color:var(--nav); }
    .login-sub { font-family:'DM Mono',monospace; font-size:.72rem; color:var(--muted); }

    .field { margin-bottom:16px; }
    .field label { display:block; font-size:.75rem; font-weight:500; color:var(--muted); margin-bottom:6px; }

    input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
      width:100%; background:var(--light); border:1px solid var(--border); border-radius:6px;
      padding:9px 12px; font-family:'Inter',sans-serif; font-size:.88rem; color:var(--text);
      outline:none; transition:border-color .15s, box-shadow .15s;
    }
    input:focus, select:focus, textarea:focus {
      border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.1);
    }
    input::placeholder, textarea::placeholder { color:#9ca3af; }
    textarea { resize:vertical; min-height:56px; }

    .btn {
      display:inline-flex; align-items:center; gap:6px; padding:8px 14px;
      border-radius:6px; border:1px solid transparent; font-family:'Inter',sans-serif;
      font-size:.82rem; font-weight:500; cursor:pointer; transition:all .15s; white-space:nowrap;
    }
    .btn:active { transform:scale(.98); }
    .btn:disabled { opacity:.4; cursor:not-allowed; }
    .btn.full { width:100%; justify-content:center; }
    .btn-primary   { background:var(--accent); color:white; border-color:var(--accent); }
    .btn-primary:hover:not(:disabled) { background:#1d4ed8; }
    .btn-secondary { background:white; color:var(--text); border-color:var(--border); box-shadow:var(--sh); }
    .btn-secondary:hover { background:var(--light); }
    .btn-ghost { background:transparent; color:var(--muted); border-color:transparent; }
    .btn-ghost:hover { background:var(--light); color:var(--text); }
    .btn-danger { background:#fef2f2; color:var(--danger); border-color:#fecaca; }
    .btn-sm { padding:5px 10px; font-size:.78rem; }
    .btn-xs { padding:3px 8px; font-size:.72rem; }

    .status-msg { font-family:'DM Mono',monospace; font-size:.75rem; margin-top:10px; min-height:1.2em; }
    .status-msg.ok  { color:var(--success); }
    .status-msg.err { color:var(--danger); }
    .status-msg.info { color:var(--info); }

    /* ── TOPBAR ── */
    .topbar {
      background:var(--nav); height:56px; padding:0 24px;
      display:flex; align-items:center; gap:0;
      box-shadow:0 1px 0 rgba(255,255,255,.06);
      position:fixed; top:0; left:0; right:0; z-index:400;
    }
    body { padding-top:56px; }
    #view-login.active { padding-top:0; }
    .topbar-brand { display:flex; align-items:center; gap:4px; cursor:pointer; flex-shrink:0; }
    .topbar-brand img { width:30px; height:30px; border-radius:6px; object-fit:contain; }
    .topbar-brand span { color:white; font-weight:600; font-size:.9rem; }

    .topbar-nav { display:flex; align-items:center; gap:2px; margin-left:32px; flex:1; }
    .topbar-nav-item {
      color:rgba(255,255,255,.85); padding:6px 12px; border-radius:6px;
      font-size:.82rem; cursor:pointer; transition:background .15s, color .15s;
      border:none; background:none; font-family:'Inter',sans-serif;
    }
    /* Routing 2026-08-31: Nav-Items sind jetzt <a href="#/…"> statt <button> */
    a.topbar-nav-item { display:inline-block; text-decoration:none; line-height:normal; }
    .topbar-nav-item:hover { background:rgba(255,255,255,.12); color:white; }
    .topbar-nav-item.active { background:rgba(255,255,255,.15); color:white; }

    /* ── USER DROPDOWN ── */
    .user-menu-wrap { position:relative; }
    .user-chip {
      display:flex; align-items:center; gap:8px; cursor:pointer;
      background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15);
      border-radius:20px; padding:4px 12px 4px 6px; transition:background .15s;
    }
    .user-chip:hover { background:rgba(255,255,255,.18); }
    .user-avatar {
      width:26px; height:26px; border-radius:50%;
      background:rgba(255,255,255,.25); display:flex; align-items:center; justify-content:center;
      font-size:.65rem; font-weight:700; color:white;
    }
    .user-name { color:white; font-size:.82rem; font-weight:500; }
    .user-chevron { color:rgba(255,255,255,.6); font-size:.65rem; margin-left:2px; }

    .user-dropdown {
      display:none; position:absolute; right:0; top:calc(100% + 8px);
      background:white; border:1px solid var(--border); 
      box-shadow:var(--sh-md); min-width:220px; z-index:1000; overflow:hidden;
    }
    .user-dropdown.open { display:block; }

    .dd-header { padding:14px 16px; border-bottom:1px solid var(--border); background:var(--light); }
    .dd-header-name { font-weight:600; font-size:.9rem; }
    .dd-header-email { font-size:.75rem; color:var(--muted); margin-top:2px; }

    .dd-item {
      display:flex; align-items:center; gap:10px; padding:10px 16px;
      font-size:.85rem; cursor:pointer; transition:background .1s; color:var(--text);
      border:none; background:none; width:100%; font-family:'Inter',sans-serif; text-align:left;
    }
    .dd-item:hover { background:var(--light); }
    .dd-item.danger { color:var(--danger); }
    .dd-item.danger:hover { background:#fef2f2; }
    .dd-sep { height:1px; background:var(--border); margin:4px 0; }
    .dd-icon { width:18px; text-align:center; font-size:.9rem; }

    /* ── MAIN BODY ── */
    .app-body { flex:1; padding:28px; padding-bottom:44px; max-width:1400px; width:100%; margin:0 auto; }
    .section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
    .section-head h2 { font-size:.95rem; font-weight:600; }
    .section-sub { font-size:.78rem; color:var(--muted); }
    .section-sep { border:none; border-top:1px solid var(--border); margin:28px 0; }

    /* ── ACCORDION (Startseite) ── */
    .country-accordion { margin-bottom:12px; }
    .country-head {
      display:flex; align-items:center; justify-content:space-between; gap:12px;
      padding:12px 18px; background:var(--nav); color:white; border-radius:8px;
      cursor:pointer; user-select:none; transition:background .15s;
    }
    .country-head:hover { background:#003070; }
    .country-name { font-weight:600; font-size:.92rem; }
    .country-meta { font-size:.75rem; color:rgba(255,255,255,.6); margin-left:auto; }
    .accordion-arrow { font-size:.8rem; color:rgba(255,255,255,.7); flex-shrink:0; }
    .country-body { padding:10px 0 4px 0; }

    .travel-accordion { margin-bottom:8px; }
    .travel-head {
      display:flex; align-items:center; justify-content:space-between; gap:12px;
      padding:10px 16px; background:white; border:1px solid var(--border);
      border-radius:8px; cursor:pointer; user-select:none; transition:background .1s;
    }
    .travel-head:hover { background:#f0f7ff; border-color:var(--accent); }
    .travel-code { font-family:'DM Mono',monospace; font-size:.78rem; color:var(--accent); font-weight:700; margin-right:8px; }
    .travel-title-acc { font-size:.88rem; font-weight:500; }
    .travel-date-count { font-size:.72rem; color:var(--muted); font-family:'DM Mono',monospace; }
    .travel-dates-body { padding:8px 0 4px 12px; }

    .dates-grid-compact { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; }

    /* ── DATE CARDS ── */
    .dates-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
    .date-card {
      background:white; border:1px solid var(--border); border-radius:var(--radius);
      box-shadow:var(--sh); cursor:pointer; transition:box-shadow .15s, transform .1s; overflow:hidden;
    }
    /* Routing 2026-08-31: Termin-Kacheln sind jetzt <a href="#/termin/…"> */
    a.date-card { display:block; text-decoration:none; color:inherit; }
    .date-card:hover { box-shadow:var(--sh-md); transform:translateY(-1px); }
    .date-card-stripe { height:3px; }
    .stripe-future { background:linear-gradient(90deg,var(--accent),#60a5fa); }
    .stripe-soon   { background:linear-gradient(90deg,var(--warning),#fbbf24); }
    .stripe-past   { background:#d1d5db; }

    .past-toggle-wrap {
      display:inline-flex; align-items:center; gap:5px; cursor:pointer; user-select:none;
    }
    .past-toggle-wrap .past-toggle-label {
      font-size:.62rem; color:var(--muted); text-transform:uppercase; letter-spacing:.3px; white-space:nowrap;
    }
    .past-toggle-track {
      position:relative; width:28px; height:16px; border-radius:99px;
      background:#cbd5e1; transition:background .2s; flex-shrink:0;
    }
    .past-toggle-track::after {
      content:''; position:absolute; top:2px; left:2px;
      width:12px; height:12px; border-radius:50%; background:white;
      transition:transform .2s; box-shadow:0 1px 2px rgba(0,0,0,.15);
    }
    .past-toggle-wrap.active .past-toggle-track { background:var(--accent); }
    .past-toggle-wrap.active .past-toggle-track::after { transform:translateX(12px); }
    .past-toggle-wrap.active .past-toggle-label { color:var(--accent); }

    .date-card-body { padding:16px; }
    .dc-code { font-family:'DM Mono',monospace; font-size:.68rem; color:var(--muted); margin-bottom:3px; }
    .dc-code strong { color:var(--accent); }
    .dc-title { font-size:.95rem; font-weight:600; margin-bottom:8px; line-height:1.35; }
    .dc-meta { display:flex; gap:12px; flex-wrap:wrap; font-size:.75rem; color:var(--muted); margin-bottom:10px; }
    .dc-stats { display:flex; gap:6px; flex-wrap:wrap; }

    .pill {
      display:inline-flex; align-items:center; gap:3px; padding:2px 8px;
      border-radius:99px; font-size:.7rem; font-weight:500;
    }
    .pill-green  { background:#ecfdf5; color:var(--success); }
    .pill-amber  { background:#fffbeb; color:var(--warning); }
    .pill-red    { background:#fef2f2; color:var(--danger); }
    .pill-blue   { background:#eff6ff; color:var(--info); }
    .pill-gray   { background:#f3f4f6; color:var(--muted); }

    /* ── BROWSE PANEL ── */
    /* ── Feedback-Cards (Admin-Inbox) ────────────────────────── */
    .feedback-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
    @media (max-width:1100px) { .feedback-grid { grid-template-columns:repeat(2, 1fr); } }
    @media (max-width:700px)  { .feedback-grid { grid-template-columns:1fr; } }
    .feedback-card { background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--sh); display:flex; flex-direction:column; overflow:hidden; border-left:3px solid var(--border); }
    .feedback-card.fb-border-neu { border-left-color:#2563eb; }
    .feedback-card.fb-border-gelesen { border-left-color:#7dd3fc; }
    .feedback-card.fb-border-in_bearbeitung { border-left-color:#f59e0b; }
    .feedback-card.fb-border-erledigt { border-left-color:#10b981; }
    .feedback-card.fb-border-abgelehnt { border-left-color:#ef4444; }
    .feedback-card.fb-border-zurueckgestellt { border-left-color:#9ca3af; }
    .feedback-card-body { padding:16px 18px; flex:1; }
    .feedback-subject { font-weight:600; font-size:.88rem; margin-bottom:6px; color:var(--text); }
    .feedback-message { font-size:.84rem; color:var(--text); line-height:1.55; white-space:pre-wrap; }
    .feedback-img-wrap { margin-top:10px; }
    .feedback-img-thumb { max-width:100%; max-height:200px; border-radius:6px; border:1px solid var(--border); cursor:zoom-in; display:block; }
    .feedback-footer { display:flex; align-items:center; gap:8px; padding:8px 14px; border-top:1px solid var(--border); background:var(--light, #f8f9fa); flex-wrap:wrap; }
    .feedback-footer-meta { display:flex; align-items:center; gap:6px; flex:1; min-width:0; }
    .feedback-user { font-weight:600; font-size:.78rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .feedback-date { font-size:.72rem; color:var(--muted); white-space:nowrap; }
    .feedback-footer-actions { display:flex; align-items:center; gap:6px; margin-left:auto; }
    .feedback-status-select { font-size:.75rem; padding:3px 6px; border:1px solid var(--border); border-radius:4px; background:white; cursor:pointer; font-family:'Inter',sans-serif; color:var(--text); }
    .feedback-delete-btn { font-size:.82rem; color:var(--muted); cursor:pointer; background:none; border:none; padding:2px 5px; border-radius:4px; line-height:1; }
    .feedback-delete-btn:hover { background:#fee2e2; color:#991b1b; }
    .feedback-empty { text-align:center; padding:32px 16px; color:var(--muted); font-size:.88rem; }

    /* ── Admin-Todos ─────────────────────────────────────────── */
    .todo-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; }
    @media (max-width:1200px) { .todo-grid { grid-template-columns:repeat(3, 1fr); } }
    @media (max-width:900px)  { .todo-grid { grid-template-columns:repeat(2, 1fr); } }
    @media (max-width:600px)  { .todo-grid { grid-template-columns:1fr; } }
    .todo-card { background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--sh); display:flex; flex-direction:column; overflow:hidden; border-left:3px solid var(--border); }
    .todo-card.fb-border-neu { border-left-color:#2563eb; }
    .todo-card.fb-border-gelesen { border-left-color:#7dd3fc; }
    .todo-card.fb-border-in_bearbeitung { border-left-color:#f59e0b; }
    .todo-card.fb-border-erledigt { border-left-color:#10b981; }
    .todo-card.fb-border-abgelehnt { border-left-color:#ef4444; }
    .todo-card.fb-border-zurueckgestellt { border-left-color:#9ca3af; }
    .todo-card-body { padding:14px 16px; flex:1; }
    .todo-title { font-weight:600; font-size:.88rem; margin-bottom:4px; color:var(--text); }
    .todo-desc { font-size:.82rem; color:var(--text); line-height:1.5; white-space:pre-wrap; }
    .todo-category-badge { display:inline-block; font-size:.68rem; font-weight:600; padding:1px 7px; border-radius:8px; background:#e0e7ff; color:#3730a3; margin-bottom:6px; }
    .todo-footer { display:flex; align-items:center; gap:8px; padding:8px 14px; border-top:1px solid var(--border); background:var(--light, #f8f9fa); flex-wrap:wrap; }
    .todo-footer-meta { display:flex; align-items:center; gap:6px; flex:1; min-width:0; }
    .todo-date { font-size:.72rem; color:var(--muted); white-space:nowrap; }
    .todo-footer-actions { display:flex; align-items:center; gap:6px; margin-left:auto; }
    .todo-status-select { font-size:.75rem; padding:3px 6px; border:1px solid var(--border); border-radius:4px; background:white; cursor:pointer; font-family:'Inter',sans-serif; color:var(--text); }
    .todo-action-btn { font-size:.82rem; color:var(--muted); cursor:pointer; background:none; border:none; padding:2px 5px; border-radius:4px; line-height:1; }
    .todo-action-btn:hover { background:#e0e7ff; color:#3730a3; }
    .todo-action-btn.todo-delete:hover { background:#fee2e2; color:#991b1b; }
    .todo-add-card { background:white; border:2px dashed var(--border); border-radius:var(--radius); display:flex; align-items:center; justify-content:center; min-height:100px; cursor:pointer; color:var(--muted); font-size:.88rem; transition:border-color .15s,color .15s; }
    .todo-add-card:hover { border-color:var(--primary,#2563eb); color:var(--primary,#2563eb); }
    /* Todo-Modal */
    .todo-modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:900; align-items:center; justify-content:center; }
    .todo-modal-overlay.open { display:flex; }
    .todo-modal { background:white; border-radius:var(--radius); box-shadow:0 8px 30px rgba(0,0,0,.18); padding:24px 28px; width:440px; max-width:90vw; }
    .todo-modal h3 { font-size:1rem; font-weight:700; margin-bottom:14px; }
    .todo-modal label { font-size:.8rem; font-weight:600; display:block; margin-bottom:4px; color:var(--text); }
    .todo-modal input, .todo-modal textarea, .todo-modal select { width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:6px; font-size:.84rem; font-family:'Inter',sans-serif; color:var(--text); box-sizing:border-box; margin-bottom:12px; }
    .todo-modal textarea { resize:vertical; min-height:80px; }
    .todo-modal-btns { display:flex; gap:8px; justify-content:flex-end; margin-top:4px; }

    .browse-panel { background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--sh); overflow:hidden; }
    .browse-head { padding:14px 20px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); background:var(--light); cursor:pointer; user-select:none; }
    .browse-head h3 { font-size:.88rem; font-weight:600; }
    .browse-hint { font-size:.75rem; color:var(--muted); }
    .browse-body { padding:20px; display:none; }
    .browse-body.open { display:block; }
    .browse-selects { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
    select[multiple] { height:180px; padding:4px; }
    select[multiple] option { padding:5px 8px; border-radius:4px; }
    select[multiple] option:checked { background:var(--accent); color:white; }

    /* ── BOOKING VIEW HEADER ── */
    .booking-header {
      background:white; border-bottom:1px solid var(--border); padding:16px 28px;
      display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-shrink:0;
    }
    .bh-travel { font-size:.75rem; color:var(--muted); margin-bottom:3px; }
    .bh-date   { font-size:1.15rem; font-weight:700; }
    .bh-meta   { display:flex; gap:14px; flex-wrap:wrap; margin-top:5px; font-size:.75rem; color:var(--muted); font-family:'DM Mono',monospace; }
    .bh-note   { margin-top:6px; font-size:.78rem; color:var(--muted); font-style:italic; }

    .booking-body { flex:1; padding:24px 28px; padding-bottom:44px; }

    /* ── VARIANTEN-TABS (Sportreise Gesamtansicht) ── */
    #variant-tabs {
      display:flex; gap:0; padding:0 28px; background:white;
      border-bottom:1px solid var(--border); overflow-x:auto;
      -webkit-overflow-scrolling:touch;
    }
    .variant-tab {
      padding:10px 16px; font-size:.78rem; font-family:'Inter',sans-serif;
      background:none; border:none; border-bottom:2px solid transparent;
      color:var(--muted); cursor:pointer;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
      max-width:260px; min-width:0; flex-shrink:1;
      transition:color .15s, border-color .15s;
    }
    .variant-tab:hover { color:var(--text); background:#fafbfc; }
    .variant-tab.active {
      color:var(--primary); border-bottom-color:var(--primary); font-weight:600;
    }
    .variant-pax {
      display:inline-block; background:#e5e7eb; color:#374151;
      font-size:.65rem; padding:1px 5px; border-radius:8px; margin-left:4px;
      font-weight:600;
    }
    .variant-tab.active .variant-pax {
      background:var(--primary); color:white;
    }
    .variant-tab-pinned {
      flex-shrink:0; white-space:nowrap;
    }

    /* ── PARTICIPANTS TABLE ── */
    .pt-wrap { background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--sh); overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; }
    .pt-toolbar { padding:12px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--light); }
    .pt-toolbar-left { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
    .pt-toolbar-right { display:flex; gap:6px; }

    table.pt { width:100%; min-width:max-content; border-collapse:separate; border-spacing:0; }
    table.pt th {
      padding:9px 12px; text-align:left; font-size:.68rem; font-weight:600;
      color:var(--muted); text-transform:uppercase; letter-spacing:.05em;
      border-bottom:1px solid var(--border); white-space:nowrap; background:var(--light);
    }
    table.pt td {
      padding:10px 12px; border-bottom:1px solid var(--border);
      font-size:.78rem; font-weight:400; vertical-align:middle;   /* 30.09.2026 (Sebastian): eine Schriftgröße/-stärke für alle Zellen, keine Einzelabweichungen mehr */
    }
    table.pt tbody tr:last-child td { border-bottom:none; }
    table.pt tbody tr:hover:not(.companion-row):not(.form-row) { background:#fafbfc; }
    table.pt tr.cancelled td { opacity:.5; }
    table.pt tr.waitlist td  { background:#fffdf5; }
    table.pt tr.companion-row td {
      padding:5px 12px; background:#fafbfc;
    }
    table.pt tr.companion-row td:first-child { padding-left:12px; }

    .pos-badge {
      display:inline-flex; align-items:center; justify-content:center;
      width:22px; height:22px; border-radius:50%; border:1px solid var(--border);
      font-size:.68rem; font-weight:600; color:var(--muted); background:var(--light);
    }

    .status-badge { display:inline-block; padding:2px 7px; border-radius:99px; font-size:.7rem; font-weight:500; }
    .status-badge.reserved    { background:#eff6ff; color:var(--info); }
    .status-badge.confirmed   { background:#ecfdf5; color:var(--success); }
    .status-badge.option      { background:#fffbeb; color:var(--warning); }
    .status-badge.inquiry     { background:#f3f4f6; color:var(--muted); }
    .status-badge.waitlist    { background:#fffbeb; color:var(--warning); border:1px dashed var(--warning); }
    .status-badge.reserve_list{ background:#f3f4f6; color:var(--muted); border:1px dashed #9ca3af; }
    .status-badge.cancelled   { background:#fef2f2; color:var(--danger); }
    .status-badge.web_unconfirmed { background:#e0f2fe; color:#075985; border:1px dashed #7dd3fc; }   /* Phase 4A: 🌐 Website-Buchung */
    table.pt tr.web-row td { background:#f0f9ff; }
    table.pt tr.companion-row.web-row td { background:#e8f4fd; }
    /* 30.09.2026 (Sebastian): Optionen hellgelb, analog zu unbestätigten Web-Buchungen (hellblau) */
    table.pt tr.option-row td { background:#fefce8; }
    /* 01.10.2026: Drag & Drop der Buchungszeilen (Griff = Platznummer-Zelle) */
    table.pt td.row-drag:active { cursor:grabbing; }
    table.pt tr.dragging-row td { opacity:.45; }
    table.pt tr.drop-before td { box-shadow:inset 0 3px 0 0 var(--accent); }
    table.pt tr.drop-after td { box-shadow:inset 0 -3px 0 0 var(--accent); }
    table.pt tr.companion-row.option-row td { background:#fbf5d5; }
    /* Auswahlmodus 2026-09-03: Zeilen-Checkboxen nur sichtbar, wenn Master-Checkbox an */
    table.pt input.row-sel { display:none; margin-right:6px; vertical-align:middle; }
    table.pt.sel-mode input.row-sel { display:inline-block; }
    #sel-actionbar a { color:var(--accent); text-decoration:none; }
    #sel-actionbar a:hover { text-decoration:underline; }
    /* 02.10.2026 (Sebastian): Zimmerpartnerschaft "DZ (1)" / "(X)" und geteilte Zellen (ein Wert für mehrere Buchungen, rowspan) */
    .room-party { color:var(--muted); font-size:.72rem; white-space:nowrap; }
    .room-party-x { color:#dc2626; font-weight:700; }
    table.pt td.shared-cell { vertical-align:middle; text-align:center; background:#f5f3ff; box-shadow:inset 0 0 0 1px #ddd6fe; }
    table.pt td.shared-cell[data-type="multi-flight"] { text-align:left; }
    table.pt td.shared-cell .shared-wrap { position:relative; padding-right:14px; }
    table.pt td.shared-cell .share-ico { position:absolute; right:-2px; top:0; font-size:.6rem; opacity:.55; cursor:help; }
    table.pt td.shared-cell.editable:hover { background:#ede9fe; }
    /* 03.10.2026 (Sebastian): Abfrage-/ZBL-Spalten – kurzer Kopf, voller Text im Tooltip, Klick zum Umbenennen */
    table.pt th .col-hdr-rename { cursor:text; border-bottom:1px dotted var(--muted); }
    table.pt th .col-hdr-rename:hover { color:var(--accent); border-bottom-color:var(--accent); }
    table.pt th .col-hdr-input { font:inherit; text-transform:none; letter-spacing:0; width:130px; padding:1px 4px; border:1px solid var(--accent); border-radius:4px; background:#fff; color:var(--text, #111); }

    /* ── INLINE BOOKING FORM ── */
    .form-row td { padding:0 !important; border-bottom:none !important; }
    .inline-form {
      background:#f0f7ff; border-bottom:2px solid var(--accent);
      padding:20px 16px; display:none;
    }
    .inline-form.open { display:block; }
    .inline-form h4 { font-size:.85rem; font-weight:600; margin-bottom:16px; color:var(--accent); }

    .form-grid {
      display:grid;
      gap:12px;
    }
    .form-section-label {
      font-size:.7rem; font-weight:600; color:var(--muted); text-transform:uppercase;
      letter-spacing:.06em; margin-bottom:4px; margin-top:4px;
    }

    .fg-cols-2 { grid-template-columns:1fr 1fr; }
    .fg-cols-3 { grid-template-columns:1fr 1fr 1fr; }
    .fg-cols-4 { grid-template-columns:1fr 1fr 1fr 1fr; }

    .form-divider { height:1px; background:var(--border); margin:4px 0; grid-column:1/-1; }

    .toggle-section {
      grid-column:1/-1; display:flex; align-items:center; gap:8px; cursor:pointer;
      padding:6px 0; color:var(--muted); font-size:.78rem;
    }
    .toggle-section:hover { color:var(--text); }
    .toggle-arrow { transition:transform .2s; font-size:.65rem; }
    .toggle-arrow.open { transform:rotate(90deg); }

    .optional-fields { display:none; grid-column:1/-1; }
    .optional-fields.open { display:contents; }

    .companion-entry {
      grid-column:1/-1; background:white; border:1px solid var(--border);
      border-radius:6px; padding:12px; position:relative;
    }
    .companion-entry .remove-comp {
      position:absolute; top:10px; right:10px;
      background:none; border:none; cursor:pointer; color:var(--muted); font-size:.85rem;
    }
    .companion-entry .remove-comp:hover { color:var(--danger); }

    .form-actions { display:flex; gap:8px; align-items:center; grid-column:1/-1; margin-top:4px; }

    /* ── COLUMN TOGGLE ── */
    .col-toggle-wrap { position:relative; }
    .col-toggle-panel {
      display:none; position:fixed;
      background:white; border:1px solid var(--border); border-radius:8px;
      box-shadow:var(--sh-md); padding:12px 16px; z-index:450; min-width:200px; max-height:320px; overflow-y:auto;
    }
    .col-toggle-panel.open { display:block; }
    /* 30.09.2026: Abschnitt "Individuelle Spalten" braucht Platz für Name + Reichweite + Knöpfe */
    .col-toggle-panel .fc-item { min-width:260px; cursor:default; }
    .col-toggle-item { display:flex; align-items:center; gap:8px; padding:4px 0; font-size:.83rem; cursor:pointer; }
    .col-toggle-item input { cursor:pointer; }

    /* ── NOTES ── */
    .notes-section { margin-top:20px; background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--sh); overflow:hidden; }
    .notes-head { padding:12px 16px; border-bottom:1px solid var(--border); background:var(--light); font-size:.85rem; font-weight:600; }
    .notes-body { padding:16px; }
    .note-item { margin-bottom:12px; padding-bottom:12px; border-bottom:1px solid var(--border); }
    .note-item:last-child { margin-bottom:0; padding-bottom:0; border-bottom:none; }
    .note-meta { font-family:'DM Mono',monospace; font-size:.7rem; color:var(--muted); margin-bottom:4px; }
    .note-text { font-size:.83rem; }

    /* ── MISC ── */
    .loading-state { display:flex; align-items:center; justify-content:center; padding:48px; color:var(--muted); gap:10px; font-size:.8rem; }
    .spinner { width:16px; height:16px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
    @keyframes spin { to { transform:rotate(360deg); } }
    .empty-state { text-align:center; padding:48px 24px; color:var(--muted); }
    .empty-state .emoji { font-size:2rem; margin-bottom:8px; }
    .empty-state p { font-size:.85rem; }
    .tag { display:inline-block; padding:1px 6px; background:#f3f4f6; border-radius:4px; font-family:'DM Mono',monospace; font-size:.68rem; color:var(--muted); }
    .mono { font-family:'DM Mono',monospace; font-size:.78rem; }

    /* ── TOPBAR ICON BUTTON ── */
    .topbar-icon-btn {
      background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15);
      color:white; width:32px; height:32px; border-radius:6px;
      font-size:1rem; cursor:pointer; display:flex; align-items:center; justify-content:center;
      transition:background .15s;
    }
    .topbar-icon-btn:hover { background:rgba(255,255,255,.2); }

    /* ── FOOTER ── */
    #app-footer {
      position:fixed; bottom:0; left:0; right:0; z-index:300;
      background:var(--nav); border-top:1px solid rgba(255,255,255,.08);
      height:26px; display:flex; align-items:center; justify-content:space-between;
      padding:0 20px;
    }
    .footer-version { font-family:'DM Mono',monospace; font-size:.65rem; color:rgba(255,255,255,.35); }
    .footer-slogan  { font-size:.72rem; font-style:italic; color:rgba(255,255,255,.5); font-family:'Inter',sans-serif; }
    .footer-help    { font-family:'DM Mono',monospace; font-size:.65rem; }
    .footer-help a  { color:rgba(255,255,255,.4); text-decoration:none; }
    .footer-help a:hover { color:rgba(255,255,255,.8); }

    /* Footer-Abstand damit Content nicht dahinter verschwindet */
    body { padding-bottom:26px; }

    /* .app-body, .booking-body spacing */

    /* ── NOTES EDIT ── */
    .note-item { position:relative; }
    .editable-note { cursor:text; }
    .editable-note:hover { background:#f0f7ff; border-radius:4px; }
    .note-textarea { width:100%; border:1px solid var(--accent); border-radius:6px; padding:8px; font-size:.83rem; font-family:'Inter',sans-serif; resize:vertical; outline:none; box-shadow:0 0 0 2px rgba(37,99,235,.1); }
    .note-save-row { display:flex; gap:6px; margin-top:6px; }
    .note-del-btn { float:right; background:none; border:none; cursor:pointer; color:var(--muted); font-size:.75rem; padding:2px 4px; }
    .note-del-btn:hover { color:var(--danger); }
    .note-add-form { border-top:1px solid var(--border); padding-top:14px; margin-top:14px; }
    .note-add-form textarea { width:100%; margin-bottom:8px; }
    .note-add-actions { display:flex; align-items:center; gap:8px; }
    .note-date-input { width:140px; }

    /* ── INLINE CELL EDITING ── */
    td.editable { cursor:pointer; position:relative; }
    td.editable:hover:not(.editing) { background:#f0f7ff !important; }
    /* 03.10.2026 (Sebastian): Stift-Symbol beim Hover entfernt (Handzeiger + hellblauer Hintergrund reichen) */
    td.editing { background:#fffbe6 !important; padding:4px !important; }
    td.saving  { background:#f0fff4 !important; }
    td.save-ok { background:#ecfdf5 !important; transition:background .6s; }
    td.save-err{ background:#fef2f2 !important; }
    .cell-input { width:100%; border:1px solid var(--accent); border-radius:4px; padding:5px 8px; font-family:'Inter',sans-serif; font-size:.83rem; background:white; color:var(--text); outline:none; box-shadow:0 0 0 2px rgba(37,99,235,.15); box-sizing:border-box; }
    .cell-input[type=date], .cell-input[type=number] { max-width:160px; }
    select.cell-input { cursor:pointer; max-width:100%; }
    textarea.cell-input { resize:vertical; min-height:60px; }
    /* Stabile Spaltenbreiten: table-layout fixed, inputs passen sich der Zelle an */
    table.pt { table-layout:auto; }
    /* 2026-09-03: Nutzer-Spaltenbreiten (Ziehen am Kopfzellen-Rand, pro Termin gespeichert).
       Ohne gespeicherte Breiten bleibt alles exakt wie bisher (auto-Layout). */
    table.pt.pt-fixed { table-layout:fixed; min-width:0; }
    table.pt th { position:relative; }
    .col-rsz { position:absolute; top:0; right:-4px; width:9px; height:100%; cursor:col-resize; user-select:none; touch-action:none; z-index:2; }
    .col-rsz:hover, .col-rsz.dragging { background:rgba(37,99,235,.28); border-radius:2px; }
    table.pt td, table.pt th { overflow:hidden; text-overflow:ellipsis; }
    /* 25.09.2026 (Sebastian): dünne Trennlinien zwischen den Spalten, auch im Kopf */
    table.pt th + th, table.pt td + td { border-left:1px solid #eef0f3; }
    td.editing .cell-input, td.editing select.cell-input { max-width:100%; width:100%; }
    .cell-overlay { position:fixed; z-index:500; background:white; border:1px solid var(--border); border-radius:8px; box-shadow:var(--sh-md); padding:14px; min-width:280px; display:none; }
    .cell-overlay.open { display:block; }
    .cell-overlay h5 { font-size:.72rem; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:10px; }
    .cell-overlay .co-field { margin-bottom:8px; }
    .cell-overlay .co-label { font-size:.7rem; color:var(--muted); margin-bottom:3px; }
    .cell-overlay .co-actions { display:flex; gap:6px; margin-top:10px; }

    /* ── EXPORT MODAL ── */
    .modal-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:800; align-items:center; justify-content:center; }
    .modal-backdrop.open { display:flex; }
    .modal { background:white;  box-shadow:0 20px 60px rgba(0,0,0,.2); width:100%; max-width:520px; max-height:90vh; overflow:hidden; display:flex; flex-direction:column; }
    .modal-head { padding:18px 22px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
    .modal-head h3 { font-size:1rem; font-weight:700; }
    .modal-close { background:none; border:none; cursor:pointer; color:var(--muted); font-size:1.2rem; padding:4px; }
    .modal-body { padding:22px; overflow-y:auto; flex:1; }
    .modal-foot { padding:16px 22px; border-top:1px solid var(--border); display:flex; gap:8px; justify-content:flex-end; flex-shrink:0; }
    .feedback-drop-zone { border:2px dashed var(--border); border-radius:8px; padding:14px 16px; min-height:60px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; cursor:pointer; transition:border-color .15s, background .15s; background:var(--light,#f8fafc); }
    .feedback-drop-zone.drag-over { border-color:var(--primary,#2563eb); background:#eff6ff; }
    .feedback-drop-hint { font-size:.8rem; color:var(--muted); text-align:center; pointer-events:none; }
    .feedback-img-remove { margin-top:4px; }
    .template-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:20px; }
    .template-card { border:2px solid var(--border); border-radius:8px; padding:14px; cursor:pointer; transition:border-color .15s, background .15s; }
    .template-card:hover { border-color:var(--accent); background:#f0f7ff; }
    .template-card.selected { border-color:var(--accent); background:#eff6ff; }
    .template-card .tc-name { font-weight:600; font-size:.88rem; margin-bottom:4px; }
    .template-card .tc-desc { font-size:.75rem; color:var(--muted); }
    .export-fields { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:14px; }
    .export-field-item { display:flex; align-items:center; gap:8px; padding:5px 8px; border-radius:6px; font-size:.83rem; cursor:pointer; }
    .export-field-item:hover { background:var(--light); }
    .export-field-item input { cursor:pointer; accent-color:var(--accent); }
    /* ── EINSTELLUNGEN-MODAL (05.10.2026, Sebastian): breiter, Blöcke Titel | Inhalt, Wirkung als Badge ── */
    .modal-wide { max-width:880px; }
    .modal-sub { font-size:.75rem; color:var(--muted); margin-top:3px; }
    .modal-sub strong { color:var(--text); font-weight:600; }
    .ts-body { padding:2px 24px 6px; }
    .ts-section { display:grid; grid-template-columns:210px minmax(0,1fr); gap:8px 28px; padding:18px 0; border-bottom:1px solid var(--border); }
    .ts-section:last-child { border-bottom:none; }
    .ts-label h4 { font-size:.86rem; font-weight:600; margin:0 0 6px; line-height:1.3; }
    .ts-scope { display:inline-block; font-size:.6rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; padding:1px 6px; border-radius:3px; border:1px solid; margin:0 4px 4px 0; white-space:nowrap; cursor:default; }
    .ts-scope-travel { color:#5b21b6; background:#ede9fe; border-color:#ddd6fe; }
    .ts-scope-date { color:#0f766e; background:#ccfbf1; border-color:#99f6e4; }
    .ts-desc { font-size:.78rem; line-height:1.5; color:var(--text); margin:0 0 10px; }
    .ts-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:.78rem; }
    .ts-row label { display:inline-flex; align-items:center; gap:5px; font-size:.78rem; color:var(--text); margin:0; }
    .ts-row select, .ts-row input[type=text], .ts-row input[type=number] { font-size:.8rem; padding:4px 8px; width:auto; }
    .ts-row select { min-width:150px; }
    .ts-link { font-size:.78rem; }
    .ts-meta { font-size:.72rem; color:var(--muted); }
    .ts-section .status-msg { margin-top:8px; min-height:0; }
    .ts-section .status-msg:empty { display:none; }
    @media (max-width:640px) { .ts-section { grid-template-columns:1fr; gap:6px; } }
    .section-label-sm { font-size:.72rem; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; margin-top:16px; }


    #view-module-admin.active { display:block; }
    #view-users.active { display:block; }
    #view-profile.active { display:block; }

    /* ── User Admin Table ── */
    .useradmin-table { width:100%; border-collapse:collapse; font-size:.85rem; }
    .useradmin-table th { text-align:left; font-size:.75rem; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; padding:8px 12px; border-bottom:2px solid var(--border); }
    .useradmin-table td { padding:10px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
    .useradmin-table tbody tr:hover { background:var(--light); }
    .useradmin-table .badge { display:inline-block; font-size:.72rem; padding:2px 8px; border-radius:10px; font-weight:500; }
    .useradmin-table .badge-active { background:#dcfce7; color:#166534; }
    .useradmin-table .badge-inactive { background:#fee2e2; color:#991b1b; }
    .useradmin-table .badge-role { background:var(--light); color:var(--text); }

    /* ── Module Admin Cards ── */
    .modadmin-card {
      background:var(--surface); border:1px solid var(--border); border-radius:8px;
      padding:14px 18px; margin-bottom:8px; display:flex; align-items:center; gap:12px;
      transition:box-shadow .15s;
    }
    .modadmin-card:hover { box-shadow:var(--sh-md); }
    .modadmin-card.modadmin-dragging { opacity:.4; }
    .modadmin-card.modadmin-dragover { border-color:var(--primary,#2563eb); box-shadow:0 0 0 2px rgba(37,99,235,.25); }
    .modadmin-card-drag { cursor:grab; color:var(--muted); font-size:1rem; user-select:none; }
    .modadmin-card-icon { font-size:1.2rem; }
    .modadmin-card-info { flex:1; }
    .modadmin-card-name { font-weight:600; font-size:.88rem; }
    .modadmin-card-meta { font-size:.75rem; color:var(--muted); }
    .modadmin-card-size {
      font-size:.72rem; padding:2px 8px; border-radius:4px;
      background:var(--light); color:var(--muted); border:1px solid var(--border);
    }
    .modadmin-card-actions { display:flex; gap:6px; }
    .modadmin-access-toggle {
      display:flex; align-items:center; gap:6px; cursor:pointer; user-select:none;
    }
    .modadmin-access-label { font-size:.72rem; color:var(--muted); min-width:55px; text-align:right; }
    .modadmin-access-check { display:none; }
    .modadmin-toggle-slider {
      width:32px; height:18px; border-radius:9px; background:#d1d5db;
      position:relative; transition:background .2s;
    }
    .modadmin-toggle-slider::after {
      content:''; position:absolute; top:2px; left:2px;
      width:14px; height:14px; border-radius:50%; background:white;
      transition:transform .2s; box-shadow:0 1px 2px rgba(0,0,0,.15);
    }
    .modadmin-access-check:checked + .modadmin-toggle-slider { background:var(--accent); }
    .modadmin-access-check:checked + .modadmin-toggle-slider::after { transform:translateX(14px); }
    /* ── Freigaben-Raster (Rechtesystem Stufe 3) ── */
    .modadmin-tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:16px; }
    .modadmin-tab { background:none; border:none; border-bottom:2px solid transparent; padding:8px 14px; font-size:.86rem; font-weight:500; color:var(--muted); cursor:pointer; }
    .modadmin-tab.active { color:var(--primary); border-bottom-color:var(--primary); }
    .grant-grid-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:8px; }
    .grant-grid { border-collapse:separate; border-spacing:0; font-size:.78rem; min-width:100%; }
    .grant-grid th, .grant-grid td { border-bottom:1px solid var(--border); padding:4px 6px; white-space:nowrap; text-align:center; }
    .grant-grid th { background:var(--light); font-weight:600; position:sticky; top:0; z-index:2; }
    .grant-grid th:first-child, .grant-grid td:first-child { text-align:left; position:sticky; left:0; background:#fff; z-index:1; min-width:220px; border-right:1px solid var(--border); }
    .grant-grid th:first-child { background:var(--light); z-index:3; }
    .grant-grid tr.grant-group td { background:var(--light); font-weight:600; text-transform:uppercase; letter-spacing:.4px; font-size:.68rem; color:var(--muted); text-align:left; padding-top:8px; }
    .grant-grid .grant-mod-id { font-size:.66rem; color:var(--muted); font-weight:400; margin-left:4px; }
    .grant-cell { min-width:66px; border:1px solid var(--border); border-radius:5px; padding:2px 6px; font-size:.7rem; cursor:pointer; background:#fff; color:var(--muted); }
    .grant-cell[data-level="read"]  { background:#e0f2fe; border-color:#7dd3fc; color:#075985; }
    .grant-cell[data-level="write"] { background:#dcfce7; border-color:#86efac; color:#166534; }
    .grant-cell.saving { opacity:.5; pointer-events:none; }
    .grant-cell.inherited { cursor:default; opacity:.7; font-style:italic; }
    .grant-legend { display:flex; gap:14px; font-size:.74rem; color:var(--muted); margin:8px 0 12px; flex-wrap:wrap; }
    .grant-legend span::before { content:''; display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; vertical-align:middle; border:1px solid var(--border); }
    .grant-legend .lg-read::before { background:#e0f2fe; border-color:#7dd3fc; }
    .grant-legend .lg-write::before { background:#dcfce7; border-color:#86efac; }
    .grant-legend .lg-none::before { background:#fff; }
    .eff-perm { display:inline-block; font-family:'DM Mono',monospace; font-size:.7rem; padding:1px 6px; border-radius:4px; background:var(--light); border:1px solid var(--border); margin:2px 3px 2px 0; }
    .eff-perm.src-user { background:#fef3c7; border-color:#fcd34d; }

    /* ── WIKI ── */
    #view-wiki.active { display:flex; flex-direction:column; min-height:100vh; }
    .wiki-layout { flex:1; display:grid; grid-template-columns:300px 1fr; gap:0; overflow:hidden; }
    .wiki-sidebar { border-right:1px solid var(--border); display:flex; flex-direction:column; height:calc(100vh - 56px); background:var(--light); overflow-y:auto; }
    .wiki-sidebar-head { padding:12px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
    .wiki-search-wrap { padding:10px 12px; border-bottom:1px solid var(--border); }
    .wiki-search-wrap input { font-size:.82rem; padding:7px 10px; }
    .wiki-section-list { flex:1; overflow-y:auto; padding:6px 0; }
    .wiki-sec { margin-bottom:2px; }
    .wiki-sec-head { display:flex; align-items:center; gap:8px; padding:8px 14px; cursor:pointer; font-size:.82rem; font-weight:600; color:var(--text); transition:background .12s; user-select:none; }
    .wiki-sec-head:hover { background:rgba(0,0,0,.04); }
    .wiki-sec-head .wiki-sec-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
    .wiki-sec-head .wiki-sec-arrow { font-size:.65rem; color:var(--muted); transition:transform .15s; }
    .wiki-sec-head.open .wiki-sec-arrow { transform:rotate(90deg); }
    .wiki-sec-pages { display:none; padding-left:30px; }
    .wiki-sec-head.open + .wiki-sec-pages { display:block; }
    .wiki-page-link { display:block; padding:5px 12px; font-size:.8rem; color:var(--muted); cursor:pointer; border-radius:4px; transition:all .12s; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .wiki-page-link:hover { background:rgba(0,0,0,.04); color:var(--text); }
    .wiki-page-link.active { background:var(--accent); color:white; }
    .wiki-main { overflow-y:auto; height:calc(100vh - 56px); padding:0; }
    .wiki-content { max-width:960px; margin:0 auto; padding:32px 40px; }
    .wiki-content.wiki-content--edit { max-width:1240px; }   /* Editor breiter als die Leseansicht (29.09.2026) */
    .wiki-empty { text-align:center; padding:80px 20px; color:var(--muted); }
    .wiki-article-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:24px; }
    .wiki-article-title { font-size:1.3rem; font-weight:700; line-height:1.3; }
    .wiki-article-meta { font-size:.75rem; color:var(--muted); margin-top:4px; font-family:'DM Mono',monospace; }
    .wiki-article-actions { display:flex; gap:6px; flex-shrink:0; }
    .wiki-article-body { font-size:.88rem; line-height:1.75; color:var(--text); }
    .wiki-article-body h2 { font-size:1.05rem; font-weight:700; margin:24px 0 8px; padding-bottom:4px; border-bottom:1px solid var(--border); }
    .wiki-article-body h3 { font-size:.92rem; font-weight:600; margin:18px 0 6px; }
    .wiki-article-body ul, .wiki-article-body ol { margin:8px 0 8px 20px; }
    .wiki-article-body li { margin-bottom:4px; }
    .wiki-article-body p { margin-bottom:10px; }
    .wiki-article-body strong { font-weight:600; }
    .wiki-article-body code { background:var(--light); padding:1px 5px; border-radius:3px; font-family:'DM Mono',monospace; font-size:.82rem; }
    /* Medien und Tabellen aus TinyMCE in der Leseansicht, 29.09.2026 */
    .wiki-article-body img { max-width:100%; height:auto; border-radius:6px; }
    .wiki-article-body figure.image { display:inline-block; margin:6px 0 12px; max-width:100%; }
    .wiki-article-body figure.image.align-left { float:left; margin-right:16px; }
    .wiki-article-body figure.image.align-right { float:right; margin-left:16px; }
    .wiki-article-body figure.image.align-center, .wiki-article-body img.align-center { display:block; margin-left:auto; margin-right:auto; }
    .wiki-article-body figcaption { font-size:.78rem; color:var(--muted); margin-top:4px; }
    /* Bilder ohne Unterschrift: TinyMCE setzt nur float, Abstand zum Text hier */
    .wiki-article-body img[style*="float: left"], .wiki-article-body img[style*="float:left"] { margin:4px 18px 10px 0; }
    .wiki-article-body img[style*="float: right"], .wiki-article-body img[style*="float:right"] { margin:4px 0 10px 18px; }
    .wiki-article-body video { max-width:100%; height:auto; border-radius:6px; background:#000; }
    .wiki-article-body iframe { max-width:100%; border:0; border-radius:6px; }
    .wiki-article-body table { border-collapse:collapse; margin:10px 0 14px; max-width:100%; font-size:.85rem; }
    .wiki-article-body th, .wiki-article-body td { border:1px solid var(--border); padding:5px 9px; vertical-align:top; }
    .wiki-article-body th { background:var(--light); font-weight:600; text-align:left; }
    .wiki-article-body blockquote { border-left:3px solid var(--border); margin:8px 0; padding:4px 12px; color:var(--muted); }
    .wiki-article-body pre { background:var(--light); padding:8px 10px; border-radius:6px; font-family:'DM Mono',monospace; font-size:.8rem; overflow-x:auto; }
    .wiki-article-body hr { border:0; border-top:1px solid var(--border); margin:16px 0; }
    .wiki-article-body span[style*="background-color"] { padding:3px 4px; border-radius:3px; }   /* Textmarker aus dem Editor (30.09.2026) */
    .wiki-article-body::after { content:''; display:block; clear:both; }
    .wiki-search-results { padding:0; }
    .wiki-search-item { padding:12px 16px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .12s; }
    .wiki-search-item:hover { background:var(--light); }
    .wiki-search-item-title { font-size:.88rem; font-weight:600; margin-bottom:2px; }
    .wiki-search-item-section { font-size:.72rem; color:var(--muted); }
    .wiki-search-item-preview { font-size:.78rem; color:var(--muted); margin-top:4px; line-height:1.4; }
    .wiki-edit-form { display:flex; flex-direction:column; gap:14px; }
    .wiki-edit-form textarea { min-height:400px; font-family:'DM Mono',monospace; font-size:.82rem; line-height:1.6; }
    /* TinyMCE (SarEditor) im Wiki-Formular, 29.09.2026 */
    .wiki-edit-form .tox-tinymce { border-radius:8px; border-color:var(--border); }
    /* TinyMCE tool-weit: kompakte, zarte Werkzeugleiste (29.09.2026) */
    .tox .tox-toolbar__primary { background:var(--light) !important; }
    .tox .tox-toolbar, .tox .tox-toolbar__primary, .tox .tox-toolbar__overflow { padding:2px 4px !important; }
    .tox .tox-toolbar__group { padding:0 3px !important; }
    .tox .tox-tbtn { height:28px !important; width:28px !important; margin:1px 0 !important; border-radius:5px !important; color:#6b7280 !important; }
    .tox .tox-tbtn--select { width:auto !important; padding:0 6px !important; }
    .tox .tox-tbtn__select-label { font-size:.8rem !important; color:#4b5563 !important; }
    /* Icons sind 24x24-SVGs ohne viewBox: nicht über width/height verkleinern (schneidet ab), sondern skalieren */
    .tox .tox-tbtn svg { fill:#6b7280 !important; transform:scale(.78); transform-origin:center; }
    .tox .tox-tbtn .tox-icon { display:flex; align-items:center; justify-content:center; }
    .tox .tox-tbtn:hover, .tox .tox-tbtn--enabled { background:#e5e7eb !important; }
    .tox .tox-tbtn:hover svg, .tox .tox-tbtn--enabled svg { fill:var(--text) !important; }
    .tox .tox-tbtn--disabled svg { fill:#c4c8cf !important; }
    .tox .tox-tbtn__select-chevron svg { transform:scale(.6); }
    .tox .tox-split-button { height:28px !important; margin:1px 0 !important; }
    .tox .tox-split-button .tox-tbtn { margin:0 !important; }
    .tox .tox-split-button__chevron { width:14px !important; }
    .tox .tox-statusbar { border-top-color:var(--border) !important; font-size:.72rem !important; }
    .wiki-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:.7rem; font-weight:500; color:white; }
    .wiki-new-section-form { padding:12px; border-bottom:1px solid var(--border); background:white; }
    /* Wiki v4 (29.09.2026): Sections, Struktur-Modus, Kontextmenü */
    .wiki-section { margin:0; border-top:1px solid var(--border); padding:2px 0 4px; }
    .wiki-section:first-of-type { border-top:none; }
    .wiki-section-head { display:flex; align-items:center; gap:6px; padding:10px 14px 6px; font-size:.7rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); user-select:none; }
    .wiki-section-head.active .wiki-section-title { color:var(--accent); }
    .wiki-sec-head.active .wiki-sec-title { color:var(--accent); }
    .wiki-sec-head .wiki-sec-title:hover { text-decoration:underline; }
    .wiki-section-title { cursor:pointer; }
    .wiki-section-title:hover { color:var(--text); }
    .wiki-section-arrow { font-size:.6rem; cursor:pointer; padding:2px 4px; margin-left:-4px; transition:transform .15s; flex-shrink:0; }
    .wiki-section.open .wiki-section-arrow { transform:rotate(90deg); }
    .wiki-section-body { display:none; }
    .wiki-section.open .wiki-section-body { display:block; }
    /* Section-Seite */
    .wiki-section-desc { font-size:.9rem; line-height:1.7; color:var(--text); margin-bottom:16px; }
    .wiki-section-desc-empty { color:var(--muted); font-style:italic; font-size:.85rem; }
    .wiki-section-contact { font-size:.85rem; margin-bottom:24px; padding:10px 14px; background:var(--light); border-radius:8px; border:1px solid var(--border); }
    .wiki-section-contact-label { display:block; font-size:.7rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-bottom:3px; }
    .wiki-section-tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:12px; }
    .wiki-tile { border:1px solid var(--border); border-radius:10px; padding:14px; background:white; cursor:pointer; transition:box-shadow .12s, border-color .12s; display:flex; flex-direction:column; gap:8px; }
    .wiki-tile:hover { border-color:var(--accent); box-shadow:0 2px 10px rgba(0,0,0,.08); }
    .wiki-tile-title { font-size:.88rem; font-weight:600; line-height:1.35; }
    .wiki-tile-summary { font-size:.78rem; color:var(--muted); line-height:1.45; }
    .wiki-page-summary { font-size:.9rem; line-height:1.6; color:var(--text); margin:-8px 0 20px; padding:10px 14px; background:var(--light); border-left:3px solid var(--accent); border-radius:0 8px 8px 0; }
    .wiki-sec-pagepick { border:1px solid var(--border); border-radius:8px; padding:8px 12px; max-height:420px; overflow-y:auto; background:white; }
    .wiki-sec-pagepick-cat { margin-bottom:8px; }
    .wiki-sec-pagepick-head { display:flex; align-items:center; gap:8px; font-size:.8rem; font-weight:600; padding:4px 0; }
    .wiki-sec-pagepick-item { display:flex; align-items:center; gap:6px; font-size:.82rem; padding:2px 0 2px 22px; cursor:pointer; }
    .wiki-section-title, .wiki-sec-title, .wiki-page-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .wiki-page-link { display:flex; align-items:center; gap:4px; }
    .wiki-add-link { color:var(--accent); font-style:italic; cursor:pointer; font-size:.8rem; padding:5px 12px; }
    .wiki-add-link:hover { background:rgba(0,0,0,.04); }
    .wiki-add-cat { padding-left:14px; }
    .wiki-struct-hint { font-size:.72rem; color:var(--muted); padding:8px 14px; background:#fff7ed; border-bottom:1px solid var(--border); line-height:1.4; }
    .wiki-ctl { display:flex; gap:2px; flex-shrink:0; }
    /* Farbfeld im Kopf der Kategorie-Seite (30.09.2026): Swatch sichtbar, natives Farbfeld dahinter */
    .wiki-color-pick { position:relative; display:inline-flex; align-items:center; width:26px; height:26px; border:1px solid var(--border); border-radius:6px; background:white; cursor:pointer; overflow:hidden; }
    .wiki-color-pick-swatch { display:block; width:16px; height:16px; border-radius:50%; margin:0 auto; pointer-events:none; }
    .wiki-color-pick input[type=color] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; padding:0; border:0; }
    .wiki-ctl-btn { border:1px solid var(--border); background:white; border-radius:4px; font-size:.6rem; line-height:1; padding:3px 5px; cursor:pointer; color:var(--muted); }
    .wiki-ctl-btn:hover:not(:disabled) { background:var(--light); color:var(--text); }
    .wiki-ctl-btn:disabled { opacity:.3; cursor:default; }
    .wiki-page-link.active .wiki-ctl-btn { color:var(--text); }
    .wiki-ctx-menu { background:white; border:1px solid var(--border); border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.12); padding:4px 0; min-width:200px; font-size:.82rem; }
    .wiki-ctx-head { padding:6px 14px; font-size:.72rem; color:var(--muted); border-bottom:1px solid var(--border); margin-bottom:4px; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .wiki-ctx-item { padding:7px 14px; cursor:pointer; transition:background .1s; }
    .wiki-ctx-item:hover { background:var(--light); }
    .wiki-ctx-item.danger { color:#dc2626; }
    .wiki-pick { padding:10px 12px; }

    /* ── TEXTBAUSTEINE ── */
    #view-phrases.active { display:flex; flex-direction:column; min-height:100vh; }
    .phrases-body { flex:1; display:grid; grid-template-columns:300px 1fr; gap:0; overflow:hidden; }
    .phrases-sidebar { border-right:1px solid var(--border); display:flex; flex-direction:column; height:calc(100vh - 82px); background:var(--light); }
    .phrases-sidebar-head { padding:14px 16px; border-bottom:1px solid var(--border); }
    .phrases-sidebar-head h3 { font-size:.88rem; font-weight:600; margin-bottom:8px; }
    .phrase-cat-item { padding:8px 16px; font-size:.83rem; cursor:pointer; transition:background .1s; border-left:3px solid transparent; }
    .phrase-cat-item:hover { background:white; }
    .phrase-cat-item.active { background:white; border-left-color:var(--accent); font-weight:600; color:var(--accent); }
    .phrase-cat-count { float:right; color:var(--muted); font-size:.72rem; font-family:'DM Mono',monospace; }
    .phrases-main { display:flex; flex-direction:column; height:calc(100vh - 82px); overflow:hidden; }
    .phrases-toolbar { padding:14px 20px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; background:white; flex-shrink:0; }
    .phrases-list { flex:1; overflow-y:auto; padding:16px 20px; }
    .phrase-card { background:white; border:1px solid var(--border); border-radius:8px; padding:14px 16px; margin-bottom:10px; transition:box-shadow .15s; }
    .phrase-card:hover { box-shadow:var(--sh-md); }
    .phrase-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:6px; }
    .phrase-shortcode { font-family:'DM Mono',monospace; font-size:.8rem; background:#f3f4f6; padding:2px 8px; border-radius:4px; color:var(--accent); font-weight:600; }
    .phrase-title { font-weight:600; font-size:.88rem; }
    .phrase-content { font-size:.82rem; color:var(--muted); line-height:1.5; white-space:pre-wrap; }
    .phrase-global-badge { font-size:.65rem; background:#eff6ff; color:var(--info); border:1px solid #bfdbfe; border-radius:4px; padding:1px 6px; font-weight:600; }
    .phrase-own-badge { font-size:.65rem; background:#f0fdf4; color:var(--success); border:1px solid #bbf7d0; border-radius:4px; padding:1px 6px; font-weight:600; }
    .phrase-actions { display:flex; gap:4px; flex-shrink:0; }

    /* Phrase Dropdown in E-Mail */
    .phrase-dropdown {
      position:absolute; background:white; border:1px solid var(--border);
      border-radius:8px; box-shadow:var(--sh-md); z-index:600;
      max-height:240px; overflow-y:auto; min-width:320px;
    }
    .phrase-dropdown-item { padding:8px 12px; cursor:pointer; display:flex; align-items:center; gap:10px; }
    .phrase-dropdown-item:hover, .phrase-dropdown-item.selected { background:#f0f7ff; }
    .phrase-dropdown-item .pd-code { font-family:'DM Mono',monospace; font-size:.75rem; color:var(--accent); width:110px; flex-shrink:0; padding-right:8px; border-right:1px solid var(--border); margin-right:4px; }
    .phrase-dropdown-item .pd-title { font-size:.82rem; font-weight:500; }
    .phrase-dropdown-item .pd-preview { font-size:.72rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

    /* ── GÄSTEVERWALTUNG ── */
    #view-guests.active { display:flex; flex-direction:column; min-height:100vh; }
    .guests-body { flex:1; display:grid; grid-template-columns:320px 1fr; gap:0; overflow:hidden; }
    .guests-list-panel { border-right:1px solid var(--border); display:flex; flex-direction:column; height:calc(100vh - 82px); }
    .guests-list-head { padding:14px 16px; border-bottom:1px solid var(--border); background:var(--light); flex-shrink:0; }
    .guests-search { display:flex; gap:8px; margin-bottom:10px; }
    .guests-search input { flex:1; }
    .guests-filter-row { display:flex; gap:6px; flex-wrap:wrap; }
    .guest-filter-pill { padding:3px 10px; border-radius:99px; font-size:.72rem; cursor:pointer; border:1px solid var(--border); background:white; transition:all .12s; }
    .guest-filter-pill:hover { border-color:var(--accent); color:var(--accent); }
    .guest-filter-pill.active { background:var(--accent); color:white; border-color:var(--accent); }
    .guests-list-body { flex:1; overflow-y:auto; }
    .guest-list-item { padding:12px 16px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .1s; display:flex; align-items:center; gap:12px; }
    a.guest-list-item { text-decoration:none; color:inherit; } /* Routing 2026-08-31: Zeilen sind Links */
    .guest-list-item:hover { background:#f0f7ff; }
    .guest-list-item.selected { background:#eff6ff; border-left:3px solid var(--accent); }
    .guest-avatar-sm { width:36px; height:36px; border-radius:50%; background:var(--nav); color:white; display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:700; flex-shrink:0; }
    .guest-list-name { font-weight:600; font-size:.85rem; }
    .guest-list-sub  { font-size:.72rem; color:var(--muted); margin-top:1px; }
    .guest-list-badge { margin-left:auto; flex-shrink:0; }

    .guest-profile { flex:1; overflow-y:auto; padding:24px 28px; }
    .guest-profile-empty { display:flex; align-items:center; justify-content:center; height:100%; color:var(--muted); flex-direction:column; gap:12px; }
    .guest-profile-head { display:flex; align-items:center; gap:20px; margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid var(--border); }
    .guest-avatar-lg { width:64px; height:64px; border-radius:50%; background:var(--nav); color:white; display:flex; align-items:center; justify-content:center; font-size:1.3rem; font-weight:700; flex-shrink:0; }
    .guest-profile-name { font-size:1.3rem; font-weight:700; }
    .guest-profile-sub  { font-size:.82rem; color:var(--muted); margin-top:2px; display:flex; gap:12px; flex-wrap:wrap; }

    .guest-tabs { display:flex; gap:0; border-bottom:2px solid var(--border); margin-bottom:20px; }
    .guest-tab { padding:8px 18px; font-size:.83rem; font-weight:500; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; color:var(--muted); transition:all .15s; background:none; border-top:none; border-left:none; border-right:none; font-family:'Inter',sans-serif; }
    .guest-tab:hover { color:var(--text); }
    .guest-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
    .guest-tab-panel { display:none; }
    .guest-tab-panel.active { display:block; }

    .data-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:20px; }
    .data-item label { font-size:.7rem; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; display:block; margin-bottom:3px; }
    .data-item span  { font-size:.85rem; }

    .travel-history-item { display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid var(--border); }
    .travel-history-item:last-child { border-bottom:none; }
    .th-year { font-family:'DM Mono',monospace; font-size:.72rem; color:var(--muted); width:50px; flex-shrink:0; }
    .th-info { flex:1; }
    .th-name { font-weight:600; font-size:.85rem; }
    .th-sub  { font-size:.75rem; color:var(--muted); margin-top:2px; }

    .message-item { padding:12px; background:var(--light); border-radius:8px; margin-bottom:10px; }
    .message-meta { font-size:.72rem; color:var(--muted); margin-bottom:4px; font-family:'DM Mono',monospace; }
    .message-text { font-size:.83rem; }

    .doc-item { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
    .doc-item:last-child { border-bottom:none; }
    .doc-icon { font-size:1.2rem; width:32px; text-align:center; flex-shrink:0; }
    .doc-name { font-weight:500; font-size:.83rem; }
    .doc-date { font-size:.72rem; color:var(--muted); font-family:'DM Mono',monospace; }

    /* ── E-MAIL ── */
    #view-email.active { display:flex; flex-direction:column; min-height:100vh; }
    .email-body { flex:1; display:grid; grid-template-columns:340px 1fr; gap:0; overflow:hidden; }
    .email-panel { display:flex; flex-direction:column; height:calc(100vh - 82px); overflow:hidden; }
    .email-panel-head { padding:16px 20px; border-bottom:1px solid var(--border); background:var(--light); flex-shrink:0; }
    .email-panel-head h3 { font-size:.88rem; font-weight:600; margin-bottom:2px; }
    .email-panel-head p  { font-size:.75rem; color:var(--muted); }
    .email-panel-body { flex:1; overflow-y:auto; padding:16px; }
    .email-filter-group { margin-bottom:16px; }
    .email-filter-label { font-size:.7rem; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
    .email-filter-chips { display:flex; flex-wrap:wrap; gap:6px; }
    .filter-chip {
      padding:4px 12px; border-radius:99px; font-size:.78rem; cursor:pointer;
      border:1px solid var(--border); background:white; transition:all .15s;
      user-select:none;
    }
    .filter-chip:hover { border-color:var(--accent); color:var(--accent); }
    .filter-chip.active { background:var(--accent); color:white; border-color:var(--accent); }
    .email-recipients { border-top:1px solid var(--border); margin-top:12px; padding-top:12px; flex-shrink:0; }
    .recipient-count { font-size:.85rem; font-weight:600; color:var(--accent); margin-bottom:8px; display:flex; align-items:center; justify-content:space-between; }
    .recipient-list { max-height:160px; overflow-y:auto; }
    .recipient-item { display:flex; align-items:center; justify-content:space-between; padding:5px 0; font-size:.78rem; border-bottom:1px solid var(--border); }
    .recipient-item:last-child { border-bottom:none; }
    .recipient-name { font-weight:500; }
    .recipient-email { color:var(--muted); font-size:.72rem; font-family:'DM Mono',monospace; }

    .email-composer { border-left:1px solid var(--border); display:flex; flex-direction:column; height:calc(100vh - 82px); }
    .email-composer-head { padding:16px 24px; border-bottom:1px solid var(--border); background:var(--light); flex-shrink:0; }
    .email-composer-head h3 { font-size:.88rem; font-weight:600; }
    .email-composer-body { flex:1; padding:20px 24px; overflow-y:auto; display:flex; flex-direction:column; gap:14px; }
    .email-composer-foot { padding:14px 24px; border-top:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; background:var(--light); }

    .email-field label { display:block; font-size:.72rem; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:5px; }
    .email-placeholder-btns { display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
    .ph-btn { padding:2px 8px; border-radius:4px; border:1px dashed var(--border); background:var(--light); font-size:.72rem; font-family:'DM Mono',monospace; cursor:pointer; color:var(--muted); transition:all .15s; }
    .ph-btn:hover { border-color:var(--accent); color:var(--accent); background:#f0f7ff; }

    .email-body-editor {
      flex:1; min-height:280px; border:1px solid var(--border); border-radius:8px;
      padding:14px; font-family:'Inter',sans-serif; font-size:.88rem; line-height:1.6;
      resize:none; outline:none; transition:border-color .15s;
    }
    .email-body-editor:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.08); }

    .coming-soon-badge { display:inline-flex; align-items:center; gap:6px; background:#fffbeb; color:var(--warning); border:1px solid #fde68a; border-radius:6px; padding:6px 12px; font-size:.78rem; font-weight:500; }

    /* ── STATISTIK DASHBOARD ── */
    #view-stats.active { display:flex; flex-direction:column; min-height:100vh; }
    .stats-body { flex:1; padding:28px; max-width:1400px; width:100%; margin:0 auto; padding-bottom:40px; }
    .stats-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:20px; margin-top:20px; }
    .stats-card {
      background:white; border:1px solid var(--border); border-radius:var(--radius);
      box-shadow:var(--sh); overflow:hidden;
    }
    .stats-card-head {
      padding:14px 18px; border-bottom:1px solid var(--border); background:var(--light);
      display:flex; align-items:center; justify-content:space-between;
    }
    .stats-card-title { font-size:.85rem; font-weight:600; }
    .stats-card-badge { font-size:.7rem; color:var(--muted); font-family:'DM Mono',monospace; }
    .stats-card-body { padding:18px; }
    .stats-card.wide { grid-column:1/-1; }
    .stats-card.span2 { grid-column:span 2; }
    .kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:20px; }
    .kpi-card {
      background:white; border:1px solid var(--border); border-radius:var(--radius);
      box-shadow:var(--sh); padding:18px 20px;
      display:flex; flex-direction:column; gap:4px;
    }
    .kpi-label { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
    .kpi-value { font-size:1.8rem; font-weight:700; color:var(--nav); font-family:'DM Mono',monospace; }
    .kpi-sub   { font-size:.72rem; color:var(--muted); }
    .kpi-trend { font-size:.75rem; margin-top:4px; }
    .kpi-trend.up   { color:var(--success); }
    .kpi-trend.down { color:var(--danger); }
    .stats-mock-badge {
      display:inline-block; font-size:.62rem; background:#fffbeb; color:var(--warning);
      border:1px solid #fde68a; border-radius:4px; padding:1px 5px; margin-left:6px;
      font-family:'DM Mono',monospace; vertical-align:middle;
    }
    .bar-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; font-size:.8rem; }
    .bar-label { width:120px; flex-shrink:0; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .bar-track { flex:1; background:#f3f4f6; border-radius:99px; height:8px; }
    .bar-fill  { height:8px; border-radius:99px; background:var(--accent); transition:width .6s ease; }
    .bar-count { width:40px; text-align:right; color:var(--muted); font-size:.75rem; font-family:'DM Mono',monospace; }

    /* ── MARKETING SEGMENTIERUNG ── */
    #view-marketing.active { display:flex; flex-direction:column; min-height:100vh; }
    .mkt-body { flex:1; padding:28px; max-width:1400px; width:100%; margin:0 auto; padding-bottom:40px; }
    .mkt-header { display:flex; align-items:baseline; gap:12px; margin-bottom:20px; }
    .mkt-header h2 { font-size:1.1rem; font-weight:700; }
    .mkt-header .mkt-sub { font-size:.75rem; color:var(--muted); }

    .mkt-filters {
      background:white; border:1px solid var(--border); border-radius:var(--radius);
      box-shadow:var(--sh); padding:20px; margin-bottom:20px;
    }
    .mkt-filters h3 { font-size:.85rem; font-weight:600; margin-bottom:14px; color:var(--nav); }
    .mkt-filter-grid {
      display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:16px;
    }
    .mkt-filter-group { display:flex; flex-direction:column; gap:4px; }
    .mkt-filter-group label {
      font-size:.72rem; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.03em;
    }
    .mkt-filter-group .filter-row { display:flex; gap:6px; align-items:center; }
    .mkt-filter-group .filter-row select { min-width:50px; max-width:70px; }
    .mkt-filter-group input[type=number] { width:80px; }
    .mkt-filter-group .hint { font-size:.68rem; color:var(--muted); font-style:italic; }

    .mkt-actions {
      display:flex; gap:10px; align-items:center; margin-top:18px; padding-top:14px;
      border-top:1px solid var(--border); flex-wrap:wrap;
    }
    .mkt-result-count { font-size:.82rem; color:var(--muted); font-family:'DM Mono',monospace; margin-left:auto; }

    /* Country multi-select */
    .mkt-country-wrap { position:relative; }
    .mkt-country-trigger {
      display:flex; align-items:center; gap:6px; width:100%; background:var(--light);
      border:1px solid var(--border); border-radius:6px; padding:7px 12px; cursor:pointer;
      font-size:.85rem; color:var(--text); min-height:38px; flex-wrap:wrap;
    }
    .mkt-country-trigger:hover { border-color:var(--accent); }
    .mkt-country-chip {
      display:inline-flex; align-items:center; gap:3px; background:var(--accent); color:white;
      border-radius:4px; padding:1px 6px; font-size:.7rem; font-weight:500; white-space:nowrap;
    }
    .mkt-country-chip .x { cursor:pointer; opacity:.7; margin-left:2px; }
    .mkt-country-chip .x:hover { opacity:1; }
    .mkt-country-dropdown {
      display:none; position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:100;
      background:white; border:1px solid var(--border); border-radius:var(--radius);
      box-shadow:var(--sh-md); max-height:260px; overflow:hidden;
    }
    .mkt-country-dropdown.open { display:block; }
    .mkt-country-search {
      width:100%; border:none; border-bottom:1px solid var(--border); padding:8px 12px;
      font-size:.82rem; outline:none;
    }
    .mkt-country-list { max-height:210px; overflow-y:auto; padding:4px 0; }
    .mkt-country-item {
      display:flex; align-items:center; gap:8px; padding:5px 12px; cursor:pointer;
      font-size:.82rem; transition:background .1s;
    }
    .mkt-country-item:hover { background:var(--light); }
    .mkt-country-item input[type=checkbox] { accent-color:var(--accent); }

    /* Results table */
    .mkt-results { background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--sh); overflow:hidden; }
    .mkt-results table { width:100%; border-collapse:collapse; font-size:.82rem; }
    .mkt-results th {
      background:var(--light); padding:10px 12px; text-align:left; font-size:.72rem;
      font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.03em;
      border-bottom:1px solid var(--border); position:sticky; top:0; cursor:pointer; user-select:none;
    }
    .mkt-results th:hover { color:var(--text); }
    .mkt-results th.sorted { color:var(--accent); }
    .mkt-results td { padding:8px 12px; border-bottom:1px solid var(--border); }
    .mkt-results tr:hover td { background:#f8faff; }
    .mkt-results .nr { font-family:'DM Mono',monospace; font-size:.78rem; color:var(--accent); }
    .mkt-results .muted { color:var(--muted); }
    .mkt-results-wrap { max-height:calc(100vh - 420px); overflow-y:auto; }
    .mkt-empty { padding:40px; text-align:center; color:var(--muted); font-size:.88rem; }

    /* JSON overlay */
    .mkt-json-overlay {
      display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:500;
      align-items:center; justify-content:center;
    }
    .mkt-json-overlay.open { display:flex; }
    .mkt-json-box {
      background:white; border-radius:12px; width:90%; max-width:800px; max-height:80vh;
      display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,.3);
    }
    .mkt-json-header {
      display:flex; align-items:center; justify-content:space-between; padding:16px 20px;
      border-bottom:1px solid var(--border);
    }
    .mkt-json-header h3 { font-size:.95rem; font-weight:600; }
    .mkt-json-content { flex:1; overflow:auto; padding:16px 20px; }
    .mkt-json-content pre {
      font-family:'DM Mono',monospace; font-size:.78rem; white-space:pre-wrap;
      word-break:break-all; line-height:1.5; color:var(--text);
    }

    /* ── PRINT ── */
    @media print {
      body * { visibility:hidden; }
      #print-area, #print-area * { visibility:visible; }
      #print-area { position:fixed; inset:0; background:white; padding:20px; }
      .print-header { margin-bottom:16px; border-bottom:2px solid #002454; padding-bottom:10px; }
      .print-title { font-size:1.1rem; font-weight:700; color:#002454; }
      .print-sub { font-size:.75rem; color:#666; margin-top:3px; }
      .print-table { width:100%; border-collapse:collapse; margin-top:12px; font-size:11px; }
      .print-table th { background:#002454; color:white; padding:6px 8px; text-align:left; font-size:10px; }
      .print-table td { padding:5px 8px; border-bottom:1px solid #e1e4e8; vertical-align:top; }
      .print-table tr:nth-child(even) td { background:#f9fafb; }
      .print-table tr.companion td { background:#f4f5f7; padding-left:20px; font-style:italic; font-size:10px; color:#555; }
      .print-footer { margin-top:16px; font-size:9px; color:#999; border-top:1px solid #e1e4e8; padding-top:8px; }
    }

    /* ── Personal Notes Module ─────────────────────────────── */
    /* ── Personal Notes: Grid-Karten ────────────────────────── */
    .pn-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; }
    @media (max-width:1200px) { .pn-grid { grid-template-columns:repeat(3, 1fr); } }
    @media (max-width:900px)  { .pn-grid { grid-template-columns:repeat(2, 1fr); } }
    @media (max-width:600px)  { .pn-grid { grid-template-columns:1fr; } }

    .pn-card-v2 {
      background:var(--card-bg, #fff); border:1px solid var(--border);
      border-radius:var(--radius, 8px); box-shadow:var(--sh, 0 1px 3px rgba(0,0,0,.08));
      display:flex; flex-direction:column; overflow:hidden;
      border-left:3px solid var(--border); transition:box-shadow .15s, transform .1s;
    }
    .pn-card-v2:hover { box-shadow:0 4px 12px rgba(0,0,0,.1); transform:translateY(-1px); }
    .pn-card-v2.pn-v2-done { opacity:.6; }

    .pn-v2-body { padding:14px 16px; flex:1; }
    .pn-v2-title { font-size:.88rem; font-weight:600; line-height:1.35; word-break:break-word; }
    .pn-strikethrough { text-decoration:line-through; color:var(--muted); }
    .pn-v2-text { font-size:.78rem; color:var(--muted); margin-top:6px; line-height:1.4;
      white-space:pre-line; word-break:break-word;
      display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
    .pn-v2-due { font-size:.74rem; margin-top:6px; color:var(--muted); }
    .pn-overdue { color:var(--danger,#dc2626); font-weight:600; }

    .pn-v2-footer {
      display:flex; align-items:center; gap:6px; padding:8px 14px;
      border-top:1px solid var(--border); background:var(--light, #f8f9fa); flex-wrap:wrap;
    }
    .pn-v2-footer-meta { display:flex; align-items:center; gap:6px; flex:1; min-width:0; }
    .pn-v2-date { font-size:.7rem; color:var(--muted); }
    .pn-v2-footer-actions { display:flex; align-items:center; gap:4px; margin-left:auto; }
    .pn-action-btn { background:none; border:none; cursor:pointer; font-size:.82rem; padding:2px 4px;
      border-radius:4px; opacity:.6; transition:opacity .15s; }
    .pn-action-btn:hover { opacity:1; background:var(--hover,#f0f0f0); }

    .pn-add-card {
      display:flex; align-items:center; justify-content:center;
      min-height:100px; border:2px dashed var(--border); border-radius:var(--radius, 8px);
      color:var(--muted); font-size:.88rem; cursor:pointer; transition:all .15s;
    }
    .pn-add-card:hover { border-color:var(--accent); color:var(--accent); background:rgba(26,86,219,.04); }
    .btn-ghost-sm { background:none; border:none; cursor:pointer; font-size:.82rem; padding:2px 4px; border-radius:4px; opacity:.7; }
    .btn-ghost-sm:hover { opacity:1; background:var(--hover,#f0f0f0); }

    /* ── Announcements ─────────────────────────────────────── */
    .ann-card { padding:14px 18px; border-bottom:1px solid var(--border); border-left:3px solid var(--accent,#1a56db); }
    .ann-card:last-child { border-bottom:none; }
    .ann-card:hover { background:var(--hover,#f8f9fa); }
    .ann-card.ann-pinned { background:#fffbeb; border-left-color:#f59e0b; }
    .ann-card.ann-pinned:hover { background:#fef3c7; }
    .ann-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
    .ann-card-title-row { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
    .ann-card-title { font-size:.92rem; font-weight:600; line-height:1.35; }
    .ann-pin-icon { font-size:.82rem; }
    .ann-card-content { font-size:.84rem; color:var(--text); margin-top:6px; line-height:1.5; white-space:pre-line; word-break:break-word; }
    .ann-card-meta { font-size:.72rem; color:var(--muted); margin-top:8px; display:flex; gap:10px; }
    .ann-card-actions { display:flex; gap:2px; opacity:0; transition:opacity .15s; }
    .ann-card:hover .ann-card-actions { opacity:1; }
    .ann-badge { font-size:.68rem; padding:2px 7px; border-radius:10px; font-weight:500; white-space:nowrap; }
    .ann-badge-global { background:#dbeafe; color:#1e40af; }
    .ann-badge-team { background:#d1fae5; color:#065f46; }
    .ann-badge-role { background:#ede9fe; color:#5b21b6; }

    /* ── Announcement Banner (auto auf jeder Seite) ───────── */
    .ann-banner { margin-bottom:8px; }
    .ann-banner-grid { display:grid; gap:10px; }
    @media (max-width:600px) { .ann-banner-grid { grid-template-columns:1fr !important; } }
    .ann-banner-card {
      padding:12px 16px; border-left:3px solid var(--accent,#1a56db);
      border-radius:var(--radius,8px); background:var(--surface,#fff);
      border:1px solid var(--border); box-shadow:var(--sh,0 1px 3px rgba(0,0,0,.06));
      display:flex; flex-direction:column;
    }
    .ann-banner-card.ann-pinned { background:#fffbeb; border-left-color:#f59e0b; }
    .ann-banner-card.ann-banner-prio { border-left-color:#8b5cf6; background:#faf5ff; }
    .ann-banner-header { display:flex; align-items:center; gap:6px; font-size:.85rem; flex-wrap:wrap; }
    .ann-banner-text { font-size:.8rem; color:var(--text); margin-top:6px; line-height:1.45; white-space:pre-line; word-break:break-word;
      display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
    .ann-banner-meta { font-size:.7rem; color:var(--muted); margin-top:auto; padding-top:6px; }
    .ann-badge-prio { background:#ede9fe; color:#5b21b6; }
    .ann-badge-due { background:#e0f2fe; color:#0369a1; }
    .ann-badge-overdue { background:#fef2f2; color:#dc2626; font-weight:600; }
