/* EuroOps Private-AI Portal – Klassifizierung als durchgehendes visuelles System.
   Nur Systemschriften: die Plattform lädt keine externen Ressourcen. */
:root {
  --paper: #f5f6f3;
  --surface: #ffffff;
  --ink: #1f2a33;
  --ink-soft: #55626d;
  --line: #d9ddd6;
  --pine: #2f6b4f;
  --pine-soft: #e3eee7;
  --c0: #7a8c7c;   /* Öffentlich */
  --c1: #3d6e9e;   /* Intern */
  --c2: #b8841c;   /* Vertraulich */
  --c3: #9e3328;   /* Streng vertraulich */
  --danger: #9e3328;
  --radius-s: 4px;
  --radius-m: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161c21; --surface: #1e262d; --ink: #e6ebe7; --ink-soft: #9aa7af; --line: #34404a;
    --pine: #6fb08d; --pine-soft: #22362c; --c0: #93a596; --c1: #7aa7d4; --c2: #d9a748; --c3: #e07a6c;
    --danger: #e07a6c; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.55 var(--font); }
a { color: var(--pine); }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.nav { background: var(--ink); color: #e9eeea; padding: 22px 14px; display: flex; flex-direction: column; gap: 18px;
       position: sticky; top: 0; height: 100vh; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav { background: #0f1418; } }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 30px; height: 30px; flex: none; object-fit: contain; }
.brand-text { font-weight: 650; font-size: 16px; line-height: 1.15; }
.brand-text small { display: block; font-weight: 400; font-size: 12px; opacity: .7; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: block; color: inherit; text-decoration: none; padding: 7px 10px; border-radius: var(--radius-s); opacity: .82; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { opacity: 1; background: rgba(255,255,255,.12); font-weight: 600; }
.nav-foot { margin-top: auto; font-size: 13px; padding: 0 8px; opacity: .85; }
.nav-foot button { margin-top: 8px; }

main { padding: 32px clamp(16px, 4vw, 48px) 64px; max-width: 1180px; width: 100%; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; font-weight: 680; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 28px 0 10px; font-weight: 650; }
.lead { color: var(--ink-soft); margin: 0 0 22px; max-width: 72ch; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--ink-soft); }
dl.facts dd { margin: 0; }

/* Klassifizierungsband: das wiedererkennbare Element der Oberfläche */
.cls { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.cls::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--cls-color); }
.cls-0 { --cls-color: var(--c0); } .cls-1 { --cls-color: var(--c1); }
.cls-2 { --cls-color: var(--c2); } .cls-3 { --cls-color: var(--c3); }
tr.banded > td:first-child { box-shadow: inset 4px 0 0 var(--cls-color); padding-left: 14px; }
.clearance { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 6px 0 4px; max-width: 280px; }
.clearance span { flex: 1; background: var(--line); }
.clearance span.on.cls-0 { background: var(--c0); } .clearance span.on.cls-1 { background: var(--c1); }
.clearance span.on.cls-2 { background: var(--c2); } .clearance span.on.cls-3 { background: var(--c3); }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--radius-m); overflow: hidden; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: 13px; color: var(--ink-soft); background: var(--paper); }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }

.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--pine-soft); color: var(--pine);
        font-size: 12.5px; margin: 1px 4px 1px 0; }
.status-ok { color: var(--pine); font-weight: 600; }
.status-bad { color: var(--danger); font-weight: 600; }

button, .btn { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 6px 12px; border-radius: var(--radius-s); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
button.danger { color: var(--danger); border-color: currentColor; }
button:disabled { opacity: .5; cursor: not-allowed; }
.nav button { background: transparent; color: inherit; border-color: rgba(255,255,255,.3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

form.stack { display: grid; gap: 12px; max-width: 560px; }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 550; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); width: 100%; }
textarea { font-family: var(--mono); font-size: 13px; min-height: 280px; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: 13px; }

.drop { border: 2px dashed var(--line); border-radius: var(--radius-m); padding: 22px; text-align: center; color: var(--ink-soft); }
.drop.over { border-color: var(--pine); background: var(--pine-soft); color: var(--ink); }

.result { border-left: 4px solid var(--cls-color); background: var(--surface); padding: 12px 16px; margin: 10px 0;
          border-radius: 0 var(--radius-m) var(--radius-m) 0; border-top: 1px solid var(--line);
          border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result p { margin: 6px 0 0; white-space: pre-wrap; max-width: 80ch; }

.viewer { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
pre.doc { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); padding: 16px;
          border-radius: var(--radius-m); max-height: 70vh; overflow: auto; }

.approval { display: grid; gap: 8px; }
.notice { padding: 12px 16px; border-radius: var(--radius-m); background: var(--pine-soft); margin: 12px 0; }
.notice.warn { background: color-mix(in srgb, var(--c3) 12%, var(--surface)); }

#toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: var(--paper); padding: 10px 16px;
         border-radius: var(--radius-m); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
         pointer-events: none; max-width: 420px; }
#toast.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; padding: 12px 16px; gap: 10px; }
  .nav ul { flex-direction: row; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .nav-foot { margin-top: 0; }
  main { padding: 20px 16px 48px; }
}
