/* EasyOne – Modul-Abschnitte und Druckvorlagen (Rechnung mit QR-Zahlteil).
   Grundstile, Farben und Bausteine stehen in eo-basis.css und eo-bausteine.css (siehe docs/Bedienung.md).
   Neue Modul-Stile bitte in css/module/<app>.css (wird nur in der eigenen App geladen); bestehende Abschnitte hier
   wandern bei der Umstellung eines Moduls in dessen Datei. */

/* ---------- Rechnung mit QR-Zahlteil (A4) ---------- */
.rechnung-seite { background: #fff; width: 210mm; min-height: 297mm; margin: 0 auto; position: relative; padding: 20mm 20mm 0; font-size: 10pt; color: #000; }
.rechnung-seite h1 { font-size: 16pt; margin-top: 15mm; }
.rechnung-seite .absender { font-size: 8pt; color: #333; }
.rechnung-seite .empfaenger { margin-top: 12mm; margin-left: 100mm; min-height: 30mm; }
.rechnung-seite table { font-size: 9.5pt; }
.rechnung-seite th { background: none; color: #000; border-bottom: 1px solid #000; }
.zahlteil {
    position: absolute; left: 0; bottom: 0; width: 210mm; height: 105mm;
    display: flex; border-top: 1px dashed #000; font-family: Arial, Helvetica, sans-serif; color: #000;
}
.zahlteil .schere { position: absolute; top: -9px; left: 60mm; font-size: 12px; background: #fff; }
.empfangsschein { width: 62mm; padding: 5mm; border-right: 1px dashed #000; position: relative; }
.zahlschein { width: 148mm; padding: 5mm; display: flex; gap: 5mm; position: relative; }
.zahlteil h4 { font-size: 11pt; font-weight: bold; margin: 0 0 5mm; }
.zahlteil .tit { font-size: 6pt; font-weight: bold; margin-top: 3mm; }
.zahlschein .tit { font-size: 8pt; }
.zahlteil .wert { font-size: 8pt; line-height: 9pt; }
.zahlschein .wert { font-size: 10pt; line-height: 11pt; }
.qr-block { width: 51mm; }
.qr-code { width: 46mm; height: 46mm; position: relative; margin-top: 5mm; }
.qr-code svg { width: 46mm; height: 46mm; display: block; }
.qr-code .ch-kreuz {
    position: absolute; left: 19.5mm; top: 19.5mm; width: 7mm; height: 7mm; background: #000; border: 0.5mm solid #fff;
}
.qr-code .ch-kreuz::before, .qr-code .ch-kreuz::after { content: ""; position: absolute; background: #fff; }
.qr-code .ch-kreuz::before { left: 2.5mm; top: 1.1mm; width: 1.1mm; height: 3.8mm; }
.qr-code .ch-kreuz::after { left: 1.1mm; top: 2.5mm; width: 3.8mm; height: 1.1mm; }
.betragszeile { display: flex; gap: 6mm; margin-top: 3mm; }
.annahme { position: absolute; right: 5mm; top: 78mm; font-size: 6pt; font-weight: bold; }
.druck-leiste { max-width: 210mm; margin: 0 auto 1rem; display: flex; gap: .5rem; }

@media print {
    /* Berichte, Listen, Formulare: normaler Rand. Rechnung (QR-Zahlteil), Mahnung und Bestellung bringen ihren Rand selbst mit
       und drucken randlos auf der benannten Seite «randlos» (sonst sitzt der QR-Zahlteil nicht am unteren Blattrand). */
    @page { size: A4; margin: 12mm 12mm 14mm; }
    @page randlos { size: A4; margin: 0; }
    .rechnung-seite { margin: 0; box-shadow: none; page: randlos; }
}


/* ---------- Module ---------- */
.kennzahl.warn { border-left: 4px solid var(--warn); }
.kennzahl.hinweis { border-left: 4px solid #d7b45a; }
.kennzahl.ok { border-left: 4px solid var(--ok); }
.karte.gestrichelt { border-style: dashed; background: transparent; }
.modul-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.modul-kopf h3 { margin: 0; }
.karte.geplant { opacity: .75; }
.paket-module { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0; }
.modul-kopf .badge { white-space: nowrap; }

/* ---------- Garage ---------- */
.blatt { max-width: 210mm; margin: 0 auto; background: #fff; padding: 12mm 14mm; border: 1px solid var(--linie); }
@media print { .blatt { border: 0; padding: 0; } }
input.kurz { width: 5rem; }
.planung { table-layout: fixed; }
.planung th, .planung td { vertical-align: top; }
.planung td { min-height: 4rem; }
.termin { display: block; background: var(--warn-bg); border-left: 3px solid var(--warn); border-radius: 4px; padding: .2rem .4rem; margin-bottom: .25rem; font-size: .85rem; }
.termin .zeit { font-variant-numeric: tabular-nums; font-weight: 600; }
.planung .heute { background: #fff7f7; }
select[data-art] { min-width: 6.5rem; }

/* ===== Allgemein (früher im Abschnitt Lager, auch von anderen Modulen genutzt) ===== */
details.karte > summary { cursor: pointer; padding: .1rem 0; }
details.karte[open] > summary { margin-bottom: .6rem; }
@media print {
    .nicht-drucken { display: none !important; }
}

/* ===== Geteilt (früher im Kanzlei-Abschnitt, auch von anderen Modulen genutzt) ===== */
.badge.gefahr { background: var(--fehler-bg); color: var(--fehler); border-color: #efc2c2; }
tr.frist-ueberfaellig td { background: #fbe9e9; }
.feiertage-auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .1rem 1rem; }
input.kurz-betrag { width: 8rem; }
table.vorschau td, table.vorschau th { font-size: .9rem; }
details summary { cursor: pointer; color: var(--link); }

/* Gemeinsam genutzt (Lohn, Kanzlei, Bebu, Anlagen, Fibu): enge Tabellen, Inline-Formulare */
table.eng-zeilen td, table.eng-zeilen th { padding: .2rem .45rem; }
.inline-form { display: inline-flex; gap: .5rem; align-items: flex-end; margin: 0; }
@media (max-width: 700px) { .inline-form { display: flex; flex-wrap: wrap; } }

/* ===== E-Mail-Versand ===== */
.email-senden textarea { width: 100%; font-family: inherit; }
.email-anhaenge ul { margin: .3rem 0 .8rem; padding-left: 1.2rem; }
.umbruch { word-break: break-all; }
.mwst-xml .meldung { margin-bottom: .5rem; }

/* ===== Plattform: Zwei-Faktor, Treuhänder-Cockpit, REST-API ===== */
.zf-einrichtung { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.zf-einrichtung h2:first-child { margin-top: 0; }
.zf-qr svg { width: 220px; height: 220px; display: block; border: 1px solid var(--linie); border-radius: var(--radius); }
.zf-geheimnis { font-size: 1.05rem; letter-spacing: .05em; word-break: break-all; background: #fafaf8; border: 1px solid var(--linie); border-radius: 4px; padding: .4rem .6rem; }
.zf-code { max-width: 9rem; font-size: 1.2rem; letter-spacing: .15em; }
.zf-codeliste { columns: 2; column-gap: 2rem; font-size: 1.05rem; padding-left: 1.6rem; }
.zf-codeliste li { margin-bottom: .3rem; }
.zf-versteckt { position: absolute; left: -9999px; width: 1px; height: 1px; }
@media (max-width: 700px) {
    .zf-einrichtung { grid-template-columns: 1fr; }
    .zf-qr svg { width: 200px; height: 200px; margin: 0 auto; }
    .zf-codeliste { columns: 1; }
}
.cockpit { display: grid; gap: 1rem; }
.cockpit-mandant { margin: 0; }
.cockpit-mandant.aktuell { border-left: 4px solid var(--akzent); }
.cockpit-kopf { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.cockpit-kopf > div:first-child { flex: 1; min-width: 12rem; }
.cockpit-kopf h2 { margin: 0; }
.cockpit-badges { display: flex; gap: .3rem; flex-wrap: wrap; }
.cockpit-kacheln { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: .8rem; }
.cockpit-kachel { margin: 0; }
.cockpit-kachel .cockpit-inhalt { display: flex; flex-direction: column; gap: .1rem; width: 100%; height: 100%; text-align: left; padding: .55rem .7rem;
    border: 1px solid var(--linie); border-radius: var(--radius); background: #fafaf8; }
.cockpit-kachel button.cockpit-inhalt:hover { background: #f1f1ee; }
.cockpit-kachel .bez { color: var(--leise); font-size: .85rem; }
.cockpit-kachel .wert { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cockpit-kachel.ck-warn .cockpit-inhalt { border-left: 3px solid var(--warn); background: var(--warn-bg); }
.cockpit-kachel.ck-hinweis .cockpit-inhalt { border-left: 3px solid #6d8fb3; }
.cockpit-kachel.ck-ok .cockpit-inhalt { border-left: 3px solid var(--ok); }
.cockpit-suche .feld { min-width: 14rem; }
.schmal-grund { max-width: 12rem; }
input.zahl-schmal { width: 5.5em; }
.api-neu .mono { font-size: 1rem; background: #fff; border: 1px solid #efd8a0; padding: .4rem .6rem; border-radius: 4px; color: var(--text); }
.api-umfang { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.api-beispiel { background: #1d1d1b; color: #f6f6f4; padding: .8rem 1rem; border-radius: var(--radius); overflow-x: auto; font-family: var(--mono); font-size: .82rem; }
.api-endpunkt { padding: .7rem 1rem; margin-bottom: .6rem; }
.api-endpunkt p { margin: .35rem 0; }
.api-kopf { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.api-kopf .mono { font-weight: 600; }
.badge.api-get { background: var(--ok-bg); color: var(--ok); border-color: #b9dcc4; }
.badge.api-post, .badge.api-put { background: #e8f0f8; color: var(--link); border-color: #c3d4e6; }
.api-fehler dt { font-family: var(--mono); font-weight: 600; margin-top: .5rem; }
.api-fehler dd { margin: .1rem 0 0 0; }

/* Gemeinsam genutzt (Zeit, Kanzlei): aufklappbare Inline-Formulare */
.inline-details { display: inline-block; }
.inline-details[open] { display: block; margin-top: .3rem; }
.inline-details form input { width: auto; }

/* ===== Garage: nach css/module/garage.css verschoben. Grosse Knöpfe/Felder nutzen auch Zeit (Mobil) und Fibu – bleiben hier. ===== */
button.gross, .knopf.gross { min-height: 3rem; padding: .6rem 1.4rem; font-size: 1.05rem; }
input.gross { font-size: 1.2rem; }

/* ===== Testmandant und Testdaten (Plattform, Verwaltung → Testdaten) ===== */
.eo-testmandant-band { display: flex; justify-content: center; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .3rem 1rem;
    background: repeating-linear-gradient(135deg, var(--eo-warn-hell), var(--eo-warn-hell) 12px, var(--eo-gefahr-hell) 12px, var(--eo-gefahr-hell) 24px);
    border-bottom: 2px solid var(--eo-gefahr); color: var(--eo-text); font-size: .85rem; text-align: center; }
.eo-testmandant-band strong { letter-spacing: .12em; color: var(--eo-gefahr); }
.eo-testmandant-band a { color: var(--eo-text); }
.td-hinweis { max-width: 70rem; }
.td-wahl .td-zeile { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; margin: .5rem 0; border: 0; padding: 0; }
.td-wahl legend, .td-wahl .td-zeile > label:first-child { font-weight: 600; min-width: 9rem; }
.td-wahl-option { display: inline-flex; gap: .35rem; align-items: center; font-weight: normal; }
.td-wahl-option input { width: auto; }
.td-tabelle .zahl, .tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.td-start, .td-reset form, .td-formular { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .8rem; }
.td-start input, .td-reset input, .td-formular input { max-width: 22rem; }
.td-klappe { padding: .8rem 1rem; max-width: 34rem; }
.td-job-kopf { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.td-balken { height: .8rem; border-radius: 999px; background: var(--eo-linie); overflow: hidden; margin: .6rem 0; }
.td-balken-wert { display: block; height: 100%; background: var(--eo-primaer); transition: width .4s; }
.td-zaehler { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .2rem 1rem; list-style: none; padding: 0; margin: .4rem 0; }
.td-zaehler li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--eo-linie); }
.td-zaehler strong { font-variant-numeric: tabular-nums; }
.td-fehler { color: var(--eo-gefahr); }
.td-ergebnis { max-width: 32rem; }
.td-p0 { width: 0%; }
.td-p5 { width: 5%; }
.td-p10 { width: 10%; }
.td-p15 { width: 15%; }
.td-p20 { width: 20%; }
.td-p25 { width: 25%; }
.td-p30 { width: 30%; }
.td-p35 { width: 35%; }
.td-p40 { width: 40%; }
.td-p45 { width: 45%; }
.td-p50 { width: 50%; }
.td-p55 { width: 55%; }
.td-p60 { width: 60%; }
.td-p65 { width: 65%; }
.td-p70 { width: 70%; }
.td-p75 { width: 75%; }
.td-p80 { width: 80%; }
.td-p85 { width: 85%; }
.td-p90 { width: 90%; }
.td-p95 { width: 95%; }
.td-p100 { width: 100%; }

/* ===== Plattform: Benachrichtigungen (Glocke in der Kopfleiste, Plattform-Migration 010) und Beiträge im Verlauf ===== */
.eo-glocke-knopf { position: relative; }
.eo-glocke-zahl {
    position: absolute; top: 3px; right: 1px; min-width: 1.1rem; height: 1.1rem; padding: 0 .28rem; border-radius: 999px;
    background: var(--eo-gefahr); color: var(--eo-flaeche); font-size: .68rem; font-weight: 700; line-height: 1.1rem; text-align: center;
}
.eo-glocke-liste { width: min(22rem, calc(100vw - 1.5rem)); }
.eo-glocke-eintrag { display: flex; flex-direction: column; gap: .1rem; white-space: normal; }
.eo-glocke-eintrag .eo-glocke-titel { color: var(--eo-text); }
.eo-glocke-eintrag.ungelesen .eo-glocke-titel { font-weight: 600; }
.eo-glocke-eintrag.ungelesen::before { content: ""; float: left; width: .45rem; height: .45rem; margin: .4rem .4rem 0 0; border-radius: 50%; background: var(--eo-info); }
tr.eo-ungelesen td { background: var(--eo-info-hell); }
.eo-verlauf-zusatz-aktionen { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; margin: .4rem 0 0; }
@media (max-width: 760px) { .eo-glocke-liste { right: -3rem; } }

/* Gruppenköpfe mit langen Namen (z. B. «Projekt: P2026-001 Netzwerkerneuerung …») umbrechen statt die Seite zu verbreitern (Handy) */
.eo-tabelle tr.eo-gruppenkopf > * { min-width: 0; max-width: 100%; }
.eo-gruppenknopf { max-width: 100%; text-align: left; }
.eo-gruppenknopf > span:not(.eo-zaehler) { min-width: 0; overflow-wrap: anywhere; white-space: normal; }

/* ===== Odoo-Import (Verwaltung → Odoo-Import) ===== */
.oi-ziel { max-width: 70rem; }
.oi-ziel details { margin-top: .6rem; }
.oi-schritte ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: none; }
.oi-schritte li a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border: 1px solid var(--eo-linie); border-radius: 999px; color: var(--eo-text); background: var(--eo-flaeche); text-decoration: none; min-height: 2.4rem; }
.oi-schritte li a:hover { border-color: var(--eo-linie-stark); }
.oi-schritte li.oi-aktiv a { border-color: var(--eo-primaer); background: var(--eo-primaer); color: var(--eo-flaeche); }
.oi-nr { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--eo-linie); color: var(--eo-text); font-size: .8rem; font-weight: 700; }
.oi-aktiv .oi-nr { background: var(--eo-flaeche); color: var(--eo-primaer); }
.oi-formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .8rem 1.2rem; max-width: 70rem; }
.oi-formular .feld { display: flex; flex-direction: column; gap: .2rem; }
.oi-formular .knopfleiste { grid-column: 1 / -1; }
.oi-zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem 2rem; align-items: start; }
.oi-apps { columns: 2 12rem; margin: .3rem 0; padding-left: 1.1rem; }
.oi-einlesen, .oi-aktionen { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .6rem 0; }
.oi-nicht li { margin: .3rem 0; }
.oi-lauf fieldset { border: 1px solid var(--eo-linie); border-radius: var(--eo-radius); margin: 0 0 1rem; padding: .6rem 1rem; }
.oi-lauf legend { font-weight: 600; padding: 0 .4rem; }
.oi-bereich { margin: .25rem 0; }
.oi-block { margin: .1rem 0 .3rem 1.6rem; }
.oi-optionen label.td-wahl-option { display: flex; margin: .3rem 0; }
.oi-optionen .oi-zwei { grid-template-columns: auto 1fr auto 1fr; gap: .4rem .8rem; align-items: center; }
.oi-tabelle input[name="ZZiel"] { min-width: 8rem; width: 100%; }
.oi-offen { background: var(--eo-warn-hell); }
.oi-fehlerzeile { background: var(--eo-gefahr-hell); }
.oi-hinweis { max-width: 26rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oi-uebersicht { max-width: 40rem; }
.om-vorschau { overflow-x: auto; max-width: 100%; margin: .4rem 0 .8rem; border: 1px solid var(--eo-linie); border-radius: var(--eo-radius); }
.om-vorschau table { width: max-content; min-width: 100%; }
.om-vorschau th, .om-vorschau td { white-space: nowrap; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.om-optionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .4rem .8rem; align-items: end; }
.om-optionen label { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.om-optionen button { justify-self: start; }
.vh { position: absolute; left: -9999px; }
@media (max-width: 700px) {
    .knopfleiste button, .oi-aktionen button, .om-datei button { white-space: normal; max-width: 100%; }
    .oi-tabelle thead, .oi-abstimmung thead { position: absolute; left: -9999px; }
    .oi-tabelle tr, .oi-abstimmung tr { display: block; border-bottom: 1px solid var(--eo-linie); padding: .4rem 0; }
    .oi-tabelle td, .oi-abstimmung td { display: flex; justify-content: space-between; gap: .8rem; border: 0; padding: .2rem .4rem; text-align: right; }
    .oi-tabelle td::before, .oi-abstimmung td::before { content: attr(data-label); font-weight: 600; text-align: left; flex: 0 0 auto; }
    .oi-tabelle td > input, .oi-tabelle td > select { max-width: 60%; }
    .oi-optionen .oi-zwei { grid-template-columns: 1fr; }
}
