/* =====================================================================================================================
   EasyOne – Grundlagen der Bedienung: Farb- und Typo-Tokens, Grundelemente, Kopfleiste, Menüs, Rückmeldungen.
   Eigene Gestaltung für EasyOne (ruhig, dicht, gut lesbar). Schriften systemnah, keine externen Quellen (Intranet).
   Reihenfolge der Stile: eo-basis.css → eo-bausteine.css → site.css (Modul-Abschnitte) → css/module/<app>.css.
   Siehe docs/Bedienung.md.
   ===================================================================================================================== */
:root {
    /* Flächen und Text */
    --eo-hintergrund: #f4f5f7;
    --eo-flaeche: #ffffff;
    --eo-flaeche-2: #f8f9fa;          /* Tabellenkopf, Gruppenzeilen */
    --eo-flaeche-3: #eef0f3;          /* Hover, ausgewählte Flächen */
    --eo-text: #1b2027;               /* 16:1 auf Weiss */
    --eo-text-2: #4f5866;             /* 7.2:1 auf Weiss – Beschriftungen, Nebentext */
    --eo-text-3: #6a7381;             /* 4.8:1 auf Weiss – nur für kleine Hinweise, nie für Pflichtinformation */
    --eo-linie: #dde1e6;
    --eo-linie-stark: #c3c9d1;
    /* Hauptfarbe: ITeasy-Blau (wie die Anmeldeseite) */
    --eo-primaer: #088dfa;
    --eo-primaer-dunkel: #0670c8;
    --eo-primaer-hell: #e6f3fe;
    --eo-primaer-linie: #9cc9f5;
    --eo-fokus: #1d6fd6;
    --eo-link: #0b5f8a;               /* 6.6:1 */
    --eo-rot: #c8102e;                /* Schweizer Rot – nur Marke */
    /* Status */
    --eo-ok: #17703a;        --eo-ok-hell: #e6f4ea;       --eo-ok-linie: #a9d8b8;
    --eo-warn: #8a5300;      --eo-warn-hell: #fff3d6;     --eo-warn-linie: #f0d18c;
    --eo-gefahr: #b3261e;    --eo-gefahr-hell: #fdecea;   --eo-gefahr-linie: #f3b8b2;
    --eo-info: #1b5aa6;      --eo-info-hell: #e8f0fb;     --eo-info-linie: #b5cdee;
    --eo-entwurf: #535c68;   --eo-entwurf-hell: #eceef1;  --eo-entwurf-linie: #cfd4da;
    /* App-Farben (Kacheln) – alle mit weissem Symbol mind. 4.5:1 */
    --eo-app-1: #0b6a66; --eo-app-2: #2a62a8; --eo-app-3: #a8471a; --eo-app-4: #4b6a26;
    --eo-app-5: #a02f4b; --eo-app-6: #6b5426; --eo-app-7: #2f5a78; --eo-app-8: #8a5a00;
    /* Typografie */
    --eo-schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --eo-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    --eo-schrift-klein: .8125rem;     /* 13 px */
    --eo-schrift-gross: 1.25rem;
    /* Masse */
    --eo-radius: 6px;
    --eo-radius-gross: 10px;
    --eo-schatten: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --eo-schatten-gross: 0 12px 32px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .08);
    --eo-kopf-hoehe: 48px;

    /* Alte Namen (Modul-Abschnitte in site.css) – zeigen auf die neuen Tokens */
    --bg: var(--eo-hintergrund);
    --flaeche: var(--eo-flaeche);
    --text: var(--eo-text);
    --leise: var(--eo-text-2);
    --linie: var(--eo-linie);
    --akzent: var(--eo-primaer);
    --link: var(--eo-link);
    --ok: var(--eo-ok);         --ok-bg: var(--eo-ok-hell);
    --warn: var(--eo-warn);     --warn-bg: var(--eo-warn-hell);
    --fehler: var(--eo-gefahr); --fehler-bg: var(--eo-gefahr-hell);
    --radius: var(--eo-radius);
    --mono: var(--eo-mono);
}

