/* CBoard CVE-Tracker – Design-Tokens, hell und dunkel */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-hover: #f1f5f9;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eff4ff;
  --primary-text: #ffffff;
  --ring: rgba(29, 78, 216, .28);
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);

  /* Severity: Text auf getönter Fläche */
  --sev-critical-fg: #9f1239; --sev-critical-bg: #ffe4e6;
  --sev-high-fg: #b91c1c;     --sev-high-bg: #fee2e2;
  --sev-medium-fg: #b45309;   --sev-medium-bg: #fef3c7;
  --sev-low-fg: #1d4ed8;      --sev-low-bg: #dbeafe;
  --sev-unknown-fg: #475569;  --sev-unknown-bg: #e2e8f0;

  /* Status */
  --st-neu: #d97706; --st-in_analyse: #2563eb; --st-betroffen: #dc2626;
  --st-nicht_betroffen: #059669; --st-in_behebung: #7c3aed; --st-erledigt: #16a34a;

  --ok-fg: #065f46; --ok-bg: #ecfdf5; --ok-bd: #a7f3d0;
  --info-fg: #1e3a8a; --info-bg: #eff6ff; --info-bd: #bfdbfe;
  --err-fg: #991b1b; --err-bg: #fef2f2; --err-bd: #fecaca;

  color-scheme: light;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --surface: #121826;
    --surface-2: #161d2d;
    --surface-hover: #1b2335;
    --text: #e6eaf2;
    --text-2: #c3cad8;
    --muted: #8b95a8;
    --border: #232c3f;
    --border-strong: #334057;

    --primary: #4f7cff;
    --primary-hover: #6b91ff;
    --primary-soft: rgba(79, 124, 255, .14);
    --ring: rgba(79, 124, 255, .35);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);

    --sev-critical-fg: #fda4af; --sev-critical-bg: rgba(225, 29, 72, .18);
    --sev-high-fg: #fca5a5;     --sev-high-bg: rgba(239, 68, 68, .16);
    --sev-medium-fg: #fcd34d;   --sev-medium-bg: rgba(245, 158, 11, .16);
    --sev-low-fg: #93c5fd;      --sev-low-bg: rgba(59, 130, 246, .16);
    --sev-unknown-fg: #cbd5e1;  --sev-unknown-bg: rgba(148, 163, 184, .16);

    --ok-fg: #6ee7b7; --ok-bg: rgba(16, 185, 129, .1); --ok-bd: rgba(16, 185, 129, .3);
    --info-fg: #93c5fd; --info-bg: rgba(59, 130, 246, .1); --info-bd: rgba(59, 130, 246, .3);
    --err-fg: #fca5a5; --err-bg: rgba(239, 68, 68, .1); --err-bd: rgba(239, 68, 68, .3);
    color-scheme: dark;
  }
}

