/* Dashboard 25 · gemeinsamer Rahmen (Seitenleiste, Kopfzeile, Befehlspalette)
 * und die Brücke, über die die bestehenden Bootstrap-Seiten dieselben Farben,
 * Schriften und Rundungen bekommen. Vorlage: Redesign/assets/css/app.css.
 * Alle Klassen des Rahmens beginnen mit "d25-", damit sie nichts Bestehendes treffen.
 */

@font-face { font-family: "Asap"; src: url("../fonts/asap-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Asap"; src: url("../fonts/asap-variable-italic.woff2") format("woff2"); font-style: italic; font-weight: 100 900; font-display: swap; }

/* ------------------------------------------------------------------ Farben und Maße */
:root {
  --yellow: #FFED00; --yellow-soft: #FFF8A8; --green: #9DC31F; --green-3: #4E7A14; --purple: #6D34FF;
  --s1: #5E8E14; --s2: #6D34FF;                        /* Diagramm-Serien (geprüft: Farbfehlsichtigkeit, Kontrast) */
  --good: #2F7D0E; --warn: #A86500; --bad: #C2362F;    /* Status – immer mit Symbol + Text */
  --bg: #F4F6EF; --surface: #FFFFFF; --surface-2: #F3F7E8; --surface-3: #EAF0DB;
  --ink: #12140F; --ink-2: #3A3F34; --muted: #6A7062; --line: #E2E7D8; --line-2: #D3DAC5;
  --glass: rgba(255, 255, 255, .72); --shadow: 0 1px 2px rgba(20, 30, 5, .05), 0 12px 32px -18px rgba(30, 50, 10, .28);
  --shadow-lg: 0 30px 80px -30px rgba(20, 40, 5, .45);
  --aurora-1: rgba(255, 237, 0, .38); --aurora-2: rgba(157, 195, 31, .30); --aurora-3: rgba(109, 52, 255, .10);
  --f-display: "Asap", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Asap", ui-sans-serif, system-ui, sans-serif;
  --r: 22px; --r-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sb: 268px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --s1: #76A019; --s2: #8466F5; --good: #7CC04A; --warn: #E3A33B; --bad: #F06A5F;
  --bg: #0C0F13; --surface: #141920; --surface-2: #1A2029; --surface-3: #212935;
  --ink: #F1F4EC; --ink-2: #C9CFC1; --muted: #8F988A; --line: #232B35; --line-2: #2E3844;
  --glass: rgba(16, 20, 26, .72); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .7); --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --aurora-1: rgba(255, 237, 0, .10); --aurora-2: rgba(157, 195, 31, .12); --aurora-3: rgba(109, 52, 255, .14);
  color-scheme: dark;
}
:root.d25-leiste-schmal { --sb: 84px; }

/* ------------------------------------------------------------------ Basis */
body.d25-body { margin: 0; min-height: 100vh; height: auto; background: var(--bg); color: var(--ink); font-family: var(--f-body); -webkit-font-smoothing: antialiased; }
body.d25-neu { font-size: 16px; line-height: 1.5; }
/* :where() hält diese Vorgaben schwach, damit jede Klasse sie überschreiben kann. */
:where(body.d25-neu) *, :where(body.d25-neu) *::before, :where(body.d25-neu) *::after { box-sizing: border-box; }
:where(body.d25-neu) button { font: inherit; color: inherit; }
:where(body.d25-neu) a { color: inherit; }
.d25-app :focus-visible, .d25-overlay :focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; border-radius: 8px; }
.d25-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.d25-app { display: grid; grid-template-columns: var(--sb) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .4s var(--ease-out); }

