/* ==========================================================================
   htprotect.app — Interaktive Demo
   demo.css — komplettes Stylesheet (keine externen Abhaengigkeiten)
   --------------------------------------------------------------------------
   GRUNDSATZ
   Die Demo soll vom angemeldeten Bereich der echten App optisch nicht zu
   unterscheiden sein — auf dem Desktop UND am Handy. Darum sind die Stile
   der App hier nicht nachgebaut, sondern UEBERNOMMEN: gleiche Klassennamen,
   gleiche Werte, gleiche @media-Regeln (Quelle: .demo-referenz/).
   Wo zwei Bauteile der App denselben Namen benutzen (.body, .dot, .ic, .pill),
   ist die Regel hier ueber den Elternteil geschaerft — im Original uebernimmt
   das die Bauteil-Kapselung von Svelte.

   Aufbau:
     01  Tokens (hell / dunkel) + Aliasse fuer die Demo-Bausteine
     02  Reset & Basis
     03  ORIGINAL — AppShell (Seite, Kopfleiste, Marke, Menues, Fusszeile)
     04  ORIGINAL — AppNav (Reiter)
     05  ORIGINAL — SummaryBar (Zusammenfassung)
     06  ORIGINAL — AmpelDot
     07  ORIGINAL — SiteCard (Website-Zeile)
     08  ORIGINAL — ActionButton
     09  ORIGINAL — Fleet (Werkzeugleiste, Suche, Schlagwoerter, Liste,
                    Sammelleiste, Kurzmeldung, Dialog)
     10  DEMO — Demo-Band, Fortschritt, Tafeln, Tabellen, Protokoll, Hinweise
     11  DEMO — dv-*-Vokabular der Nebenansichten (views-b)
     12  DEMO — Hilfsklassen
     13  KOMPATIBILITAET — aeltere Klassennamen auf Original-Optik
     14  Bewegungsreduktion, Druck, sehr schmale Schirme
   ========================================================================== */


/* ==========================================================================
   01  TOKENS — 1:1 aus der App (.demo-referenz/TOKENS.css)
   ========================================================================== */

:root {
    color-scheme: light dark;

    /* Ampel-Farben (semantisch) — hell */
    --ok: #1f9c58;
    --warn: #b7791f;
    --err: #c0392b;
    --ok-bg: #eaf8f0;
    --warn-bg: #fdf6e6;
    --err-bg: #fdecee;

    /* Grundpalette + Schild-Gruen-Akzent (hell) */
    --bg: #eef1f6;
    --surface: #ffffff;
    --surface-2: #f5f7fb;
    --text: #111111;
    --muted: #555555;
    --faint: #7a828e;
    --border: #d9dee7;
    --accent: #1f9c58;
    --accent-bright: #25b365;
    --accent-ink: #ffffff;

    /* Struktur */
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(16, 32, 43, .06), 0 6px 18px rgba(16, 32, 43, .05);
    --shadow-lg: 0 12px 40px rgba(16, 32, 43, .18);

    /* --- Aliasse: nur fuer Bausteine, die es im Original nicht gibt ------- */
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: var(--mono);
    --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --accent-hover: var(--accent-bright);
    --accent-press: var(--accent);
    --focus: var(--accent);
    --overlay: rgba(6, 12, 18, .55);
    --shadow-1: var(--shadow);
    --shadow-2: var(--shadow);
    --shadow-3: var(--shadow-lg);
    --r-xs: 6px;
    --r-sm: var(--radius-sm);
    --r-md: var(--radius-sm);
    --r-lg: var(--radius);
    --r-pill: 999px;
    --t-fast: 120ms;
    --t-base: 200ms;
    --ease: cubic-bezier(.4, .0, .2, 1);
    --page-max: 940px;
}

/* Dunkel — Systemvorgabe, solange der Umschalter nichts gesetzt hat */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --ok: #34d27b;
        --warn: #e8b341;
        --err: #f0556b;
        --ok-bg: #0c1f14;
        --warn-bg: #221a08;
        --err-bg: #220d12;

        --bg: #0b0e15;
        --surface: #10131c;
        --surface-2: #161a26;
        --text: #f0f0f0;
        --muted: #b3b9c7;
        --faint: #7f8698;
        --border: #262b3a;
        --accent: #34d27b;
        --accent-bright: #4ade8a;
        --accent-ink: #06210f;
        --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .4);
        --shadow-lg: 0 16px 48px rgba(0, 0, 0, .6);

        --overlay: rgba(2, 5, 10, .70);
    }
}

/* Dunkel — ausdruecklich gewaehlt (schlaegt die Systemvorgabe) */
:root[data-theme="dark"] {
    --ok: #34d27b;
    --warn: #e8b341;
    --err: #f0556b;
    --ok-bg: #0c1f14;
    --warn-bg: #221a08;
    --err-bg: #220d12;

    --bg: #0b0e15;
    --surface: #10131c;
    --surface-2: #161a26;
    --text: #f0f0f0;
    --muted: #b3b9c7;
    --faint: #7f8698;
    --border: #262b3a;
    --accent: #34d27b;
    --accent-bright: #4ade8a;
    --accent-ink: #06210f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .6);

    --overlay: rgba(2, 5, 10, .70);
}

/* [data-theme="light"] braucht keine eigenen Werte: die :root-Vorgaben SIND
   hell, und die Auto-Dunkel-Regel greift nur ohne data-theme. */


