/* Goldlegit.com – Brand Design 2.0: Creme, Tannengrün, Gold als Akzent; grosse Schriften und Bedienelemente ----- */
:root {
  /* Brand Design 2.0 – Tannengrün trägt, Gold akzentuiert (60 % Creme, 30 % Grün, 10 % Gold) */
  --green-950: #081A15;
  --green-900: #0F2B23;   /* Tannengrün: Flächen, Header, Text auf Creme */
  --green-800: #1B4537;
  --green-700: #2E6B55;   /* Links, Rahmen, Status OK */
  --green-600: #3F7C66;
  --green-100: #DCE8E2;
  --gold: #C39B3E;        /* Altgold: Logo, Linien, Icons auf hellen Flächen – nicht für Text */
  --gold-light: #D9BE74;  /* Gold: Logo und Akzente auf Grün, Hauptbutton */
  --gold-700: #9A7B33;    /* einzige goldene Textfarbe auf hellen Flächen (grosse Zahlen) */
  --gold-100: #EEDFB4;
  --gold-50: #F7EFD9;
  --cream: #F6F1E6;       /* Seitenhintergrund */
  --cream-2: #EDE4D2;
  --cream-3: #DCCFB6;
  --paper: #FCFAF5;
  --ink: #1C1A17;         /* Fliesstext */
  --ink-2: #5B5349;
  --muted: #736A5F;
  --line: #DCCFB6;
  --line-2: #C4B48F;
  --good: #2E6B55;     --good-bg: #DCEAE3;     --good-line: #B5D2C4;
  --warn: #B9791C;     --warn-bg: #F7E7CC;     --warn-line: #E8CF9A;
  --serious: #A83C34;  --serious-bg: #F3DCDA;  --serious-line: #E2B3AE;
  --critical: #7E2B25; --critical-bg: #EFCFCB; --critical-line: #D9A9A3;
  --info: #35628F;     --info-bg: #DCE6F0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 26, 23, .05), 0 10px 30px rgba(28, 26, 23, .07);
  --shadow-hover: 0 2px 4px rgba(28, 26, 23, .06), 0 16px 40px rgba(28, 26, 23, .12);
  --fs: 17px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}
