  :root {
    --blue: #2f6bff;
    --blue-dark: #1e4fd6;
    --ink: #1f2937;
    --ink-soft: #374151;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --border: #d8dde6;
    --bg-active: #eef1f6;
    --bg-hint: #f4f5f7;
    --orange: #f5a300;
    --red: #e02424;
    --radius: 10px;
  }

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

  body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: #fff;
    font-size: 15px;
    line-height: 1.55;
    display: flex;
    min-height: 100vh;
  }

  /* Hintergrund-Scroll sperren, solange ein Modal / Overlay offen ist */
  html:has(#admin-overlay.open),
  html:has(#arch-overlay.open),
  html:has(#overview-overlay.open),
  html:has(#benj-greet:not(.hidden)),
  html:has(#benj-farewell:not(.hidden)),
  html.modal-open {
    overflow: hidden;
  }
  body:has(#admin-overlay.open),
  body:has(#arch-overlay.open),
  body:has(#overview-overlay.open),
  body:has(#benj-greet:not(.hidden)),
  body:has(#benj-farewell:not(.hidden)),
  body.modal-open {
    overflow: hidden;
  }

  h1 { font-family: "Baloo 2", "Poppins", "Inter", sans-serif; }

  /* ============ Sidebar ============ */
  .sidebar {
    width: 300px;
    min-width: 300px;
    border-right: 1px solid #e9ecf1;
    display: flex;
    flex-direction: column;
    padding: 28px 22px 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: #fff;
  }

  .brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 36px;
  }
  .brand .logo { display: flex; flex-direction: column; align-items: flex-end; cursor: pointer; }
  .brand .logo .logo-svg { width: 142px; height: auto; display: block; }
  .brand .logo .sub {
    font-family: "Baloo 2", "Poppins", sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--orange);
    line-height: 1;
    margin-top: 4px;
  }
  .brand .switcher { color: var(--gray-light); cursor: pointer; padding-top: 8px; }

  .help-icon-btn {
    position: absolute;
    top: 26px;
    right: 52px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-active);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-weight: 700;
    font-size: 16px;
    transition: background 0.2s, transform 0.2s;
  }
  .help-icon-btn:hover {
    background: var(--blue);
    color: #fff;
    transform: scale(1.05);
  }

  .notif {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 4px;
    margin-bottom: 22px;
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
    font-size: 16px;
  }
  .notif:hover { background: #f6f7fa; }
  .notif .bell { color: var(--gray); min-width: 20px; }
  .notif .label { flex: 1; }
  .notif .badge {
    background: #fdf4e7;
    color: var(--orange);
    font-size: 14px;
    font-weight: 600;
    border-radius: 9px;
    padding: 3px 11px;
  }

  .back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 26px;
  }
  .back-link:hover { color: var(--blue-dark); }

  .sidebar h2.section {
    font-family: "Inter", sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #14161a;
  }

  .nav { list-style: none; display: flex; flex-direction: column; gap: 2px; }
  .nav a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius);
    color: var(--ink-soft);
    text-decoration: none;
    cursor: pointer;
  }
  .nav a:hover { background: #f6f7fa; }
  .nav a.active { background: var(--bg-active); color: var(--blue); font-weight: 500; }

  .sidebar .spacer { flex: 1; }

  .user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-active);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
  }
  .user-card .avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray);
  }
  .user-card .name { font-weight: 600; flex: 1; }
  .user-card .chev { color: var(--gray-light); }

  /* ============ Main ============ */
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fbfcfd; }

  .topbar {
    padding: 22px 40px;
    border-bottom: 1px solid #eceff4;
    background: #fff;
  }
  .topbar .crumb { color: var(--gray); }
  .topbar .crumb.current { color: var(--blue); font-weight: 500; }
  .topbar .sep { color: var(--gray-light); margin: 0 8px; }

  .page-wrap { flex: 1; padding: 26px 28px 40px; }

  .card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(20, 25, 40, .05), 0 6px 24px rgba(20, 25, 40, .06);
    max-width: 2120px;
    padding: 44px 48px 56px;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .card.hidden {
    opacity: 0;
    transform: translateY(10px);
  }

  .back-overview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 30px;
  }
  .back-overview:hover { text-decoration: underline; }

  h1 {
    font-size: 33px;
    font-weight: 600;
    color: #14161a;
    margin-bottom: 26px;
    letter-spacing: -0.2px;
  }

  .lead { color: var(--ink-soft); margin-bottom: 32px; }

  h2.block-title {
    font-family: "Inter", sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: #14161a;
    margin: 44px 0 16px;
  }

  /* ---------- Form elements ---------- */
  .field { margin-bottom: 26px; }
  .field label.title {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #14161a;
  }

  .select-wrap { position: relative; }
  .select-wrap select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: var(--ink);
    padding: 13px 44px 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
  }
  .select-wrap select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(47,107,255,.15);
  }
  .select-wrap::after {
    content: "";
    position: absolute;
    right: 18px; top: 50%;
    width: 9px; height: 9px;
    border-right: 2px solid var(--gray);
    border-bottom: 2px solid var(--gray);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
  }

  input[type="text"].date-input {
    font: inherit;
    color: var(--ink);
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 350px;
    max-width: 100%;
  }
  input[type="text"].date-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(47,107,255,.15);
  }
  input[type="text"].date-input:disabled {
    background: var(--bg-hint);
    border-color: transparent;
  }

  /* Checkboxen */
  .check {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    cursor: pointer;
    user-select: none;
  }
  .check input { position: absolute; opacity: 0; pointer-events: none; }
  .check .box {
    width: 22px; height: 22px;
    min-width: 22px;
    border: 1.5px solid #c3cad6;
    border-radius: 5px;
    background: #fff;
    margin-top: 2px;
    position: relative;
    transition: background .12s, border-color .12s;
  }
  .check input:checked + .box { background: var(--blue); border-color: var(--blue); }
  .check input:checked + .box::after {
    content: "";
    position: absolute;
    left: 7px; top: 3px;
    width: 5px; height: 10px;
    border-right: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(45deg);
  }
  .check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(47,107,255,.25); }
  .check .text { font-size: 15.5px; color: var(--ink); }
  .check .text .meta {
    display: block;
    color: var(--gray);
    font-size: 14px;
    margin-top: 3px;
  }

  /* Radios */
  .radio {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    cursor: pointer;
    user-select: none;
  }
  .radio input { position: absolute; opacity: 0; pointer-events: none; }
  .radio .dot {
    width: 22px; height: 22px;
    min-width: 22px;
    border: 1.5px solid #c3cad6;
    border-radius: 50%;
    background: #fff;
    margin-top: 2px;
    position: relative;
    transition: border-color .12s;
  }
  .radio input:checked + .dot { border: 7px solid var(--blue); }
  .radio input:focus-visible + .dot { box-shadow: 0 0 0 3px rgba(47,107,255,.25); }
  .radio .text { font-size: 15.5px; }

  .option-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 28px; }
  .check-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }

  .badge-beta {
    display: inline-block;
    background: #fdecec;
    color: var(--red);
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: 1px;
  }
  .info-icon {
    display: inline-flex;
    vertical-align: -3px;
    margin-left: 6px;
    color: var(--ink-soft);
  }

  .hint-box {
    background: var(--bg-hint);
    border-radius: var(--radius);
    padding: 24px 28px;
    color: var(--ink-soft);
    margin: 36px 0 0;
  }

  .btn {
    font: inherit;
    font-weight: 500;
    border-radius: var(--radius);
    padding: 13px 28px;
    cursor: pointer;
    border: none;
    background: var(--blue);
    color: #fff;
  }
  .btn:hover { background: var(--blue-dark); }
  .btn-row { margin-top: 36px; }
  /* „Gespeichert"-Zustand: Button wird kurz zum Häkchen (wie im echten Connect) */
  .btn.btn-saved, .btn.btn-saved:hover {
    background: #7184d6; pointer-events: none;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .btn.btn-saved svg { width: 20px; height: 20px; display: block; animation: btnCheckPop .28s ease; }
  @keyframes btnCheckPop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

  .help-links { list-style: disc; margin: 18px 0 26px 28px; display: flex; flex-direction: column; gap: 8px; }
  .help-links a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }
  .help-links a:hover { text-decoration: underline; }

  .red-text { color: var(--red); }

  .section-divider { margin-top: 56px; }

  /* Smoothe Übergänge für ein-/ausgeblendete Elemente */
  .section-divider, .check, .check-list {
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    overflow: hidden;
  }
  .section-divider.hidden, .check.hidden, .check-list.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
  }

  /* Footer */
  .footer {
    border-top: 1px solid #eceff4;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-light);
    font-size: 14.5px;
    background: #fff;
  }
  .footer a { color: var(--blue); text-decoration: none; }
  .footer a:hover { text-decoration: underline; }
  .footer .left .pipe { color: var(--gray-light); margin: 0 4px; }

  /* ============ Login ============ */
  #login-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #fbfcfd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }
  #login-screen.fade-out {
    opacity: 0;
    visibility: hidden;
  }
  /* Bereits eingeloggt (per Inline-Head-Script gesetzt): Login sofort verbergen, kein Flash */
  html.eb-authed #login-screen { display: none !important; }
  .login-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(20, 25, 40, .05), 0 10px 36px rgba(20, 25, 40, .09);
    width: 420px;
    max-width: 100%;
    padding: 48px 44px 44px;
    text-align: center;
  }
  .login-logo { display: inline-flex; flex-direction: column; align-items: flex-end; margin-bottom: 34px; }
  .login-logo .login-logo-svg { width: 176px; height: auto; display: block; }
  .login-logo .logo-sub {
    font-family: "Baloo 2", "Poppins", sans-serif;
    font-weight: 600;
    font-size: 17px;
    color: var(--orange);
    line-height: 1;
    margin-top: 7px;
  }
  .login-card h2 {
    font-family: "Inter", sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #14161a;
    margin-bottom: 24px;
  }
  .login-card input[type="password"] {
    font: inherit;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    text-align: center;
  }
  .login-card input[type="password"]:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(47,107,255,.15);
  }
  .login-card .btn { width: 100%; }
  .login-error {
    color: var(--red);
    font-size: 14px;
    margin-top: 14px;
    min-height: 20px;
  }
  .login-card.shake { animation: loginShake .4s; }
  @keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-9px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(4px); }
  }

  /* Chat bubble */
  .chat-fab {
    position: fixed;
    right: 26px; bottom: 26px;
    z-index: 950;
    width: 58px; height: 58px;
    border-radius: 50%;
    background: var(--blue);
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(47,107,255,.35);
  }
  .chat-fab svg { width: 26px; height: 26px; fill: #fff; }

  /* ============ Geführte Tour ============ */
  /* ============ Demo-Toolbar (Tour / Erklär-Modus / Selektoren) ============ */
  .demo-toolbar {
    position: fixed;
    left: 322px;
    bottom: 26px;
    z-index: 900;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    max-width: calc(100vw - 322px - 24px - 96px); /* rechts Platz für den Chat-Button */
    background: #14161a;
    border-radius: 18px;
    padding: 5px;
    box-shadow: 0 8px 22px rgba(20,22,26,.3);
  }
  .demo-toolbar button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 8px 13px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
  }
  .demo-toolbar button:hover { background: rgba(255,255,255,.12); }
  .demo-toolbar button.on { background: var(--blue); }
  /* WIP/ausgegraut: deaktiviert (nicht klickbar) */
  .demo-toolbar button.is-wip { color: rgba(255,255,255,.38); opacity: .6; cursor: not-allowed; }
  .demo-toolbar button.is-wip svg { stroke: rgba(255,255,255,.38); }
  .demo-toolbar button.is-wip:hover { background: transparent; }
  .demo-toolbar button svg { width: 15px; height: 15px; }
  .demo-toolbar .tb-sep { width: 1px; height: 22px; background: rgba(255,255,255,.18); }
  .demo-toolbar [hidden] { display: none !important; }
  .demo-toolbar .q {
    width: 19px; height: 19px;
    min-width: 19px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
  }
  .demo-toolbar button.on .q { background: #fff; color: var(--blue); }

  /* ============ Erklär-Modus ============ */
  body.explain-on, body.explain-on * { cursor: help !important; }
  body.explain-on select { pointer-events: none !important; }

  #explain-badge {
    position: fixed;
    z-index: 985;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(47,107,255,.45);
    transform: translate(14px, 14px);
  }
  body.explain-on #explain-badge { display: flex; }

  #explain-ring {
    position: fixed;
    z-index: 960;
    border: 2.5px solid var(--blue);
    border-radius: 10px;
    background: rgba(47,107,255,.06);
    pointer-events: none;
    display: none;
    transition: all .25s ease;
  }

  #explain-pop {
    position: fixed;
    z-index: 986;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #14161a;
    color: #fff;
    border-radius: 12px;
    padding: 15px 18px 14px;
    box-shadow: 0 10px 36px rgba(0,0,0,.4);
    display: none;
    font-size: 14px;
    line-height: 1.55;
  }
  #explain-pop .pop-title {
    font-weight: 700;
    font-size: 14.5px;
    margin-bottom: 5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  #explain-pop .pop-title .q {
    width: 18px; height: 18px;
    min-width: 18px;
    border-radius: 50%;
    background: var(--blue);
    font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  #explain-pop .pop-text { color: #d3d7de; }
  #explain-pop .pop-hint { color: #8a909b; font-size: 12px; margin-top: 9px; }

  /* ============ Selektor-Inspektor ============ */
  #inspect-layer { position: fixed; inset: 0; z-index: 970; pointer-events: none; display: none; }
  body.inspect-on #inspect-layer { display: block; }

  /* ============ In-Place-Erklärtext-Editor (Modus + Modal) ============ */
  #edit-layer { position: fixed; inset: 0; z-index: 970; pointer-events: none; display: none; }
  body.editmode-on #edit-layer { display: block; }
  body.editmode-on, body.editmode-on * { cursor: default; }
  .em-out {
    position: fixed; box-sizing: border-box; pointer-events: auto; cursor: pointer;
    border: 2px dashed #2f6bff; border-radius: 8px; background: rgba(47,107,255,.07);
    transition: background .12s, box-shadow .12s;
  }
  .em-out:hover { background: rgba(47,107,255,.16); box-shadow: 0 0 0 3px rgba(47,107,255,.22); }
  .em-out.is-empty { border-color: #c9820b; background: rgba(201,130,11,.08); }
  .em-out.is-empty:hover { background: rgba(201,130,11,.18); box-shadow: 0 0 0 3px rgba(201,130,11,.22); }
  .em-tag {
    position: fixed; z-index: 971; pointer-events: none; transform: translateY(-58%);
    font: 700 11px/1.3 -apple-system, system-ui, sans-serif; color: #fff; background: #2f6bff;
    padding: 2px 8px; border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 7px rgba(0,0,0,.28);
    display: flex; align-items: center; gap: 4px;
  }
  .em-tag.is-empty { background: #c9820b; }

  #edit-hint {
    position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 972;
    background: #2a2f3a; color: #eef0f4; font-size: 13px; font-weight: 600;
    padding: 9px 16px; border-radius: 999px; box-shadow: 0 8px 26px rgba(15,23,42,.35);
    display: none; pointer-events: none;
  }
  body.editmode-on #edit-hint { display: block; }

  #edit-modal-backdrop {
    position: fixed; inset: 0; z-index: 1600; background: rgba(15,23,42,.5);
    display: none; align-items: center; justify-content: center; padding: 20px;
  }
  #edit-modal-backdrop.open { display: flex; }
  #edit-modal {
    background: #fff; border-radius: 16px; box-shadow: 0 22px 64px rgba(0,0,0,.32);
    width: 720px; max-width: 100%; max-height: calc(100vh - 40px);
    display: flex; flex-direction: column; overflow: hidden;
  }
  #edit-modal .em-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #eceff4; }
  #edit-modal .em-head-txt { flex: 1; }
  #edit-modal .em-title { font-weight: 700; font-size: 16px; color: var(--ink); }
  #edit-modal .em-sub { font-size: 12.5px; color: var(--gray); margin-top: 2px; }
  #edit-modal #em-close { background: none; border: none; color: var(--gray); font-size: 17px; cursor: pointer; padding: 4px 9px; border-radius: 8px; }
  #edit-modal #em-close:hover { background: var(--bg-active); color: var(--ink); }
  #edit-modal .em-body { display: grid; grid-template-columns: 1fr 300px; gap: 18px; padding: 18px 20px; overflow-y: auto; background: #f7f9fc; }
  @media (max-width: 680px) { #edit-modal .em-body { grid-template-columns: 1fr; } }
  #edit-modal .em-form { display: flex; flex-direction: column; gap: 8px; }
  #edit-modal .em-addr { align-self: flex-start; font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--gray-light); background: var(--bg-active); border-radius: 6px; padding: 2px 8px; }
  #edit-modal .em-addr:empty { display: none; }
  #edit-modal .em-label { font-size: 12px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
  #edit-modal .em-label-hint { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--gray-light); }
  #edit-modal #em-text { min-height: 130px; resize: vertical; font-size: 13.5px; line-height: 1.55; }
  #edit-modal .em-preview-col { position: sticky; top: 0; }
  #edit-modal .em-foot { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid #eceff4; }
  #edit-modal .em-foot-btns { margin-left: auto; display: flex; gap: 8px; }

  /* ============ Toast / Bestätigung (kurz eingeblendet) ============ */
  #toast {
    position: fixed; left: 50%; top: 22px; transform: translateX(-50%) translateY(-16px);
    z-index: 2000; display: flex; align-items: center; gap: 11px;
    background: #14161a; color: #fff; padding: 13px 20px 13px 15px; border-radius: 14px;
    box-shadow: 0 12px 34px rgba(15,23,42,.4); font-size: 14.5px; font-weight: 600;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  #toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
  #toast .toast-check {
    flex: none; width: 26px; height: 26px; border-radius: 50%; background: #1f9d55;
    display: flex; align-items: center; justify-content: center;
  }
  #toast.is-error .toast-check { background: #d64545; }
  #toast .toast-check svg { width: 15px; height: 15px; display: block; }
  #toast .toast-sub { display: block; font-weight: 500; font-size: 12.5px; color: #b9bec7; margin-top: 1px; }

  .ins-out {
    position: fixed; border: 1.5px dashed; border-radius: 8px;
    pointer-events: none; box-sizing: border-box;
  }
  .ins-badge {
    position: fixed; z-index: 971;
    font: 600 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    padding: 2px 7px; border-radius: 6px; color: #fff;
    pointer-events: auto; cursor: copy; white-space: nowrap;
    box-shadow: 0 2px 7px rgba(0,0,0,.28);
    transform: translateY(-58%); max-width: 320px; overflow: hidden; text-overflow: ellipsis;
  }
  .ins-badge:hover { filter: brightness(1.12); }
  .ins-badge.copied { background: #111 !important; }
  .ins-ok   { background: #1f9d55; } .ins-out.ins-ok   { border-color: #1f9d55; }
  .ins-warn { background: #c9820b; } .ins-out.ins-warn { border-color: #c9820b; }
  .ins-red  { background: #d64545; } .ins-out.ins-red  { border-color: #d64545; }
  .ins-nav  { background: #2f6bff; } .ins-out.ins-nav  { border-color: #2f6bff; }
  .ins-unv  { background: #8b5cf6; } .ins-out.ins-unv  { border-color: #8b5cf6; }
  /* „ungeprüft": gestrichelt-violetter Rahmen + auffälliges Muster, unabhängig vom Abdeckungs-Status */
  .ins-out.ins-unverified { border-style: dashed; border-width: 2.5px; border-color: #8b5cf6; }
  .ins-badge.ins-unverified::after { content: " ?"; opacity: .9; }
  .ins-badge.ins-unverified { box-shadow: 0 0 0 2px rgba(139,92,246,.5), 0 2px 7px rgba(0,0,0,.28); }
  .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
  .dot.dot-unv { background: #8b5cf6; }
  #inspect-panel .ip-row.is-unverified { background: rgba(139,92,246,.08); }
  #inspect-panel .ip-chip-unv { background: rgba(139,92,246,.25); color: #c3b1f7; }

  #inspect-panel {
    position: fixed; top: 64px; right: 16px; width: 270px;
    max-height: calc(100vh - 150px); overflow: auto;
    background: #14161a; color: #fff; border-radius: 12px;
    z-index: 988; padding: 15px 16px 14px; display: none;
    box-shadow: 0 12px 38px rgba(0,0,0,.45); font-size: 13px;
  }
  body.inspect-on #inspect-panel { display: block; }
  #inspect-panel .ip-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
  #inspect-panel .ip-title { font-weight: 700; font-size: 15px; }
  #inspect-panel #inspect-close { background: none; border: none; color: #8a909b; font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
  #inspect-panel #inspect-close:hover { background: rgba(255,255,255,.1); color: #fff; }
  #inspect-panel .ip-sub { color: #9aa0ab; font-size: 12px; margin: 0 0 11px; line-height: 1.45; }
  #inspect-panel .ip-sub code { background: rgba(255,255,255,.1); padding: 1px 5px; border-radius: 4px; font-size: 11px; }
  #inspect-panel .ip-legend { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #c7ccd4; margin-bottom: 11px; }
  #inspect-panel .ip-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
  #inspect-panel .ip-stats span { background: rgba(255,255,255,.08); border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 600; }
  #inspect-panel .ip-group { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #7e8794; margin: 12px 0 5px; }
  #inspect-panel .ip-row { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.06); cursor: copy; }
  #inspect-panel .ip-row:hover { background: rgba(255,255,255,.05); }
  #inspect-panel .ip-row .dot { flex: 0 0 auto; }
  #inspect-panel .ip-chip {
    flex: 0 0 auto; font: 700 9.5px/1 ui-monospace, Menlo, Consolas, monospace;
    text-transform: uppercase; letter-spacing: .03em;
    padding: 3px 5px; border-radius: 4px; color: #cfd6e4; background: rgba(255,255,255,.1);
  }
  #inspect-panel .ip-chip-name  { background: rgba(31,157,85,.22);  color: #74e3a3; }
  #inspect-panel .ip-chip-id    { background: rgba(201,130,11,.22); color: #f0bd6a; }
  #inspect-panel .ip-chip-route { background: rgba(47,107,255,.22); color: #8fb2ff; }
  #inspect-panel .ip-chip-css   { background: rgba(255,255,255,.12); color: #c7ccd4; }
  #inspect-panel .ip-row .ip-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  #inspect-panel .ip-row .ip-val {
    font: 11.5px/1.35 ui-monospace, Menlo, Consolas, monospace; color: #e6e9ee;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #inspect-panel .ip-row .ip-lab {
    color: #7e8794; font-size: 10.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* ============ Admin-Overlay (Wissensdatenbank) ============ */
  #admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(15, 23, 42, .5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  #admin-overlay.open { display: flex; }
  #admin-overlay .admin-card { width: 920px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
  #overview-overlay .arch-card { width: 860px; max-height: min(88vh, calc(100vh - 40px)); }
  .admin-warn-badge {
    flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: #92400e;
    background: #fff7ed; border: 1px solid #fdba74; border-radius: 999px; padding: 2px 9px;
  }
  /* Login-Gate */
  #admin-login { display: none; padding: 40px 22px 44px; }
  .admin-card.locked #admin-login { display: flex; justify-content: center; }
  .admin-card.locked .admin-tabs,
  .admin-card.locked .admin-body,
  .admin-card.locked .admin-foot { display: none; }
  .admin-login-box { width: 320px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
  .admin-login-title { font-size: 16px; font-weight: 700; color: var(--ink); }
  #admin-login-error:empty { display: none; }
  /* Tab-Menü Wissen / Fragen */
  .admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid #eceff4; background: #fff; }
  .admin-tab {
    font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
    border: none; background: none; color: var(--gray);
    padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -1px;
    display: flex; align-items: center; gap: 7px; white-space: nowrap;
  }
  .admin-tab:hover { color: var(--ink); }
  .admin-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
  .admin-count {
    font-size: 11px; font-weight: 700; min-width: 20px; text-align: center;
    background: var(--bg-active); color: var(--gray); border-radius: 999px; padding: 1px 7px;
  }
  .admin-tab.active .admin-count { background: var(--blue); color: #fff; }
  .admin-body { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 18px 22px; background: #f7f9fc; }
  .admin-pane { display: flex; flex-direction: column; gap: 10px; }
  .admin-pane.hidden { display: none; }

  /* ============ Erklärtext-Editor (Admin → Tab Erklärtexte) ============ */
  .txt-toolbar-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .txt-search { flex: 1; min-width: 200px; }
  .txt-onlymissing { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gray); white-space: nowrap; cursor: pointer; }
  .txt-editor { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
  @media (max-width: 760px) { .txt-editor { grid-template-columns: 1fr; } }
  .txt-list { display: flex; flex-direction: column; gap: 14px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
  .txt-group-head {
    position: sticky; top: 0; z-index: 1; background: #f7f9fc;
    font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase;
    letter-spacing: .5px; padding: 4px 0 3px; border-bottom: 1px solid #e6e9ef;
  }
  .txt-entry { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; }
  .txt-entry.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
  .txt-entry.missing { border-color: #f0b200; }
  .txt-entry-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
  .txt-entry-top .txt-label { flex: 1; font-size: 12px; font-weight: 700; color: var(--ink); }
  .txt-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: var(--gray-light); background: var(--bg-active); border-radius: 5px; padding: 1px 6px; }
  .txt-warn { display: none; font-size: 10.5px; font-weight: 700; color: #b97e00; background: #fff5db; border-radius: 5px; padding: 1px 6px; }
  .txt-entry.missing .txt-warn { display: inline-block; }
  .txt-f-title { width: 100%; margin-bottom: 7px; }
  .txt-fmt-bar { display: flex; gap: 5px; margin-bottom: 6px; }
  .txt-fmt-bar button {
    font: inherit; font-size: 12.5px; cursor: pointer; border: 1px solid var(--border);
    background: #fff; color: var(--ink); border-radius: 6px; min-width: 30px; height: 27px; padding: 0 8px;
  }
  .txt-fmt-bar button:hover { background: var(--bg-active); }
  .txt-fmt-bar .txt-fmt-b { font-weight: 800; }
  .txt-fmt-bar .txt-fmt-i { font-style: italic; }
  .txt-fmt-bar .txt-fmt-c { font-family: ui-monospace, Menlo, monospace; }
  .txt-f-text { width: 100%; min-height: 64px; resize: vertical; font-size: 13px; line-height: 1.55; }

  .txt-preview-wrap { position: sticky; top: 0; }
  .txt-preview-label { font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
  .txt-preview-pop {
    background: #2a2f3a; color: #eef0f4; border-radius: 12px; padding: 15px 17px;
    box-shadow: 0 16px 40px rgba(15,23,42,.28); max-width: 320px;
  }
  .txt-pop-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 7px; }
  .txt-pop-title .q { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; flex: none; }
  .txt-pop-text { color: #d3d7de; font-size: 13.5px; line-height: 1.6; }
  .txt-pop-text strong { color: #fff; }
  .txt-pop-text code { background: rgba(255,255,255,.12); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
  .txt-pop-hint { color: #8a909b; font-size: 11.5px; margin-top: 9px; }
  .txt-prev-meta { font-size: 11px; color: var(--gray-light); margin: 9px 0 0; line-height: 1.5; }
  .admin-hint { font-size: 12.5px; color: var(--gray); margin: 0; line-height: 1.5; }
  .admin-list { display: flex; flex-direction: column; gap: 12px; }
  .admin-label { font-size: 12px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .4px; }
  .admin-input {
    font: inherit; font-size: 13.5px; color: var(--ink); line-height: 1.5;
    border: 1.5px solid var(--border); border-radius: 9px; padding: 9px 11px;
    width: 100%; box-sizing: border-box; background: #fff; resize: vertical;
  }
  .admin-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
  .admin-grow { overflow: hidden; min-height: 40px; }
  .admin-section-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 700; color: var(--ink);
  }
  .admin-entry {
    border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px;
    display: flex; flex-direction: column; gap: 9px; background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
  }
  .admin-entry .admin-entry-top { display: flex; gap: 9px; align-items: center; }
  .admin-entry .admin-num {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px;
    background: var(--bg-active); color: var(--blue); font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .admin-entry .admin-f-titel { flex: 1; font-weight: 600; }
  .admin-entry .admin-del {
    flex: 0 0 auto; border: none; background: #fff1f1; color: var(--red);
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 17px; line-height: 1;
  }
  .admin-entry .admin-del:hover { background: #ffe0e0; }
  .admin-entry .admin-f-tags { font-size: 12.5px; background: #fafbfe; }
  .admin-foot {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 22px; border-top: 1px solid #eceff4; background: #fff;
  }
  .admin-foot-btns { margin-left: auto; display: flex; gap: 8px; }
  .admin-status { font-size: 12.5px; color: var(--gray); }
  .admin-status.ok { color: #1a9d54; font-weight: 600; }
  .admin-status.err { color: var(--red); font-weight: 600; }
  .admin-btn {
    font: inherit; font-size: 13px; font-weight: 600; padding: 9px 16px;
    border-radius: 9px; border: 1.5px solid var(--border); background: #fff;
    color: var(--ink-soft); cursor: pointer; transition: background .13s, color .13s;
  }
  .admin-btn.ghost:hover { background: var(--bg-active); color: var(--blue); }
  .admin-btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
  .admin-btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

  .arch-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 56px rgba(0,0,0,.35);
    width: 640px;
    max-width: 100%;
    max-height: min(720px, calc(100vh - 60px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .arch-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 22px;
    border-bottom: 1px solid #eceff4;
    background: linear-gradient(135deg, var(--blue) 0%, #1e4fd6 100%);
  }
  .arch-head .icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
  }
  .arch-head .who { flex: 1; }
  .arch-head .who .name { font-weight: 700; font-size: 17px; color: #fff; }
  .arch-head .who .status { font-size: 13px; color: rgba(255,255,255,.85); }
  .arch-head .icon-btn {
    background: rgba(255,255,255,.15); border: none; color: #fff;
    cursor: pointer; padding: 8px; border-radius: 8px; display: flex;
  }
  .arch-head .icon-btn:hover { background: rgba(255,255,255,.25); }
  
  .arch-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 26px;
    background: #fff;
  }
  .arch-body h3 {
    font-family: "Poppins", sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 14px;
    margin-top: 26px;
  }
  .arch-body h3:first-child { margin-top: 0; }
  .arch-body p {
    color: var(--ink-soft);
    line-height: 1.65;
    margin-bottom: 14px;
  }
  .arch-body ul {
    list-style: none;
    margin: 16px 0;
  }
  .arch-body li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    color: var(--ink-soft);
    line-height: 1.6;
  }
  .arch-body li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--blue);
    font-weight: 700;
  }
  .arch-layer {
    background: var(--bg-hint);
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 20px 0;
  }
  .dev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 0 0 20px;
  }
  .dev-note {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-soft);
    background: var(--bg-hint);
    border-left: 3px solid var(--blue);
    border-radius: 0 8px 8px 0;
    padding: 11px 14px;
    margin: 0;
  }
  .dev-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--bg-hint);
    color: var(--gray);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 2px solid var(--border);
  }
  .dev-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--ink-soft);
    vertical-align: top;
    line-height: 1.5;
  }
  .dev-table td:first-child { color: var(--ink); }
  .dev-table tbody tr:last-child td { border-bottom: none; }
  .dev-table code {
    background: #f0f2f5;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    font-family: ui-monospace, "SFMono-Regular", monospace;
    color: var(--blue);
    white-space: nowrap;
  }
  .arch-body code {
    background: #f0f2f5;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12.5px;
    font-family: ui-monospace, "SFMono-Regular", monospace;
    color: var(--blue);
  }
  /* ─── Repo-Tree ─── */
  .repo-tree {
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 12.5px;
    background: #0e1016;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 9px;
    padding: 10px 0;
    margin: 4px 0 6px;
    overflow: hidden;
  }
  .rt-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 14px 3px calc(14px + var(--d,0) * 16px);
    min-height: 26px;
    cursor: default;
    color: rgba(255,255,255,.7);
    border-radius: 0;
    transition: background .08s;
  }
  .rt-item:hover { background: rgba(255,255,255,.06); }
  .rt-folder { cursor: pointer; }
  .rt-caret {
    width: 10px; flex-shrink: 0;
    color: rgba(255,255,255,.35); font-size: 9px;
    display: inline-block; transition: transform .12s;
  }
  .rt-folder.rt-open > .rt-caret { transform: rotate(90deg); }
  .rt-icon { flex-shrink: 0; font-size: 12px; line-height: 1; }
  .rt-name { white-space: nowrap; }
  .rt-dir  { color: #7eb3ff; font-weight: 500; }
  .rt-js   { color: #f0c060; }
  .rt-css  { color: #78d1f0; }
  .rt-json { color: #f0a060; }
  .rt-md   { color: #98c379; }
  .rt-php  { color: #c9a0dc; }
  .rt-img  { color: #e06c75; }
  .rt-cfg  { color: rgba(255,255,255,.4); }
  .rt-html { color: #e5c07b; }
  .rt-note {
    color: rgba(255,255,255,.3); font-size: 11px;
    margin-left: 6px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
  }
  .rt-badge {
    flex-shrink: 0; font-family: system-ui, sans-serif;
    font-size: 10px; border-radius: 3px; padding: 1px 6px; margin-left: 5px;
  }
  .rt-badge.p1 { background: rgba(47,107,255,.25); color: #7eb3ff; }
  .rt-badge.p2 { background: rgba(200,80,80,.2); color: #e07070; }
  .rt-divider { height: 1px; background: rgba(255,255,255,.08); margin: 7px 14px; }
  .rt-children.rt-collapsed { display: none; }
  /* ─── Accordion ─── */
  .acc-item { border-top: 1px solid var(--border); }
  .acc-item:first-child { border-top: none; }
  .acc-head {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 13px 0; background: none; border: none; cursor: pointer;
    font-size: 15px; font-weight: 700; color: var(--blue); text-align: left;
    font-family: inherit; line-height: 1.3;
  }
  .acc-head:hover { opacity: .8; }
  .acc-sub { font-weight: 400; font-size: 13px; color: var(--ink-soft); margin-left: 4px; }
  .acc-arrow { flex-shrink: 0; color: var(--blue); transition: transform .15s; }
  .acc-head.acc-open .acc-arrow { transform: rotate(90deg); }
  .acc-body { padding-bottom: 8px; }
  .acc-body.acc-collapsed { display: none; }
  .arch-layer strong {
    color: var(--blue);
    font-weight: 600;
  }

  .hidden { display: none !important; }

  @media (max-width: 900px) {
    .sidebar { display: none; }
    .card { padding: 26px 20px 40px; }
    .page-wrap { padding: 16px 12px 30px; }
  }

  /* ---- Testaufgabe-Badge & Karte ---- */
  #lars-badge {
    position: fixed; top: 14px; right: 14px; z-index: 8900;
    cursor: grab; user-select: none; touch-action: none;
  }
  #lars-badge.dragging { cursor: grabbing; }
  .lars-btn {
    display: flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b; border-radius: 20px;
    padding: 5px 14px 5px 6px;
    box-shadow: 0 3px 14px rgba(245,158,11,.35), 0 1px 3px rgba(0,0,0,.12);
    font-size: 13px; font-weight: 700; color: #92400e;
    white-space: nowrap; cursor: inherit;
    transition: box-shadow .2s;
  }
  .lars-btn:hover { box-shadow: 0 5px 20px rgba(245,158,11,.5); }
  .lars-avatar-ring {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff; font-size: 13px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #f59e0b;
  }
  .lars-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #ef4444;
    margin-left: 2px; animation: lars-pulse 1.4s ease-in-out infinite;
  }
  @keyframes lars-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(.65); }
  }
  /* Floating Aufgabenkarte – kein Overlay, kein Backdrop */
  #lars-panel {
    position: fixed; top: 60px; right: 14px; z-index: 8800;
    width: 300px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08),
                0 0 0 1px rgba(0,0,0,.06);
    display: none; flex-direction: column; overflow: hidden;
  }
  #lars-panel.open { display: flex; }
  .lars-panel-head {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px 9px 10px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid rgba(245,158,11,.25);
    cursor: grab; user-select: none;
  }
  #lars-panel.panel-dragging .lars-panel-head { cursor: grabbing; }
  .lars-grip { color: #d97706; flex-shrink: 0; opacity: .7; }
  .lars-panel-title {
    flex: 1; font-size: 12px; font-weight: 700; color: #92400e; line-height: 1.3;
  }
  .lars-panel-sub { font-size: 10px; color: #b45309; font-weight: 500; }
  .lars-panel-close {
    background: none; border: none; cursor: pointer; padding: 4px;
    border-radius: 6px; color: #b45309; line-height: 1; flex-shrink: 0;
    transition: background .15s, color .15s;
  }
  .lars-panel-close:hover { background: rgba(0,0,0,.1); color: #78350f; }
  .lars-minimize-btn {
    background: none; border: none; cursor: pointer; padding: 4px;
    border-radius: 6px; color: #b45309; line-height: 1; flex-shrink: 0;
    transition: background .15s, color .15s;
  }
  .lars-minimize-btn:hover { background: rgba(0,0,0,.1); color: #78350f; }
  .lars-min-icon { transition: transform .22s ease; display: block; }
  #lars-panel.minimized .lars-min-icon { transform: rotate(180deg); }
  /* Body+Footer smooth collapse */
  .lars-body, .lars-panel-footer {
    overflow: hidden;
    transition: max-height .28s cubic-bezier(0.4,0,0.2,1), opacity .22s ease, padding .28s cubic-bezier(0.4,0,0.2,1);
    max-height: 500px; opacity: 1;
  }
  #lars-panel.minimized .lars-body { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
  #lars-panel.minimized .lars-panel-footer { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
  /* No transition while dragging */
  #lars-panel.panel-dragging { transition: none !important; }
  .lars-body { padding: 8px 10px 6px; }
  .lars-row {
    display: flex; align-items: baseline; gap: 6px;
    padding: 3px 5px; border-radius: 5px;
  }
  .lars-row:nth-child(odd) { background: #f8fafc; }
  .lars-label {
    font-size: 10px; font-weight: 600; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .04em;
    min-width: 86px; flex-shrink: 0;
  }
  .lars-value { font-size: 12px; font-weight: 600; color: #1e293b; }
  .lars-tag {
    font-size: 9px; padding: 1px 5px; border-radius: 99px; font-weight: 700;
    margin-left: 3px; vertical-align: middle;
  }
  .lars-tag.warn { background: #fef3c7; color: #d97706; }
  .lars-tag.no   { background: #fee2e2; color: #dc2626; }
  .lars-tag.ok   { background: #dcfce7; color: #16a34a; }
  .lars-panel-footer {
    padding: 7px 10px 10px;
    border-top: 1px solid #f1f5f9;
  }
  .lars-setup-btn {
    width: 100%; padding: 8px 14px;
    background: var(--blue); color: #fff;
    border: none; border-radius: 8px; cursor: pointer;
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: background .15s, transform .1s;
  }
  .lars-setup-btn:hover { background: #1a5adb; transform: translateY(-1px); }

  /* ============================================================
     Import-Startseite (index.html) – scoped .imp-*
     ============================================================ */
  .imp-banner {
    background: #eaf2fe; color: #1e4fd6; border: 1px solid #cfe0fb;
    border-radius: var(--radius); padding: 11px 16px; margin: 0 0 22px;
    font-size: 13.5px; text-align: center; line-height: 1.4;
  }
  .imp-banner a { color: #1e4fd6; font-weight: 600; text-decoration: underline; }

  .imp-grid {
    display: grid; grid-template-columns: minmax(0,1fr) clamp(330px, 32%, 520px);
    gap: 22px; align-items: start; margin-bottom: 24px;
  }
  .imp-import-card h1 { font-size: 22px; font-weight: 600; color: var(--ink); margin: 0 0 22px; }

  .imp-link-btn {
    background: none; border: none; color: var(--blue); font-weight: 500;
    font-size: 14px; cursor: pointer; padding: 0; margin: -14px 0 24px;
    display: inline-block;
  }
  .imp-link-btn:hover { text-decoration: underline; }

  .imp-daterange { position: relative; max-width: 360px; }
  .imp-daterange input {
    width: 100%; box-sizing: border-box; padding: 11px 42px 11px 13px;
    border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
    color: var(--ink); background: #fff;
  }
  .imp-daterange .cal {
    position: absolute; right: 1px; top: 1px; bottom: 1px; width: 40px;
    display: flex; align-items: center; justify-content: center;
    border-left: 1px solid var(--border); color: var(--gray);
    background: #fafbfc; border-radius: 0 8px 8px 0;
  }

  .imp-actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
  .imp-actions .check { margin: 0; }

  /* Account-Box rechts */
  .imp-account { padding: 22px 22px 26px; }
  .imp-account h2 { font-size: 19px; font-weight: 600; margin: 0 0 18px; color: var(--ink); }
  .imp-notice {
    background: #fdecec; border: 1px solid #f5c6c6; border-radius: 8px;
    padding: 12px 14px; font-size: 13px; color: #b42318; margin-bottom: 20px; line-height: 1.45;
  }
  .imp-notice strong { color: #e02424; }
  .imp-account h3 { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
  .imp-apis { margin-bottom: 22px; }
  .imp-api-list { margin: 0; font-size: 14px; line-height: 1.7; color: var(--gray); }
  .imp-apis a { color: var(--blue); text-decoration: none; }
  .imp-apis a:hover { text-decoration: underline; }
  .imp-carriers-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
  .imp-carriers-head a { color: var(--blue); font-size: 12.5px; text-decoration: none; }
  .imp-carrier-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
  .imp-carrier {
    height: 78px; border: 1px solid var(--border); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #fff; padding: 14px 18px;
  }
  .imp-carrier img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; display: block; }
  /* Markenkacheln (Logos sind transparent) – Farben wie im echten Grid */
  .imp-carrier.dhl    { background: #f9c633; border-color: transparent; }
  .imp-carrier.hermes { background: #4f97d3; border-color: transparent; }
  .imp-carrier.post   { background: #f9c633; border-color: transparent; }
  .imp-carrier.dpd    { background: #fff; border-color: var(--border); }
  .imp-carrier.gls    { background: #fff; border-color: var(--border); }

  /* Importvorgänge-Tabelle */
  .imp-runs { padding: 22px 24px 26px; }
  .imp-runs-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
  .imp-runs-head h2 { font-size: 19px; font-weight: 600; margin: 0; flex: 1; color: var(--ink); }
  .imp-runs-head .check { margin: 0; }
  .imp-runs-head select, .imp-runs-head input {
    padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--ink); background:#fff;
  }
  .imp-runs-head .imp-search {
    background: var(--blue); color: #fff; border: none; width: 40px; height: 36px;
    border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  }
  .imp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .imp-table th {
    text-align: left; color: var(--gray); font-weight: 600; font-size: 12.5px;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
  }
  .imp-table td { padding: 14px 12px; border-bottom: 1px solid #eef1f5; color: var(--ink-soft); vertical-align: top; }
  .imp-table .sub { color: var(--gray); font-size: 12px; }
  .imp-badge-ok {
    display: inline-block; background: #e7f7ee; color: #137a43; border: 1px solid #b6e7cc;
    padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  }
  .imp-table .imp-act { color: var(--blue); text-decoration: none; }
  .imp-table .imp-act:hover { text-decoration: underline; }

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

  /* ============================================================
     Import-Sidebar: Icons, Chevrons, aufklappbares Einstellungs-Akkordeon
     ============================================================ */
  .sidebar h2.section.imp-sec {
    font-family: "Inter", sans-serif; font-size: 13px; font-weight: 700;
    color: var(--blue); letter-spacing: .2px; margin: 22px 0 8px; text-transform: none;
  }
  .imp-nav a {
    display: flex; align-items: center; gap: 13px; padding: 11px 12px;
    border-radius: var(--radius); color: var(--ink); text-decoration: none; cursor: pointer;
    font-size: 16px;
  }
  .imp-nav a:hover { background: #f6f7fa; }
  .imp-nav a.active { background: var(--bg-active); color: var(--blue); font-weight: 600; }
  .imp-nav a .ico { width: 21px; height: 21px; min-width: 21px; color: var(--gray); }
  .imp-nav a.active .ico { color: var(--blue); }
  .imp-nav a > span { flex: 1; }
  .imp-nav .chev-r { width: 17px; height: 17px; min-width: 17px; color: var(--gray-light); transition: transform .28s ease; }

  /* Einstellungs-Akkordeon */
  .nav-acc .nav-acc-head { /* erbt .imp-nav a */ }
  .nav-acc.open > .nav-acc-head .acc-chev { transform: rotate(90deg); }
  .nav-acc-body {
    list-style: none; margin: 0; padding: 0;
    max-height: 0; overflow: hidden; transition: max-height .32s ease;
  }
  .nav-acc.open > .nav-acc-body { max-height: 460px; }
  .nav-acc-body a {
    display: flex; align-items: center; gap: 13px; padding: 10px 12px 10px 46px;
    border-radius: var(--radius); color: var(--ink-soft); text-decoration: none; font-size: 15.5px;
  }
  .nav-acc-body a:hover { background: #f6f7fa; }
  .nav-acc-body a > span { flex: 1; }

  /* ============================================================
     Einmaliger Hinweis „Startseite überarbeitet" (Modal)
     ============================================================ */
  .snote-overlay {
    position: fixed; inset: 0; z-index: 2500;
    background: rgba(20,22,26,.5);
    display: flex; align-items: center; justify-content: center; padding: 20px;
  }
  .snote-overlay[hidden] { display: none; }
  .snote-card {
    background: #fff; border-radius: 16px; max-width: 500px; width: 100%;
    padding: 32px 30px 24px; text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    animation: snotePop .24s ease;
  }
  .snote-list {
    text-align: left; margin: 0 0 24px; padding-left: 20px;
    color: var(--ink-soft); font-size: 14.5px; line-height: 1.5;
  }
  .snote-list li { margin-bottom: 8px; }
  .snote-list li:last-child { margin-bottom: 0; }
  @keyframes snotePop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
  .snote-icon {
    width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
    background: var(--bg-active); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
  }
  .snote-icon svg { width: 30px; height: 30px; }
  .snote-card h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
  .snote-card p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 24px; }
  .snote-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .snote-actions .btn { width: 100%; }
  .snote-later {
    background: none; border: none; color: var(--gray); font-size: 14px;
    cursor: pointer; padding: 10px 14px;
  }
  .snote-later:hover { color: var(--ink); text-decoration: underline; }

  /* Roter „Löschen"-Button (Amazon-Autorisierung widerrufen) */
  .btn.btn-danger { background: var(--red); }
  .btn.btn-danger:hover { background: #c01c1c; }
