/* DATANORM-Viewer. Werkzeugseite, nicht Landingpage: schmaler Kopf, breite
   Arbeitsfläche, Detailspalte rechts. Ergänzt style.css. */

.dnv-app {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 24px 72px;
}

/* ---------------------------------------------------------------- Kopf */
.dnv-head { margin-bottom: 20px; }
.dnv-head h1 {
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    line-height: 1.15;
    margin: 0 0 6px;
}
.dnv-head p {
    margin: 0;
    max-width: 78ch;
    color: var(--text-muted, #5b6472);
    font-size: 15.5px;
}

/* Datenschutz-Aussage: bewusst das auffälligste Element der Seite. */
.dnv-claim {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 22px;
    margin-bottom: 22px;
    border-radius: 12px;
    border: 1px solid #1f5e52;
    background: linear-gradient(180deg, #f2f8f6, #eaf3f0);
    color: #143c34;
}
.dnv-claim svg { flex: none; margin-top: 2px; color: #1f5e52; }
.dnv-claim strong { display: block; font-size: 17px; margin-bottom: 4px; }
.dnv-claim span { display: block; font-size: 14.5px; line-height: 1.55; max-width: 92ch; }

/* ------------------------------------------------------------- Leiste */
.dnv-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border, #e3e7ec);
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg, #fff);
}
.dnv-btn {
    padding: 9px 16px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #1f5e52;
    background: #1f5e52;
    color: #fff;
}
.dnv-btn:hover { filter: brightness(1.08); }
.dnv-btn-quiet {
    background: var(--surface, #fff);
    color: var(--text, #1a2230);
    border-color: var(--border, #c9cfd6);
    font-weight: 500;
}
.dnv-btn:disabled { opacity: .45; cursor: default; }
.dnv-search {
    flex: 1 1 260px;
    max-width: 420px;
    padding: 9px 14px;
    border: 1px solid var(--border, #c9cfd6);
    border-radius: 8px;
    font: inherit;
}
.dnv-bar-info {
    font-size: 14px;
    color: var(--text-muted, #5b6472);
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------- Ablagezone */
.dnv-drop {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    padding: 52px 24px;
    border: 2px dashed var(--border, #c9cfd6);
    border-radius: 12px;
    background: var(--surface, #fff);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dnv-drop:hover,
.dnv-drop:focus-visible,
.dnv-drop.is-over { border-color: #1f5e52; background: #f4f8f7; }
.dnv-drop strong { font-size: 17px; }
.dnv-drop span { color: var(--text-muted, #5b6472); font-size: 14.5px; max-width: 74ch; }

.dnv-progress-wrap { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.dnv-progress-track { flex: 1; height: 6px; border-radius: 3px; background: #e8ecea; overflow: hidden; }
.dnv-progress { height: 100%; width: 2%; background: #1f5e52; transition: width .15s; }
.dnv-progress-wrap span { font-size: 13px; color: var(--text-muted, #5b6472); }

/* ------------------------------------------------------ Arbeitsfläche */
.dnv-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
@media (min-width: 1100px) {
    .dnv-workspace:has(.dnv-detail:not([hidden])) { grid-template-columns: minmax(0, 1fr) 380px; }
}
.dnv-main { min-width: 0; }

.dnv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.dnv-stat {
    border: 1px solid var(--border, #e3e7ec);
    border-radius: 9px;
    padding: 10px 13px;
    background: var(--surface, #fff);
    display: flex; flex-direction: column; gap: 1px;
}
.dnv-stat-label {
    font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
    color: var(--text-muted, #5b6472);
}
.dnv-stat-value { font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 650; }
.dnv-stat-hint { font-size: 12px; color: var(--text-muted, #5b6472); }

.dnv-problems { margin-bottom: 16px; }
.dnv-problem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dnv-problem-list li {
    display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
    padding: 8px 12px; border-radius: 7px; font-size: 14px;
    border-left: 3px solid var(--border, #dfe3e6);
    background: var(--surface, #fff);
}
.dnv-problem-list strong { font-variant-numeric: tabular-nums; }
.dnv-problem-list li.dnv-bad { border-left-color: #a03a1c; }
.dnv-problem-list li.dnv-warn { border-left-color: #b3730a; }
.dnv-problem-list li.dnv-info { border-left-color: #1f5e52; }
.dnv-ok { color: var(--text-muted, #5b6472); font-size: 14px; margin: 0; }

/* ------------------------------------------------------------ Tabelle */
.dnv-tablebar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}
.dnv-tablebar .dnv-search { flex: 1 1 280px; max-width: 460px; }
.dnv-filter-info {
    font-size: 13.5px;
    color: var(--text-muted, #5b6472);
    font-variant-numeric: tabular-nums;
}

.dnv-table-wrap { overflow-x: auto; }
.dnv-table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14px; }
.dnv-table th, .dnv-table td {
    text-align: left; padding: 7px 14px 7px 0;
    border-bottom: 1px solid var(--border, #eceff2); vertical-align: top;
}
.dnv-table th {
    font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
    color: var(--text-muted, #5b6472); font-weight: 500; white-space: nowrap;
    background: var(--bg, #fff);
}
.dnv-table .dnv-num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; white-space: nowrap; }
.dnv-table code { font-size: .92em; }
.dnv-table tbody tr { cursor: pointer; }
.dnv-table tbody tr:hover { background: #f4f8f7; }
.dnv-table tbody tr.is-selected { background: #eaf3f0; box-shadow: inset 3px 0 0 #1f5e52; }
.dnv-table tbody tr:focus-visible { outline: 2px solid #1f5e52; outline-offset: -2px; }

.dnv-badge {
    display: inline-block; font-size: 10.5px; line-height: 1;
    padding: 2px 5px; border-radius: 3px; margin-left: 6px;
    background: #eef2f0; color: var(--text-muted, #5b6472);
}

.dnv-pager { display: flex; align-items: center; gap: 14px; margin: 14px 0 24px; }
.dnv-pager span { font-size: 13.5px; color: var(--text-muted, #5b6472); font-variant-numeric: tabular-nums; }

.dnv-more { margin-bottom: 12px; }
.dnv-more > summary {
    cursor: pointer; font-size: 14px; font-weight: 600;
    padding: 8px 0; color: var(--text-muted, #5b6472);
}

/* ------------------------------------------------------- Detailspalte */
.dnv-detail {
    border: 1px solid var(--border, #e3e7ec);
    border-radius: 12px;
    padding: 20px 22px 24px;
    background: var(--surface, #fff);
    position: relative;
}
@media (min-width: 1100px) {
    .dnv-detail { position: sticky; top: 78px; max-height: calc(100vh - 100px); overflow-y: auto; }
}
.dnv-d-close {
    position: absolute; top: 10px; right: 12px;
    border: 0; background: none; font-size: 26px; line-height: 1;
    cursor: pointer; color: var(--text-muted, #5b6472); padding: 2px 6px;
}
.dnv-detail h3 { margin: 0 26px 4px 0; font-size: 18px; line-height: 1.3; }
.dnv-detail h4 {
    margin: 20px 0 6px; font-size: 11px; letter-spacing: .05em;
    text-transform: uppercase; color: var(--text-muted, #5b6472);
}
.dnv-d-sub { margin: 0 0 12px; font-size: 14px; color: var(--text-muted, #5b6472); }
.dnv-d-img {
    display: block; width: 100%; max-height: 260px; object-fit: contain;
    border: 1px solid var(--border, #e3e7ec); border-radius: 8px;
    background: #fafbfc; margin-bottom: 14px;
}
.dnv-d-hint { font-size: 13px; color: var(--text-muted, #5b6472); margin: 0 0 12px; }
.dnv-d-list { margin: 0; display: grid; gap: 0; }
.dnv-d-row {
    display: grid; grid-template-columns: 42% 1fr; gap: 12px;
    padding: 7px 0; border-bottom: 1px solid var(--border, #f0f2f5);
}
.dnv-d-row dt { font-size: 12.5px; color: var(--text-muted, #5b6472); margin: 0; }
.dnv-d-row dd { margin: 0; font-size: 14px; word-break: break-word; }
.dnv-d-row dd.dnv-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.dnv-d-text { font-size: 14px; line-height: 1.55; white-space: pre-line; margin: 0; }
.dnv-d-raw {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px; line-height: 1.5; overflow-x: auto;
    background: #f7f8fa; border: 1px solid var(--border, #e3e7ec);
    border-radius: 7px; padding: 10px 12px; margin: 0;
    white-space: pre; max-height: 260px;
}

@media (prefers-reduced-motion: reduce) {
    .dnv-drop, .dnv-progress { transition: none; }
}