/* ==========================================================================
   02  RESET & BASIS
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 650;
    line-height: 1.25;
}
h1 { font-size: 1.25rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; }
h4 { font-size: 0.9rem; }

p { margin: 0 0 0.6rem; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

code,
kbd,
pre,
.mono,
.htp-mono,
.demo-mono {
    font-family: var(--mono);
}

code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-xs);
    padding: .1em .35em;
    font-size: .875em;
}

hr,
.rule {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 0.9rem 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
@supports not selector(:focus-visible) {
    :focus { outline: 2px solid var(--accent); outline-offset: 2px; }
}

::selection {
    background: var(--accent-soft);
    color: var(--text);
}

/* Nur fuer Screenreader */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Sprungmarke */
.skip-link {
    position: absolute;
    left: 0.9rem;
    top: -60px;
    z-index: 200;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top var(--t-fast) var(--ease);
}
.skip-link:focus {
    top: 0.6rem;
    text-decoration: none;
}

/* Zahlen in Spalten immer gleich breit */
.htp-mono,
.tabnum,
.pill .num,
.table td,
.table th,
.dv-table td,
.progress-pct,
.log-time {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Sperrt Scrollen, solange ein Dialog offen ist */
body.is-modal-open { overflow: hidden; }


/* ==========================================================================
   03  ORIGINAL — AppShell
   ========================================================================== */

.page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding-bottom: 6rem;
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.hdr {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem 0.5rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.logolink {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    flex: none;
}
.logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}
/* Gestapelte Marke: Titel oben, Team-Zeile darunter. */
.bt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    min-width: 0;
}
.apptitle {
    text-decoration: none;
    color: var(--text);
    max-width: 100%;
}
.apptitle:hover { text-decoration: none; }
.apptitle strong {
    font-size: 0.98rem;
    white-space: nowrap;
}
.dim {
    color: var(--accent);
}
.teamsw {
    position: relative;
    max-width: 100%;
    min-width: 0;
}
.wsline {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
    min-width: 0;
    font-size: 0.72rem;
    color: var(--muted);
}
.wsname {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wsswitch {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 0.72rem;
    color: var(--muted);
    cursor: pointer;
}
.wsswitch:hover { color: var(--text); }
.wsswitch:hover .wscaret { opacity: 1; }
.wscaret {
    flex: none;
    font-size: 0.6rem;
    opacity: 0.75;
}
.teammenu {
    position: absolute;
    left: 0;
    top: calc(100% + 0.4rem);
    z-index: 41;
    min-width: 14rem;
    max-width: 78vw;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
}
.teamhd {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--faint);
    padding: 0.35rem 0.55rem 0.25rem;
}
.teamitem {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.55rem;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
}
.teamitem:hover { background: var(--surface-2); }
.ti-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.ti-name {
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ti-role {
    font-size: 0.7rem;
    color: var(--muted);
}
.teamitem.on .ti-name { color: var(--accent); }
.ti-check {
    color: var(--accent);
    font-weight: 700;
    flex: none;
}
.hactions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}
.lockbtn {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lockbtn:hover { border-color: var(--accent); }
.lockbtn.locked {
    opacity: 0.6;
    cursor: default;
}
.usermenu {
    position: relative;
}
.userbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    max-width: 42vw;
}
.userbtn:hover { border-color: var(--accent); }
.uname {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menubd {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: default;
}
.menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 41;
    min-width: 12rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
}
.mi {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
}
.mi:hover {
    background: var(--surface-2);
    text-decoration: none;
}
.mi-out { color: var(--err); }

/* Inhaltsspalte der Seite (im Original: .body direkt in .page) */
.page > .body,
.appbody {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

/* Rechtszeile: dezent, aber immer da. */
.legalbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
    padding: 1.2rem 0.9rem 0;
    margin-top: 0.6rem;
    border-top: 1px solid var(--border);
}
.legalbar a {
    font-size: 0.75rem;
    color: var(--faint);
    text-decoration: none;
}
.legalbar a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Mobil: Seitenabstand halbiert -> mehr nutzbare Breite fuer die Inhalte. */
@media (max-width: 560px) {
    .page > .body,
    .appbody {
        padding: 0.6rem 0.45rem;
        gap: 0.4rem;
    }
    .legalbar {
        gap: 0.3rem 0.75rem;
        padding-top: 1rem;
    }
}


/* ==========================================================================
   04  ORIGINAL — AppNav
   ========================================================================== */

.appnav {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.9rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.appnav::-webkit-scrollbar { display: none; }
.appnav .grp {
    display: flex;
    align-items: stretch;
    gap: 0.15rem;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.65rem 0.55rem;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.12s;
}
.tab:hover {
    color: var(--text);
    text-decoration: none;
}
.tab.on,
.tab[aria-current="page"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab svg {
    flex: none;
    opacity: 0.9;
}
/* Forum ist nur per Layout nach rechts abgesetzt — Farbe und Hover exakt wie
   die uebrigen Hauptmenuepunkte. */
@media (max-width: 560px) {
    .tab {
        padding: 0.55rem 0.5rem 0.5rem;
        font-size: 0.82rem;
    }
}


/* ==========================================================================
   05  ORIGINAL — SummaryBar
   ========================================================================== */

.bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition:
        border-color 0.12s,
        transform 0.08s;
}
.pill.flat { cursor: default; }
.pill:not(.flat):active { transform: scale(0.98); }
.pill.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.pill .num {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}
.pill .lbl {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.01em;
}
.pill.ok .num { color: var(--ok); }
.pill.warn .num { color: var(--warn); }
.pill.err .num { color: var(--err); }


/* ==========================================================================
   06  ORIGINAL — AmpelDot
   --------------------------------------------------------------------------
   Der Punkt traegt seine Groesse in --s und seine Farbe in --c. Damit die
   Demo ihn auch ohne Inline-Stil setzen kann, gibt es Ampel-Klassen.
   ========================================================================== */

.dot {
    display: inline-block;
    width: var(--s, 11px);
    height: var(--s, 11px);
    border-radius: 999px;
    background: var(--c, var(--ok));
    flex: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--ok)) 22%, transparent);
}
.dot.ok,
.dot-ok,
.dot.is-ok,
.dot.level-ok { --c: var(--ok); }
.dot.warn,
.dot-warn,
.dot.is-warn,
.dot.level-warn { --c: var(--warn); }
.dot.err,
.dot.crit,
.dot-err,
.dot-crit,
.dot.is-crit,
.dot.level-crit { --c: var(--err); }
.dot.off,
.dot-offline,
.dot-unreachable { --c: var(--faint); }