html.big { --fs: 19.5px; }
* { box-sizing: border-box; }
html { font-size: var(--fs); }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; min-height: 100vh; }
::selection { background: var(--gold-light); color: var(--green-900); }
a { color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
a:hover { color: var(--green-900); text-decoration-color: var(--gold-700); }
h1, h2, h3 { margin: 0; color: var(--green-900); line-height: 1.2; font-family: var(--serif); font-weight: 600; letter-spacing: .005em; font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
h4 { margin: 0; color: var(--green-900); line-height: 1.25; font-weight: 700; font-size: 1.02rem; }
h1 { font-size: 2.4rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.3rem; }
p { margin: 0 0 .6rem; }
.lead { font-size: 1.06rem; color: var(--ink-2); max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; color: var(--ink-2); }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--cream-2); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--gold-100); }
pre { white-space: pre-wrap; word-break: break-word; background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; max-height: 420px; overflow: auto; font-size: .92rem; line-height: 1.5; }
.skip { position: absolute; left: -999px; top: 0; background: var(--green-900); color: #fff; padding: 8px 12px; z-index: 999; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold-700); outline-offset: 2px; }

/* Kopf & Navigation ------------------------------------------------------ */
.topbar { background: var(--green-900); color: var(--cream); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--gold-light); }
.brand { display: flex; align-items: center; gap: 18px; color: var(--cream); text-decoration: none; min-width: 0; }
.brand-logo { height: 50px; width: auto; display: block; }
.brand-sub { font-family: var(--serif); font-size: 1.08rem; letter-spacing: .05em; color: var(--gold-light); border-left: 1px solid rgba(217, 190, 116, .55); padding-left: 18px; line-height: 1.2; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.topbar-right label { color: var(--cream-2); font-size: .85rem; margin: 0 6px 0 0; text-transform: none; letter-spacing: 0; display: inline; }
.topbar-right select { width: auto; min-width: 220px; min-height: 42px; background: rgba(255, 253, 249, .96); color: var(--ink); border-color: transparent; }
.topbar-right .who { color: var(--cream); font-size: .95rem; }
.topbar .btn.light { background: transparent; color: var(--cream); border-color: rgba(217, 190, 116, .6); }
.topbar .btn.light:hover { background: rgba(246, 241, 230, .1); border-color: var(--gold-light); color: var(--gold-light); }
.mainnav { display: flex; gap: 2px; background: rgba(252, 250, 245, .92); border-bottom: 1px solid var(--line); padding: 0 22px; overflow-x: auto; backdrop-filter: blur(6px); }
.mainnav a { display: flex; align-items: center; gap: 9px; padding: 15px 18px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 1.02rem; letter-spacing: .01em; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s, background .15s; }
.mainnav a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mainnav a:hover { color: var(--green-900); background: var(--gold-50); }
.mainnav a.active { color: var(--green-900); border-bottom-color: var(--gold); }
.main { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; }
.foot { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-family: var(--serif); font-size: .98rem; letter-spacing: .03em; padding: 22px 20px 34px; border-top: 1px solid var(--line); margin: 0 24px; }
.foot-mark { width: 26px; height: 26px; opacity: .85; }
.loading { color: var(--muted); padding: 40px; text-align: center; font-size: 1.05rem; }
@media (max-width: 860px) { .brand-sub { display: none; } }
@media (max-width: 720px) {
  .topbar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .brand-logo { height: 34px; }
  .topbar-right { flex: 1 1 auto; gap: 8px 12px; align-items: center; }
  .topbar-right .who { font-size: .82rem; line-height: 1.2; }
  .topbar-right .who strong { display: block; }
  .topbar-right .inline { display: flex; align-items: center; gap: 6px; width: 100%; }
  .topbar-right label { font-size: .78rem; }
  .topbar-right select { min-width: 0; flex: 1; min-height: 38px; font-size: .95rem; }
  .topbar .btn.sm { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
  .mainnav { padding: 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { padding: 12px 11px; font-size: .92rem; gap: 7px; }
  .mainnav a svg { width: 19px; height: 19px; }
  .main { padding: 16px 14px 44px; }
  h1 { font-size: 1.9rem; }
  .toolbar { gap: 8px; }
  .toolbar input[type=search] { width: 100%; }
  .toolbar select { flex: 1 1 140px; min-width: 0; }
  .btn { min-height: 42px; padding: 9px 16px; }
  /* Tabellen als Karten: eine Karte je Zeile, Spaltenüberschrift vor jedem Wert – nichts wird abgeschnitten */
  .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 14px; margin-bottom: 12px; }
  .table-wrap tr.row-link:hover { background: var(--gold-50); }
  .table-wrap td { border: 0; padding: 7px 0; display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: 4px 12px; align-items: start; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap td + td { border-top: 1px solid var(--cream-2); }
  .table-wrap td.num { text-align: left; }
  .table-wrap td > * { grid-column: 2; }
  .table-wrap td > .sub { margin-top: -2px; }
  .table-wrap td::before { content: attr(data-label); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }
  .table-wrap td:not([data-label]) { grid-template-columns: 1fr; }
  .table-wrap td:not([data-label])::before { content: none; }
  .table-wrap td:first-child { font-size: 1.02rem; }
  .table-wrap td .sub { display: block; }
  table { font-size: .95rem; }
  .tabs { gap: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 10px 12px; white-space: nowrap; font-size: .95rem; }
  .modal { padding: 20px 16px; border-radius: 14px; }
  .foot { margin: 0 14px; font-size: .88rem; text-align: center; }
}
@media (max-width: 420px) {
  .brand-logo { height: 30px; }
  .topbar-right .who:not(:first-child) { display: none; }
}

/* Seitenkopf & Hilfetexte ------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1::after { content: ''; display: block; width: 52px; height: 2px; background: var(--gold); margin: 10px 0 12px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.help { display: flex; gap: 12px; align-items: flex-start; background: var(--gold-50); border: 1px solid var(--gold-100); border-left: 4px solid var(--gold); border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; color: var(--ink); font-size: .98rem; }
.help b { color: var(--green-900); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; margin-bottom: 12px; text-decoration: none; color: var(--ink-2); }
.back:hover { color: var(--green-900); text-decoration: underline; }

/* Karten & Raster ---------------------------------------------------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card > h2:first-child, .card > h3:first-child { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--gold-100); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--gold-100); flex-wrap: wrap; }
.card-head h2, .card-head h3 { border: 0; padding: 0; margin: 0; }
.card-head .hint { color: var(--muted); font-size: .9rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.stack > * + * { margin-top: 18px; }
@media (max-width: 960px) { .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; } }

/* Start: grosse Aktionen & Kennzahlen -------------------------------------- */
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 24px; }
.action-card { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); min-height: 160px; transition: .18s; box-shadow: var(--shadow); position: relative; }
.action-card:hover, .action-card:focus-visible { border-color: var(--gold); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.action-card .icon { width: 52px; height: 52px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--gold); color: var(--green-900); display: grid; place-items: center; font-size: 1.45rem; font-weight: 600; font-family: var(--serif); }
.action-card.primary .icon { background: var(--green-900); border-color: var(--green-900); color: var(--gold-light); }
.action-card .title { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--green-900); line-height: 1.15; }
.action-card .desc { color: var(--ink-2); font-size: .95rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.tile.gold { border-top-color: var(--gold); background: var(--gold-50); }
.tile.gold .tile-value { font-size: 2.1rem; color: var(--gold-700); }
.gold-now { margin-top: 12px; padding: 16px 18px; border: 1px solid var(--gold-100); border-radius: 14px; background: var(--gold-50); }
.gold-now-value { font-family: var(--serif); font-weight: 600; font-size: 2.3rem; line-height: 1.1; color: var(--green-900); font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.gold-now-value .unit { font-family: inherit; font-size: 1.05rem; font-weight: 500; color: var(--muted); }
.gold-now-title { margin-top: 6px; font-weight: 600; }
.gold-now .err { color: var(--serious); }
.tile { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: .15s; }
.tile:hover { border-color: var(--line-2); border-top-color: var(--gold-700); box-shadow: var(--shadow-hover); }
.tile-label { font-size: .8rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tile-value { font-family: var(--serif); font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; font-size: 2.7rem; font-weight: 600; color: var(--green-900); line-height: 1.05; margin-top: 4px; }
.tile-value.alert { color: var(--critical); }
.tile-hint { font-size: .88rem; color: var(--muted); }

/* Risiko-Kennzeichnung (immer Farbe + Symbol + Text) ----------------------- */
.risk { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; white-space: nowrap; border: 1.5px solid transparent; }
.risk .sym { font-size: 1rem; line-height: 1; }
.risk.low { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.risk.medium { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.risk.high { background: var(--serious-bg); color: var(--serious); border-color: var(--serious-line); }
.risk.critical { background: var(--critical-bg); color: var(--critical); border-color: var(--critical-line); }
.risk.unrated, .risk.neutral { background: var(--cream-2); color: var(--ink-2); border-color: var(--line); }
.risk.gold { background: var(--green-900); color: var(--gold-light); border-color: var(--green-900); }
.verdict { display: flex; gap: 20px; align-items: center; padding: 22px 24px; border-radius: var(--radius); border: 1.5px solid; margin-bottom: 18px; box-shadow: var(--shadow); }
.verdict .big { font-size: 3rem; line-height: 1; }
.verdict h2 { font-size: 1.8rem; }
.verdict.low { background: var(--good-bg); border-color: var(--good); } .verdict.low h2 { color: var(--good); }
.verdict.medium { background: var(--warn-bg); border-color: var(--warn); } .verdict.medium h2 { color: var(--warn); }
.verdict.high { background: var(--serious-bg); border-color: var(--serious); } .verdict.high h2 { color: var(--serious); }
.verdict.critical { background: var(--critical-bg); border-color: var(--critical); } .verdict.critical h2 { color: var(--critical); }
.verdict p { margin: 4px 0 0; font-size: 1.02rem; }
.score-bar { height: 12px; background: rgba(0, 0, 0, .08); border-radius: 6px; overflow: hidden; margin-top: 8px; max-width: 360px; }
.score-bar > span { display: block; height: 100%; background: currentColor; border-radius: 6px; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--cream-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.critical { background: var(--critical-bg); color: var(--critical); border-color: var(--critical-line); }
.badge.high { background: var(--serious-bg); color: var(--serious); border-color: var(--serious-line); }
.badge.medium { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.low { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.badge.gold { background: var(--green-900); color: var(--gold-light); border-color: var(--green-900); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); }
.chip.ok { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }

/* Buttons ------------------------------------------------------------------ */
.btn { font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: .01em; color: var(--green-900); background: var(--paper); border: 1.5px solid var(--green-700); border-radius: 999px; padding: 10px 20px; min-height: 46px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: .15s; white-space: nowrap; }
.btn:hover { background: var(--green-100); border-color: var(--green-900); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--gold-light); color: var(--green-900); border-color: var(--gold-light); box-shadow: 0 2px 6px rgba(195, 155, 62, .25); }
.btn.primary:hover { background: var(--gold); border-color: var(--gold); color: var(--green-900); }
.btn.gold { background: var(--green-900); color: var(--gold-light); border-color: var(--green-900); box-shadow: 0 2px 6px rgba(15, 43, 35, .2); }
.btn.gold:hover { background: var(--green-800); border-color: var(--green-800); }
.btn.quiet { border-color: var(--line-2); color: var(--ink-2); font-weight: 500; }
.btn.quiet:hover { background: var(--cream-2); color: var(--ink); border-color: var(--gold); }
.btn.danger { color: var(--serious); border-color: var(--serious-line); }
.btn.danger:hover { background: var(--serious-bg); border-color: var(--serious); }
.btn.sm { font-size: .92rem; padding: 7px 15px; min-height: 38px; }
.btn.xs { font-size: .85rem; padding: 4px 12px; min-height: 32px; font-weight: 500; }
.btn.block { width: 100%; }
.btn.lg { font-size: 1.1rem; padding: 14px 30px; min-height: 54px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }


/* Anmeldung ---------------------------------------------------------------- */
.auth-tabs { margin: 10px 0 16px; }
.auth-tabs a { flex: 1; text-align: center; padding: 10px 6px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .88rem; margin: 16px 0 10px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-col { display: flex; flex-direction: column; gap: 8px; }
.who-mail { display: block; font-size: .78rem; color: var(--cream-2); opacity: .8; }

/* Formulare ---------------------------------------------------------------- */
label { display: block; font-size: .95rem; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 10px 14px; min-height: 46px; width: 100%; outline: none; transition: .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(195, 155, 62, .22); background: #fff; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--green-700); vertical-align: middle; }
input[type=file] { padding: 9px; background: var(--paper); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--green-700) 50%), linear-gradient(135deg, var(--green-700) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.field { margin-bottom: 14px; }
.field .note { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-section { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--green-900); margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--gold-100); grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.inline { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline label { margin: 0; }
.inline select, .inline input { width: auto; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { width: 320px; max-width: 100%; }
.toolbar select { width: auto; min-width: 170px; }
.toolbar .spacer { flex: 1; }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 28px 20px; text-align: center; color: var(--ink-2); cursor: pointer; background: var(--cream-2); font-size: 1rem; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: var(--gold-50); color: var(--green-900); }
.dropzone strong { display: block; color: var(--green-900); font-size: 1.05rem; margin-bottom: 4px; }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; background: var(--paper); }
details + details { margin-top: 10px; }
details summary { cursor: pointer; font-weight: 600; color: var(--green-900); font-size: 1rem; padding: 4px 0; }
details[open] summary { margin-bottom: 10px; border-bottom: 1px solid var(--gold-100); padding-bottom: 8px; }

/* Tabellen ------------------------------------------------------------------ */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .98rem; }
th { text-align: left; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); padding: 13px 14px; border-bottom: 1px solid var(--gold); background: var(--cream-2); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--cream-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.row-link { cursor: pointer; transition: background .12s; }
tbody tr.row-link:hover { background: var(--gold-50); }
td .sub { color: var(--muted); font-size: .88rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-2); }
.empty strong { display: block; color: var(--green-900); font-family: var(--serif); font-size: 1.35rem; margin-bottom: 6px; }

/* Listen ------------------------------------------------------------------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 14px; align-items: center; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: .15s; }
.item.link { cursor: pointer; }
.item.link:hover { border-color: var(--gold); background: var(--gold-50); }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 600; color: var(--green-900); }
.item .meta { color: var(--ink-2); font-size: .9rem; margin-top: 2px; }
.flag { border-left: 5px solid var(--warn); align-items: flex-start; }
.flag.critical { border-left-color: var(--critical); } .flag.high { border-left-color: var(--serious); } .flag.medium { border-left-color: var(--warn); } .flag.low { border-left-color: var(--muted); }
.flag .detail { color: var(--ink-2); font-size: .95rem; margin-top: 4px; }
.flag .evidence { color: var(--muted); font-size: .9rem; margin-top: 4px; font-style: italic; }
.green { border-left: 5px solid var(--good); }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 9px 16px; margin: 0; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; color: var(--ink); font-weight: 500; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.tl { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.tl .when { color: var(--muted); font-size: .9rem; }
.tl .kind { font-size: .8rem; font-weight: 700; color: var(--green-700); text-transform: uppercase; letter-spacing: .08em; }
.tl .body { white-space: pre-wrap; color: var(--ink-2); font-size: .95rem; margin-top: 4px; }
.steps { margin: 0; padding-left: 22px; line-height: 1.8; font-size: 1rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Tabs ---------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tabs a { padding: 12px 16px; color: var(--ink-2); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: 1rem; transition: .15s; }
.tabs a:hover { color: var(--green-900); background: var(--gold-50); }
.tabs a.active { color: var(--green-900); border-bottom-color: var(--gold); }
.tabs .count { font-size: .85rem; color: var(--muted); margin-left: 6px; font-weight: 500; }

/* Dokumente-Checkliste ----------------------------------------------------- */
.doc-cat { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--green-900); margin: 22px 0 8px; }
.doc-row { display: grid; grid-template-columns: minmax(240px, 1.6fr) 170px 160px minmax(160px, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--cream-2); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .lbl { font-size: .98rem; } .doc-row .lbl small { display: block; color: var(--muted); font-size: .85rem; }
.doc-row select, .doc-row input { min-height: 40px; padding: 6px 10px; font-size: .95rem; }
@media (max-width: 900px) { .doc-row { grid-template-columns: 1fr 1fr; } .doc-row .lbl { grid-column: 1 / -1; } }
.status-missing { color: var(--critical); font-weight: 600; } .status-requested { color: var(--warn); font-weight: 600; } .status-received { color: var(--info); font-weight: 600; } .status-verified { color: var(--good); font-weight: 600; } .status-expired { color: var(--serious); font-weight: 600; } .status-rejected { color: var(--critical); font-weight: 600; } .status-na { color: var(--muted); }
.progress { height: 10px; background: var(--cream-2); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green-700); }

/* Modal & Hinweise --------------------------------------------------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 43, 35, .55); backdrop-filter: blur(2px); z-index: 100; display: grid; place-items: center; padding: 20px; overflow: auto; }
.modal { width: min(760px, 100%); max-height: 94vh; overflow: auto; background: var(--paper); border-radius: 18px; border: 1px solid var(--gold-100); box-shadow: 0 24px 70px rgba(0, 0, 0, .32); padding: 26px 28px; }
.modal.wide { width: min(1020px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--gold-100); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
#toast-root { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--green-900); color: var(--cream); border-left: 5px solid var(--gold-light); border-radius: 12px; padding: 12px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 1rem; max-width: 440px; animation: pop .2s ease-out; }
.toast.ok { border-left-color: var(--good-bg); } .toast.err { border-left-color: var(--serious-bg); background: var(--serious); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Anmeldung / Einrichtung -------------------------------------------------- */
.centered { max-width: 560px; margin: 44px auto; }
.centered .card { padding: 34px 36px; }
.welcome-logo { display: block; width: 220px; max-width: 70%; height: auto; margin: 0 auto 22px; }
.centered h1 { text-align: center; }
.centered .lead { text-align: center; margin-left: auto; margin-right: auto; }

/* E-Mail-Studio ------------------------------------------------------------ */
.email-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .email-grid { grid-template-columns: 1fr; } }
.email-body { min-height: 480px; font-size: 1rem; line-height: 1.55; }
.att { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: .95rem; }
.att.missing { opacity: .55; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.thumb-box { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; color: var(--ink-2); font-size: .8rem; }
.thumb-box img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; }
.thumb-box .file { font-size: 2rem; height: 110px; display: flex; align-items: center; }
.thumb-box .cap { width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone { border: 2px dashed var(--gold); border-radius: var(--radius); padding: 12px; background: var(--paper); }
.dropzone.over { background: var(--gold-50); }
.stepnum { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green-700); color: #fff; font-weight: 700; margin-right: 10px; font-size: .95rem; }

/* Markdown-Ausgabe --------------------------------------------------------- */
.md h1 { font-size: 1.7rem; margin: 12px 0; } .md h2 { font-size: 1.4rem; margin: 18px 0 6px; } .md h3 { font-size: 1.2rem; margin: 12px 0 4px; }
.md table { margin: 8px 0 14px; font-size: .92rem; } .md th, .md td { padding: 7px 10px; border: 1px solid var(--line); }
.md ul { margin: 6px 0 10px 20px; padding: 0; } .md p { margin: 6px 0; }
@media print {
  .topbar, .mainnav, .foot, .btn, .toolbar, .back, .no-print, .tabs, .skip, #toast-root, #modal-root { display: none !important; }
  body { background: #fff; color: #111; }
  .main { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 1px solid var(--line); }
  .tile, tr, .verdict, .kv { break-inside: avoid; page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .page-head h1::after { background: #C39B3E; }
}