/* --- Grundlagen ---------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
main { padding: 1.5rem 1.75rem 2.5rem; max-width: 1560px; margin: 0 auto; }
.sitefooter { padding: 1.25rem 1rem 1.5rem; text-align: center; font-size: .85rem;
              border-top: 1px solid var(--border); max-width: 1560px; margin: 0 auto; color: var(--text-2); }
body.auth .sitefooter { border-top: 0; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin: .25rem 0 1.25rem;
     display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
h2.subtitle { font-size: 1.05rem; font-weight: 500; color: var(--text-2); margin: -.75rem 0 1.25rem; }
h3 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
     margin: 1.5rem 0 .75rem; }
h3:first-child { margin-top: 0; }
code, pre { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: .05rem .35rem; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- Kopfbereich --------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem; padding: .55rem 1.75rem;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; letter-spacing: -.01em; color: var(--text); font-size: 1.02rem; }
.brand:hover { color: var(--text); }
.mainnav { display: flex; align-items: center; gap: .15rem; flex: 1; flex-wrap: wrap; }
.mainnav a { color: var(--text-2); padding: .4rem .7rem; border-radius: var(--radius-sm); font-weight: 500; font-size: .93rem; }
.mainnav a:hover { background: var(--surface-hover); color: var(--text); }
.mainnav a.active { background: var(--primary-soft); color: var(--primary); }
.navsep { width: 1px; height: 1.2rem; background: var(--border); margin: 0 .4rem; }
.me { display: flex; gap: .5rem; align-items: center; }
.userchip { display: flex; align-items: center; gap: .55rem; color: var(--text); padding: .2rem .5rem .2rem .2rem; border-radius: 999px; }
.userchip:hover { background: var(--surface-hover); color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
          color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.who { display: flex; flex-direction: column; line-height: 1.15; }
.who strong { font-size: .88rem; font-weight: 600; }
.who small { font-size: .74rem; color: var(--muted); }
@media (max-width: 1100px) { .who { display: none; } }

/* --- Flächen & Layout ---------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.card.narrow { max-width: 440px; margin: 2rem auto; }
fieldset.card { min-width: 0; }
fieldset.card legend { font-weight: 600; font-size: .95rem; padding: 0 .4rem; color: var(--text); }
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pagehead h1 { margin-bottom: 1.25rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .cols { grid-template-columns: minmax(0, 1fr); } }

.stack { display: flex; flex-direction: column; gap: .75rem; }
.row { display: flex; gap: .5rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.grid2 .span2 { grid-column: span 2; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } .grid2 .span2 { grid-column: auto; } }
form.inline { display: inline; }

/* Anmeldung */
body.auth { min-height: 100vh; display: grid; place-items: center; grid-template-rows: 1fr auto;
            background: radial-gradient(1200px 600px at 50% -10%, var(--primary-soft), transparent 70%), var(--bg); }
body.auth main { width: 100%; padding: 1.5rem; }
.card.login { padding: 2rem; box-shadow: var(--shadow); }
.card.login img { display: block; margin-bottom: .75rem; }
.card.login h1 { margin: 0; }
.card.login > p { margin: .25rem 0 1.5rem; }

/* --- Formulare ----------------------------------------------------------- */
label { display: flex; flex-direction: column; gap: .35rem; font-size: .86rem; font-weight: 500; color: var(--text-2); }
label.radio, label.tagopt { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; color: var(--text); }
input, select, textarea {
  font: inherit; font-size: .93rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .5rem .7rem;
  transition: border-color .15s, box-shadow .15s;
}
input, select { min-height: 2.35rem; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
input[type=checkbox], input[type=radio] { min-height: 0; width: 1rem; height: 1rem; accent-color: var(--primary); margin: 0; }
input[type=color] { padding: .15rem; width: 2.6rem; height: 2.35rem; cursor: pointer; }
input[type=search] { -webkit-appearance: none; appearance: none; }

button, .button {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 2.35rem; padding: .45rem .95rem; border-radius: var(--radius-sm);
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
button:hover, .button:hover { background: var(--surface-hover); color: var(--text); }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary, button.primary, .button.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.primary:hover, button.primary:hover, .button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-text); }
button.danger { color: var(--danger); }
button.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
button.ghost:hover { background: var(--surface-hover); color: var(--text); }
button.link { border: 0; background: none; box-shadow: none; color: var(--primary); padding: 0; min-height: 0; font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
.small-btn { min-height: 2rem; padding: .3rem .7rem; font-size: .85rem; }
button.block { width: 100%; justify-content: center; margin-top: .25rem; }
.danger { color: var(--danger); }

/* --- Meldungen ----------------------------------------------------------- */
.flash { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-weight: 500;
         animation: flash-in .25s ease-out; }
.flash.ok { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }
.flash.info { background: var(--info-bg); border-color: var(--info-bd); color: var(--info-fg); }
.flash.error { background: var(--err-bg); border-color: var(--err-bd); color: var(--err-fg); }
.flash p { margin: 0 0 .5rem; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } }
pre.token { background: var(--surface); color: var(--text); border: 1px dashed var(--border-strong); padding: .65rem .8rem;
            border-radius: var(--radius-sm); user-select: all; overflow-x: auto; margin: 0; }

/* --- Filter -------------------------------------------------------------- */
.filterform { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
              padding: .9rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.quickfilters { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border-strong); border-radius: 999px;
        padding: .3rem .8rem; background: var(--surface); color: var(--text-2); font-size: .86rem; font-weight: 500;
        cursor: pointer; user-select: none; transition: all .15s; }