.dot.pulse {
    animation: htp-pulse 1.8s ease-out infinite;
}
@keyframes htp-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--ok)) 55%, transparent);
    }
    70% {
        box-shadow: 0 0 0 7px color-mix(in srgb, var(--c, var(--ok)) 0%, transparent);
    }
    100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--ok)) 0%, transparent);
    }
}
@media (prefers-reduced-motion: reduce) {
    .dot.pulse { animation: none; }
}

/* Im Original umhuellt <span class="dot"> den eigentlichen Punkt. Traegt ein
   Punkt selbst einen Punkt, ist er nur die Huelle. */
.dot:has(> .dot) {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
}


/* ==========================================================================
   07  ORIGINAL — SiteCard (die Website-Zeile)
   ========================================================================== */

.card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition:
        border-color 0.12s,
        transform 0.06s;
    text-align: left;
}
.card:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.card:active {
    transform: scale(0.995);
}
.card.sel,
.card.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.card .pick {
    display: inline-flex;
    align-items: center;
}
.card .pick input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--accent);
}
.card > .dot {
    display: inline-flex;
    align-items: center;
}
.card > .body {
    min-width: 0;
    flex: 1;
}
.card .row1 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.card .name {
    font-weight: 650;
    font-size: 0.96rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.badge {
    flex: none;
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--accent);
    white-space: nowrap;
}
.badge.sec {
    background: var(--warn-bg);
    color: var(--warn);
}
/* Joomla-Kern-Update: Warnton — ein veralteter Kern ist sicherheitsrelevant
   und wird darum wie die uebrigen Sicherheitshinweise gefuehrt. */
.badge.core {
    background: var(--warn-bg);
    color: var(--warn);
}
.card .row2 {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.15rem;
    font-size: 0.76rem;
    color: var(--muted);
    min-width: 0;
}
.card .host {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
}
.card .sep {
    color: var(--faint);
}
.card .jver {
    white-space: nowrap;
    color: var(--muted);
    flex: none;
}
.card .seen.down {
    color: var(--err);
    font-weight: 600;
}
.card .seen.stale {
    color: var(--warn);
}
.card .tags {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.2rem;
    min-width: 0;
    overflow: hidden;
}
.tg {
    font-size: 0.66rem;
    font-weight: 600;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    white-space: nowrap;
}
.card .links {
    display: flex;
    gap: 0.25rem;
    flex: none;
}
.ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 1.05rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}
.ic:hover {
    border-color: var(--accent);
    text-decoration: none;
}
.ic:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
/* Zahnrad als Button (1-Klick-Login) — optisch identisch zum .ic-Link. */
.icbtn {
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
}

/* Mobil: ultra-kompakt + maximale Platznutzung. Der Name bleibt EINZEILIG
   (kuerzt mit …), die Metazeile ebenfalls. */
@media (max-width: 560px) {
    .card {
        gap: 0.45rem;
        padding: 0.55rem 0.5rem;
        border-radius: 12px;
    }
    .card .row1 {
        gap: 0.3rem;
    }
    .card .name {
        font-size: 0.8rem;
        font-weight: 500;
    }
    .badge {
        font-size: 0.62rem;
        padding: 0.05rem 0.32rem;
    }
    .card .row2 {
        margin-top: 0.08rem;
        font-size: 0.66rem;
        gap: 0.26rem;
        line-height: 1.25;
    }
    .card .host {
        max-width: 60%;
    }
    .card .seen,
    .card .jver {
        white-space: nowrap;
        flex: none;
    }
    .card .links {
        gap: 0.2rem;
    }
    .ic {
        width: 1.7rem;
        height: 1.7rem;
        font-size: 0.9rem;
    }
}


/* ==========================================================================
   08  ORIGINAL — ActionButton
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
    text-decoration: none;
    transition:
        filter 0.12s,
        transform 0.08s,
        background 0.12s;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled,
.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}
.btn.full,
.btn.btn-block,
.btn.btn-full {
    width: 100%;
}
.btn .ic {
    width: auto;
    height: auto;
    border: 0;
    background: none;
    border-radius: 0;
    font-size: 1rem;
    line-height: 1;
}
.btn .lbl-short { display: none; }
/* Am Handy: Kurzlabel statt vollem Label (nur wenn eines gesetzt ist). */
@media (max-width: 560px) {
    .btn.has-short .lbl { display: none; }
    .btn.has-short .lbl-short { display: inline; }
}

.btn.accent {
    background: var(--accent);
    color: var(--accent-ink);
}
.btn.accent:hover:not(:disabled) { filter: brightness(1.06); }

.btn.ghost {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}
.btn.ghost:hover:not(:disabled) { border-color: var(--accent); }