/* ------------------------------------------------------------------ Seitenleiste */
.d25-sb { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); z-index: 1035; box-sizing: border-box; font-family: var(--f-body); }
/* Die Navigation rollt für sich; Konto und „einklappen" bleiben unten stehen. */
.d25-sb nav { flex: 1; min-height: 0; overflow: hidden auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.d25-sb *, .d25-top *, .d25-fuss *, .d25-overlay * { box-sizing: border-box; }
.d25-sb-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; text-decoration: none; color: var(--ink); }
.d25-sb-brand img { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 4px 10px rgba(200, 190, 0, .45)); transition: transform .8s var(--ease-out); }
.d25-sb-brand:hover img { transform: rotate(72deg) scale(1.06); }
.d25-sb-brand b { display: block; font: 800 18px/1.05 var(--f-display); letter-spacing: -.015em; }
.d25-sb-brand small { display: block; font-size: 12px; color: var(--muted); }
.d25-sb-label { margin: 14px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.d25-sb-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 14px; background: none; text-align: left; text-decoration: none; font: 600 15px var(--f-body); color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s; white-space: nowrap; }
.d25-sb-item > i:first-child { flex: none; width: 22px; font-size: 18px; text-align: center; }
.d25-sb-item:hover { background: var(--surface-2); color: var(--ink); }
.d25-sb-item[aria-current="page"] { background: var(--ink); color: var(--surface); }
.d25-sb-item[aria-current="page"] > i:first-child { color: var(--yellow); }
.d25-sb-item .d25-chev { margin-left: auto; font-size: 12px; transition: transform .3s var(--ease); }
.d25-sb-item[aria-expanded="true"] .d25-chev { transform: rotate(90deg); }
.d25-sb-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease-out); }
.d25-sb-sub.is-open { grid-template-rows: 1fr; }
.d25-sb-sub > div { overflow: hidden; }
.d25-sb-sub a { display: block; margin: 1px 0; padding: 7px 12px 7px 46px; border-radius: 10px; text-decoration: none; font-size: 14px; color: var(--muted); white-space: nowrap; }
.d25-sb-sub a:hover { background: var(--surface-2); color: var(--ink); }
.d25-sb-sub a[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--surface-3); }
.d25-sb-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; }
.d25-konto { position: relative; }
.d25-sb-user { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); font-family: var(--f-body); }
.d25-avatar { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--yellow), var(--green)); color: #111; font: 800 13px var(--f-display); overflow: hidden; }
.d25-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d25-sb-user b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.d25-sb-user small { display: block; font-size: 12px; color: var(--muted); }
.d25-sb-user > i { margin-left: auto; color: var(--muted); }
.d25-konto-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); min-width: 230px; z-index: 5; }
.d25-konto-menu[hidden] { display: none; }
.d25-konto-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.d25-konto-menu a:hover, .d25-konto-menu a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.d25-konto-menu a i { width: 20px; text-align: center; }

.d25-leiste-schmal .d25-sb-brand div, .d25-leiste-schmal .d25-sb-label, .d25-leiste-schmal .d25-sb-item span, .d25-leiste-schmal .d25-sb-item .d25-chev, .d25-leiste-schmal .d25-sb-sub, .d25-leiste-schmal .d25-sb-user div, .d25-leiste-schmal .d25-sb-user > i { display: none; }
.d25-leiste-schmal .d25-sb-item { justify-content: center; padding: 0; }
.d25-leiste-schmal .d25-sb-user { justify-content: center; }
.d25-leiste-schmal .d25-konto-menu { right: auto; }