label.chip { flex-direction: row; }
.chip:hover { border-color: var(--primary); color: var(--text); }
.chip input { width: .9rem; height: .9rem; }
.chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.quickfilters .reset { margin-left: auto; font-size: .85rem; color: var(--muted); }
.quickfilters .reset:hover { color: var(--primary); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filters input[type=search] { min-width: 260px; flex: 1; padding-left: 2.1rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat .7rem center / 1rem; }
.filters select { max-width: 260px; }
.filters select.active { border-color: var(--primary); background-color: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* Aktionsleiste für ausgewählte CVEs */
.bulkbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0 0 .6rem; padding: .5rem .75rem;
           border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.bulkbar .count { font-weight: 600; font-size: .86rem; margin-right: .25rem; }
.bulkbar select, .bulkbar button { min-height: 2rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .85rem; }
.bulkbar .sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 .25rem; }
.bulkbar .hint { margin-left: auto; }

/* --- Tabellen ------------------------------------------------------------ */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
             box-shadow: var(--shadow-sm); }
.card .tablewrap { box-shadow: none; }
.card > .tablewrap { border: 0; border-radius: 0; margin: 0 -1.25rem; }
.card.tablewrap { padding: 0; }
#cve-table > p.muted { margin: 0 0 .5rem; font-size: .86rem; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: .74rem; font-weight: 600;
           text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:has(td.sel input:checked) { background: var(--primary-soft); }
tbody tr:last-child td { border-bottom: 0; }
th.sortable a { color: inherit; display: inline-flex; align-items: center; gap: .25rem; }
th.sortable a:hover { color: var(--text); }
th.sorted { color: var(--primary); }
table.cves th, table.cves td { padding-left: .6rem; padding-right: .6rem; }
table.cves td.title { min-width: 220px; max-width: 460px; color: var(--text-2); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.cves td.cveid a { font-family: var(--mono); font-weight: 600; font-size: .88rem; }
tr.inactive { opacity: .5; }
td form.row { flex-wrap: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .8rem; font-weight: 400; }
.prewrap { white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }
th.sel, td.sel { width: 2.25rem; padding-right: 0; }

/* --- Badges & Tags ------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600; line-height: 1;
         padding: .3rem .55rem; border-radius: 6px; background: var(--surface-2); color: var(--text-2);
         border: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
h1 .badge { font-size: .8rem; }
.badge[class*="sev-"] { border-color: transparent; font-variant-numeric: tabular-nums; }
.badge[class*="sev-"]::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; opacity: .85; }
.sev-critical { background: var(--sev-critical-bg); color: var(--sev-critical-fg); }
.sev-high { background: var(--sev-high-bg); color: var(--sev-high-fg); }
.sev-medium { background: var(--sev-medium-bg); color: var(--sev-medium-fg); }
.sev-low { background: var(--sev-low-bg); color: var(--sev-low-fg); }
.sev-unknown { background: var(--sev-unknown-bg); color: var(--sev-unknown-fg); }
.badge[class*="st-"] { background: var(--surface); border-radius: 999px; }
.badge[class*="st-"]::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--st, var(--muted)); }
.st-neu { --st: var(--st-neu); }
.st-in_analyse { --st: var(--st-in_analyse); }
.st-betroffen { --st: var(--st-betroffen); }
.st-nicht_betroffen { --st: var(--st-nicht_betroffen); }
.st-in_behebung { --st: var(--st-in_behebung); }
.st-erledigt { --st: var(--st-erledigt); }
.tag { display: inline-flex; align-items: center; font-size: .76rem; font-weight: 500; line-height: 1; padding: .28rem .55rem;
       border-radius: 999px; color: var(--tag); white-space: nowrap; margin: .1rem 0;
       max-width: 13rem; overflow: hidden; text-overflow: ellipsis; display: inline-block;
       background: color-mix(in srgb, var(--tag) 12%, transparent);
       border: 1px solid color-mix(in srgb, var(--tag) 30%, transparent); }
@media (prefers-color-scheme: dark) { .tag { color: color-mix(in srgb, var(--tag) 65%, white); } }

/* --- Detailansicht ------------------------------------------------------- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; margin: 0; }
.facts dt { color: var(--muted); font-size: .86rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.statusflow { display: flex; flex-direction: column; gap: .2rem; }
.statusflow label.radio { padding: .45rem .6rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; }
.statusflow label.radio:hover { background: var(--surface-hover); }
.statusflow label.radio:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.tagpick { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.tagopt { cursor: pointer; }
.history { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.history li { position: relative; padding: 0 0 1rem 1.5rem; }
.history li::before { content: ""; position: absolute; left: .3rem; top: .45rem; width: .55rem; height: .55rem; border-radius: 50%;
                      background: var(--border-strong); box-shadow: 0 0 0 3px var(--surface); }
.history li::after { content: ""; position: absolute; left: .55rem; top: 1.1rem; bottom: 0; width: 1px; background: var(--border); }
.history li:last-child::after { display: none; }
.history li .muted { font-size: .8rem; }
.history .h-status::before { background: var(--primary); }
.history .h-kommentar::before { background: var(--st-in_behebung); }
.history .h-verknuepfung::before { background: var(--st-erledigt); }
.history .h-status div { font-weight: 600; }
.brand-co { color: var(--primary); font-weight: 800; }
h1.logo-title { gap: .35rem; }

/* --- Toasts (unten links, stapelbar) ------------------------------------- */
.toasts { position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 100; display: flex; flex-direction: column; gap: .6rem;
          width: min(420px, calc(100vw - 2.5rem)); pointer-events: none; }
.toast { --accent: var(--primary); position: relative; overflow: hidden; pointer-events: auto;
         display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start;
         padding: .85rem .75rem .95rem .9rem; border-radius: var(--radius-sm);
         background: var(--surface); color: var(--text); border: 1px solid var(--border);
         box-shadow: 0 8px 28px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08);
         animation: toast-in .22s cubic-bezier(.2, .8, .3, 1); }