.btn.ok {
    background: var(--ok-bg);
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}
.btn.warn {
    background: var(--warn-bg);
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 35%, transparent);
}
.btn.danger {
    background: var(--err-bg);
    color: var(--err);
    border-color: color-mix(in srgb, var(--err) 35%, transparent);
}

.spin {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 999px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: htp-spin 0.7s linear infinite;
    flex: none;
}
@keyframes htp-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .spin { animation-duration: 1.6s; }
}


/* ==========================================================================
   09  ORIGINAL — Fleet: Werkzeugleiste, Liste, Sammelleiste, Dialog
   ========================================================================== */

.banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    color: var(--muted);
}

.tools {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    flex-wrap: wrap;
}
/* Traegt die Flex-Rolle des Suchfelds, damit das Mikrofon INNEN sitzen kann. */
.searchwrap {
    position: relative;
    display: flex;
    flex: 1 1 12rem;
    min-width: 0;
}
.search {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
}
.search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
/* Platz fuer Mikrofon/Leeren freihalten, damit der Text nicht darunter laeuft. */
.searchwrap.hasmic .search,
.searchwrap.hasclear .search {
    padding-right: 2.35rem;
}
.searchwrap.hasmic.hasclear .search {
    padding-right: 4.05rem;
}
.sacts {
    position: absolute;
    right: 0.28rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.08rem;
}
.searchwrap.hasmic .search::-webkit-search-cancel-button {
    display: none;
}
.mic,
.clr {
    position: relative;
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        transform 0.12s ease;
}
.mic:hover {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
/* Leeren ist eine RUECKNAHME, keine Aktion — bewusst neutral. */
.clr:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--text) 10%, transparent);
}
.mic:active,
.clr:active { transform: scale(0.92); }
.mic:focus-visible,
.clr:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
/* Waehrend der Aufnahme: gefuellt + ruhig pulsierender Ring. */
.mic.on {
    color: var(--accent-ink, #fff);
    background: var(--accent);
}
.mic .pulse {
    position: absolute;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    border-radius: 50%;
    background: none;
    box-shadow: none;
    pointer-events: none;
}
.mic.on .pulse {
    animation: micPulse 1.6s ease-out infinite;
}
@keyframes micPulse {
    from {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
    }
    to {
        box-shadow: 0 0 0 0.66rem color-mix(in srgb, var(--accent) 0%, transparent);
    }
}
@media (prefers-reduced-motion: reduce) {
    .mic.on .pulse {
        animation: none;
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
    }
    .mic:active,
    .clr:active { transform: none; }
}
.tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.72rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    flex: none;
    transition:
        border-color 0.12s,
        color 0.12s,
        background 0.12s;
}
.tool:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.tool.on {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.tool svg { display: block; }
/* Ein <select> mit .tool braucht senkrechte Polsterung und Textfarbe zurueck -
   sonst klebt der gewaehlte Wert am Rand und erscheint grau statt lesbar. */
select.tool {
    padding: 0.45rem 0.65rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
}
/* Handy: Suchfeld, Auswahl-Icon und "Website hinzufuegen" in EINER Zeile. */
@media (max-width: 560px) {
    .tools { flex-wrap: nowrap; }
    .searchwrap { flex-basis: 6rem; }
    .mic,
    .clr {
        width: 1.7rem;
        height: 1.7rem;
    }
}

.tagbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.tgf {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.tgf.on {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
}
.navbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}
.navbtn:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
@media (max-width: 520px) {
    .navbtn .nl { display: none; }
}
.selrow {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.82rem;
}
.link {
    background: none;
    border: none;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
}
.count {
    margin-left: auto;
    color: var(--muted);
}

/* Die Website-Liste ist EINSPALTIG — Zeilen, kein Kachelraster. */
.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
@media (max-width: 560px) {
    .list { gap: 0.4rem; }
}

.empty {
    text-align: center;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.et,
.empty-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
}
.es,
.empty-text {
    color: var(--muted);
    font-size: 0.87rem;
    margin: 0;
    max-width: 36ch;
}
.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.how {
    color: var(--accent);
    font-size: 0.83rem;
    text-decoration: none;
}

.bulkbar {
    position: fixed;
    left: 50%;
    bottom: calc(0.8rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(680px, calc(100% - 1.4rem));
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.bc,
.bulk-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}
.bb {
    display: flex;
    gap: 0.5rem;
}

/* --- Kurzmeldung ----------------------------------------------------------
   Im Original schwebt genau EINE Meldung oben mittig. Die Demo sammelt sie in
   .toast-stack; die Pille selbst sieht aus wie im Original. */
.toast-stack,
.toasts {
    position: fixed;
    left: 50%;
    top: calc(0.8rem + env(safe-area-inset-top));
    transform: translateX(-50%);
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    max-width: calc(100% - 1.5rem);
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    pointer-events: auto;
}
.toast.fixed {
    position: fixed;
    left: 50%;
    top: calc(0.8rem + env(safe-area-inset-top));
    transform: translateX(-50%);
    z-index: 70;
}
.toast.ok,
.toast-ok {
    background: var(--ok);
    border-color: transparent;
    color: #fff;
}
.toast.warn,
.toast-warn {
    background: var(--warn);
    border-color: transparent;
    color: #fff;
}
.toast.err,
.toast-err,
.toast-error {
    background: var(--err);
    border-color: transparent;
    color: #fff;
}
.toast-info {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    color: var(--text);
}
.toast-body {
    min-width: 0;
    flex: 1 1 auto;
    font-weight: 600;
}
.toast-close {
    flex: none;
    background: none;
    border: 0;
    padding: 0 0 0 0.15rem;
    font-size: 1rem;
    line-height: 1;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}
.toast-close:hover { opacity: 1; }
.toast.is-leaving {
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

/* --- Dialog --------------------------------------------------------------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 18, 0.55);
    backdrop-filter: blur(2px);
    z-index: 60;
    border: 0;
}
.modal-host { display: contents; }

.modal {
    position: fixed;
    z-index: 61;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(460px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom));
}
.grip {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    margin: 0.1rem auto 0.7rem;
}
.modal h2,
.modal-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.lead,
.modal-text {
    color: var(--muted);
    font-size: 0.86rem;
    margin: 0 0 0.9rem;
    line-height: 1.4;
}
.perr {
    color: var(--err);
    font-size: 0.86rem;
    margin: 0 0 0.8rem;
}
.code {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.7rem;
}
.code span {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    flex: 1;
    overflow-x: auto;
    white-space: nowrap;
}
.copy {
    flex: none;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.dl {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.8rem;
    line-height: 1.5;
}
.dl code {
    display: inline-block;
    margin-top: 0.25rem;
    color: var(--accent);
    word-break: break-all;
    font-size: 0.76rem;
}
.close {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
}
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* <dialog class="modal"> — die Demo ruft showModal(); die Abdunklung liefert
   ::backdrop. Die letzte Regel ist wichtig: Autoren-CSS mit display schlaegt
   sonst die UA-Regel fuer geschlossene Dialoge. */
dialog.modal {
    position: fixed;
    inset: auto;
    left: 50%;
    bottom: 0;
    top: auto;
    transform: translateX(-50%);
    margin: 0;
    max-width: min(460px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    color: var(--text);
}
dialog.modal::backdrop {
    background: var(--overlay);
    backdrop-filter: blur(2px);
}
dialog.modal:not([open]) { display: none; }

@media (min-width: 560px) {
    .modal {
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        border-bottom: 1px solid var(--border);
        border-radius: var(--radius);
    }
    .grip { display: none; }
    .uname { max-width: 12rem; }

    dialog.modal {
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
    }
}


/* ==========================================================================
   10  DEMO — was es im Original nicht gibt
   ========================================================================== */

/* --- Demo-Band: Pflicht, aber bewusst dezent ------------------------------
   Schmaler Streifen ueber der Kopfleiste. Er darf die Optik der App nicht
   dominieren — kleine Schrift, ruhige Farbe, kein Rahmenspektakel. */
.demo-banner,
.demo-ribbon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.28rem 0.9rem;
    background: color-mix(in srgb, var(--accent) 8%, var(--bg));
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: center;
}
.demo-banner strong,
.demo-ribbon strong { font-weight: 700; }

/* --- Fortschritt ---------------------------------------------------------- */
.progress,
.progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.progress-label,
.progress-meta {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 600;
    min-width: 0;
}
.progress-label > :last-child,
.progress-pct {
    margin-left: auto;
    color: var(--text);
    font-weight: 700;
    flex: 0 0 auto;
}
.progress-phase {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.progress-track,
.progress-bar {
    height: 7px;
    width: 100%;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    overflow: hidden;
}
.progress-fill,
.progress-value {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--accent);
    transition: width 400ms var(--ease);
}
/* views-a baut <div class="progress" role="progressbar"><div class="progress-fill">
   also OHNE eigene Spur. Ohne diese Regel waere der Balken unsichtbar — und
   genau der Balken traegt die Aussage der Demo. */
.progress[role="progressbar"] {
    display: block;
    height: 7px;
    width: 100%;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    overflow: hidden;
}
.progress[role="progressbar"] > .progress-fill { height: 100%; }
.progress-ok .progress-fill,
.progress-done .progress-fill { background: var(--ok); }
.progress-warn .progress-fill { background: var(--warn); }
.progress-failed .progress-fill { background: var(--err); }

/* --- Ansichtskopf + Tafeln der Nebenansichten ----------------------------- */
.view {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}
.view-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.view-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}
.view-sub {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
}
.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.panel-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text);
}
.panel-hint {
    margin: 0;
    color: var(--faint);
    font-size: 0.76rem;
}
.panel-body {
    padding: 0.8rem;
    min-width: 0;
}

