/* GSE Mitarbeiterportal – modernes Design-System.
   Liegt als Schicht über style.css (gleiche Variablen, dadurch Hell/Dunkel automatisch) und behält die Wiedererkennung der GSE des ASB:
   ASB-Rot als Akzent, Logo oben links, roter Strich unter der Marke, gelbe Testbanner. */

:root {
  --font: "Inter var", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --bg: #f5f6f8; --line: #e7e9ee; --bd2: #d3d7de; --sf2: #f9fafb; --gys: #eef0f3;
  --r: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px -8px rgba(16, 24, 40, .12);
  --shadow-lg: 0 18px 40px -16px rgba(16, 24, 40, .30), 0 2px 6px rgba(16, 24, 40, .06);
  --ring: 0 0 0 4px rgba(216, 20, 28, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: var(--font);
}
@media screen { :root[data-theme=dark] { --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px -10px rgba(0, 0, 0, .55); --shadow-lg: 0 20px 44px -16px rgba(0, 0, 0, .7); --ring: 0 0 0 4px rgba(229, 50, 58, .28); --line: #292e36; --bd2: #3a4049; } }
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px -10px rgba(0, 0, 0, .55); --shadow-lg: 0 20px 44px -16px rgba(0, 0, 0, .7); --ring: 0 0 0 4px rgba(229, 50, 58, .28); --line: #292e36; --bd2: #3a4049; } }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font); font-size: 15.5px; line-height: 1.55; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: radial-gradient(1100px 380px at 85% -8%, rgba(216, 20, 28, .055), transparent 65%), var(--bg);
  background-attachment: fixed;
}
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 1.08rem; font-weight: 650; letter-spacing: -.01em; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
::selection { background: rgba(216, 20, 28, .18); }
.muted { color: var(--muted); }
:where(table, .dash-n, .count, .pill) { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  main.wrap { animation: gse-in .28s var(--ease) both; }
  @keyframes gse-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------- Karten ---------- */
.card { border-radius: var(--r); border-color: var(--line); box-shadow: var(--shadow); padding: 22px 24px; transition: box-shadow .2s var(--ease), border-color .2s, transform .2s var(--ease); }
a.card, .dash-card { text-decoration: none; color: inherit; }
a.card:hover, .dash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(216, 20, 28, .35); }
.card.narrow { max-width: 480px; }
.card > h2:first-child { margin-top: 0; }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s var(--ease); flex: none; }
details.card[open] > summary::before { transform: rotate(45deg); }
details.card[open] > summary { margin-bottom: .8rem; }
.pagehead { margin-bottom: 20px; align-items: flex-end; }
.pagehead p.muted { margin: .25rem 0 0; max-width: 62rem; }
.teaser { border-left-width: 4px; }

/* ---------- Schaltflächen ---------- */
.btn { min-height: 40px; padding: 8px 18px; border-radius: var(--r-sm); font-weight: 600; letter-spacing: -.005em; border-color: var(--bd2); box-shadow: 0 1px 1px rgba(16, 24, 40, .04); transition: background .15s, border-color .15s, box-shadow .2s var(--ease), transform .1s, color .15s; }
.btn:hover { border-color: var(--ink2); background: var(--sf2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #e3232b 0%, #cf141c 100%); border-color: #b80f16; color: #fff; box-shadow: 0 1px 2px rgba(176, 15, 22, .35), 0 8px 16px -8px rgba(216, 20, 28, .65), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { background: linear-gradient(180deg, #ea2d35 0%, #d8141c 100%); border-color: #b00f16; box-shadow: 0 2px 4px rgba(176, 15, 22, .35), 0 12px 22px -10px rgba(216, 20, 28, .75), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--gys); border-color: var(--bd2); }
.btn.danger { color: var(--err); }
.btn.danger:not(.ghost) { background: var(--err); color: #fff; border-color: var(--err); }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: .86rem; border-radius: 9px; }
.btn.ms { background: #1f1f1f; border-color: #1f1f1f; border-radius: 12px; padding: 12px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); }
.btn.ms:hover { background: #000; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-btn { border-radius: 10px; transition: background .15s; }
.icon-btn:hover { background: var(--gys); }

/* ---------- Formulare ---------- */
label { font-weight: 600; font-size: .86rem; color: var(--ink2); letter-spacing: 0; }
input, select, textarea { border-radius: var(--r-sm); border-color: var(--bd2); min-height: 42px; background: var(--sf); transition: border-color .15s, box-shadow .2s var(--ease), background .15s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:hover, select:hover, textarea:hover { border-color: var(--ink2); }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { border-radius: 6px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 16px 14px; }
legend { padding: 0 8px; font-weight: 650; font-size: .86rem; color: var(--ink2); }
.grid { gap: 14px 18px; }

/* ---------- Pills, Zähler, Tabs ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; font-size: .76rem; font-weight: 650; letter-spacing: 0; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; flex: none; }
.pill-open { background: var(--warn-l); color: var(--warn); }
.count { font-weight: 650; }
.tabs { border-bottom: 0; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 6px 14px; border-radius: 99px; border: 1px solid transparent; margin-bottom: 0; font-weight: 550; font-size: .9rem; transition: background .15s, color .15s; }
.tabs a:hover { background: var(--gys); }
.tabs a[aria-current] { background: var(--red-l); color: var(--red-d); border-color: transparent; font-weight: 650; }
.flash { border-radius: 12px; border-width: 1px 1px 1px 4px; box-shadow: var(--shadow); font-weight: 500; }
.flash-ok { border-left-color: var(--ok); } .flash-warn { border-left-color: var(--warn); } .flash-err { border-left-color: var(--err); }

/* ---------- Tabellen und Listen ---------- */
.table-wrap { padding: 0; overflow: auto; }
.table-wrap > table { margin: 0; }
table.list { font-size: .9rem; }
table.list th { font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: 12px 16px; background: var(--sf2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list th a { color: inherit; text-decoration: none; }
table.list th a:hover { color: var(--red-d); }
table.list td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.list tbody tr { transition: background .12s; }
table.list tbody tr:hover { background: var(--sf2); }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tr.sel td { background: var(--red-xl); }
table.list tr.inactive { opacity: .62; }
table.list td a:not(.btn):hover { color: var(--red-d); }
.card.table-wrap { border-radius: var(--r); }
.small-table { font-size: .84rem; }
.cbx { width: 44px; padding-right: 0 !important; }
.list .item { padding: 14px 8px; border-radius: 10px; transition: background .12s; }
.list .item:hover { background: var(--sf2); }
.card.list { padding: 8px 14px; }

/* ---------- Seitenleiste und Kopfleiste ---------- */
.gs-side { background: var(--sf); border-right: 1px solid var(--line); }
.sn-brand { border-bottom-width: 3px; }
.sn-sec { font-size: .66rem; letter-spacing: .1em; padding: 18px 12px 6px; opacity: .85; }
.sn a { border-radius: 10px; padding: 8px 12px; margin: 1px 8px; font-weight: 550; color: var(--ink2); transition: background .12s, color .12s; position: relative; }
.sn a svg { color: var(--muted); transition: color .12s; }
.sn a:hover { background: var(--gys); color: var(--ink); }
.sn a:hover svg { color: var(--ink2); }
.sn a.on { background: var(--red-l); color: var(--red-d); font-weight: 650; }
.sn a.on svg { color: var(--red); }
.sn a.on::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.sn-neu-btn { border-radius: 12px; min-height: 42px; }
.sn-foot { background: var(--sf); }
.sn-foot .av { background: linear-gradient(135deg, var(--red), #a50d13); color: #fff; }
.gs-top { background: var(--topbar); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.gs-search { border-radius: 12px; transition: box-shadow .2s var(--ease), border-color .15s; }
.gs-search:hover { border-color: var(--bd2); }
.dd-menu { border-radius: 14px; box-shadow: var(--shadow-lg); }
.testbanner { font-size: .76rem; letter-spacing: .02em; padding: 3px 8px; }
footer { color: var(--muted); }

/* ---------- Anmeldung ---------- */
.login { padding-top: 6vh; position: relative; }
.login::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 50% -12%, rgba(216, 20, 28, .13), transparent 70%), radial-gradient(700px 420px at 105% 105%, rgba(255, 230, 0, .14), transparent 70%); }
.login .card.narrow { max-width: 440px; padding: 34px 32px 28px; border-radius: 22px; box-shadow: var(--shadow-lg); text-align: center; }
.login .card.narrow form, .login .card.narrow details { text-align: left; }
.login-logo { height: 76px; margin-bottom: 14px; }
.login h1 { font-size: 1.5rem; }
details.testlogin { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
details.testlogin summary { cursor: pointer; font-weight: 600; color: var(--ink2); font-size: .92rem; }
header.site { border-bottom-width: 3px; box-shadow: 0 1px 0 var(--line); }

/* ---------- Kennzahlen, Organigramm, Massenbearbeitung ---------- */
.dash-grid { gap: 14px; }
.dash-card { border-radius: var(--r); position: relative; overflow: hidden; }
.dash-card .dash-n { font-size: 2.2rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.05; margin: 2px 0; }
.dash-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); transition: background .2s; }
.dash-card:hover::after { background: var(--red); }
.og-p { border-radius: 12px; box-shadow: var(--shadow); transition: transform .15s var(--ease), border-color .15s; }
.og-p:hover { transform: translateY(-1px); border-color: var(--red); }
.og-main { box-shadow: 0 8px 18px -10px rgba(216, 20, 28, .8); }
.bulkbar { position: sticky; bottom: 14px; z-index: 40; background: var(--card); border: 1px solid var(--bd2); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 12px 16px; margin: 0 0 14px; }
.bulkbar[hidden] { display: none; }
.bulk-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bulk-top select { width: auto; min-width: 14rem; }
.bulk-opt { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.bulk-sts { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.bulk-opt label { max-width: 28rem; }

/* ---------- Details ---------- */
.card.user > summary { align-items: flex-start; }
hr { border: 0; border-top: 1px solid var(--line); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; border: 3px solid transparent; }

@media (max-width: 900px) {
  body { font-size: 15px; }
  .card { padding: 18px; border-radius: 12px; }
  h1 { font-size: 1.45rem; }
  .bulkbar { bottom: 8px; }
  .login { padding-top: 3vh; }
}
@media print { body { background: #fff; } .card { box-shadow: none; } main.wrap { animation: none; } }
.dash-grid>.card,.dash-grid>a.card{margin-bottom:0}.dash-card small+small{margin-top:2px}
.table-wrap > table.list { min-width: 820px; }
table.list td small.muted.block { white-space: nowrap; }
.bulkbar .bulk-sts { max-height: 9.5rem; overflow: auto; }