.toast.ok { --accent: #16a34a; }
.toast.info { --accent: var(--primary); }
.toast.error { --accent: var(--danger); }
.toast::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.toast-icon { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; flex: none;
              background: var(--accent); color: #fff; font-weight: 800; font-size: .8rem; line-height: 1; margin-top: .05rem; }
.toast-text { font-size: .9rem; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; padding-top: .1rem; }
.toast-close { min-height: 0; padding: 0 .35rem; border: 0; background: transparent; box-shadow: none; color: var(--muted);
               font-size: 1.25rem; line-height: 1.2; font-weight: 400; border-radius: 6px; }
.toast-close:hover { background: var(--surface-hover); color: var(--text); }
.toast-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); opacity: .35;
                  transform-origin: left; animation: toast-timer var(--toast-duration, 10s) linear forwards; }
.toast:hover .toast-progress { animation-play-state: paused; }
.toast.leaving { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(-16px); } }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.leaving { animation: none; } }

/* --- Mobile ----------------------------------------------------------------- */
.navtoggle, .mobile-only { display: none; }

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: .5rem; padding: .5rem 1rem; }
  .navtoggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 2.5rem; padding: .5rem; }
  .navtoggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .topbar.open .navtoggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .topbar.open .navtoggle span:nth-child(2) { opacity: 0; }
  .topbar.open .navtoggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .brand { flex: 1; min-width: 0; white-space: nowrap; font-size: .98rem; }
  .brand span { overflow: hidden; text-overflow: ellipsis; }
  .me > form { display: none; }
  .mainnav .mobile-only { display: block; }
  .mainnav { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: .1rem; padding: .25rem 0 .5rem; }
  .topbar.open .mainnav { display: flex; }
  .mainnav a { padding: .7rem .75rem; font-size: 1rem; }
  .navsep { width: auto; height: 1px; margin: .3rem 0; }
  .me .who { display: none; }
}