/* --- Zeilenlisten in den Nebenansichten ----------------------------------- */
.rows {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}
.rows > .row { border-bottom: 1px solid var(--border); }
.rows > .row:last-child { border-bottom: 0; }

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    padding: 0.6rem 0;
    min-width: 0;
}
.row-main {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    flex: 1 1 220px;
}
.row-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.row-id {
    color: var(--faint);
    font-size: 0.76rem;
}
.row-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}
.row-progress,
.row-findings {
    flex: 1 1 100%;
    min-width: 0;
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
}
.card-status {
    margin-left: auto;
    flex: 0 0 auto;
}
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.card-title,
.card-title-btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 650;
    font-size: 0.96rem;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.card-title-btn:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* --- Meta, Funde, Chips ---------------------------------------------------- */
.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.6rem;
    font-size: 0.76rem;
    color: var(--muted);
}
.meta-key,
.meta-faint { color: var(--faint); }
.findings { margin-top: 0.4rem; }
.sev { font-weight: 650; }
.sev-high { color: var(--err); }
.sev-med { color: var(--warn); }
.sev-low { color: var(--muted); }
.chips,
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.chip,
.chip-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 600;
    white-space: nowrap;
}
.list-count {
    color: var(--faint);
    font-size: 0.76rem;
}
.linkish {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- Formularteile --------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.field-grow { flex: 1 1 180px; min-width: 0; }
.label,
.field-label,
.ctl-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
}
.field-hint,
.hint {
    font-size: 0.76rem;
    color: var(--faint);
}
.field-error {
    font-size: 0.76rem;
    color: var(--err);
    font-weight: 600;
}
.input,
textarea,
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    min-width: 0;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
}
select,
.select {
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.86rem;
    cursor: pointer;
    min-width: 0;
}
.input:focus,
.select:focus,
select:focus,
textarea:focus,
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.input[disabled],
select[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--surface-2);
}
.check,
.check-box {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.82rem;
}
.check input,
.check-box input {
    accent-color: var(--accent);
    width: 1.05rem;
    height: 1.05rem;
}
.ctl {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* --- Tabellen -------------------------------------------------------------- */
.table-wrap,
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.table th,
.table td {
    padding: 0.5rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table th {
    color: var(--faint);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    background: var(--surface-2);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table-right,
.table th.right,
.table td.right { text-align: right; }
.table-nowrap { white-space: nowrap; }

/* --- Protokoll / Aktivitaet ------------------------------------------------ */
.log-list { list-style: none; margin: 0; padding: 0; }
.log-row,
.log-item,
.list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    min-width: 0;
}
.log-row:last-child,
.log-item:last-child,
.list-item:last-child { border-bottom: 0; }
.log-time {
    color: var(--faint);
    font-size: 0.76rem;
    flex: none;
}
.log-site {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.log-type { color: var(--muted); }
.log-state,
.log-code { margin-left: auto; }
.list-item-main { flex: 1 1 200px; min-width: 0; }
.list-item-title { font-weight: 600; font-size: 0.86rem; }
.list-item-sub { font-size: 0.76rem; color: var(--muted); }
.list-item-actions {
    margin-left: auto;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.state {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}
.state-queued { color: var(--faint); }
.state-running { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.state-done { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.state-failed { background: var(--err-bg); color: var(--err); border-color: transparent; }

/* --- Hinweise -------------------------------------------------------------- */
.notices {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.notice,
.note,
.callout {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    padding-right: 2.2rem;
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.84rem;
}
.notice-ok, .note-ok, .callout-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.notice-warn, .note-warn, .callout-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.notice-err, .note-crit, .callout-crit { border-left-color: var(--err); background: var(--err-bg); }
.notice-info { border-left-color: var(--accent); }
.note-title { font-weight: 650; }
.notice-x {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none;
    border: 0;
    padding: 4px 7px;
    font: inherit;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    border-radius: var(--r-xs);
}
.notice-x:hover { color: var(--text); background: var(--surface); }

/* --- Spinner / Platzhalter -------------------------------------------------- */
.spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    animation: htp-spin 0.7s linear infinite;
    flex: none;
}
.spinner-sm { width: 12px; height: 12px; }
.spinner-lg { width: 26px; height: 26px; border-width: 3px; }
.skeleton {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    min-height: 1rem;
}


/* ==========================================================================
   11  DEMO — dv-*-Vokabular der Nebenansichten (views-b)
   --------------------------------------------------------------------------
   views-b bringt sein eigenes, durchgaengiges Praefix mit. Das Dummy-Joomla
   liefert views-b als eigenen <style id="dv-joomla-style"> mit dem Praefix
   .jm-* selbst — es ist bewusst KEIN HTProtect-Aussehen und darum hier nicht
   mitgestaltet.
   ========================================================================== */

.dv-view { display: flex; flex-direction: column; gap: 0.85rem; min-width: 0; }
.dv-h1 { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.dv-p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

.dv-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.dv-head-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.dv-head-side { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-left: auto; }
.dv-head-id { color: var(--faint); font-size: 0.76rem; }
.dv-host { color: var(--muted); font-size: 0.8rem; word-break: break-word; }

.dv-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
}
.dv-card-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.dv-card-title { margin: 0; font-size: 0.95rem; font-weight: 650; color: var(--text); }
.dv-card-bd {
    padding: 0.8rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dv-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.dv-row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; min-width: 0; }
.dv-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dv-chiprow,
.dv-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }

/* Schluessel/Wert */
.dv-kvs { display: grid; gap: 0.4rem 0.8rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.dv-kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dv-kv-k {
    color: var(--faint);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}
.dv-kv-v { color: var(--text); font-size: 0.86rem; font-weight: 600; word-break: break-word; }

/* Knoepfe — gleiche Masse wie der ActionButton der App */
.dv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.dv-btn:hover:not(:disabled) { border-color: var(--accent); }
.dv-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.dv-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.dv-btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.dv-btn-ghost {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}
.dv-btn-danger {
    background: var(--err-bg);
    border-color: color-mix(in srgb, var(--err) 35%, transparent);
    color: var(--err);
}
.dv-btn-block { width: 100%; }

/* Formular */
.dv-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dv-label {
    color: var(--faint);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}
.dv-select {
    appearance: none;
    padding: 0.45rem 1.7rem 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    cursor: pointer;
    min-width: 0;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 13px center, right 8px center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.dv-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text);
}

/* Pillen, Punkte, Chips */
.dv-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
.dv-pill-ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.dv-pill-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); }
.dv-pill-err { background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 35%, transparent); color: var(--err); }
.dv-pill-neutral { background: var(--surface-2); border-color: var(--border); color: var(--muted); }

.dv-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--faint);
    flex: 0 0 auto;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 22%, transparent);
}
.dv-dot-ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.dv-dot-warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.dv-dot-err { background: var(--err); box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 22%, transparent); }