/* ------------------------------------------------------------------ Hauptbereich + Kopfzeile */
.d25-main { min-width: 0; padding: 0 clamp(16px, 2.6vw, 40px) 32px; display: flex; flex-direction: column; min-height: 100vh; }
.d25-top { position: sticky; top: 0; z-index: 1025; display: flex; align-items: center; gap: 14px; margin: 0 calc(clamp(16px, 2.6vw, 40px) * -1); padding: 14px clamp(16px, 2.6vw, 40px); background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color .3s; font-family: var(--f-body); }
.d25-top.is-scrolled { border-bottom-color: var(--line); }
.d25-icon-btn { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 18px; transition: transform .2s var(--ease), background-color .2s; position: relative; }
.d25-icon-btn:hover { transform: translateY(-1px); background: var(--surface-2); }
.d25-search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); cursor: pointer; text-align: left; font: 500 15px var(--f-body); }
.d25-search:hover { border-color: var(--line-2); }
.d25-search span { flex: 1; }
.d25-top kbd, .d25-overlay kbd { padding: 2px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 7px; font: 600 12px var(--f-body); color: var(--muted); background: var(--surface-2); }
.d25-top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.d25-year { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.d25-year button { height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: none; font: 700 14px var(--f-body); color: var(--muted); cursor: pointer; transition: background-color .25s, color .25s; }
.d25-year button[aria-pressed="true"] { background: var(--yellow); color: #111; }
.d25-clock { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: 700 15px var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.d25-clock i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(157, 195, 31, .6); animation: d25-ping 2s var(--ease-out) infinite; }
@keyframes d25-ping { 70%, 100% { box-shadow: 0 0 0 8px rgba(157, 195, 31, 0); } }
.d25-menu-btn { display: none; }

.d25-inhalt { flex: 1; min-width: 0; }
.d25-fuss { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font: 500 13px var(--f-body); color: var(--muted); background: none; }
.d25-fuss a { text-decoration: none; font-weight: 600; color: inherit; }
.d25-fuss .bi-heart-fill { color: var(--bad); }

/* ------------------------------------------------------------------ Befehlspalette */
.d25-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(10, 14, 6, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .2s; font-family: var(--f-body); }
.d25-overlay.is-open { opacity: 1; pointer-events: auto; }
.d25-palette { width: min(640px, 100%); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(-10px) scale(.98); transition: transform .3s var(--ease-out); }
.d25-overlay.is-open .d25-palette { transform: none; }
.d25-palette-field { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); margin: 0; }
.d25-palette-field i { font-size: 18px; color: var(--muted); }
.d25-palette-field input { flex: 1; border: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); outline: none; }
.d25-palette ul { max-height: 52vh; margin: 0; padding: 8px; overflow: auto; list-style: none; }
.d25-palette li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; cursor: pointer; font-size: 15px; }
.d25-palette li i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); }
.d25-palette li small { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.d25-palette li[aria-selected="true"] { background: var(--surface-2); }
.d25-palette li[aria-selected="true"] i { background: var(--yellow); color: #111; }
.d25-palette .d25-gruppe { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: default; }
.d25-palette-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Meldungen des Rahmens (unten mittig) */
.d25-toasts { position: fixed; left: 50%; bottom: 24px; z-index: 2100; display: grid; gap: 8px; transform: translateX(-50%); font-family: var(--f-body); }
.d25-toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--surface); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-lg); animation: d25-toast .4s var(--ease-out) both; }
.d25-toast i { color: var(--yellow); }
@keyframes d25-toast { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ------------------------------------------------------------------ Brücke zu den bestehenden Seiten
 * style.css arbeitet mit eigenen Variablen; sie werden hier auf die neuen Farben gelegt.
 * Dazu die wichtigsten Bootstrap-Bausteine im neuen Stil. */
:root {
  --gfl-primary: var(--green-3); --gfl-primary-hover: #3E6310; --gfl-secondary: var(--purple); --gfl-accent: var(--ink);
  --bg-body: var(--bg); --bg-card: var(--surface); --bg-nav: var(--surface);
  --text-main: var(--ink); --text-muted: var(--muted); --border-color: var(--line);
  --input-bg: var(--surface); --input-border: var(--line-2); --input-color: var(--ink);
  --bs-body-font-family: var(--f-body); --bs-body-bg: var(--bg); --bs-body-color: var(--ink);
  --bs-primary: #4E7A14; --bs-primary-rgb: 78, 122, 20;
  --bs-link-color: #3E6310; --bs-link-color-rgb: 62, 99, 16; --bs-link-hover-color: #2C470B; --bs-link-hover-color-rgb: 44, 71, 11;
  --bs-border-color: var(--line); --bs-border-radius: 12px; --bs-border-radius-lg: 18px; --bs-border-radius-sm: 9px;
}
.d25-alt { padding-top: 18px; }
.d25-alt > .container-fluid, .d25-alt > .container { padding-left: 0; padding-right: 0; max-width: none; }
.d25-alt .card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.d25-alt .card:hover { box-shadow: var(--shadow); transform: none; }
.d25-alt .card-header { background: none; border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.d25-alt .card-footer { background: none; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.d25-alt .form-container { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.d25-alt .btn { border-radius: 12px; font-weight: 600; }
.d25-alt .btn-primary { --bs-btn-bg: var(--green-3); --bs-btn-border-color: var(--green-3); --bs-btn-hover-bg: #3E6310; --bs-btn-hover-border-color: #3E6310; --bs-btn-active-bg: #33520D; --bs-btn-active-border-color: #33520D; --bs-btn-disabled-bg: var(--green-3); --bs-btn-disabled-border-color: var(--green-3); --bs-btn-focus-shadow-rgb: 78, 122, 20; background-color: var(--green-3); border-color: var(--green-3); color: #fff; }
.d25-alt .btn-primary:hover, .d25-alt .btn-primary:focus { background-color: #3E6310; border-color: #3E6310; color: #fff; }
.d25-alt .btn-outline-primary { --bs-btn-color: var(--green-3); --bs-btn-border-color: var(--green-3); --bs-btn-hover-bg: var(--green-3); --bs-btn-hover-border-color: var(--green-3); --bs-btn-active-bg: var(--green-3); --bs-btn-active-border-color: var(--green-3); color: var(--green-3); border-color: var(--green-3); }
.d25-alt .btn-outline-primary:hover { background-color: var(--green-3); color: #fff; }
.d25-alt .form-control, .d25-alt .form-select { border-radius: 12px; border-color: var(--line-2); }
.d25-alt .form-control:focus, .d25-alt .form-select:focus { border-color: var(--green); box-shadow: 0 0 0 .2rem rgba(157, 195, 31, .25); }
.d25-alt .form-check-input { border-color: #9AA48A; }
.d25-alt .form-check-input:checked { background-color: var(--green-3); border-color: var(--green-3); }
.d25-alt .nav-pills .nav-link.active, .d25-alt .nav-pills .show > .nav-link { background-color: var(--yellow); color: #111; }
.d25-alt .nav-pills .nav-link { color: var(--muted); font-weight: 700; border-radius: 12px; }
.d25-alt .nav-tabs .nav-link.active { color: var(--ink); font-weight: 700; border-bottom-color: var(--surface); }
.d25-alt .nav-tabs .nav-link { color: var(--muted); }
.d25-alt .text-primary { color: var(--green-3) !important; }
.d25-alt .bg-primary { background-color: var(--green-3) !important; }
.d25-alt .border-primary { border-color: var(--green-3) !important; }
.d25-alt .breadcrumb { font-size: 14px; }
.d25-alt .breadcrumb a { color: var(--muted); text-decoration: none; }
.d25-alt .page-link { color: var(--green-3); }
.d25-alt .active > .page-link, .d25-alt .page-link.active { background-color: var(--green-3); border-color: var(--green-3); color: #fff; }
.d25-alt .dataTables_wrapper .dataTables_paginate .paginate_button.current, .d25-alt .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background: var(--yellow) !important; border-color: var(--yellow) !important; color: #111 !important; }
.d25-alt .progress { border-radius: 10px; background: var(--surface-3); }
.d25-alt .progress-bar { background: linear-gradient(90deg, var(--green), var(--yellow)); color: #111; font-weight: 700; }
.d25-alt .section-title::after { background: var(--yellow); }
.d25-body .modal-content { border: 1px solid var(--line); border-radius: var(--r); }
.d25-body .dropdown-menu { border-color: var(--line); border-radius: 14px; }
.d25-body .dropdown-item.active, .d25-body .dropdown-item:active { background-color: var(--ink); color: var(--surface); }
/* Die Fußzeile der alten Seiten (style.css: footer{…}) soll den Rahmen nicht beeinflussen. */
.d25-body footer.d25-fuss { position: static; width: auto; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  .d25-app *, .d25-app *::before, .d25-app *::after, .d25-overlay, .d25-overlay * { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
}

/* ------------------------------------------------------------------ Responsiv */
@media (max-width: 1100px) {
  :root { --sb: 84px; }
  .d25-sb-brand div, .d25-sb-label, .d25-sb-item span, .d25-sb-item .d25-chev, .d25-sb-sub, .d25-sb-user div, .d25-sb-user > i { display: none; }
  .d25-sb-item { justify-content: center; padding: 0; }
  .d25-sb-user { justify-content: center; }
  .d25-sb-collapse { display: none; }
  .d25-konto-menu { right: auto; }
}
@media (max-width: 760px) {
  :root, :root.d25-leiste-schmal { --sb: 0px; }
  .d25-app { grid-template-columns: minmax(0, 1fr); }
  .d25-sb { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .4s var(--ease-out); box-shadow: var(--shadow-lg); background: var(--surface); }
  .d25-app.is-menu .d25-sb { transform: none; }
  .d25-sb-brand div, .d25-sb-label, .d25-sb-item span, .d25-sb-item .d25-chev, .d25-sb-user div, .d25-sb-user > i { display: revert; }
  .d25-sb-sub { display: grid; }
  .d25-sb-item { justify-content: flex-start; padding: 0 12px; }
  .d25-sb-user { justify-content: flex-start; }
  .d25-menu-btn { display: inline-grid; }
  .d25-search span, .d25-search kbd, .d25-clock { display: none; }
  .d25-search { flex: none; width: 44px; padding: 0; justify-content: center; }
  .d25-app.is-menu::before { content: ""; position: fixed; inset: 0; z-index: 1034; background: rgba(10, 14, 6, .38); }
}
@media print {
  .d25-sb, .d25-top, .d25-fuss, .d25-overlay, .d25-toasts { display: none !important; }
  .d25-app { display: block; }
  .d25-main { padding: 0; }
}