@media (max-width: 760px) {
  :root { font-size: 15px; }
  main { padding: 1rem 1rem 5rem; }
  h1 { font-size: 1.35rem; margin-bottom: 1rem; }
  .pagehead { align-items: flex-start; }
  .pagehead h1 { margin-bottom: .75rem; }
  .pagehead > .button, .actions { width: 100%; }
  .pagehead > .button { justify-content: center; margin-bottom: 1rem; }
  .actions > form, .actions > a { flex: 1 1 auto; }
  .actions button, .actions .button { width: 100%; justify-content: center; }
  .card { padding: 1rem; }
  .card > .tablewrap { margin: 0 -1rem; }
  input, select, textarea { font-size: 16px; }  /* verhindert Auto-Zoom auf iOS */

  /* Filter */
  .filterform { padding: .75rem; }
  .quickfilters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -.75rem .6rem; padding: 0 .75rem .2rem; scrollbar-width: none; }
  .quickfilters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .quickfilters .reset { flex: none; margin-left: .25rem; }
  .filters input[type=search] { min-width: 0; flex-basis: 100%; }
  .filters select { flex: 1 1 calc(50% - .25rem); max-width: none; min-width: 0; }
  .mobile-only { display: block; }

  /* Aktionsleiste */
  .bulkbar { gap: .4rem; }
  .bulkbar .count { flex-basis: 100%; }
  .bulkbar select, .bulkbar input { flex: 1 1 100%; width: 100%; min-width: 0; }
  .bulkbar button { flex: 1 1 auto; justify-content: center; }
  .bulkbar .sep, .bulkbar .hint { display: none; }

  /* CVE-Liste als Karten */
  table.cves thead tr { display: flex; align-items: center; }
  table.cves thead th:not(.sel) { display: none; }
  table.cves thead th.sel { border: 0; background: none; padding: .6rem .75rem; }
  table.cves thead th.sel::after { content: "Alle auswählen"; margin-left: .5rem; text-transform: none; letter-spacing: 0;
                                   font-size: .85rem; font-weight: 500; vertical-align: middle; }
  table.cves, table.cves tbody { display: block; }
  table.cves tbody tr {
    display: grid; grid-template-columns: auto 1fr auto; column-gap: .6rem; row-gap: .4rem; align-items: center;
    grid-template-areas: "sel id sev" ". title title" ". status jira" ". tags tags" ". pkg date";
    padding: .85rem .75rem; border-bottom: 1px solid var(--border);
  }
  table.cves tbody tr:last-child { border-bottom: 0; }
  table.cves tbody td { display: block; padding: 0; border: 0; min-width: 0; max-width: none; }
  table.cves td.c-sel { grid-area: sel; width: auto; }
  table.cves td.c-id { grid-area: id; }
  table.cves td.c-sev { grid-area: sev; justify-self: end; }
  table.cves td.c-title { grid-area: title; color: var(--text); }
  table.cves td.c-status { grid-area: status; }
  table.cves td.c-jira { grid-area: jira; justify-self: end; font-size: .85rem; }
  table.cves td.c-tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: .3rem; }
  table.cves td.c-tags:empty { display: none; }
  table.cves td.c-pkg { grid-area: pkg; font-size: .85rem; color: var(--muted); }
  table.cves td.c-date { grid-area: date; justify-self: end; font-size: .85rem; color: var(--muted); }
  table.cves td.c-occ, table.cves td.c-src { display: none; }
  table.cves td.c-pkg::before, table.cves td.c-jira::before { content: attr(data-label) ": "; color: var(--muted); }
  table.cves tbody tr td[colspan] { grid-column: 1 / -1; padding: 1rem 0; }
  table.cves .tag { max-width: 100%; }

  /* Detail */
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .55rem; }
  h2.subtitle { margin-top: -.5rem; }

  /* Formular-Zeilen in Admin-Tabellen umbrechen */
  td form.row { flex-wrap: wrap; }
  .row.wrap > * { flex: 1 1 100%; }

  /* Toasts über die ganze Breite */
  .toasts { left: .75rem; right: .75rem; bottom: .75rem; width: auto; }
}
.mainnav .navlogout { width: 100%; justify-content: flex-start; padding: .7rem .75rem; font-size: 1rem; font-weight: 500; color: var(--text-2); }