.dv-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Fortschritt in views-b */
.dv-job { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dv-job-row { display: flex; align-items: baseline; gap: 0.4rem; font-size: 0.76rem; min-width: 0; }
.dv-job-name {
    color: var(--muted);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dv-job-pct { margin-left: auto; color: var(--text); font-weight: 700; flex: 0 0 auto; }
.dv-bar {
    height: 7px;
    width: 100%;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    overflow: hidden;
}
.dv-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--accent);
    transition: width 400ms var(--ease);
}

/* Tabellen */
.dv-tablewrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dv-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.dv-table th,
.dv-table td {
    padding: 0.5rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.dv-table th {
    color: var(--faint);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    background: var(--surface-2);
}
.dv-table tbody tr:last-child td { border-bottom: 0; }
.dv-table tbody tr:hover { background: var(--surface-2); }

/* Protokoll */
.dv-loglist { display: flex; flex-direction: column; gap: 0; }
.dv-logitem {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    min-width: 0;
}
.dv-logitem:last-child { border-bottom: 0; }
.dv-log-time { color: var(--faint); font-size: 0.76rem; flex: 0 0 auto; }
.dv-log-type { font-weight: 600; color: var(--text); }
.dv-log-code { margin-left: auto; }

/* Hinweiszeile — erst mit .dv-notice-on sichtbar */
.dv-notice { display: none; margin: 0; }
.dv-notice-on {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-size: 0.84rem;
    color: var(--text);
}
.dv-notice-on.dv-tone-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.dv-notice-on.dv-tone-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.dv-notice-on.dv-tone-err { border-left-color: var(--err); background: var(--err-bg); }

.dv-tone-ok { color: var(--ok); }
.dv-tone-warn { color: var(--warn); }
.dv-tone-err { color: var(--err); }
.dv-muted { color: var(--muted); }
.dv-hint { color: var(--faint); font-size: 0.76rem; }
.dv-strong { font-weight: 650; color: var(--text); }
.dv-nowrap { white-space: nowrap; }
.dv-mono {
    font-family: var(--mono);
    font-size: 0.76rem;
    word-break: break-all;
}


/* ==========================================================================
   12  DEMO — Hilfsklassen
   ========================================================================== */

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.t-xs { font-size: 0.68rem; }
.t-sm { font-size: 0.76rem; }
.t-md { font-size: 0.86rem; }
.t-lg { font-size: 1rem; }
.bold { font-weight: 700; }
.semi { font-weight: 600; }
.upper { text-transform: uppercase; letter-spacing: .05em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.break { overflow-wrap: anywhere; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ml-auto { margin-left: auto; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.w-full { width: 100%; }
.hidden,
[hidden] { display: none !important; }
/* 0.85rem = Abstand der Fleet-Inhaltsspalte im Original. */
.stack { display: flex; flex-direction: column; gap: 0.85rem; }
.stack-tight { display: flex; flex-direction: column; gap: 0.4rem; }
.gap-2 { gap: 0.4rem; }
.gap-3 { gap: 0.6rem; }
.gap-4 { gap: 0.85rem; }
.mt-2 { margin-top: 0.4rem; }
.mt-3 { margin-top: 0.6rem; }
.mt-4 { margin-top: 0.85rem; }
.mb-2 { margin-bottom: 0.4rem; }
.mb-3 { margin-bottom: 0.6rem; }
.mb-4 { margin-bottom: 0.85rem; }


/* ==========================================================================
   13  KOMPATIBILITAET
   --------------------------------------------------------------------------
   Aeltere Klassennamen der Demo (Huelle in index.blade.php, frueheres
   Vokabular der Ansichten) bekommen hier die Optik des Originals. Die
   zusammengesetzten Selektoren stehen bewusst hoeher als die Grundregeln
   weiter oben, damit sie diese schlagen koennen.
   ========================================================================== */

/* --- Huelle: Kopfleiste, Navigation, Inhalt, Fusszeile --------------------- */
.demo-app,
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.demo-header,
.app-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0.6rem 0.9rem 0.5rem;
}
.app-brand,
.demo-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}
.app-brand:hover,
.demo-brand:hover { text-decoration: none; }
.app-brand > span:not(.app-brand-mark) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    min-width: 0;
    font-size: 0.98rem;
    font-weight: 700;
    white-space: nowrap;
}
.app-brand-mark,
.demo-brand-mark {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    flex: none;
    color: var(--accent);
}
.app-brand-sub {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-actions,
.demo-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.demo-nav,
.app-nav {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}
.demo-nav-inner,
.app-nav-inner {
    display: flex;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0 0.9rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.demo-nav-inner::-webkit-scrollbar,
.app-nav-inner::-webkit-scrollbar { display: none; }

/* Reiter — exakt die Optik von .tab */
.nav-link,
.demo-nav a,
.demo-nav button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.65rem 0.55rem;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.12s;
}
.nav-link:hover,
.demo-nav a:hover,
.demo-nav button:hover {
    color: var(--text);
    text-decoration: none;
}
.nav-link.is-active,
.demo-nav a[aria-current="page"],
.demo-nav button[aria-current="page"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
/* Forum wird nur per Layout nach rechts abgesetzt. */
.nav-link.is-forum,
.tab.forum.right-aligned { margin-left: auto; }

.demo-main,
.app-main {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1 1 auto;
}

.demo-footer,
.app-footer {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 1.2rem 0.9rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: 0.75rem;
    text-align: center;
}

@media (max-width: 560px) {
    .demo-main,
    .app-main {
        padding: 0.6rem 0.45rem;
        gap: 0.6rem;
    }
    .demo-header,
    .app-header { padding: 0.5rem 0.6rem 0.45rem; }
    .demo-nav-inner,
    .app-nav-inner { padding: 0 0.45rem; }
    .nav-link,
    .demo-nav a,
    .demo-nav button {
        padding: 0.55rem 0.5rem 0.5rem;
        font-size: 0.82rem;
    }
}

/* --- Knopf-Abwandlungen aelterer Namen ------------------------------------- */
.btn.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.btn.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.btn-secondary,
.btn.btn-ghost {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}
.btn.btn-ghost:hover:not(:disabled),
.btn.btn-secondary:hover:not(:disabled) { border-color: var(--accent); }
.btn.btn-danger,
.btn.btn-danger-solid {
    background: var(--err-bg);
    border-color: color-mix(in srgb, var(--err) 35%, transparent);
    color: var(--err);
}
.btn.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
}
.btn.btn-lg {
    padding: 0.7rem 1.1rem;
    font-size: 0.95rem;
}
.btn.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: var(--surface-2);
    border-color: var(--border);
}
.btn.is-loading { pointer-events: none; opacity: 0.7; }
.btn.btn-vault[data-locked="true"] {
    background: var(--warn-bg);
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 35%, transparent);
}
.btn.btn-vault[data-locked="false"] {
    background: var(--ok-bg);
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}