/* ---------- Grundelemente ---------- */
* { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh;
    font-family: var(--eo-schrift); font-size: 1rem; line-height: 1.45;
    background: var(--eo-hintergrund); color: var(--eo-text);
    font-feature-settings: "tnum" 0;
}
a { color: var(--eo-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.43rem; line-height: 1.25; margin: 0 0 1rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.14rem; margin: 1.5rem 0 .6rem; font-weight: 600; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; font-weight: 600; }
p { margin: .5rem 0; }
hr { border: 0; border-top: 1px solid var(--eo-linie); margin: .5rem 0; }
kbd { font-family: var(--eo-mono); font-size: .75rem; padding: .05rem .35rem; border: 1px solid var(--eo-linie-stark); border-bottom-width: 2px; border-radius: 4px; background: var(--eo-flaeche); color: var(--eo-text-2); }
code, .mono { font-family: var(--eo-mono); font-size: .9em; }
img, svg { max-width: 100%; }

/* Fokus immer sichtbar (Tastatur) */
:focus-visible { outline: 2px solid var(--eo-fokus); outline-offset: 2px; border-radius: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
.eo-sprung { position: absolute; left: -9999px; top: .5rem; z-index: 100; background: var(--eo-flaeche); padding: .5rem .8rem; border-radius: var(--eo-radius); box-shadow: var(--eo-schatten-gross); }
.eo-sprung:focus { left: .5rem; }
.eo-unsichtbar, .zf-versteckt { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.eo-symbol { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.eo-leise, .leise { color: var(--eo-text-2); }
.klein { font-size: var(--eo-schrift-klein); }
.rechts { text-align: right; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }
.umbruch { word-break: break-all; }

/* ---------- Seitenrahmen ---------- */
.inhalt { max-width: 1480px; margin: 0 auto; padding: 1rem 1.5rem 3rem; }
.inhalt:focus { outline: none; }
body.eo-ohne-kopf .inhalt { max-width: none; padding: 0; }
.schmal { max-width: 760px; margin: 2rem auto; }

/* ---------- Kopfleiste ---------- */
.eo-kopf {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: .25rem;
    height: var(--eo-kopf-hoehe); padding: 0 .75rem;
    background: var(--eo-flaeche); border-bottom: 1px solid var(--eo-linie);
}
.eo-kopf-knopf {
    display: inline-flex; align-items: center; gap: .4rem; height: 36px; min-width: 36px; padding: 0 .55rem;
    border: 0; border-radius: var(--eo-radius); background: transparent; color: var(--eo-text); cursor: pointer; font: inherit;
}
.eo-kopf-knopf:hover, .eo-kopf-knopf[aria-expanded="true"] { background: var(--eo-flaeche-3); }
.eo-kopf-knopf .eo-symbol { width: 20px; height: 20px; }
.eo-apps-knopf { color: var(--eo-text-2); }
.eo-marke, .eo-app-name { display: inline-flex; align-items: center; gap: .5rem; font-weight: 650; font-size: 1.07rem; color: var(--eo-text); padding: 0 .5rem 0 .25rem; white-space: nowrap; }
.eo-marke:hover, .eo-app-name:hover { text-decoration: none; }
.eo-app-punkt { display: inline-flex; width: 26px; height: 26px; border-radius: 7px; align-items: center; justify-content: center; color: #fff; }
.eo-app-punkt .eo-symbol { width: 16px; height: 16px; }
.kreuz { width: 18px; height: 18px; background: var(--eo-rot); position: relative; display: inline-block; border-radius: 3px; flex: none; }
.kreuz::before, .kreuz::after { content: ""; position: absolute; background: #fff; }
.kreuz::before { left: 7px; top: 3px; width: 4px; height: 12px; }
.kreuz::after { left: 3px; top: 7px; width: 12px; height: 4px; }
.eo-kopf-luecke { flex: 1; }
.eo-menue-knopf { display: none; }

.eo-hauptmenue { flex: 1; min-width: 0; height: 100%; }
.eo-menueleiste { display: flex; align-items: stretch; height: 100%; list-style: none; margin: 0; padding: 0; gap: .1rem; }
.eo-menue-eintrag { position: relative; display: flex; align-items: center; }
.eo-menue-link {
    display: inline-flex; align-items: center; gap: .2rem; height: 34px; padding: 0 .7rem; border-radius: var(--eo-radius);
    color: var(--eo-text); background: none; border: 0; font: inherit; cursor: pointer; white-space: nowrap;
}
.eo-menue-link:hover, .eo-menue-link[aria-expanded="true"] { background: var(--eo-flaeche-3); text-decoration: none; }
.eo-menue-link.aktiv { color: var(--eo-primaer-dunkel); font-weight: 600; box-shadow: inset 0 -2px 0 var(--eo-primaer); border-radius: var(--eo-radius) var(--eo-radius) 0 0; }
.eo-pfeil { width: 14px; height: 14px; color: var(--eo-text-2); transition: transform .15s; }
[aria-expanded="true"] > .eo-pfeil { transform: rotate(180deg); }

.eo-kopf-rechts { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.eo-befehl-knopf {
    display: inline-flex; align-items: center; gap: .45rem; height: 34px; padding: 0 .55rem 0 .65rem; min-width: 12rem;
    border: 1px solid var(--eo-linie); border-radius: var(--eo-radius); background: var(--eo-flaeche-2); color: var(--eo-text-2); cursor: pointer; font: inherit;
}
.eo-befehl-knopf:hover { border-color: var(--eo-linie-stark); background: var(--eo-flaeche); }
.eo-befehl-knopf kbd { margin-left: auto; }
.eo-kopf-menue { position: relative; }
.eo-mandant-knopf { max-width: 16rem; font-weight: 500; }
.eo-mandant-knopf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eo-avatar {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
    background: var(--eo-primaer-hell); color: var(--eo-primaer-dunkel); font-weight: 650; font-size: .8rem; letter-spacing: .02em;
}

/* Dropdowns (Menügruppen, Mandant, Benutzer, Filter) */
.eo-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 50; min-width: 15rem; max-width: min(28rem, calc(100vw - 1rem));
    max-height: calc(100vh - var(--eo-kopf-hoehe) - 1rem); overflow-y: auto;
    padding: .35rem; background: var(--eo-flaeche); border: 1px solid var(--eo-linie); border-radius: var(--eo-radius-gross); box-shadow: var(--eo-schatten-gross);
}
.eo-dropdown-rechts { left: auto; right: 0; }
.eo-dropdown a, .eo-dropdown-knopf, .eo-dropdown-aktuell {
    display: flex; align-items: center; gap: .5rem; width: 100%; padding: .42rem .65rem; border-radius: var(--eo-radius);
    color: var(--eo-text); text-align: left; background: none; border: 0; font: inherit; cursor: pointer; white-space: nowrap;
}
.eo-dropdown a:hover, .eo-dropdown-knopf:hover { background: var(--eo-flaeche-3); text-decoration: none; }
.eo-dropdown a.aktiv { background: var(--eo-primaer-hell); color: var(--eo-primaer-dunkel); font-weight: 600; }
.eo-dropdown-aktuell { color: var(--eo-primaer-dunkel); font-weight: 600; cursor: default; }
.eo-dropdown-knopf .eo-leise { margin-left: auto; font-size: var(--eo-schrift-klein); }
.eo-dropdown form { margin: 0; }
.eo-dropdown-titel { margin: .35rem .65rem .2rem; font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--eo-text-2); }
.eo-dropdown-abschnitt + .eo-dropdown-abschnitt { border-top: 1px solid var(--eo-linie); margin-top: .3rem; padding-top: .3rem; }
.eo-dropdown-person { display: flex; flex-direction: column; gap: .15rem; padding: .4rem .65rem; }
.eo-dropdown-person .eo-badge { align-self: flex-start; margin-top: .2rem; }
.eo-dropdown .check { padding: .3rem .65rem; margin: 0; }

/* App-Umschalter und Befehlspalette (Overlays) */
.eo-apps-ueberlagerung, .eo-befehle-ueberlagerung {
    position: fixed; inset: 0; z-index: 60; background: rgba(20, 26, 34, .38); display: flex; justify-content: center; align-items: flex-start;
    padding: 8vh 1rem 1rem; overflow-y: auto;
}
.eo-apps-innen { width: min(880px, 100%); background: var(--eo-hintergrund); border-radius: 14px; box-shadow: var(--eo-schatten-gross); padding: 1rem 1.5rem 1.75rem; }
.eo-apps-kopf { display: flex; align-items: center; justify-content: space-between; }
.eo-apps-kopf h2 { margin: .3rem 0 .8rem; }
.eo-befehle-innen { width: min(640px, 100%); background: var(--eo-flaeche); border-radius: 12px; box-shadow: var(--eo-schatten-gross); overflow: hidden; }
.eo-befehle-feld { display: flex; align-items: center; gap: .6rem; padding: .3rem .9rem; border-bottom: 1px solid var(--eo-linie); }
.eo-befehle-feld input { border: 0; outline: 0; font-size: 1.07rem; padding: .7rem 0; width: 100%; background: transparent; }
.eo-befehle-feld input:focus { box-shadow: none; }
.eo-befehle-liste { list-style: none; margin: 0; padding: .35rem; max-height: 60vh; overflow-y: auto; }
.eo-befehle-liste a { display: flex; flex-direction: column; padding: .45rem .7rem; border-radius: var(--eo-radius); color: var(--eo-text); }
.eo-befehle-liste a:hover, .eo-befehle-liste li.aktiv a { background: var(--eo-primaer-hell); text-decoration: none; }
.eo-befehl-app { font-size: .75rem; color: var(--eo-text-2); }
.eo-befehl-titel { font-weight: 500; }
.eo-befehle-leer { padding: 1rem; color: var(--eo-text-2); margin: 0; }

/* App-Kacheln (Startseite und Umschalter) */
.eo-app-raster { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem .75rem; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.eo-app-kachel { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .7rem .4rem; border-radius: var(--eo-radius-gross); color: var(--eo-text); text-align: center; }
.eo-app-kachel:hover { text-decoration: none; background: rgba(255, 255, 255, .7); }
.eo-app-kachel:hover .eo-app-symbol { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 24, 40, .18); }
.eo-app-kachel.aktiv .eo-app-titel { font-weight: 650; }
.eo-app-symbol { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 16px; color: #fff; box-shadow: 0 2px 6px rgba(16, 24, 40, .14); transition: transform .15s, box-shadow .15s; }
.eo-app-symbol .eo-symbol { width: 32px; height: 32px; stroke-width: 1.6; }
.eo-app-titel { font-size: .93rem; line-height: 1.25; }
.eo-farbe-1 { background: var(--eo-app-1); } .eo-farbe-2 { background: var(--eo-app-2); } .eo-farbe-3 { background: var(--eo-app-3); } .eo-farbe-4 { background: var(--eo-app-4); }
.eo-farbe-5 { background: var(--eo-app-5); } .eo-farbe-6 { background: var(--eo-app-6); } .eo-farbe-7 { background: var(--eo-app-7); } .eo-farbe-8 { background: var(--eo-app-8); }

/* ---------- Rückmeldungen: Toasts, Dialog ---------- */
.eo-toasts { position: fixed; top: calc(var(--eo-kopf-hoehe) + .6rem); right: .9rem; z-index: 70; display: flex; flex-direction: column; gap: .5rem; width: min(26rem, calc(100vw - 1.8rem)); pointer-events: none; }
.eo-toast, .eo-toasts .validation-summary-errors {
    pointer-events: auto; display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .6rem .7rem .85rem; margin: 0;
    background: var(--eo-flaeche); border: 1px solid var(--eo-linie); border-left: 4px solid var(--eo-primaer); border-radius: var(--eo-radius);
    box-shadow: var(--eo-schatten-gross); color: var(--eo-text); animation: eo-ein .18s ease-out;
}
.eo-toast, .eo-toasts .validation-summary-errors { cursor: pointer; }   /* Klick auf die Meldung schliesst sie */
.eo-toast > span { flex: 1; padding-top: .05rem; }
.eo-toast > .eo-symbol { margin-top: .1rem; }
.eo-toast-ok { border-left-color: var(--eo-ok); } .eo-toast-ok > .eo-symbol { color: var(--eo-ok); }
.eo-toast-fehler, .eo-toasts .validation-summary-errors { border-left-color: var(--eo-gefahr); } .eo-toast-fehler > .eo-symbol { color: var(--eo-gefahr); }
.eo-toast.weg { opacity: 0; transform: translateX(1rem); transition: opacity .2s, transform .2s; }
@keyframes eo-ein { from { opacity: 0; transform: translateY(-.4rem); } to { opacity: 1; transform: none; } }
.eo-dialog { border: 0; border-radius: var(--eo-radius-gross); box-shadow: var(--eo-schatten-gross); padding: 1.25rem 1.5rem; width: min(30rem, calc(100vw - 2rem)); color: var(--eo-text); }
.eo-dialog::backdrop { background: rgba(20, 26, 34, .38); }
.eo-dialog h2 { margin-top: 0; }
.eo-tastenliste { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0 0 .5rem; }
.eo-tastenliste dd { margin: 0; }

/* ---------- Bestehende Klassen (alle Module) mit neuem Grundstil ---------- */
.karte { background: var(--eo-flaeche); border: 1px solid var(--eo-linie); border-radius: var(--eo-radius-gross); padding: 1rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--eo-schatten); }
a.karte { color: var(--eo-text); display: block; transition: border-color .15s, box-shadow .15s; }
a.karte:hover { text-decoration: none; border-color: var(--eo-linie-stark); box-shadow: 0 4px 12px rgba(16, 24, 40, .1); }
.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kennzahl .wert { font-size: 1.43rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kennzahl .bez { color: var(--eo-text-2); font-size: var(--eo-schrift-klein); }
.zweispaltig { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 960px) { .zweispaltig { grid-template-columns: 1fr; } }
.zeile { display: flex; gap: .75rem 1rem; align-items: flex-end; flex-wrap: wrap; }
.zeile > * { margin: 0; }
.zeile > h1 { margin-right: auto; }
.abstand { margin-top: 1rem; }
.abstand-unten { margin-bottom: 1rem; }
.abstand-klein { margin-top: .3rem; }
.feld-breit { flex: 1; min-width: 240px; }

/* Tabellen (auch alte Seiten) */
table { width: 100%; border-collapse: collapse; background: var(--eo-flaeche); font-variant-numeric: tabular-nums; }
th, td { padding: .42rem .6rem; border-bottom: 1px solid var(--eo-linie); vertical-align: top; text-align: left; }
th { font-weight: 600; font-size: var(--eo-schrift-klein); color: var(--eo-text-2); background: var(--eo-flaeche-2); }
tbody tr:hover > td { background: #fafbfc; }
td.betrag, th.betrag { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.summe td { font-weight: 600; border-top: 2px solid var(--eo-text); }
tr.gruppe td { font-weight: 600; background: var(--eo-flaeche-2); }
tr.storniert td { color: var(--eo-text-2); text-decoration: line-through; }
tr.storno td { color: var(--eo-text-2); }
.tabelle-rahmen { border: 1px solid var(--eo-linie); border-radius: var(--eo-radius-gross); overflow-x: auto; background: var(--eo-flaeche); box-shadow: var(--eo-schatten); }
.tabelle-rahmen table { border: 0; }
.tabelle-rahmen tr:last-child > td { border-bottom: 0; }
table.eng th { text-align: left; font-weight: 500; color: var(--eo-text-2); padding-right: 1rem; white-space: nowrap; background: none; }
table.diff { width: auto; background: none; margin-top: .25rem; }
table.diff td { border: 0; padding: .05rem .4rem .05rem 0; font-size: .82rem; }
table.diff .alt { color: var(--eo-gefahr); text-decoration: line-through; }
table.diff .neu { color: var(--eo-ok); }

/* Formulare */
label { display: block; font-size: var(--eo-schrift-klein); color: var(--eo-text-2); margin-bottom: .2rem; font-weight: 500; }
input, select, textarea {
    font: inherit; color: var(--eo-text); padding: .42rem .55rem; border: 1px solid var(--eo-linie-stark); border-radius: var(--eo-radius); background: #fff; width: 100%;
    transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover, textarea:hover { border-color: #a9b1bb; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--eo-primaer); box-shadow: 0 0 0 3px var(--eo-primaer-ring, rgba(8, 141, 250, .2)); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--eo-primaer); }
input[type=checkbox]:focus, input[type=radio]:focus { box-shadow: none; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--eo-fokus); outline-offset: 2px; }
input[type=file] { padding: .3rem; background: var(--eo-flaeche-2); }
input[disabled], select[disabled], textarea[disabled], input[readonly] { background: var(--eo-flaeche-2); color: var(--eo-text-2); }
input.betrag { text-align: right; font-variant-numeric: tabular-nums; }
.feld { margin-bottom: .8rem; }
.felder { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: .45rem; align-items: center; color: var(--eo-text); font-size: 1rem; font-weight: 400; }
fieldset { border: 1px solid var(--eo-linie); border-radius: var(--eo-radius-gross); padding: .8rem 1rem; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 600; padding: 0 .3rem; color: var(--eo-text); }

/* Knöpfe: «haupt» = wichtigste Aktion der Seite (Petrol), Standard = Umriss, «gefahr» = zerstörend */
button, .knopf {
    font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-height: 34px; padding: .36rem .85rem; border-radius: var(--eo-radius); cursor: pointer; line-height: 1.25;
    border: 1px solid var(--eo-linie-stark); background: var(--eo-flaeche); color: var(--eo-text); white-space: nowrap; text-decoration: none;
    transition: background .12s, border-color .12s;
}
button:hover, .knopf:hover { background: var(--eo-flaeche-3); border-color: #aab2bc; text-decoration: none; }
button:active, .knopf:active { transform: translateY(1px); }
button.haupt, .knopf.haupt { background: var(--eo-primaer); color: #fff; border-color: var(--eo-primaer); }
button.haupt:hover, .knopf.haupt:hover { background: var(--eo-primaer-dunkel); border-color: var(--eo-primaer-dunkel); }
button.gefahr, .knopf.gefahr { border-color: var(--eo-gefahr-linie); color: var(--eo-gefahr); }
button.gefahr:hover, .knopf.gefahr:hover { background: var(--eo-gefahr-hell); border-color: var(--eo-gefahr); }
button.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--eo-link); font-weight: 400; }
button.link:hover { text-decoration: underline; background: none; }
button[disabled], .knopf.deaktiviert { opacity: .55; cursor: not-allowed; }
button.klein, .knopf.klein { min-height: 28px; padding: .2rem .6rem; font-size: var(--eo-schrift-klein); }
.knopf .eo-symbol, button .eo-symbol { width: 16px; height: 16px; }
.knopfleiste { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.eo-symbolknopf {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-height: 0; padding: 0;
    border: 1px solid transparent; border-radius: var(--eo-radius); background: none; color: var(--eo-text-2); cursor: pointer;
}
.eo-symbolknopf:hover { background: var(--eo-flaeche-3); color: var(--eo-text); text-decoration: none; }
.eo-symbolknopf.aktiv { background: var(--eo-primaer-hell); color: var(--eo-primaer-dunkel); border-color: var(--eo-primaer-linie); }
.eo-symbolknopf.deaktiviert { opacity: .35; cursor: default; }
.eo-symbolknopf.deaktiviert:hover { background: none; }

/* Meldungen im Inhalt (Hinweise zu einer Seite). Rückmeldungen nach Aktionen kommen als Toast. */
.meldung { display: block; padding: .65rem .9rem; border-radius: var(--eo-radius); margin-bottom: 1rem; border: 1px solid; border-left-width: 4px; }
.meldung.ok { background: var(--eo-ok-hell); border-color: var(--eo-ok-linie); border-left-color: var(--eo-ok); color: #0f4f28; }
.meldung.warn { background: var(--eo-warn-hell); border-color: var(--eo-warn-linie); border-left-color: var(--eo-warn); color: #5f3a00; }
.meldung.fehler, .validation-summary-errors { background: var(--eo-gefahr-hell); border: 1px solid var(--eo-gefahr-linie); border-left: 4px solid var(--eo-gefahr); color: #7d1a14; padding: .65rem .9rem; border-radius: var(--eo-radius); margin-bottom: 1rem; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.validation-summary-valid { display: none; }
.field-validation-error { color: var(--eo-gefahr); font-size: var(--eo-schrift-klein); }
.input-validation-error { border-color: var(--eo-gefahr); }

/* Badges: alt (badge ok/warn/gefahr/muted) und neu (eo-badge-…) */
.badge, .eo-badge {
    display: inline-flex; align-items: center; gap: .25rem; padding: .08rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 550; line-height: 1.45;
    border: 1px solid var(--eo-entwurf-linie); background: var(--eo-entwurf-hell); color: var(--eo-entwurf); white-space: nowrap;
}
.badge.ok, .eo-badge-ok { background: var(--eo-ok-hell); color: var(--eo-ok); border-color: var(--eo-ok-linie); }
.badge.warn, .eo-badge-warnung { background: var(--eo-warn-hell); color: var(--eo-warn); border-color: var(--eo-warn-linie); }
.badge.gefahr, .eo-badge-gefahr { background: var(--eo-gefahr-hell); color: var(--eo-gefahr); border-color: var(--eo-gefahr-linie); }
.eo-badge-info { background: var(--eo-info-hell); color: var(--eo-info); border-color: var(--eo-info-linie); }
.badge.muted, .eo-badge-entwurf { color: var(--eo-entwurf); background: var(--eo-flaeche-2); }
.eo-badge-neutral { background: var(--eo-flaeche-2); color: var(--eo-text-2); border-color: var(--eo-linie); }

/* Alte Seiten-Navigation per Knopfreihe (bis zur Umstellung): als Segmente */
.zeile.abstand-unten > a.knopf.haupt { background: var(--eo-primaer-hell); color: var(--eo-primaer-dunkel); border-color: var(--eo-primaer-linie); }

/* Beleg-Prüfung, KI */
.beleg-vorschau { width: 100%; height: 78vh; border: 1px solid var(--eo-linie); border-radius: var(--eo-radius); background: #fff; }
img.beleg-vorschau { object-fit: contain; height: auto; max-height: 78vh; }
.erkannt { background: var(--eo-info-hell); border-left: 3px solid var(--eo-info); padding: .5rem .75rem; font-size: .93rem; margin-bottom: 1rem; border-radius: 0 var(--eo-radius) var(--eo-radius) 0; }
.ocr-text { white-space: pre-wrap; font-family: var(--eo-mono); font-size: .8rem; max-height: 14rem; overflow: auto; background: var(--eo-flaeche-2); padding: .5rem; border: 1px solid var(--eo-linie); border-radius: var(--eo-radius); }
.ki-box { background: var(--eo-info-hell); border-left: 3px solid var(--eo-info); padding: .6rem .8rem; margin-bottom: 1rem; border-radius: 0 var(--eo-radius) var(--eo-radius) 0; }
details summary { cursor: pointer; color: var(--eo-link); }

/* ---------- Anmeldung, Mandantenwahl, Zwei-Faktor ---------- */
.anmeldung-seite { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.anmeldung-bild {
    background: linear-gradient(160deg, #0b6a66 0%, #0a4f5c 55%, #173a52 100%); color: #e9f4f3; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden;
}
.anmeldung-bild::after { content: ""; position: absolute; right: -12rem; bottom: -12rem; width: 32rem; height: 32rem; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .05); }
.anmeldung-bild .eo-marke { color: #fff; font-size: 1.3rem; padding: 0; }
.anmeldung-bild h2 { font-size: 1.9rem; line-height: 1.2; font-weight: 600; margin: 0 0 1rem; max-width: 26rem; color: #fff; }
.anmeldung-bild p { max-width: 26rem; color: #cfe5e3; }
.anmeldung-bild ul { padding-left: 1.1rem; color: #cfe5e3; }
/* Anmeldeseite im ITeasy-Blau (nur hier; die Anwendung selbst bleibt unverändert) */
.anmeldung-seite { --eo-primaer: #088dfa; --eo-primaer-dunkel: #0670c8; --eo-primaer-hell: #e6f3fe; --eo-primaer-linie: #9cc9f5; background: #f4f5fa; }
.anmeldung-seite .anmeldung-bild { background: linear-gradient(170deg, #0c1e60 0%, #0a3a99 55%, #088dfa 130%); }
.anmeldung-seite .anmeldung-bild p, .anmeldung-seite .anmeldung-bild ul { color: #d4e4fb; }
.anmeldung-seite .anmeldung h1 { color: #0c1e60; }
.anmeldung-seite button.haupt { border-radius: 999px; }
.anmeldung-logo { display: inline-flex; align-items: center; gap: .5rem; }
.anmeldung-logo { color: #fff; gap: .75rem; }
.anmeldung-logo svg { display: block; }
.anmeldung-logo-name { font-weight: 700; font-size: 1.3rem; }
.anmeldung-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.anmeldung { width: min(400px, 100%); margin: 0 auto; }
.anmeldung .marke-klein { display: none; }
.anmeldung h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.anmeldung .karte { padding: 1.5rem 1.6rem; }
.anmeldung button.haupt { width: 100%; min-height: 40px; margin-top: .4rem; }
.anmeldung input { padding: .55rem .65rem; }
@media (max-width: 860px) {
    .anmeldung-seite { grid-template-columns: 1fr; }
    .anmeldung-bild { display: none; }
    .anmeldung .marke-klein { display: flex; justify-content: center; margin-bottom: 1.2rem; font-size: 1.4rem; }
}

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
    .eo-befehl-knopf { min-width: 0; padding: 0 .55rem; border: 0; background: none; }
    .eo-befehl-knopf .eo-befehl-text, .eo-befehl-knopf kbd { display: none; }
    .eo-mandant-knopf span { max-width: 9rem; }
}
@media (max-width: 760px) {
    html { font-size: 15px; }
    .inhalt { padding: .75rem 1rem 3rem; }
    .eo-kopf { padding: 0 .4rem; }
    .eo-app-name { font-size: 1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .eo-menue-knopf { display: inline-flex; order: 3; }
    .eo-kopf-rechts { order: 4; }
    .eo-hauptmenue {
        display: none; position: fixed; top: var(--eo-kopf-hoehe); left: 0; right: 0; bottom: 0; z-index: 45; height: auto;
        background: var(--eo-flaeche); overflow-y: auto; padding: .5rem .75rem 2rem; border-top: 1px solid var(--eo-linie);
    }
    .eo-hauptmenue.offen { display: block; }
    .eo-menueleiste { flex-direction: column; height: auto; }
    .eo-menue-eintrag { display: block; }
    .eo-menue-link { width: 100%; height: 44px; justify-content: space-between; font-size: 1.05rem; }
    .eo-menue-link.aktiv { box-shadow: inset 3px 0 0 var(--eo-primaer); border-radius: 0 var(--eo-radius) var(--eo-radius) 0; }
    .eo-menue-dropdown { position: static; box-shadow: none; border: 0; padding: 0 0 .4rem .6rem; max-height: none; min-width: 0; max-width: none; }
    .eo-menue-dropdown a { padding: .6rem .65rem; }
    .eo-menue-mehr { display: none !important; }
    .eo-mandant-knopf span, .eo-mandant-knopf .eo-pfeil { display: none; }
    .eo-dropdown-rechts { position: fixed; top: var(--eo-kopf-hoehe); right: .5rem; left: .5rem; max-width: none; }
    .eo-apps-ueberlagerung { padding-top: 1rem; }
    .eo-app-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .eo-app-symbol { width: 56px; height: 56px; border-radius: 14px; }
    .eo-toasts { top: auto; bottom: .75rem; right: .75rem; }
    button, .knopf { min-height: 38px; }
}

/* ---------- Druck ---------- */
body.druck { background: #e9eaec; }
@media print {
    body, body.druck { background: #fff; }
    .eo-kopf, .eo-toasts, .eo-steuerbereich, .eo-verlauf, .eo-aktionsleiste, .eo-auswahlleiste, .eo-smart-buttons, .eo-sprung,
    .druck-leiste, .meldung, .nicht-drucken, .eo-spaltenwahl, .eo-auswahl, .menue, .untermenue { display: none !important; }
    .inhalt { padding: 0; max-width: none; }
    .karte, .tabelle-rahmen, .eo-tabelle-rahmen { box-shadow: none; }
}

/* Kleine Formulare in Tabellenzellen (alte Seiten): Eingaben nicht auf volle Breite ziehen */
td > form.zeile, td > form.inline-form, td > .zeile { flex-wrap: nowrap; align-items: center; gap: .35rem; }
td form.zeile input:not([type=checkbox]):not([type=radio]), td form.zeile select, td form.inline-form input:not([type=checkbox]), td form.inline-form select { width: auto; min-width: 0; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }

/* Rückmeldung beim Absenden: Ladebalken oben und «arbeitet»-Zustand am Knopf (eo-bedienung.js) */
.eo-ladebalken { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10000; overflow: hidden; pointer-events: none; }
.eo-ladebalken[hidden] { display: none; }
.eo-ladebalken::before { content: ""; display: block; height: 100%; width: 35%; background: var(--eo-primaer); animation: eo-lauf 1.1s ease-in-out infinite; }
@keyframes eo-lauf { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
button.eo-wartet, a.knopf.eo-wartet { cursor: progress; opacity: .8; pointer-events: none; }
button.eo-wartet::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .55em; vertical-align: -.1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: eo-dreh .7s linear infinite; }
@keyframes eo-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .eo-ladebalken::before { animation: none; width: 100%; opacity: .6; }
    button.eo-wartet::after { animation: none; }
}

/* Touch-Bedienung: Ziele mindestens ca. 40 px, damit nichts danebengetippt wird */
@media (pointer: coarse), (max-width: 700px) {
    .eo-symbolknopf, .eo-sichten .eo-symbolknopf, .eo-favorit .eo-symbolknopf, .eo-suche-menueknopf { min-width: 40px; min-height: 40px; }
    .eo-facette-weg { min-width: 28px; min-height: 28px; align-items: center; justify-content: center; }
    td .eo-zeilenlink, .eo-zeilenlink { display: inline-block; min-width: 40px; min-height: 40px; line-height: 40px; }
    .eo-app-name { display: inline-flex; align-items: center; min-height: 40px; }
    input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
}

/* Verwaltung: Bereichsliste links, Einstellungen des gewählten Bereichs rechts (Darstellung wie die Einstellungen in Odoo) */
.eo-verw { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: start; background: var(--eo-flaeche); border: 1px solid var(--eo-linie); border-radius: var(--eo-radius-gross); }
.eo-verw-liste { border-radius: var(--eo-radius-gross) 0 0 var(--eo-radius-gross); position: sticky; top: 3.5rem; display: flex; flex-direction: column; max-height: calc(100vh - 4rem); overflow-y: auto; border-right: 1px solid var(--eo-linie); background: var(--eo-hintergrund, #f7f8fa); }
.eo-verw-liste a { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; border-left: 3px solid transparent; color: var(--eo-text); text-decoration: none; font-size: .9rem; }
.eo-verw-liste a:hover { background: rgba(0,0,0,.04); }
.eo-verw-liste a.aktiv { background: rgba(37,99,235,.10); border-left-color: var(--eo-akzent, #2563eb); font-weight: 500; }
.eo-verw-titel { margin: 1rem 1rem .25rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--eo-text-leise, #6b7280); }
.eo-verw-inhalt { min-width: 0; min-height: 60vh; padding: 0 0 1rem; }
.eo-verw-inhalt > :not(.eo-verw-band):not(.eo-verw-karten) { margin-left: 1.5rem; margin-right: 1.5rem; }
.eo-verw-inhalt > :first-child:not(.eo-verw-band) { margin-top: 1.25rem; }
.eo-verw-band { margin: 0 0 1rem; padding: .6rem 1.5rem; background: rgba(0,0,0,.055); font-size: .95rem; font-weight: 600; }
.eo-verw-karten { grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1.25rem 2rem; padding: 0 1.5rem 1.5rem; }
.eo-verw-karten a.karte { margin: 0; padding: .1rem 0 .1rem 1rem; border: 0; border-left: 1px solid var(--eo-linie); border-radius: 0; box-shadow: none; background: transparent; }
.eo-verw-karten a.karte:hover { border-left-color: var(--eo-akzent, #2563eb); box-shadow: none; }
.eo-verw-karten a.karte h3 { margin: 0 0 .25rem; font-size: .9rem; }
.eo-verw-karten a.karte:hover h3 { color: var(--eo-akzent, #2563eb); }
@media (max-width: 800px) { .eo-verw { grid-template-columns: 1fr; } .eo-verw-liste { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--eo-linie); } }