/* --- Kleine Zustands-Pillen aelterer Namen ---------------------------------
   .pill ist im Original die BREITE Zusammenfassungskarte. Wo die Demo eine
   kleine Statuspille meint, macht sie das mit einem Ton-Zusatz kenntlich. */
.pill.pill-ok,
.pill.pill-warn,
.pill.pill-err,
.pill.pill-neutral {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: default;
}
.pill.pill-ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.pill.pill-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); }
.pill.pill-err { background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 35%, transparent); color: var(--err); }
.pill.pill-neutral { background: var(--surface-2); color: var(--muted); }

/* Kennzahlen aelterer Namen — Optik der Zusammenfassung */
.stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
}
.stat-num,
.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.01em;
}
.stat-row { display: flex; align-items: baseline; gap: 0.4rem; }
.stat-static { cursor: default; }
.stat-ok .stat-value, .stat-ok .stat-num { color: var(--ok); }
.stat-warn .stat-value, .stat-warn .stat-num { color: var(--warn); }
.stat-crit .stat-value, .stat-crit .stat-num,
.stat-err .stat-value, .stat-err .stat-num { color: var(--err); }

/* Abzeichen-Toene aelterer Namen */
.badge.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge.badge-warn,
.badge.badge-update { background: var(--warn-bg); color: var(--warn); }
.badge.badge-err,
.badge.badge-crit,
.badge.badge-security { background: var(--err-bg); color: var(--err); }
.badge.badge-muted,
.badge.badge-neutral { background: var(--surface-2); color: var(--muted); }
.badge.badge-accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }

/* Kachelraster gibt es fuer die WEBSITELISTE nicht — die ist einspaltig.
   .cards bleibt nur fuer Nebenansichten (z. B. laufende Auftraege). */
.cards {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.grid { display: grid; gap: 0.6rem; }
.grid-2 { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-4 { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }

/* Frueheres Website-Kachel-Vokabular auf die Zeilen-Optik gebracht. */
.site-tile,
.tile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
}
.site-tile:hover,
.tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.site-tile-title { font-weight: 650; font-size: 0.96rem; }
.site-tile-host,
.site-tile-meta {
    font-size: 0.76rem;
    color: var(--muted);
}
.site-tile-host { font-family: var(--mono); }
.site-tile-badges,
.site-tile-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}


/* ==========================================================================
   14  BEWEGUNGSREDUKTION, DRUCK, SEHR SCHMALE SCHIRME
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    /* Zustaende muessen trotzdem lesbar bleiben */
    .spin,
    .spinner {
        animation: htp-spin 1.6s linear infinite !important;
    }
    .progress-fill,
    .dv-bar-fill { transition: none !important; }
    .skeleton { animation: none !important; background: var(--surface-2); }
}

@media print {
    .demo-nav,
    .app-nav,
    .app-actions,
    .appnav,
    .tools,
    .tagbar,
    .toast-stack,
    .bulkbar,
    .btn { display: none !important; }
    body { background: #fff; color: #000; }
    .card,
    .panel,
    .dv-card { box-shadow: none; border-color: #999; break-inside: avoid; }
    .demo-banner { background: #fff; color: #000; border-bottom: 1px solid #000; }
}

@media (max-width: 680px) {
    .cards,
    .dv-grid,
    .grid,
    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }
    .dv-kvs { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .panel-body,
    .dv-card-bd,
    .panel-head,
    .dv-card-hd { padding: 0.6rem; }
    .row-controls { margin-left: 0; width: 100%; }
    .view-title,
    .dv-h1 { font-size: 1.05rem; }
    .dv-logitem { gap: 2px 0.4rem; }
    .dv-log-code { margin-left: 0; flex-basis: 100%; }
    .table th,
    .table td { padding: 0.45rem 0.5rem; }
}

/* Das Original kennt UNTERHALB von 560px keine weitere Stufe. Fruehere
   400px-Regeln fuer .bar/.pill sind bewusst entfernt: sie haben die
   Zusammenfassung auf 360er- und 390er-Handys kleiner gemacht als in der App. */
@media (max-width: 400px) {
    .card-actions .btn,
    .dv-actions .dv-btn { flex: 1 1 auto; }
}
