/* SiGeKo App 2.0 – zentrale Screen-UI-Schicht
   Bewusst ausschließlich Bildschirmdarstellung. Druck/A4/PDF bleiben bei den Modulregeln. */
@media screen {
  /* Zentralisierte Seitenregeln: index.php */


























/* Einheitliche Bedienelemente v1.2.0 – Feinabgleich */










/* Fachmodule / Schriftverkehr – kleine Lesbarkeitskorrekturen ohne Layoutumbau. */


body[data-letter-module="sonstiges"] .panel .rich-editor{font-size:14px;line-height:1.55}
body[data-letter-module="sonstiges"] .panel .rich-editor p,body[data-letter-module="sonstiges"] .panel .rich-editor div,body[data-letter-module="sonstiges"] .panel .rich-editor li{font-size:inherit;line-height:inherit}
@media screen and (max-width:1100px){body[data-letter-module="sonstiges"] .panel .rich-editor{font-size:16px;line-height:1.6;min-height:260px}}




  /* Gemeinsames Eingaberaster der Auftragsliste. */
  
  
  
  
  
  
  

  /* Buchhaltung – nur fach-/strukturbezogene Abweichungen.
     Visuelle Basis kommt ausschließlich aus der gemeinsamen Projekt-Referenzbasis. */
  
  
  
  
  


  /* Schriftverkehr – nur fach-/strukturbezogene Abweichungen.
     Projektkarten, Filter, Typografie und Formfelder nutzen die gemeinsame Projekt-Referenzbasis. */
  
  
  
  
  


  /* Vorlagen – ausschließlich fachliches Editor-/Rasterlayout.
     Allgemeine Karten, Typografie, Buttons, Inputs und Navigation kommen aus der Projekt-Referenzbasis. */
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  


  /* Zentralisierte Seitenregeln: projekte.php */































































































/* Fachlayout Projekte – nur projektspezifische Ergänzungen; Basis siehe Projekt-Referenzbasis. */









  /* Zentralisierte Seitenregeln: projektbearbeitung.php */








/* Fachlayout Projektbearbeitung */














/* Feinabgleich: Statusfilter exakt wie auf Projekte */







  /* Zentralisierte Seitenregeln: textbausteine.php */







/* Fachlayout Textbausteine */
















  /* Zentralisierte Seitenregeln: papierkorb.php */













  :root{
    --ui-bg:#edf1f3;
    --ui-surface:#fff;
    --ui-surface-2:#f8faf9;
    --ui-panel:#fff;
    --ui-line:#d9e1e6;
    --ui-line-strong:#c7d1d8;
    --ui-text:#132238;
    --ui-muted:#66758a;
    --ui-muted-2:#7b8898;
    --ui-green:#1a8e3c;
    --ui-green-strong:#157735;
    --ui-green-soft:#eef8f1;
    --ui-danger:#a33232;
    --ui-danger-bg:#fde8e8;
    --ui-danger-line:#e3a5a5;
    --ui-warn-bg:#fff4df;
    --ui-warn-text:#79531d;
    --ui-shadow:0 10px 28px rgba(15,23,42,.055);
  }

  /* Einheitlicher Header auf allen Verwaltungsseiten.
     Seitenlokale Altregeln duerfen Position/Logo nicht mehr unterschiedlich skalieren. */
  .wrap > .top{
    display:flex!important;
    justify-content:space-between!important;
    align-items:flex-start!important;
    gap:20px!important;
    margin-bottom:24px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  .wrap > .top .brand img,.wrap > .top .page-brand img{
    width:235px!important;
    height:auto!important;
    max-height:78px!important;
    object-fit:contain!important;
  }
  .wrap > .top .auth-area{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    margin-left:auto!important;
    font-size:12px!important;
    line-height:1.2!important;
  }
  .wrap > .top .auth-user{
    box-sizing:border-box!important;
    height:40px!important;
    min-height:40px!important;
    padding:0 12px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#ededed!important;
    border:1px solid #d2d2d2!important;
    border-radius:10px!important;
    color:#111!important;
    font-size:12px!important;
    font-weight:400!important;
    line-height:1.2!important;
    white-space:nowrap!important;
  }
  .wrap > .top .sigeko-theme-picker{height:40px!important;display:inline-flex!important;align-items:center!important}
  .wrap > .top .sigeko-theme-icon{
    box-sizing:border-box!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    padding:0!important;
    border-radius:10px!important;
    font-size:18px!important;
    line-height:1!important;
  }
  .wrap > .top .auth-area form{display:flex!important;align-items:center!important;margin:0!important}
  .wrap > .top .auth-logout{
    box-sizing:border-box!important;
    height:40px!important;
    min-height:40px!important;
    padding:0 14px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#fff;
    color:#111!important;
    border:1px solid #cfd6dc!important;
    border-radius:10px!important;
    font-size:13px!important;
    font-weight:400!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    box-shadow:none!important;
  }
  .wrap > .top .auth-logout:hover{background:#f8fafb!important;border-color:#bbc5cd!important}

  @layer app-actions, saved-documents;
  /* Authentifizierungsanzeige; Button-Geometrie folgt im gemeinsamen Block. */
  .wrap .auth-area{align-items:center;gap:8px}
  .wrap .auth-area form{display:flex;align-items:center;margin:0}
  .wrap .auth-user{
    min-height:40px;
    padding:9px 12px;
    display:inline-flex;
    align-items:center;
    border-radius:10px;
    font-size:12px;
    line-height:1.2;
  }
  .wrap .auth-logout{min-height:40px;padding:9px 12px;font-size:13px;line-height:1.2;border-radius:10px}
  .wrap .sigeko-theme-icon{width:40px!important;height:40px!important;min-height:40px!important;border-radius:10px!important}





  /* Gemeinsame Projekt-Referenzbasis.
     Einzige visuelle Basis für Projektübersicht, Buchhaltung, Schriftverkehr und Vorlagen.
     Seitenblöcke dürfen hier nur fachliche Struktur ergänzen, keine zweite Shell definieren. */
  
  
  
  
  
  
  
  
  
  
  
  
  /* Gemeinsame Projekt-Komponenten: exakt dieselben Bausteine auf allen Übersichtsseiten. */
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  /* Buchhaltung: Auftragsvorgänge nutzen die gemeinsame Kartenbasis; die orange
     Auftragslisten-Optik ist rein visuell und nicht an den Statusfilter gekoppelt. */
  
  
  
  
  
  

  
  

  /* Auftragsliste: Jahresauswahl und Bearbeiten sind Teil derselben zentralen UI. */
  
  
  
  
  
  
  

  /* Angebote: Verwaltungsseite nutzt dieselbe UI-Basis wie die übrigen Bereiche.
     Nur die Arbeitsaufteilung und die A4-Vorschau sind angebotsbezogen. */
  
  .accounting-offers-page .wrap{
    width:100%!important;
    max-width:1480px!important;
    margin:0 auto!important;
    padding:22px 22px 28px!important;
  }
  .accounting-offers-page .card{
    background:var(--ui-surface)!important;
    border:1px solid var(--ui-line)!important;
    border-radius:24px!important;
    box-shadow:var(--ui-shadow)!important;
    padding:18px!important;
  }
  .accounting-offers-page .navcard{margin-bottom:16px!important}
  .accounting-offers-page input,
  .accounting-offers-page select,
  .accounting-offers-page textarea{
    width:100%!important;
    max-width:100%!important;
    border:1px solid #ccd7df!important;
    border-radius:12px!important;
    padding:10px 12px!important;
    background:#fff;
    color:var(--ui-text)!important;
    font:inherit!important;
  }
  .accounting-offers-page textarea{line-height:1.35!important}
  .accounting-offers-page .offer-layout{display:block!important}
  .accounting-offers-page .offer-main{min-width:0!important}
  .accounting-offers-page .offer-customer-bar{margin-bottom:16px!important;padding:16px 18px!important}
  .accounting-offers-page .customer-select-grid{
    display:grid!important;
    grid-template-columns:minmax(300px,.9fr) minmax(0,2.1fr)!important;
    gap:16px!important;
    align-items:end!important;
  }
  .accounting-offers-page .customer-select-grid label{margin-top:0!important}
  .accounting-offers-page .customer-select-grid select{min-height:44px!important;font-weight:700!important}
  .accounting-offers-page .customer-select-grid .letter-manager{margin:0!important;min-height:74px!important}
  .accounting-offers-page .offer-work{
    display:grid!important;
    grid-template-columns:minmax(500px,620px) minmax(0,1fr)!important;
    gap:18px!important;
    align-items:start!important;
  }
  .accounting-offers-page .offer-editor{
    min-width:0!important;
    position:sticky!important;
    top:10px!important;
    max-height:calc(100vh - 20px)!important;
  }
  .accounting-offers-page .offer-preview{
    min-width:0!important;
    overflow:auto!important;
    padding:0 4px 20px!important;
  }
  .accounting-offers-page .toolbar{margin-bottom:12px!important}
  .accounting-offers-page .letter-manager{background:var(--ui-surface-2)!important;border-color:var(--ui-line)!important}
  .accounting-offers-page .letter-entry{border-color:var(--ui-line)!important}
  .accounting-offers-page .page-footer{
    display:flex!important;justify-content:space-between!important;gap:16px!important;
    margin:18px 2px 4px!important;padding:10px 2px 14px!important;
    border-top:1px solid var(--ui-line)!important;color:var(--ui-footer-color)!important;font-size:11px!important;
  }

  /* Einheitliche Verwaltungsnavigation: erste Ebene + durchlaufende zweite Ebene. */
  .nav-block,.projects-nav-block{width:100%;min-width:0;display:flex;flex-direction:column;gap:14px}
  .title-row>.nav-block{flex:1 1 100%;width:100%}
  .title-row>div:last-child:not(.nav-block){margin-left:auto}
  .app-main-nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
  .app-main-nav a,.app-main-nav span{
    font-size:15px!important;
    font-weight:700!important;
    line-height:1.2!important;
    text-decoration:none!important;
  }
  .app-main-nav a{color:#60708a!important}
  .app-main-nav a:hover{color:var(--ui-text)!important}
  .app-main-nav .main-current{color:var(--ui-text)!important;border:0!important;padding:0!important;text-decoration:none!important;cursor:default!important}
  .app-main-nav .sep{color:#b6c0ca!important}

  .section-nav,.projects-heading-nav{
    width:100%;
    display:flex!important;
    align-items:flex-end!important;
    gap:22px!important;
    flex-wrap:wrap!important;
    border-bottom:1px solid var(--ui-line)!important;
    padding:0!important;
  }
  .section-nav .sep,.projects-heading-nav .sep{display:none!important}
  .section-nav a,.section-nav .nav-current,.section-nav span.nav-locked,.section-nav span.no-access,
  .projects-heading-nav a,.projects-heading-nav .nav-current,.projects-heading-nav span.nav-locked,.projects-heading-nav span.no-access{
    display:inline-flex!important;
    align-items:center!important;
    margin:0!important;
    padding:0 0 10px!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    color:var(--ui-muted)!important;
    font-size:17px!important;
    font-weight:700!important;
    line-height:1.2!important;
    text-decoration:none!important;
    white-space:nowrap;
  }
  .section-nav .nav-current,.projects-heading-nav .nav-current{
    color:var(--ui-green)!important;
    border-bottom:3px solid var(--ui-green)!important;
    margin-bottom:-1px!important;
  }
  .section-nav a:hover,.projects-heading-nav a:hover{color:var(--ui-text)!important}

  /* Jahresauswahl zentral: Statusfarben nur inaktiv, aktive Auswahl immer eindeutig. */
  .years{display:flex;gap:9px;flex-wrap:wrap}
  .years a{
    background:#fff;
    border:1px solid #d4dde3!important;
    color:#526174!important;
    border-radius:12px!important;
    padding:10px 15px!important;
    font-weight:700!important;
    text-decoration:none!important;
    outline:none!important;
  }
  .years a.year-running:not(.active){background:#edf8ed!important;border-color:#cfe3cf!important;color:#285b28!important}
  .years a.year-paused:not(.active){background:#fff4df!important;border-color:#ead4ad!important;color:#79531d!important}
  .years a.year-completed:not(.active){background:#f2f4f6!important;border-color:#d5dce2!important;color:#596775!important}
  .years a.year-all:not(.active){background:#fff;border-color:#d4dde3!important;color:#526174!important}
  .years a.active,
  .years a.year-running.active,
  .years a.year-paused.active,
  .years a.year-completed.active,
  .years a.year-all.active{
    background:var(--ui-green)!important;
    border-color:var(--ui-green)!important;
    color:#fff!important;
    outline:none!important;
    box-shadow:none!important;
  }
  .years a:hover:not(.active){border-color:#b7c4cc!important;color:var(--ui-text)!important}

  /* Gemeinsame Tabellen-/Verwaltungsbasis für Projektbearbeitung und Auftragsliste. */
  
  .processing-admin-page *{box-sizing:border-box}
  .processing-admin-page .wrap{max-width:1480px!important;margin:0 auto!important;padding:24px 22px 28px!important}
  .processing-admin-page .card{background:var(--ui-surface)!important;border:1px solid var(--ui-line)!important;border-radius:22px!important;box-shadow:var(--ui-shadow)!important;padding:18px!important;margin-bottom:16px!important}
  .processing-admin-page input,.processing-admin-page select,.processing-admin-page textarea{border:1px solid var(--ui-line)!important;border-radius:12px!important;background:var(--ui-surface)!important;color:var(--ui-text)!important;font:inherit}
  
  .processing-admin-page .projects-title-row{display:flex;align-items:center;justify-content:space-between;gap:18px!important;flex-wrap:wrap}
  .processing-admin-page .project-count{font-size:12px;color:var(--ui-muted);text-align:right;min-height:15px;font-variant-numeric:tabular-nums}
  .processing-admin-page .message{padding:10px 12px;border-radius:14px!important;margin-bottom:14px;background:#eef8ee;border:1px solid #bcdabc}
  .processing-admin-page .message.error{background:#fff0f0;border-color:#e1b0b0}
  .processing-admin-page .processing-search-row{display:block}
  .processing-admin-page .processing-search{width:100%}
  .processing-admin-page .processing-search label{display:block;font-size:12px;font-weight:700;margin-bottom:4px}
  .processing-admin-page .processing-search input{width:100%;min-width:0;padding:12px 14px!important}
  :where(.processing-admin-page,.accounting-performance-page) .processing-wrap{border:1px solid var(--ui-line)!important;border-radius:18px!important;overflow:auto!important;background:var(--ui-surface)!important}
  :where(.processing-admin-page,.accounting-performance-page) .processing-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0!important;font-size:13px}
  :where(.processing-admin-page,.accounting-performance-page) .processing-table th{background:var(--ui-surface-2)!important;color:var(--ui-muted)!important;padding:11px 8px!important;border-bottom:1px solid var(--ui-line)!important;border-right:1px solid var(--ui-line-soft)!important;text-align:left;vertical-align:bottom;line-height:1.15}
  :where(.processing-admin-page,.accounting-performance-page) .processing-table td{padding:10px 8px!important;border-bottom:1px solid var(--ui-line)!important;border-right:1px solid var(--ui-line-soft)!important;vertical-align:middle;overflow-wrap:anywhere}
  
  :where(.processing-admin-page,.accounting-performance-page) .processing-table tr:last-child td{border-bottom:0!important}
  :where(.processing-admin-page,.accounting-performance-page) .processing-table input,:where(.processing-admin-page,.accounting-performance-page) .processing-table select{width:100%;min-width:0;padding:8px 7px!important;border-radius:10px!important}
  .processing-admin-page .project-no{font-weight:700;font-size:14px}
  .processing-admin-page .status-badge{display:inline-block!important;margin:5px 0 0!important;padding:4px 8px!important;border-radius:999px!important;background:var(--ui-green-soft)!important;color:var(--ui-green-strong)!important;font-size:10px!important}
  .processing-admin-page .filter-empty{display:none;padding:18px;color:var(--ui-muted);text-align:center;border:1px dashed var(--ui-line)!important;border-radius:14px!important;background:var(--ui-surface-2)!important}
  .processing-admin-page .save-bar{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px;padding-top:4px!important}
  .processing-admin-page .save-bar .primary{min-width:190px!important}
  .processing-admin-page .page-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:18px 2px 4px;padding:10px 2px 14px;border-top:1px solid var(--ui-line)!important;color:var(--ui-footer-color)!important;font-size:11px}
  .processing-admin-page .processing-table.order-list-table th:nth-child(1){width:14%}
  .processing-admin-page .processing-table.order-list-table th:nth-child(2){width:26%}
  .processing-admin-page .processing-table.order-list-table th:nth-child(3){width:42%}
  .processing-admin-page .processing-table.order-list-table th:nth-child(4){width:18%}
  .processing-admin-page .processing-table tr.not-commissioned td{background:#ffeded!important}
  .processing-admin-page .processing-table tr.not-commissioned .status-badge{background:#ffe7e7!important;color:#a52b2b!important}
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  @media(max-width:1100px){
    :where(.processing-admin-page,.accounting-performance-page) .processing-wrap{overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table{display:block;width:100%;font-size:14px}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table thead{display:none}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table tr{display:grid;grid-template-columns:1fr;border:1px solid var(--ui-line)!important;border-radius:18px!important;overflow:hidden;background:var(--ui-surface);box-shadow:none!important}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table td{display:grid;grid-template-columns:minmax(120px,38%) minmax(0,1fr);gap:10px;align-items:center;width:100%;padding:9px 11px!important;border-right:0!important;border-bottom:1px solid var(--ui-line)!important;min-width:0}
    
    :where(.processing-admin-page,.accounting-performance-page) .processing-table td::before{content:attr(data-label);font-size:11px;line-height:1.2;font-weight:700;color:var(--ui-muted)}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table td:last-child{border-bottom:0!important}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table input,:where(.processing-admin-page,.accounting-performance-page) .processing-table select{font-size:16px;min-height:42px}
    .processing-admin-page .status-badge{display:inline-block!important;margin:4px 0 0 7px!important}
    
  }
  @media(max-width:760px){
    .processing-admin-page .wrap{padding:16px 10px 22px!important}
    .processing-admin-page .card{border-radius:18px!important;padding:14px!important}
    :where(.processing-admin-page,.accounting-performance-page) .processing-table tbody{grid-template-columns:1fr}
    .processing-admin-page .save-bar{position:sticky;bottom:8px;z-index:5;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:16px!important;padding:8px!important;box-shadow:0 2px 8px rgba(0,0,0,.08)}
    .processing-admin-page .save-bar .primary{width:100%}
    .processing-admin-page .page-footer{font-size:10px}
    
    
  }
  @media(max-width:430px){
    :where(.processing-admin-page,.accounting-performance-page) .processing-table td{grid-template-columns:1fr;gap:5px}
    .processing-admin-page .status-badge{display:block!important;margin:4px 0 0!important}
  }

@layer app-table-state {
  .processing-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
  .processing-heading .workspace-section-title{margin:0!important}
  body .processing-table tr.processing-changed>td{background:#fff5dc!important;box-shadow:inset 0 1px #e1c379,inset 0 -1px #e1c379}
  html[data-theme="dark"] body .processing-table tr.processing-changed>td{background:#3b321e!important;color:#ffe2a4!important}
  .processing-reset{margin:6px 0 0;white-space:normal}
  .table-readonly-value{display:inline-block;min-height:20px;overflow-wrap:anywhere}
  .date-pair:has(.table-readonly-value) {gap:6px}
  [data-processing-save-bar][hidden],.sigeko-save-state[hidden],[data-processing-display][hidden]{display:none!important}
  .invoice-performance-entry{display:flex;align-items:center;gap:8px;margin:6px 0;min-width:0}
  .invoice-performance-entry>.invoice-order-card{flex:1;min-width:0;margin:0}
  .invoice-performance-entry>.btn{flex:0 0 auto;white-space:nowrap}
  @media(max-width:540px){.invoice-performance-entry{align-items:stretch;flex-wrap:wrap}.invoice-performance-entry>.invoice-order-card{flex-basis:100%}.invoice-performance-entry>.btn{margin-left:auto}}
  .invoice-gross-info{display:block;margin-top:4px;font-size:11px;line-height:1.35;color:var(--ui-muted)}
@media (hover:hover) and (pointer:fine) {
  .invoice-deviation-badge{position:relative;cursor:help}
  .invoice-deviation-badge:hover::after{content:attr(data-deviation-tooltip);position:absolute;z-index:20;left:50%;bottom:calc(100% + 7px);transform:translateX(-50%);white-space:nowrap;padding:6px 9px;border-radius:6px;background:#222;color:#fff;font:400 12px/1.4 Arial,sans-serif;box-shadow:0 3px 10px #0003;pointer-events:none}
}
}
  /* Light Mode – Karten/Status klarer lesbar und einheitlicher. */
  .project.running{background:#eef7f0!important;border-color:#bcdcc4!important;}
  .project.paused{background:#fff4e4!important;border-color:#e7cf9f!important;}
  .project.completed{background:#f3f5f7!important;border-color:#d9e0e6!important;color:#5c6875!important;}
  .project .project-no,.project .object{color:var(--ui-text)!important;}
  .project .address{border-bottom-color:#d7e0e5!important;}
  .status-badge.running{background:#ddf2e3!important;color:#1d7c39!important;}
  .status-badge.paused{background:#fee7bf!important;color:#8a5d14!important;}
  .status-badge.completed{background:#e6ebef!important;color:#5b6673!important;}
  
  
  
  

  .processing-table tr.running td{background:#eff8f1!important;}
  .processing-table tr.paused td,.processing-table tr.not-started td{background:#fff5e7!important;}
  .processing-table tr.completed td{background:#f3f5f7!important;color:#5d6976!important;}
  .processing-table .status-badge{background:#ddf2e3!important;color:#1d7c39!important;}
  .processing-table tr.paused .status-badge,.processing-table tr.not-started .status-badge{background:#fee7bf!important;color:#8a5d14!important;}
  .processing-table tr.completed .status-badge{background:#e6ebef!important;color:#5b6673!important;}

  /* Papierkorb nutzt dieselbe aktive Farbe und Linienlogik. */
  .trash-tabs{border-bottom:1px solid var(--ui-line)!important}
  .trash-tabs a,.trash-tabs span{color:var(--ui-muted)!important}
  .trash-tabs .active{color:var(--ui-green)!important;border-bottom:3px solid var(--ui-green)!important}

  /* Aktionsfarben werden einmalig in app-actions festgelegt. */

  /* Projektkarten: Modul-/Dokumentlinks immer zweispaltig; ungerader letzter Eintrag bleibt halbe Breite. */
  .module-link-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .module-link-grid>.btn,.module-link-grid>button,.module-link-grid>span.btn{
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    text-decoration:none!important;
    grid-column:auto!important;
  }

  /* Fachmodule: nur UI, keine Grid-/Preview-Geometrie. */
  
  
  
  
  
  .toolbar{gap:8px}

  /* ------------------------------------------------------------------ */
  /* Dark Mode – einheitliche Screen-Farben. Dokumentvorschauen bleiben */
  /* durch ihre bestehenden Preview-Regeln ausdrücklich im Light Mode. */
  /* ------------------------------------------------------------------ */
  html[data-theme="dark"]{
    --ui-bg:#15171b;
    --ui-surface:#22252b;
    --ui-surface-2:#292d34;
    --ui-panel:#22252b;
    --ui-line:#4b535f;
    --ui-line-strong:#5a6470;
    --ui-text:#f2f5f8;
    --ui-muted:#c0c8d2;
    --ui-muted-2:#aeb8c3;
    --ui-green:#25b653;
    --ui-green-strong:#1f9e49;
    --ui-green-soft:#1f3527;
    --ui-danger:#ffaaaa;
    --ui-danger-bg:#4a252d;
    --ui-danger-line:#955563;
    --ui-warn-bg:#3a301f;
    --ui-warn-text:#ffe0a3;
  }

  html[data-theme="dark"] body{background:var(--ui-bg)!important;color:var(--ui-text)!important}
  html[data-theme="dark"] .wrap{color:var(--ui-text)!important}

  html[data-theme="dark"] .card,
  html[data-theme="dark"] .panel,
  html[data-theme="dark"] .area-card,
  html[data-theme="dark"] .project-master-card,
  html[data-theme="dark"] .editor-card,
  html[data-theme="dark"] .letter-manager,
  html[data-theme="dark"] .archive,
  html[data-theme="dark"] .archive-list,
  html[data-theme="dark"] .categories,
  html[data-theme="dark"] .item,
  html[data-theme="dark"] .category-column{
    background:var(--ui-surface)!important;
    border-color:var(--ui-line)!important;
    color:var(--ui-text)!important;
  }

  /* Navigation – aktiv überall gleich grün, Linie über die volle Breite. */
  html[data-theme="dark"] .app-main-nav a{color:#d7dde5!important}
  html[data-theme="dark"] .app-main-nav .main-current{color:#fff!important}
  html[data-theme="dark"] .app-main-nav .sep{color:#7f8995!important}
  html[data-theme="dark"] .section-nav,html[data-theme="dark"] .projects-heading-nav{border-bottom-color:#59626e!important}
  html[data-theme="dark"] .section-nav a,html[data-theme="dark"] .projects-heading-nav a,
  html[data-theme="dark"] .section-nav span.nav-locked,html[data-theme="dark"] .section-nav span.no-access,
  html[data-theme="dark"] .projects-heading-nav span.nav-locked,html[data-theme="dark"] .projects-heading-nav span.no-access{color:#c0c8d2!important}
  html[data-theme="dark"] .section-nav .nav-current,html[data-theme="dark"] .projects-heading-nav .nav-current{
    color:var(--ui-green)!important;
    border-bottom-color:var(--ui-green)!important;
    background:transparent!important;
  }
  html[data-theme="dark"] .section-nav a:hover,html[data-theme="dark"] .projects-heading-nav a:hover{color:#fff!important}

  html[data-theme="dark"] .trash-tabs{border-bottom-color:#59626e!important}
  html[data-theme="dark"] .trash-tabs a,html[data-theme="dark"] .trash-tabs span{color:#c0c8d2!important}
  html[data-theme="dark"] .trash-tabs .active{color:var(--ui-green)!important;border-bottom-color:var(--ui-green)!important}

  html[data-theme="dark"] .wrap > .top .auth-user{background:#2c3138!important;border-color:#4b535f!important;color:#eef1f4!important}
  html[data-theme="dark"] .wrap > .top .sigeko-theme-icon{background:#2b3037!important;border-color:#66707d!important;color:#fff!important}
  html[data-theme="dark"] .wrap > .top .auth-logout{background:#22252b!important;border-color:#59626f!important;color:#f2f4f6!important}
  html[data-theme="dark"] .wrap > .top .auth-logout:hover{background:#30363e!important;border-color:#687381!important}

  /* Startseite */
  html[data-theme="dark"] .hero h1,html[data-theme="dark"] .area-card h2,html[data-theme="dark"] .trash-card h2{color:#f6f8fa!important}
  html[data-theme="dark"] .section-label{color:#eef2f6!important;border-top-color:#434c57!important}
  html[data-theme="dark"] .area-card{background:#22252b!important;border-color:#444d58!important;box-shadow:0 12px 28px rgba(0,0,0,.18)!important}
  html[data-theme="dark"] .area-card:hover{background:#272b32!important;border-color:#59636f!important;box-shadow:0 16px 34px rgba(0,0,0,.24)!important}
  html[data-theme="dark"] .area-card p,html[data-theme="dark"] .trash-card p{color:#c8d0da!important}
  html[data-theme="dark"] .area-divider{border-top-color:#414a55!important}
  html[data-theme="dark"] .icon-badge,html[data-theme="dark"] .area-open{background:#1f3527!important;color:#43cc70!important}

  /* Filter: keine weißen Inseln. */
  html[data-theme="dark"] .project-filter{background:#232930!important;border-color:#46515d!important;color:#eef1f4!important}
  html[data-theme="dark"] .project-filter strong,html[data-theme="dark"] .project-filter-stack,html[data-theme="dark"] .project-count{color:#d4dbe4!important}
  html[data-theme="dark"] .project-filter label{background:#2b3138!important;border-color:#55606d!important;color:#eef1f4!important}

  /* Projekte / Schriftverkehr / Buchhaltung – gleiche Statuslogik. */
  html[data-theme="dark"] .project{background:#23272d!important;border-color:#454d58!important;color:#f0f2f4!important}
  html[data-theme="dark"] .project.running{background:#193326!important;border-color:#3d6a4e!important}
  html[data-theme="dark"] .project.paused{background:#3b2d18!important;border-color:#806638!important}

  html[data-theme="dark"] .project.completed{background:#2a2f35!important;border-color:#545d68!important;color:#cbd2da!important}
  html[data-theme="dark"] .project .project-no,html[data-theme="dark"] .project .object{color:#f4f7fa!important}
  html[data-theme="dark"] .project .address{color:#d0d8e0!important;border-bottom-color:#4e5863!important}
  html[data-theme="dark"] .status-badge.running{background:#294b34!important;color:#c7eccf!important}
  html[data-theme="dark"] .status-badge.paused{background:#5b4724!important;color:#ffe0a3!important}
  html[data-theme="dark"] .status-badge.completed{background:#444a52!important;color:#dde2e8!important}

  
  
  
  
  

  html[data-theme="dark"] .years a{background:#2a3037!important;border-color:#55606c!important;color:#dbe2ea!important}
  html[data-theme="dark"] .years a.year-running:not(.active){background:#203928!important;border-color:#3f6b50!important;color:#d8f0df!important}
  html[data-theme="dark"] .years a.year-paused:not(.active){background:#43331a!important;border-color:#81663a!important;color:#ffe7b8!important}
  html[data-theme="dark"] .years a.year-completed:not(.active){background:#30353b!important;border-color:#59626d!important;color:#d1d7df!important}
  html[data-theme="dark"] .years a.year-all:not(.active){background:#30353b!important;border-color:#59626d!important;color:#eef1f4!important}
  html[data-theme="dark"] .years a.active{background:var(--ui-green)!important;border-color:var(--ui-green)!important;color:#fff!important;outline:none!important}

  /* Projektbearbeitung */
  html[data-theme="dark"] .processing-wrap{background:#22252b!important;border-color:#46505c!important}
  html[data-theme="dark"] .processing-table th{background:#323842!important;color:#f1f4f7!important;border-bottom-color:#5a6571!important;border-right-color:#4a545f!important}
  html[data-theme="dark"] .processing-table td{color:#eef1f4!important;border-bottom-color:#49525e!important;border-right-color:#434c57!important}
  html[data-theme="dark"] .processing-table tr.running td{background:#183123!important}
  html[data-theme="dark"] .processing-table tr.paused td,html[data-theme="dark"] .processing-table tr.not-started td{background:#3a2f1b!important}
  html[data-theme="dark"] .processing-table tr.completed td{background:#2b3037!important;color:#d1d8e0!important}
  html[data-theme="dark"] .processing-table td::before{color:#cfd6df!important}
  html[data-theme="dark"] .processing-table .status-badge{background:#294b34!important;color:#d7f0de!important}
  html[data-theme="dark"] .processing-table tr.paused .status-badge,html[data-theme="dark"] .processing-table tr.not-started .status-badge{background:#6a5024!important;color:#ffe5b0!important}
  html[data-theme="dark"] .processing-table tr.completed .status-badge{background:#424851!important;color:#dde3ea!important}
  html[data-theme="dark"] .processing-admin-page .processing-table tr.not-commissioned td{background:#3a2222!important;color:#f4e7e7!important}
  html[data-theme="dark"] .processing-admin-page .processing-table tr.not-commissioned .status-badge{background:#663434!important;color:#ffd7d7!important}
  html[data-theme="dark"] .processing-progress-track{background:#59616b!important;box-shadow:none!important}
  html[data-theme="dark"] .processing-progress-fill{background:#21ad50!important}
  html[data-theme="dark"] .processing-progress-text{color:#fff!important}
  html[data-theme="dark"] .processing-rest-positive,html[data-theme="dark"] .processing-rest-negative,html[data-theme="dark"] .processing-done{color:#fff!important}

  /* Textbausteine */
  html[data-theme="dark"] .categories,html[data-theme="dark"] .item,html[data-theme="dark"] .category-column{background:#292d34!important;border-color:#4b535f!important}
  html[data-theme="dark"] .cat{background:#292d34!important;border-bottom-color:#444d58!important;color:#d7dee7!important}
  html[data-theme="dark"] .cat.active{background:#1f3527!important;color:#d5f0dc!important}
  html[data-theme="dark"] .cat small{color:#bfc7d0!important}
  html[data-theme="dark"] .item-category,html[data-theme="dark"] .category-title strong{color:#f4f7fa!important}
  html[data-theme="dark"] .item-text{color:#d7dee7!important}
  html[data-theme="dark"] .usage,html[data-theme="dark"] .pager,html[data-theme="dark"] .empty{color:#bfc7d0!important}

  /* Fachmodule */
  
  
  
  

  
  
  /* Primäre Eingabeaktionen sind im Dark Mode bewusst blau; Grün bleibt der aktiven Navigation vorbehalten. */
  
  
  
  

  html[data-theme="dark"] .panel h1,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .panel h3{color:#f5f7fa!important}
  html[data-theme="dark"] .panel .legal-box{background:#292d34!important;border-color:#4b535f!important;color:#eef1f4!important}
  html[data-theme="dark"] .panel .legal-box .hint{color:#aeb8c3!important}
  html[data-theme="dark"] .offer-editor .letter-manager{background:#292d34!important;border-color:#4b535f!important;color:#eef1f4!important}
  html[data-theme="dark"] .panel .status,html[data-theme="dark"] .panel .save-status,html[data-theme="dark"] .panel .server-box,
  html[data-theme="dark"] .panel .letter-manager,html[data-theme="dark"] .panel .archive,html[data-theme="dark"] .panel .archive-list,
  html[data-theme="dark"] #draftList{
    background:#292d34!important;border-color:#4b535f!important;color:#eef1f4!important
  }
  html[data-theme="dark"] .panel .status.saved,html[data-theme="dark"] .panel .save-status.saved{background:#1f3527!important;border-color:#477158!important;color:#d0edd8!important}
  html[data-theme="dark"] .panel .status.dirty,html[data-theme="dark"] .panel .save-status.dirty{background:#3a301f!important;border-color:#856f41!important;color:#ffe4b2!important}
  html[data-theme="dark"] .panel .mini,html[data-theme="dark"] .panel .hint{color:#c6cdd6!important}
  html[data-theme="dark"] .panel #noticeCount,html[data-theme="dark"] .panel #sigePlanCount,html[data-theme="dark"] .panel #reportCount{color:#c6cdd6!important}

  /* Gemeinsame Dialoghülle; die Aktionslogik bleibt beim jeweiligen Dialog. */
  #moduleLeaveDialog,#offerMoveDialog,#offerOriginalPdfDialog{position:fixed;inset:0;background:#0007;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(2px)}
  #moduleLeaveDialog .sigeko-leave-card,#offerMoveDialog .sigeko-leave-card,#offerOriginalPdfDialog .sigeko-leave-card{width:min(520px,100%);max-height:calc(100dvh - 32px);overflow:auto}
  #moduleLeaveDialog .sigeko-dialog-input{width:100%;margin:0 0 14px}
  #offerMoveDialog .sigeko-leave-card{display:grid;gap:12px}
  #offerMoveDialog .sigeko-leave-card h2,#offerMoveDialog .sigeko-leave-card p{margin:0}
  #offerMoveDialog .sigeko-leave-card label{display:grid;gap:5px;font-size:13px;font-weight:600;margin:0}
  @media(max-width:520px){#moduleLeaveDialog,#offerMoveDialog,#offerOriginalPdfDialog{padding:12px}}
  html[data-theme="dark"] .page-footer{color:var(--ui-footer-color)!important;border-top-color:#434c57!important}
}























/* Mobile-Größen bleiben bewusst bei den vorhandenen, über Jahre abgestimmten Seitenregeln. */

@media screen and (max-width:760px){
  .app-main-nav a,.app-main-nav span{font-size:14px!important}
  .section-nav,.projects-heading-nav{gap:16px!important}
  .section-nav a,.section-nav .nav-current,.section-nav span.nav-locked,.section-nav span.no-access,
  .projects-heading-nav a,.projects-heading-nav .nav-current,.projects-heading-nav span.nav-locked,.projects-heading-nav span.no-access{
    font-size:15px!important;
    padding-bottom:8px!important;
  }
  .wrap .auth-user,
.wrap .auth-logout{min-height:44px!important}
  .wrap .sigeko-theme-icon{width:44px!important;height:44px!important;min-height:44px!important}
}

@media screen and (max-width:760px){
  .wrap > .top{align-items:flex-start!important;flex-direction:column!important;gap:12px!important;margin-bottom:20px!important}
  .wrap > .top .brand img,.wrap > .top .page-brand img{width:165px!important;max-height:62px!important}
  .wrap > .top .auth-area{margin-left:0!important;flex-wrap:wrap!important;gap:8px!important}
  .wrap > .top .auth-user,.wrap > .top .auth-logout{height:44px!important;min-height:44px!important}
  .wrap > .top .sigeko-theme-picker{height:44px!important}
  .wrap > .top .sigeko-theme-icon{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
}




/* ========================================================================== */
/* Einheitliche Fachmodule – zentrale Screen-UI für Projekte, Schriftverkehr  */
/* und Buchhaltung. Dokument-/A4-Geometrie bleibt in den jeweiligen Vorlagen. */
/* ========================================================================== */
@media screen{
  .app{
    align-items:start!important;
  }
  .app>.panel{
    padding:18px!important;
    background:var(--ui-surface,#fff)!important;
    border:1px solid var(--ui-line,#d9e1e6)!important;
    border-radius:24px!important;
    box-shadow:0 12px 32px rgba(15,23,42,.06)!important;
  }
  .app>.preview-wrap{
    padding:6px 10px 18px!important;
  }
  /* Eine Navigationsdefinition fuer alle Fachmodule; Bestellungen ist die Referenz. */
  .app>.panel>.module-nav{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    align-items:stretch;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 14px;
    padding:10px;
    border:1px solid var(--ui-line,#d9e1e6);
    border-radius:18px;
    background:#fff;
    color:var(--ui-text,#132238);
    box-shadow:none;
  }
  .app>.panel>.module-nav>.btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    width:100%;
    min-width:0;
    max-width:100%;
    min-height:var(--ui-control-height,42px);
    padding:var(--ui-control-padding,9px 11px);
    border:1px solid var(--action-line,#a7adb4);
    border-radius:var(--ui-control-radius,18px);
    background:var(--action-neutral,#fff);
    color:var(--action-neutral-text,#172331);
    font:400 var(--ui-control-font-size,13px)/var(--ui-control-line-height,1.2) Arial,Helvetica,sans-serif;
    text-align:center;
    text-decoration:none;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:normal;
    -webkit-hyphens:auto;
    hyphens:auto;
    box-shadow:none;
    text-shadow:none;
    filter:none;
    transition:background-color .15s ease,border-color .15s ease,color .15s ease,filter .15s ease;
  }
  .app>.panel>.module-nav>.btn:first-child{
    grid-column:1/-1;
    justify-self:start;
    width:auto;
    justify-content:flex-start;
  }
  .app>.panel>.module-nav>.current{
    background:var(--ui-green-soft,#eef8f1);
    border-color:#cfe2d5;
    color:var(--ui-green-strong,#157735);
    font-weight:700;
    cursor:default;
  }
  /* Shared box model: module controls fit the panel on narrow screens. */
  
  /* Shared neutral link-button baseline, including modules without inline button CSS. */
  
  
  
  
  
  
  
  
  
  
  .app>.panel>.toolbar{gap:8px!important}
  .app>.panel>h1{color:var(--ui-text,#132238)!important;margin-bottom:14px!important}
  .app>.panel input,.app>.panel textarea,.app>.panel select{
    border:1px solid #ccd7df!important;
    border-radius:var(--ui-field-radius)!important;
    padding:var(--ui-field-padding)!important;
    background:#fff;
    color:var(--ui-text,#132238)!important;
  }
  .app>.panel .status{
    border:1px solid var(--ui-line,#d9e1e6)!important;
    border-radius:14px!important;
    background:#f8fafb!important;
    color:#5f6f82!important;
  }
  .app>.panel .status.saved{background:var(--ui-green-soft,#eef8f1)!important;border-color:#cfe2d5!important}
  .app>.panel .status.dirty{background:#fff8e8!important;border-color:#ead4ad!important}
  .app>.panel .letter-manager{
    border:1px solid var(--ui-line,#d9e1e6)!important;
    border-radius:18px!important;
    padding:12px!important;
    background:#fff;
  }
  .app>.panel .letter-entry{border-top:1px solid var(--ui-line-soft,#e8edf1)!important}
  .app>.panel button,.app>.panel .btn{font-size:13px!important;line-height:1.2!important}
  .app>.panel label{line-height:1.25}

  /* Gemeinsame Darstellung gespeicherter Zustände (z. B. SiGePlan/Vorankündigung). */
  .app>.panel .archive{
    max-height:240px!important;
    overflow:auto!important;
    border:0!important;
    margin-top:8px!important;
    display:grid!important;
    gap:8px!important;
    padding:0!important;
    background:transparent!important;
  }
  .app>.panel .archive-row{
    display:grid!important;
    border:1px solid var(--ui-line,#d9e1e6)!important;
    border-radius:14px!important;
    background:#fff;
    padding:10px 12px!important;
    margin:0!important;
    box-shadow:none!important;
  }
  
  .app>.panel .archive-actions{display:flex!important;gap:6px!important;flex-wrap:wrap!important;justify-content:flex-end!important}

}

@media screen and (max-width:1100px), screen and (hover:none) and (pointer:coarse) and (max-width:1366px){
  .app{display:block!important;padding:10px!important}
  .app>.panel{border-radius:20px!important}
  .app>.preview-wrap{padding:12px 0 20px!important}
  .app>.panel>.module-nav{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-start;
  }
  .app>.panel>.module-nav>.btn{
    flex:0 0 auto;
    width:auto;
    max-width:100%;
    order:2;
  }
  .app>.panel>.module-nav>.btn:first-child{order:0}
  .app>.panel>.module-nav::after{
    content:"";
    flex:0 0 100%;
    width:0;
    height:0;
    padding:0;
    margin:0;
    order:1;
  }
  
  
  
  
  
}

@media screen and (max-width:560px){
  .app>.panel>.module-nav>.btn{width:100%}
  .app>.panel>.module-nav>.btn:first-child{width:auto}
  
  
  
  
}

@media screen and (max-width:520px){
  .module-link-grid{grid-template-columns:1fr!important}
}

html[data-theme="dark"] .app>.panel>.module-nav{
  background:#23272e;
  border-color:#48515d;
  color:var(--ui-text,#f2f5f8);
}
html[data-theme="dark"] .app>.panel>.module-nav>.current{
  background:#1f3b29;
  border-color:#2ea854;
  color:#d9f5df;
}
html[data-theme="dark"] .app>.panel .status{background:#292d34!important;color:#d0d7df!important;border-color:#4b535f!important}
html[data-theme="dark"] .app>.panel .letter-manager,
html[data-theme="dark"] .app>.panel .archive-row{background:#22252b!important;border-color:#4b535f!important}
html[data-theme="dark"] .app>.panel input,
html[data-theme="dark"] .app>.panel textarea,
html[data-theme="dark"] .app>.panel select{background:#292d34!important;color:#f2f5f8!important;border-color:#59626f!important}

@media screen and (max-width:1250px){
  .accounting-offers-page .customer-select-grid{grid-template-columns:minmax(0,1fr)!important}
  .accounting-offers-page .offer-work{grid-template-columns:minmax(0,1fr)!important}
  .accounting-offers-page .offer-editor{position:relative!important;top:auto!important;max-height:none!important}
}
@media screen and (max-width:760px){
  .accounting-offers-page .wrap{padding:16px 12px 22px!important}
  .accounting-offers-page .row{grid-template-columns:1fr!important}
  .accounting-offers-page .fee-row{grid-template-columns:1fr 120px auto!important}
}
@media screen {
  
  html[data-theme="dark"] .accounting-offers-page .card{background:#23272e!important;border-color:#48515d!important}
  html[data-theme="dark"] .accounting-offers-page input,
  html[data-theme="dark"] .accounting-offers-page select,
  html[data-theme="dark"] .accounting-offers-page textarea{background:#292d34!important;color:#f2f5f8!important;border-color:#59626f!important}
  html[data-theme="dark"] .accounting-offers-page .letter-manager{background:#292d34!important;border-color:#4b535f!important;color:#d0d7df!important}
}


/* Zentrale Zugriffskennzeichnung: eingeschränkte Benutzer sehen alle Module,
   gesperrte Ziele bleiben jedoch sichtbar, ausgegraut und nicht anklickbar. */
@media screen {
  .access-locked,
  .no-access,
  a.access-locked,
  a.no-access,
  button.access-locked,
  button.no-access,
  span.access-locked,
  span.no-access {
    cursor:not-allowed!important;
  }
  .btn.access-locked,
  .btn.no-access,
  button.access-locked,
  button.no-access {
    background:#eef1f4!important;
    color:#8995a3!important;
    border-color:#d4dbe1!important;
    box-shadow:none!important;
    filter:grayscale(1)!important;
    opacity:.78!important;
    pointer-events:auto!important;
  }
  .btn.access-locked:hover,
  .btn.no-access:hover,
  button.access-locked:hover,
  button.no-access:hover {
    background:#eef1f4!important;
    color:#8995a3!important;
    border-color:#d4dbe1!important;
    box-shadow:none!important;
    transform:none!important;
  }
  .btn.access-locked::before,
  .btn.no-access::before,
  button.access-locked::before,
  button.no-access::before {
    content:"🔒";
    margin-right:.38em;
    font-size:.9em;
  }
  .section-nav .access-locked,
  .section-nav .no-access,
  .projects-heading-nav .access-locked,
  .projects-heading-nav .no-access,
  .nav-locked {
    color:#97a1ad!important;
    cursor:not-allowed!important;
    text-decoration:none!important;
  }
  .section-nav .access-locked::before,
  .section-nav .no-access::before,
  .projects-heading-nav .access-locked::before,
  .projects-heading-nav .no-access::before,
  .nav-locked::before {
    content:"🔒";
    margin-right:.3em;
    font-size:.78em;
  }
  .area-card.access-locked,
  .area-card.card-disabled {
    position:relative!important;
    opacity:.72!important;
    filter:grayscale(.8)!important;
    cursor:not-allowed!important;
    transform:none!important;
  }
  .area-card.access-locked:hover,
  .area-card.card-disabled:hover {
    transform:none!important;
    box-shadow:var(--shadow,0 12px 32px rgba(15,23,42,.06))!important;
    border-color:var(--line,#d9e1e6)!important;
  }
  .access-lock-badge {
    display:inline-flex!important;
    align-items:center!important;
    gap:5px!important;
    width:max-content!important;
    max-width:100%!important;
    margin-top:14px!important;
    padding:5px 9px!important;
    border:1px solid #d4dbe1!important;
    border-radius:999px!important;
    background:#eef1f4!important;
    color:#7d8997!important;
    font-size:11px!important;
    font-weight:700!important;
    line-height:1.15!important;
  }
  html[data-theme="dark"] .btn.access-locked,
  html[data-theme="dark"] .btn.no-access,
  html[data-theme="dark"] button.access-locked,
  html[data-theme="dark"] button.no-access,
  html[data-theme="dark"] .access-lock-badge {
    background:#2b3037!important;
    border-color:#454d57!important;
    color:#929ba6!important;
  }
  html[data-theme="dark"] .section-nav .access-locked,
  html[data-theme="dark"] .section-nav .no-access,
  html[data-theme="dark"] .projects-heading-nav .access-locked,
  html[data-theme="dark"] .projects-heading-nav .no-access,
  html[data-theme="dark"] .nav-locked { color:#8c96a2!important; }
}

@media screen {
  .trash-tabs .access-locked{
    display:inline-flex!important;
    align-items:center!important;
    gap:.3em!important;
    color:#97a1ad!important;
    opacity:.8!important;
  }
  .trash-tabs .access-locked::before{content:"🔒";font-size:.8em}
}

/* Gemeinsame Metainformation für automatisch geladene Bundesbank-Basiszinssätze. */
.basis-stand{margin-top:4px;font-size:11px;line-height:1.25;color:#66727d}
html[data-theme="dark"] .basis-stand{color:#aeb8c2}

/* Buchhaltung: offizielle Berechnungsgrundlage kompakt und einheitlich anzeigen. */
.basis-rate-info{min-height:42px;display:flex;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--soft);font-size:12px;font-weight:700;color:var(--muted);line-height:1.25}

/* Gemeinsamer ISO-Kalenderwochen-Picker für Fachmodule. */
.sigeko-week-picker{width:100%}
.sigeko-week-picker-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;min-height:42px}
.sigeko-week-overlay{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.38);backdrop-filter:blur(2px)}
.sigeko-week-card{width:min(430px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 32px));overflow:auto;background:var(--ui-surface,#fff);color:var(--text,#17212b);border:1px solid var(--line,#d9e1e6);border-radius:16px;box-shadow:0 24px 64px rgba(15,23,42,.24);padding:14px}
.sigeko-week-head{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:8px;margin-bottom:10px}.sigeko-week-head strong{text-align:center;text-transform:capitalize}.sigeko-week-head button{min-height:38px;padding:6px 10px}
.sigeko-week-list{display:grid;gap:6px}.sigeko-week-row{display:grid;grid-template-columns:76px 1fr;align-items:center;gap:12px;width:100%;min-height:42px;padding:8px 12px;text-align:left;border:1px solid var(--line,#d9e1e6);border-radius:10px;background:var(--soft,#f7f9fa);color:inherit}.sigeko-week-row:hover,.sigeko-week-row.is-selected{border-color:#74ba87;background:#eef8f1}.sigeko-week-number{font-weight:800;color:#177c37}.sigeko-week-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
html[data-theme="dark"] .sigeko-week-row:hover,html[data-theme="dark"] .sigeko-week-row.is-selected{background:#203428;border-color:#4f8e62}.sigeko-week-card button{cursor:pointer}

/* Angebote: flexible Positionen der Ausführungsphase. */
@media screen {
  .accounting-offers-page .offer-execution-items{
    margin:12px 0 10px;
    padding:12px;
    border:1px solid var(--ui-line,#d9e1e6);
    border-radius:14px;
    background:var(--ui-surface-2,#f7f9fa);
  }
  .accounting-offers-page .offer-execution-items-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
  }
  .accounting-offers-page .offer-execution-items-hint{
    margin:7px 0 10px;
    color:var(--ui-muted,#667482);
    font-size:12px;
    line-height:1.35;
  }
  .accounting-offers-page [data-execution-items]{display:grid;gap:10px}
  .accounting-offers-page .offer-execution-item{
    padding:14px;
    border:1px solid var(--ui-line,#d9e1e6);
    border-radius:16px;
    background:var(--ui-surface,#fff);
    box-shadow:0 1px 2px rgba(15,23,42,.04);
  }
  .accounting-offers-page .offer-execution-item-grid{
    display:grid;
    grid-template-columns:repeat(12,minmax(0,1fr));
    gap:10px 12px;
    align-items:end;
  }
  .accounting-offers-page .offer-execution-item-title{grid-column:span 5}
  .accounting-offers-page .offer-execution-item-quantity{grid-column:span 2}
  .accounting-offers-page .offer-execution-item-unit{grid-column:span 2}
  .accounting-offers-page .offer-execution-item-price{grid-column:span 3}
  .accounting-offers-page .offer-execution-item-details{grid-column:1/-1}
  .accounting-offers-page .offer-execution-item label{margin-top:0!important;margin-bottom:4px!important}
  .accounting-offers-page .offer-execution-item-footer{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid var(--ui-line,#d9e1e6);
  }
  .accounting-offers-page .offer-execution-item-toggle{
    margin:0!important;
    min-width:0;
    flex:0 0 auto;
    max-width:100%;
    display:grid;
    grid-template-columns:20px minmax(0,1fr);
    align-items:center;
    gap:10px;
    font-size:12px;
    font-weight:700;
  }
  .accounting-offers-page .offer-execution-item-toggle input{margin:0;width:16px;height:16px}
  .accounting-offers-page .offer-execution-item-toggle span{line-height:1.25;min-width:0;overflow-wrap:anywhere}
  .accounting-offers-page .offer-execution-item-summary{
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 12px;
    border:1px solid var(--ui-line,#d9e1e6);
    border-radius:12px;
    background:var(--ui-surface-2,#f7f9fa);
    min-width:170px;
    justify-content:space-between;
  }
  .accounting-offers-page .offer-execution-item-summary[hidden]{display:none!important}
  .accounting-offers-page .offer-execution-item-summary span{
    font-size:12px;
    font-weight:700;
    color:var(--ui-muted,#667482);
    text-transform:uppercase;
    letter-spacing:.04em;
  }
  .accounting-offers-page [data-exec-item-total]{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:16px}
  html[data-theme="dark"] .accounting-offers-page .offer-execution-items,
  html[data-theme="dark"] .accounting-offers-page .offer-execution-item{border-color:#4b535f!important}
  html[data-theme="dark"] .accounting-offers-page .offer-execution-items{background:#292d34!important}
  html[data-theme="dark"] .accounting-offers-page .offer-execution-item{background:#23272e!important}
  html[data-theme="dark"] .accounting-offers-page .offer-execution-item-footer{border-top-color:#4b535f!important}
  html[data-theme="dark"] .accounting-offers-page .offer-execution-item-summary{border-color:#4b535f!important;background:#2b313a!important}
}
@media screen and (max-width:920px){
  .accounting-offers-page .offer-execution-item-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .accounting-offers-page .offer-execution-item-title,
  .accounting-offers-page .offer-execution-item-details{grid-column:1/-1}
  .accounting-offers-page .offer-execution-item-quantity,
  .accounting-offers-page .offer-execution-item-unit,
  .accounting-offers-page .offer-execution-item-price{grid-column:auto}
}
@media screen and (max-width:760px){
  .accounting-offers-page .offer-execution-item-grid{grid-template-columns:1fr}
  .accounting-offers-page .offer-execution-item-title,
  .accounting-offers-page .offer-execution-item-quantity,
  .accounting-offers-page .offer-execution-item-unit,
  .accounting-offers-page .offer-execution-item-price,
  .accounting-offers-page .offer-execution-item-details{grid-column:auto}
  .accounting-offers-page .offer-execution-item-footer{flex-direction:column;align-items:stretch}
  .accounting-offers-page .offer-execution-item-summary{min-width:0;width:100%}
  .accounting-offers-page .offer-execution-item-footer .btn{width:100%}
}



/* Original-Angebote als unveränderte PDF-Datei. */
#offerOriginalPdfDialog .original-pdf-upload-card{display:grid;gap:12px}
#offerOriginalPdfDialog .original-pdf-upload-card h2,#offerOriginalPdfDialog .original-pdf-upload-card p{margin:0}
#offerOriginalPdfDialog .original-pdf-upload-card label{display:grid;gap:4px;font-size:12px;font-weight:700;margin:0}
#offerOriginalPdfDialog .original-pdf-upload-card input{width:100%;min-height:44px;padding:9px 11px;border:1px solid #aaa;border-radius:8px;background:#fff;color:#111;font:inherit}
#offerOriginalPdfDialog .sigeko-leave-actions{margin-top:4px}
html[data-theme="dark"] #offerOriginalPdfDialog .original-pdf-upload-card input{background:#23272e!important;color:#f2f5f8!important;border-color:#59626f!important}
.original-document-viewer{min-height:calc(100vh - 36px);background:#fff;border:1px solid #cfd6dc;border-radius:10px;overflow:hidden;box-shadow:0 2px 14px rgba(0,0,0,.12)}
.original-document-viewer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#f4f6f8;border-bottom:1px solid #d6dde3}
.original-document-viewer iframe{display:block;width:100%;height:calc(100vh - 95px);min-height:700px;border:0;background:#777}
html[data-theme="dark"] .original-document-viewer{background:#23272e;border-color:#48515d}
html[data-theme="dark"] .original-document-viewer-head{background:#292d34;border-color:#48515d;color:#f1f4f7}
@media screen and (min-width:761px) and (max-width:1100px){
  .original-document-viewer{min-height:calc(100vh - 36px)}
  .original-document-viewer iframe{height:calc(100vh - 95px);min-height:600px}
}

/* Mobile UI Vereinheitlichung 2.0
   Ausschließlich Bedienoberfläche. A4-/PDF-/Preview-Geometrie wird hier bewusst nicht angesprochen. */
@media screen and (max-width:760px){
  .app>.panel{
    padding:12px!important;
    border-radius:18px!important;
  }
  .app>.panel h1{font-size:22px!important;line-height:1.2!important;margin:0 0 14px!important}
  .app>.panel h2{font-size:18px!important;line-height:1.25!important;margin:22px 0 8px!important}
  .app>.panel label{font-size:13px!important;line-height:1.35!important}
  .app>.panel input:not([type="checkbox"]):not([type="radio"]),
  .app>.panel select,
  .app>.panel textarea{font-size:16px!important;min-height:44px!important;padding:10px 12px!important}
  .app>.panel textarea{min-height:92px!important}
  .app>.panel .toolbar{gap:8px!important;margin-bottom:12px!important}
  .app>.panel .row,
  .app>.panel .row3{grid-template-columns:1fr!important;gap:8px!important}
  .app>.panel .checkline{
    grid-template-columns:18px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    line-height:1.35!important;
  }
  .app>.panel .checkline span{min-width:0!important;overflow-wrap:anywhere!important}
  .app>.panel .letter-entry-main,
  .app>.panel .mini{overflow-wrap:anywhere!important}
  .app>.panel .letter-entry{min-width:0!important}
}
/* Datum/Uhrzeit ist eine kompakte gemeinsame Eingabekomponente.
   Nicht an Touch-/Pointer-Erkennung koppeln: iPadOS kann je nach Eingabegerät
   hover/pointer unterschiedlich melden. */






@media screen and (max-width:760px){
  /* iPhone/iOS Safari und der Zwischenbereich bis zum Tablet-Breakpoint:
     native Datum-/Zeitfelder vollständig auf die reale Formularspalte
     begrenzen. Das eigentliche Smartphone-Layout bleibt weiterhin <=560px. */
  
  
}

@media screen and (max-width:430px){
  .app{padding:6px!important}
  .app>.panel{padding:10px!important;border-radius:16px!important}
  .app>.panel h1{font-size:21px!important}
  .app>.panel h2{font-size:17px!important}
  .app>.panel .toolbar>button,
  .app>.panel .toolbar>.btn{flex:1 1 100%!important}
}


/* Einheitliche mobile Dokumentvorschau
   Gilt zentral für A4-Seiten und eingebettete Original-PDFs.
   Die Dokumentgeometrie selbst bleibt unverändert; nur der Bildschirm-Container
   wird auf die verfügbare Gerätebreite begrenzt. */
@media screen and (max-width:760px){
  .preview-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:12px!important;
    overflow-x:hidden!important;
  }

  .original-document-viewer{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 auto!important;
  }

  .original-document-viewer-head{
    min-width:0!important;
    flex-wrap:wrap!important;
  }

  .original-document-viewer-head strong{
    min-width:0!important;
    overflow-wrap:anywhere!important;
  }

  .original-document-viewer iframe{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:72vh!important;
    min-height:480px!important;
  }
}


/* Einheitlicher Umbruch für lange Fachmodul-Navigation.
   Gilt auf Bildschirmgrößen allgemein, damit auch schmalere Desktop-/Laptop-
   Seitenleisten lange Modulnamen innerhalb ihres Buttons halten.
   Dokument-/PDF-/Drucklayout bleibt unverändert. */



/* Original-PDF-Viewer: auf Desktop/Laptop die Höhe der Fachmodul-Spalte nutzen.
   Dadurch endet der Viewer nicht bereits nach einer Viewport-Höhe, wenn das
   Formular links länger als das sichtbare Browserfenster ist. */
@media screen and (min-width:761px){
  .app>.preview-wrap{
    align-self:stretch!important;
    min-height:100%!important;
  }

  .original-document-viewer:not([hidden]){
    display:flex!important;
    flex-direction:column!important;
    height:100%!important;
    min-height:calc(100vh - 36px)!important;
  }

  .original-document-viewer:not([hidden]) .original-document-viewer-head{
    flex:0 0 auto!important;
  }

  .original-document-viewer:not([hidden]) iframe{
    flex:1 1 auto!important;
    height:auto!important;
    min-height:700px!important;
  }
}


/* Einheitliche Dokumentmodul-Shell
   Äußere Aufteilung aller Projekt-Fachmodule ist zentral identisch.
   Modulspezifisch bleiben nur die Inhalte innerhalb von Panel und Vorschau. */




/* Einheitliche A4-Vorschaugröße auf großen Bildschirmen.
   Nur Bildschirmdarstellung: Dokument-/PDF-Geometrie bleibt unverändert.
   Hochformat-A4 wird einheitlich vergrößert; Querformat etwas geringer, damit
   es in der flexiblen Vorschaufläche vollständig sichtbar bleibt. */


/* Unterhalb der gemeinsamen Desktop-Grenze stapeln alle Fachmodule gleich.
   Vorschau-/Dokumentgeometrien innerhalb der preview-wrap bleiben unberührt. */


@media screen and (hover:none) and (pointer:coarse) and (min-width:761px) and (max-width:1366px){
  /* Tablet/iPad: die Eingabeflaeche nutzt die vorhandene Breite voll aus.
     Smartphone und Desktop bleiben unberuehrt. */
  

  /* Tablet/iPad: Aktionsleiste kompakt halten. Lokale alte flex:1-Regeln
     dürfen Speichern/Neu/PDF nicht über die verfügbare Breite strecken. */
  
  

  /* iPadOS/Safari: native Datum-/Zeitfelder duerfen keine eigene intrinsische
     Mindestbreite ueber ihre Grid-/Flexspalte hinaus erzwingen. */
  
  

}




/* iPad/iOS: WebKit kann mehrseitige PDFs in eingebetteten iframes weiterhin nur
   eingeschraenkt scrollen. Auf Apple-Mobilgeraeten wird deshalb fuer Original-
   PDFs der native Vollbild-PDF-Viewer angeboten; Desktop behaelt den Inline-Viewer. */
.original-document-viewer-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.original-document-viewer-native-open{display:none;align-items:center;justify-content:center;text-decoration:none}
.original-document-viewer-native-note{display:none;padding:16px;border-top:1px solid var(--ui-line,#d6dde3);background:var(--ui-surface-2,#f4f6f8);font-size:13px;line-height:1.45;color:var(--ui-text,#132238)}
.original-document-viewer.is-ios-native-pdf .original-document-viewer-native-open{display:inline-flex}
.original-document-viewer.is-ios-native-pdf .original-document-viewer-native-note{display:block}
.original-document-viewer.is-ios-native-pdf iframe{display:none!important}
@media screen and (hover:none) and (pointer:coarse) and (min-width:761px) and (max-width:1366px){
  .original-document-viewer{width:100%!important;max-width:none!important;min-height:0!important}
  .original-document-viewer-head{position:sticky;top:0;z-index:2}
  .original-document-viewer iframe{width:100%!important;max-width:100%!important;height:78vh!important;min-height:640px!important}
}

/* Rechnungskontrolle: Tablet/iPad zeigt Rechnungen bewusst einspaltig und jede
   Karte traegt Projekt + Rechnungsart/-nummer. Das verhindert bei mehreren
   Abschlaegen die Zuordnung ueber nebeneinander laufende Karten. */
.invoice-control-mobile-head{display:none!important}


/* iPad quer: Tabellen bleiben oberhalb von 1100 px echte Tabellen.
   Native Datumsfelder erhalten ausreichend Platz und einen sichtbaren Abstand. */


/* Der WebKit-Ersatz für eingebettete A4-Dokumente gilt auch auf breiten
   Touchscreens. Nur Bildschirmdarstellung; Desktop und PDF bleiben unverändert. */
@media screen and (max-width:1100px), screen and (hover:none) and (pointer:coarse){
  .slide-page .slide-month-year{width:12%!important;height:2.8%!important;white-space:nowrap!important}
  .slide-page .slide-owner-address{width:52%!important;white-space:nowrap!important}
}
@media screen and (hover:none) and (pointer:coarse){
  .slide-stage,.slide-stage *{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
}
@media screen and (hover:none) and (pointer:coarse) and (min-width:1101px){
  .slide-page .linked-desktop-render{display:none!important}
  .slide-page .mobile-linked-render{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;overflow:hidden!important;background:#fff!important}
  .slide-page .mobile-linked-canvas{position:absolute!important;left:0!important;top:0!important;transform-origin:top left!important;overflow:hidden!important;background:#fff!important}
  .slide-page .mobile-linked-canvas>.native-a4{position:absolute!important;left:0!important;top:0!important;margin:0!important}
}

/* Einheitliche Flächenfarben für alle Dokumentmodule.
   Referenz ist der frühere Bestellungen-Stand vor der Weiß-Umstellung:
   - Gesamthintergrund/Vorschau: #f3f4f6
   - linke Arbeitsfläche: #fafafa (leicht abgesetzt, aber nicht weiß)
   - abgerundete Karten/Navigation: weiß */










/* Dark Mode bleibt über die zentralen Variablen konsistent. */




/* Einheitliche vertikale Abstände in Dokumentmodulen.
   Referenz: Zahlungserinnerung. Navigation, Haupt-Aktionsleiste und Titel
   dürfen nicht direkt aneinanderkleben. Nur direkte Shell-Elemente betroffen;
   modulspezifische Werkzeugleisten innerhalb von Editoren bleiben unverändert. */



/* Dokumente – feine Absender-Unterstreichung wie in den Originalvorlagen.
   Gilt nur für Buchhaltung/Schriftverkehr mit Absenderzeile über der Empfängeradresse. */


/* Angebote/Nachträge: der scrollbar werdende Bauherren-/Kundenbereich bleibt
   eine eigene helle Arbeitsfläche; Dark Mode wird zentral gespiegelt. */
@media screen{
  
  

  /* Rechnungsentwürfe: Metadaten und beide Aktionen bleiben in einer sauberen
     Zeile; auf Smartphones wandern die Aktionen gemeinsam unter den Text. */
  
  
}


/* Gemeinsame Bestellkarten und Rechnungs-Leistungspositionen.
   Bestellungen und Rechnungen verwenden dieselbe Typografie/Informationshierarchie. */






















/* Einheitliche Button-Geometrie in Verwaltung und HTML-Modulen.
   Eine zentrale Grundgröße für Bedienbuttons; kompakte Aktionsbuttons
   dürfen schmal bleiben, verwenden aber dieselbe Höhe und Typografie. */
@media screen{
  button:not(.customer-tree-row),input[type="submit"],input[type="button"],input[type="reset"],.btn{
    -webkit-appearance:none;
    appearance:none;
    font-family:inherit;
    text-align:center;
    cursor:pointer;
  }
  :is(button,input[type="submit"],input[type="button"],input[type="reset"],a.btn):focus-visible{
    outline:3px solid var(--ui-green,#1a8e3c)!important;
    outline-offset:3px!important;
  }
  button:disabled,input[type="submit"]:disabled,input[type="button"]:disabled{
    cursor:not-allowed!important;
    opacity:.55!important;
  }
  .wrap button:not(.sigeko-theme-icon):where(:not(.task-snooze)):not([hidden]),
  .wrap .btn:not(.sigeko-theme-icon):not([hidden]),
  body.module-shell > .app > .panel button:not([hidden]):where(:not(.module-nav > .btn)):not(.customer-tree-row):not([data-photo-jump]):not(.package-position),
  body.module-shell > .app > .panel .btn:not([hidden]):where(:not(.module-nav > .btn)){
    box-sizing:border-box;
    min-height:var(--ui-control-height)!important;
    padding:var(--ui-control-padding)!important;
    font-size:var(--ui-control-font-size)!important;
    line-height:var(--ui-control-line-height)!important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
  }

  

  

  /* Kompakte Fach-Aktionsbuttons behalten die gemeinsame Höhe,
     aber kein künstliches horizontales Standard-Padding. */
  
}

@media screen and (pointer:coarse){
  .wrap button:not(.sigeko-theme-icon):not([hidden]),
  .wrap .btn:not(.sigeko-theme-icon):not([hidden]),
  body.module-shell > .app > .panel button:not([hidden]):where(:not(.module-nav > .btn)):not(.customer-tree-row):not([data-photo-jump]):not(.package-position),
  body.module-shell > .app > .panel .btn:not([hidden]):where(:not(.module-nav > .btn)){
    min-height:var(--ui-control-touch-height)!important;
  }
}




/* One flat action system, including native dialogs and dynamically created actions.
   Named important rules replace historical module-specific borders and shadows. */
@layer app-actions {
@media screen {
  :root {--action-primary:#198b3d;--action-primary-hover:#157735;--action-danger:#a53530;--action-danger-hover:#8f2925;--action-danger-line:#d3bbb9;--action-danger-bg:#fff;--action-danger-bg-hover:#fbefee;--action-neutral:#fff;--action-neutral-text:#172331;--action-line:#a7adb4;--action-radius:18px;}
  html[data-theme="dark"] {--action-primary:#238747;--action-primary-hover:#2a9953;--action-danger:#e9a5a8;--action-danger-hover:#f3bdc0;--action-danger-line:#78545a;--action-danger-bg:#292e35;--action-danger-bg-hover:#422e33;--action-neutral:#292e35;--action-neutral-text:#f1f3f5;--action-line:#68727f;}
  body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :where(button,a.btn,input[type="submit"],input[type="button"],input[type="reset"]):where(:not(.module-nav > .btn)):where(:not(.access-locked):not(.no-access):not(.customer-tree-row):not([data-photo-jump]):not(.sigeko-theme-icon):not(.favorite-edit):not(.task-toggle):not(.task-snooze):not(.weekly-project-toggle):not(.weekly-hidden-toggle):not(.weekly-overview-toggle):not(.home-weekly-toggle):not(.complaint-position-badge):not(.photo-position-badge):not(.package-position):not(.ref-project-toggle):not(.sigeko-week-row)) {
    appearance:none!important;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:6px;
    min-height:var(--ui-control-height,42px)!important;padding:9px 12px!important;border:1px solid var(--action-line)!important;border-radius:var(--action-radius)!important;
    background:var(--action-neutral)!important;color:var(--action-neutral-text)!important;box-shadow:none!important;text-shadow:none!important;filter:none!important;
    font:400 var(--ui-control-font-size,13px)/1.2 Arial,Helvetica,sans-serif!important;text-decoration:none!important;transition:background-color .15s ease,border-color .15s ease,color .15s ease,filter .15s ease;
  }
  body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(button.primary,a.btn.primary,input.primary):not(.access-locked):not(.no-access) {
    border:1px solid transparent!important;color:#fff!important;font-weight:700!important;
  }
  body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(button.primary,a.btn.primary,input.primary):not(.access-locked):not(.no-access) {background:var(--action-primary)!important;}
  body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(button.danger,a.btn.danger,button[data-discard]):not(.access-locked):not(.no-access) {background:var(--action-danger-bg)!important;border-color:var(--action-danger-line)!important;color:var(--action-danger)!important;font-weight:400!important;}
  body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(button.primary,a.btn.primary,input.primary):not(.access-locked):not(.no-access):not(:disabled):not([aria-disabled="true"]):hover {background:var(--action-primary-hover)!important;}
  body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(button.danger,a.btn.danger,button[data-discard]):not(.access-locked):not(.no-access):not(:disabled):not([aria-disabled="true"]):hover {background:var(--action-danger-bg-hover)!important;border-color:var(--action-danger-hover)!important;color:var(--action-danger-hover)!important;}
  /* Appweites Hover-Feedback mit einem Eigentümer, ohne Schlagschatten. */
  body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :where(button,a.btn,input[type="submit"],input[type="button"],input[type="reset"]):where(:not(.access-locked):not(.no-access):not(.customer-tree-row):not([data-photo-jump]):not(.favorite-edit):not(.task-toggle):not(.task-snooze):not(.weekly-project-toggle):not(.weekly-hidden-toggle):not(.weekly-overview-toggle):not(.home-weekly-toggle):not(.complaint-position-badge):not(.photo-position-badge):not(.package-position):not(.ref-project-toggle):not(.sigeko-week-row)):not(:disabled):not([aria-disabled="true"]):hover{filter:brightness(.96)!important;}
  html[data-theme="dark"] body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :where(button,a.btn,input[type="submit"],input[type="button"],input[type="reset"]):where(:not(.access-locked):not(.no-access):not(.customer-tree-row):not([data-photo-jump]):not(.favorite-edit):not(.task-toggle):not(.task-snooze):not(.weekly-project-toggle):not(.weekly-hidden-toggle):not(.weekly-overview-toggle):not(.home-weekly-toggle):not(.complaint-position-badge):not(.photo-position-badge):not(.package-position):not(.ref-project-toggle):not(.sigeko-week-row)):not(:disabled):not([aria-disabled="true"]):hover{filter:brightness(1.08)!important;}
  body :is(button,.btn,input[type="submit"],input[type="button"],input[type="reset"])[hidden] {display:none!important;}
  body :is(button,.btn,input[type="submit"],input[type="button"],input[type="reset"]):disabled {opacity:.55!important;cursor:not-allowed!important;}
  body :is(button,.btn,input[type="submit"],input[type="button"],input[type="reset"]):focus-visible {outline:3px solid var(--ui-green,#198b3d)!important;outline-offset:3px!important;}
}
@media screen and (pointer:coarse) {body :is(.wrap,.panel,dialog,.sigeko-leave-card) :is(button,.btn,input[type="submit"],input[type="button"],input[type="reset"]):not([data-photo-jump]):not(.customer-tree-row):not(.package-position){min-height:44px!important;}}
@media(prefers-reduced-motion:reduce){body :where(.wrap,.panel,dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(button,.btn,input[type="submit"],input[type="button"],input[type="reset"]){transition:none!important;}}
}

/* Gemeinsame Schriftverkehrslisten und serverseitige Modul-Entwürfe.
   Darstellung ausschließlich hier; project-drafts.js erzeugt nur noch Struktur. */
@media screen{
#moduleDraftBox{
  margin:10px 0 16px;
  padding:0;
  border:0;
  border-radius:12px;
  background:transparent;
  
  font-size:12px;
  line-height:1.4;
}
#moduleDraftBox [data-draft-title]{font-weight:700;margin-bottom:4px;color:#66758a}
#moduleDraftBox [data-draft-status]{color:#66758a}
#moduleDraftBox [data-draft-list]{margin-top:5px;color:#66758a}
#moduleDraftBox .module-draft-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--ui-line,#e4e7eb);padding:5px 0}
#moduleDraftBox .module-draft-row>span{flex:1;min-width:0}
#moduleLeaveDialog .sigeko-leave-card{max-height:calc(100vh - 24px);overflow:auto}
#moduleLeaveDialog .sigeko-leave-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
#moduleLeaveDialog .sigeko-leave-actions .primary{font-weight:700}
[data-letter-temp-manager],
#moduleDraftBox,
#draftStatus,
[data-letter-temp-manager] .letter-manager-head,
[data-letter-temp-manager] .letter-manager-head strong,
[data-letter-temp-manager] .letter-count,
[data-letter-temp-manager] .letter-entry-main,
[data-letter-temp-manager] .letter-entry-main strong,
[data-letter-temp-manager] .letter-entry-main small,
[data-letter-temp-manager] .letter-empty{color:#66758a!important}
@media(max-width:520px){
  #moduleDraftBox .module-draft-row>span{flex-basis:100%!important}
  #moduleDraftBox .module-draft-row button{flex:1 1 120px;min-height:44px}
  #moduleLeaveDialog{padding:12px!important;align-items:flex-end!important}
  #moduleLeaveDialog .sigeko-leave-card{padding:15px!important;border-radius:8px 8px 0 0!important;width:100%!important;max-width:none!important}
  #moduleLeaveDialog .sigeko-leave-actions{display:grid;grid-template-columns:1fr}
  #moduleLeaveDialog .sigeko-leave-actions button{width:100%;min-height:46px}
}
}

/* ==================================================================
   HTML-Dokumentmodule: zentraler Dark-Mode-Standard
   Single Source of Truth für alle module-shell-Seiten.
   Moduldateien enthalten keine eigenen Dark-Mode-Regeln mehr.
   Dokument-/PDF-/Preview-Flächen werden hiervon nicht verändert.
   ================================================================== */
@media screen {
  

  

  

  /* Gemeinsame Karten-/Arbeitsflächen in der linken Bedienoberfläche. */
  

  
  

  /* Navigation. */
  
  
  

  /* Eingaben. */
  
  

  /* Buttons. */
  
  
  
  
  

  /* Modulübergreifende Spezial-Komponenten, aber weiterhin zentral gestylt. */
  
  
  
  
  
  
  

  /* Kassenbericht: derselbe Dark-Mode-Standard wie die übrigen Module.
     Desktop-Tabelle darf Zeilen leicht staffeln; im responsiven Kartenlayout
     bleiben Zellen transparent, damit keine dunklen Balken hinter Labels entstehen. */
  
  
  @container cash-editor (min-width:1321px){
    
  }
  @container cash-editor (max-width:1320px){
    
  }


  /* Kassenbericht: Hilfstexte und Mobil-Labels folgen dem zentralen Standard. */
  

  /* Typografie. */
  
  
}


/* ==================================================================
   HTML-Module – UI-Konsolidierung
   Nur Bedienoberfläche in .panel; Dokument-/Preview-Geometrie bleibt unberührt.
   ================================================================== */

/* Einheitliche Checkbox-Geometrie in allen HTML-Modulen.
   Fachliche Gruppen duerfen ihr Grid/Flex-Layout behalten; Groesse und vertikale
   Ausrichtung der eigentlichen Checkbox kommen ausschliesslich zentral. */


/* Gemeinsame Grid-Eingabezeilen: intrinsische Feldbreiten dürfen keine Nachbarspalte überlagern. */


/* Einheitliche Desktop-Typografie für alle HTML-Module.
   Verhindert unterschiedliche Schriftgrößen durch ältere modulinterne Media-Queries
   (u. a. Angebote/Nachträge). */


/* Der zentrale Dark-Mode-Standard wird für gemeinsame UI-Komponenten vervollständigt.
   Keine Moduldatei erhält dafür eigene Dark-Regeln. */
@media screen{
  

  /* SiGePlan: Auswahl der Bausteinpakete soll im Dark Mode keine
     zusaetzliche dunkle Rechteckflaeche innerhalb des Panels bilden. */
  

  /* Vorankündigung / gespeicherte Stände */
  
  

  /* Baustellenordnung + Präsentation: Vorlagenkarten identisch lesbar. */
  
  
  
  

  /* Sonstiges: contenteditable ist kein input/textarea und braucht deshalb
     denselben zentralen Eingabe-Standard explizit. */
  
  

  /* Allgemeine Sekundärtexte im Dark Mode nicht mit alten Light-Farben anzeigen. */
  
}



/* PSA-Auswahlkarten: zwei kompakte Aktionszeilen.
   "Verpflichtend / Bei Bedarf" bleibt ein Inhaltsschalter; ↑ / ↓ / × stehen darunter. */



/* HTML-Module: Aktionsbuttons und Sekundärtexte im Dark Mode.
   Gilt zentral auch für dynamisch erzeugte Öffnen/Löschen-Leisten
   (Bestellungen, Entwürfe, Archive usw.). */
@media screen{
  

  

  

  

  /* Gemeinsame Sekundär-/Hinweistexte ausreichend kontrastreich. */
  
}

/* Zentralisierte JS-UI-Reste: Auth-/iPhone-Kompatibilität.
   Keine dynamisch injizierten <style>-Blöcke mehr aus auth.js/ui-mobile.js. */
@media screen{
  
  html.sigeko-iphone-preview-text-fix .preview-wrap .page,
  html.sigeko-iphone-preview-text-fix .preview-wrap .order-page,
  html.sigeko-iphone-preview-text-fix .preview-wrap .reference-page,
  html.sigeko-iphone-preview-text-fix .preview-wrap .invoice-page{
    -webkit-text-size-adjust:100%!important;
    text-size-adjust:100%!important;
  }
}


/* Begehungsbericht: temporäre Entwürfe nutzen dieselbe zentrale UI-/Dark-Mode-Logik
   statt Inline-Farben und Inline-Flexdefinitionen aus bericht.js. */



/* Schriftverkehr: zentrale Seitenteilung statisch statt Laufzeit-<style> aus schriftverkehr.js. */
[data-correspondence-template]{display:none!important}
    .correspondence-rendered,.correspondence-continuation{display:block!important}
    .correspondence-continuation{width:210mm;height:297mm;background:#fff;margin:0 auto 16px;box-shadow:0 2px 14px rgba(0,0,0,.16);position:relative;overflow:hidden;color:#111;font-family:Arial,Helvetica,sans-serif}
    .correspondence-page-title{position:absolute;left:25.012mm;right:19.95mm;top:30.14mm;font-size:9.96pt;line-height:1.145;text-align:center;font-weight:400}
    .correspondence-flow{position:absolute;left:25.012mm;right:19.95mm;top:42.55mm;font-size:9.96pt;line-height:1.145;white-space:pre-wrap}
    .correspondence-flow.rich-output{white-space:normal}
    .correspondence-flow.rich-output img{display:block;max-width:100%;height:auto;margin:3mm 0}
    .correspondence-continuation .closing{margin-top:6mm;white-space:pre-wrap}
    .correspondence-continuation .attachments-table{width:100%;border-collapse:collapse;margin-top:3mm;font-size:8.5pt}
    .correspondence-continuation .attachments-table th,.correspondence-continuation .attachments-table td{border:1px solid #777;padding:1.5mm 2mm;text-align:left;vertical-align:top}
    @media print{[data-correspondence-template]{display:none!important}.correspondence-rendered,.correspondence-continuation{box-shadow:none!important;margin:0!important;break-after:page;page-break-after:always}.correspondence-rendered:last-child,.correspondence-continuation:last-child{break-after:auto;page-break-after:auto}}

/* Gemeinsame JS-UI ohne Inline-Styles */
.sigeko-auth-error{font-family:Arial,sans-serif;max-width:760px;margin:50px auto;padding:20px}
.sigeko-pdf-share-overlay{position:fixed;inset:0;z-index:2147483647;background:rgba(0,0,0,.42);display:flex;align-items:flex-end;justify-content:center;padding:18px;font-family:Arial,Helvetica,sans-serif}
.sigeko-pdf-share-panel{width:min(520px,100%);background:#fff;color:#111;border-radius:12px;padding:16px;box-shadow:0 8px 32px rgba(0,0,0,.3)}
.sigeko-pdf-share-text{font-size:14px;font-weight:700;margin:0 0 12px;overflow-wrap:anywhere}
.sigeko-pdf-share-primary,.sigeko-pdf-share-cancel{width:100%;font:inherit}
.sigeko-pdf-share-primary{padding:12px;border:1px solid #222;border-radius:8px;background:#222;color:#fff;font-weight:700}
.sigeko-pdf-share-cancel{margin-top:8px;padding:10px;border:1px solid #aaa;border-radius:8px;background:#fff;color:#111}

/* Modulnavigation: Beschriftungen bleiben kompakt; Umbruch erfolgt zwischen Buttons. */


/* Fachmodule: gemeinsame Entwurfs- und Archivdarstellung.
   Schriftverkehr folgt der SiGePlan-Projektbox; gespeicherte Fachdatensätze
   verwenden exakt die vorhandene Bestellkarten-Struktur. */
@media screen{
  
  
  
  

  
  
  
  
  

  /* Temporäre Entwürfe bleiben als eigene Statuskarte analog SiGePlan. */
  

  /* Rechnungs-Bestellkarten sind echte Bestellkarten; das <label>-Element darf
     keine eigene Formular-Typografie oder Außenabstände einbringen. */
  

  /* Rechnungen: Begehungspreis und Übernahmeaktion als gemeinsame Eingabezeile. */
  
  
  


  
}


/* Systempflege: temporäre Vorlagenentwürfe verwenden dieselbe Kartenbasis. */
@media screen{
  .page-vorlagen [data-template-temp-manager]{font-size:12px;line-height:1.4}
  .page-vorlagen [data-template-temp-manager] .letter-manager-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}
  .page-vorlagen [data-template-temp-manager] .letter-manager-head strong{font-size:12px;font-weight:700}
  .page-vorlagen [data-template-temp-manager] .letter-count{font-size:11px;color:var(--ui-muted,#66758a)}
  .page-vorlagen [data-template-temp-manager] .letter-empty{font-size:11.5px;color:var(--ui-muted,#66758a);padding:5px 0}
  .page-vorlagen [data-template-temp-list]{display:grid;gap:6px}
  .page-vorlagen [data-template-temp-list] .order-entry{
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;
    border:1px solid var(--ui-line,#dce2e7);border-radius:9px;padding:8px 9px;background:var(--ui-card,#fff);min-width:0
  }
  .page-vorlagen [data-template-temp-list] .order-entry strong{display:block;font-size:12px}
  .page-vorlagen [data-template-temp-list] .order-entry small{display:block;margin-top:2px;font-size:10.5px;color:var(--ui-muted,#66758a)}
  .page-vorlagen [data-template-temp-list] .order-entry-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
}
@media screen and (max-width:560px){
  .page-vorlagen [data-template-temp-list] .order-entry{grid-template-columns:1fr}
  .page-vorlagen [data-template-temp-list] .order-entry-actions{justify-content:stretch}
  .page-vorlagen [data-template-temp-list] .order-entry-actions>*{flex:1 1 120px}
}


/* E-Rechnung / XRechnung – strukturierte Anzeige im bestehenden Dokumentviewer. */
  
  .xinvoice-shell{max-width:1180px;margin:0 auto;padding:18px}
  .xinvoice-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;padding:10px 12px;background:#fff;border:1px solid #d7dee5;border-radius:12px}
  .xinvoice-toolbar>div:first-child{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
  .xinvoice-toolbar strong{font-size:14px}
  .xinvoice-toolbar span{font-size:12px;color:#68778a}
  .xinvoice-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
  .xinvoice-toolbar .btn{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 10px;border:1px solid #ccd7df;border-radius:10px;background:#fff;color:#111;text-decoration:none;font-size:12px}
  .xinvoice-card{background:#fff;border:1px solid #d7dee5;border-radius:14px;padding:22px;box-shadow:0 8px 26px rgba(15,23,42,.08)}
  .xinvoice-title{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:16px;border-bottom:1px solid #dce2e7}
  .xinvoice-title h1{margin:3px 0 0;font-size:24px;line-height:1.15}
  .xinvoice-kicker{display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#64748b}
  .xinvoice-format{display:inline-flex;align-items:center;border-radius:999px;padding:6px 9px;background:#e8f6ec;color:#176f36;font-size:11px;font-weight:700;white-space:nowrap}
  .xinvoice-meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
  .xinvoice-meta-grid>div{padding:10px 11px;background:#f8fafb;border:1px solid #e1e7ec;border-radius:10px;min-width:0}
  .xinvoice-meta-grid span{display:block;margin-bottom:4px;font-size:10.5px;color:#68778a}
  .xinvoice-meta-grid strong{display:block;font-size:12.5px;overflow-wrap:anywhere}
  .xinvoice-parties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 18px}
  .xinvoice-parties>div{padding:13px 14px;border:1px solid #e1e7ec;border-radius:10px;background:#fff}
  .xinvoice-card h2{margin:0 0 9px;font-size:14px}
  .xinvoice-parties p{margin:3px 0;font-size:12.5px;line-height:1.45}
  .xinvoice-parties .muted{color:#68778a;font-size:11px}
  .xinvoice-table-wrap{overflow:auto;border:1px solid #dce2e7;border-radius:10px}
  .xinvoice-table{width:100%;border-collapse:collapse;font-size:12px}
  .xinvoice-table th,.xinvoice-table td{padding:9px 10px;border-bottom:1px solid #e5e9ed;text-align:left;vertical-align:top}
  .xinvoice-table th{background:#f7f9fb;font-size:10.5px;color:#546173;white-space:nowrap}
  .xinvoice-table tbody tr:last-child td{border-bottom:0}
  .xinvoice-table .num{text-align:right;white-space:nowrap}
  .xinvoice-empty{text-align:center!important;color:#68778a;padding:18px!important}
  .xinvoice-summary{width:min(440px,100%);margin:18px 0 0 auto;border-top:1px solid #cfd7de}
  .xinvoice-summary>div{display:grid;grid-template-columns:1fr auto;gap:20px;padding:7px 0;font-size:12.5px}
  .xinvoice-summary .total{border-top:1px solid #94a0ac;margin-top:2px;padding-top:10px;font-size:14px}
  .xinvoice-note{margin-top:18px;padding-top:12px;border-top:1px solid #e1e7ec;color:#68778a;font-size:10.5px;line-height:1.45}
  .xinvoice-source-note{margin-bottom:10px;padding:10px 12px;border:1px solid #d7dee5;border-radius:10px;background:#fff8e7;color:#6b5315;font-size:11px}
  .xinvoice-source{margin:0;padding:14px;border:1px solid #d7dee5;border-radius:10px;background:#fff;font:11px/1.45 Consolas,"SFMono-Regular",Menlo,monospace;white-space:pre;overflow:auto;tab-size:2}
@media screen and (max-width:760px){
  .xinvoice-shell{padding:10px}
  .xinvoice-card{padding:14px}
  .xinvoice-title{flex-direction:column}
  .xinvoice-meta-grid,.xinvoice-parties{grid-template-columns:1fr}
  .xinvoice-toolbar-actions{width:100%}
  .xinvoice-toolbar-actions .btn{flex:1 1 160px}
}
@media print{
  
  .xinvoice-shell{max-width:none;padding:0}
  .xinvoice-toolbar{display:none}
  .xinvoice-card{border:0;box-shadow:none;padding:0}
  .xinvoice-table-wrap{overflow:visible}
  .xinvoice-table tr,.xinvoice-parties>div,.xinvoice-meta-grid>div{break-inside:avoid}
}

html[data-theme="dark"] .xinvoice-toolbar,html[data-theme="dark"] .xinvoice-card,html[data-theme="dark"] .xinvoice-parties>div,html[data-theme="dark"] .xinvoice-source{background:#22252b;border-color:#4b535f;color:#f2f5f8}
html[data-theme="dark"] .xinvoice-toolbar .btn{background:#303742;border-color:#5e6875;color:#f4f7fa}
html[data-theme="dark"] .xinvoice-toolbar span,html[data-theme="dark"] .xinvoice-meta-grid span,html[data-theme="dark"] .xinvoice-parties .muted,html[data-theme="dark"] .xinvoice-note{color:#c0c8d2}
html[data-theme="dark"] .xinvoice-meta-grid>div,html[data-theme="dark"] .xinvoice-table th{background:#292d34;border-color:#4b535f;color:#e3e8ee}
html[data-theme="dark"] .xinvoice-title,html[data-theme="dark"] .xinvoice-table-wrap,html[data-theme="dark"] .xinvoice-table th,html[data-theme="dark"] .xinvoice-table td,html[data-theme="dark"] .xinvoice-summary,html[data-theme="dark"] .xinvoice-note{border-color:#4b535f}
html[data-theme="dark"] .xinvoice-source-note{background:#3a301f;border-color:#665532;color:#ffe0a3}

/* Auftragsliste / Rechnungskontrolle: Suche und Eingabe-/Finanzkarte stehen vor der
   Jahresauswahl; die Jahresauswahl gehört optisch zur jeweiligen Tabelle. */






/* Gemeinsame Dokumentabschlüsse: finale Maschinenhinweise / Kurzbrief-Unterzeichner. */
.accounting-machine-note{position:absolute;left:25.012mm;right:19mm;top:250.5mm;font-size:7.2pt;line-height:1.12;color:#111}
body[data-letter-module="kurzbrief"] .brief-signer{display:inline-block;margin-top:3.2mm;font-size:6pt;line-height:1.1}

/* Einheitliche kompakte Entfernen-Schaltfläche für bestehende ×-Aktionen. */
.icon-delete{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;border-radius:14px!important;font-size:21px!important;font-weight:700!important;line-height:1!important}

/* Empfangene E-Rechnungen: rein flüchtige Lese-/PDF-Ansicht ohne Archivierung. */
.einvoice-reader-page .einvoice-upload-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin-top:12px}
.einvoice-reader-page .einvoice-upload-row input[type=file]{width:100%}
.einvoice-reader-page .einvoice-note{font-size:12px;color:var(--ui-muted,#66758a);line-height:1.45;margin-top:8px}
.einvoice-reader-page p.einvoice-note{font-size:13px}
.einvoice-reader-page .einvoice-document{margin-top:16px}
.einvoice-reader-page .einvoice-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:12px;border-bottom:1px solid var(--ui-line,#dce2e7)}
.einvoice-reader-page .einvoice-head h1{margin:0}
.einvoice-reader-page .einvoice-format{font-size:12px;font-weight:700;white-space:nowrap}
.einvoice-reader-page .einvoice-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}
.einvoice-reader-page .einvoice-meta>div{border:1px solid var(--ui-line,#dce2e7);border-radius:9px;padding:9px;background:var(--ui-card,#fff)}
.einvoice-reader-page .einvoice-meta span{display:block;color:var(--ui-muted,#66758a);font-size:10.5px}
.einvoice-reader-page .einvoice-meta strong{display:block;margin-top:3px;font-size:12px;overflow-wrap:anywhere}
.einvoice-reader-page .einvoice-parties{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
.einvoice-reader-page .einvoice-parties>div{border:1px solid var(--ui-line,#dce2e7);border-radius:9px;padding:10px;background:var(--ui-card,#fff)}
.einvoice-reader-page .einvoice-table-wrap{overflow:auto}
.einvoice-reader-page .einvoice-table{width:100%;border-collapse:collapse;font-size:12px}
.einvoice-reader-page .einvoice-table th,.einvoice-reader-page .einvoice-table td{padding:8px;border-bottom:1px solid var(--ui-line,#e5e9ed);text-align:left;vertical-align:top}
.einvoice-reader-page .einvoice-table .num{text-align:right;white-space:nowrap}
.einvoice-reader-page .einvoice-totals{margin:14px 0 0 auto;max-width:430px;display:grid;gap:6px}
.einvoice-reader-page .einvoice-totals>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:7px 8px;border-bottom:1px solid var(--ui-line,#dce2e7)}
.einvoice-reader-page .einvoice-totals .total{font-weight:700;border-top:1px solid var(--ui-text,#132238)}
.einvoice-reader-page .einvoice-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-top:12px}
.einvoice-reader-page .einvoice-actions form{display:flex;justify-content:flex-end}
@media screen and (max-width:760px){
  .einvoice-reader-page .einvoice-upload-row{grid-template-columns:1fr}
  .einvoice-reader-page .einvoice-meta{grid-template-columns:1fr 1fr}
  .einvoice-reader-page .einvoice-parties{grid-template-columns:1fr}
}
@media screen and (max-width:560px){.einvoice-reader-page .einvoice-meta{grid-template-columns:1fr}}
@media print{
  .einvoice-reader-page .einvoice-screen-only,.einvoice-reader-page .page-footer{display:none!important}
  .einvoice-reader-page .wrap{max-width:none!important;margin:0!important;padding:0!important}
  .einvoice-reader-page .card{box-shadow:none!important;border:0!important;margin:0!important;padding:0!important}
}

/* Firmenauswahl in der Vorankündigung nutzt das bestehende Modulraster. */
.company-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:end;margin:7px 0}
.company-picker label{display:grid;gap:4px}
@media screen and (max-width:560px){.company-picker{grid-template-columns:1fr}}

/* SiGePlan: Paketkopf ohne Textüberlagerungen im Editor. */










/* Installierte iPhone/iPad-Web-App: lokale Geräteentsperrung nach Inaktivität. */
.sigeko-mobile-lock{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(20,24,30,.62);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.sigeko-mobile-lock[hidden]{display:none}
.sigeko-mobile-lock-card{width:min(420px,100%);box-sizing:border-box;padding:28px;border:1px solid var(--ui-line);border-radius:20px;background:var(--ui-surface);color:var(--ui-text);box-shadow:0 22px 70px rgba(0,0,0,.28);text-align:center}
.sigeko-mobile-lock-card h1{margin:8px 0 10px;font-size:24px;line-height:1.2}
.sigeko-mobile-lock-card p{margin:0 0 20px;line-height:1.45;color:var(--ui-muted)}
.sigeko-mobile-lock-icon{font-size:38px;line-height:1}
.sigeko-mobile-lock-card button{min-height:48px;width:100%}

/* Gemeinsamer Speicherstatus und benutzergebundene Offline-Warteschlange. */
@media screen{
  .sigeko-save-state{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center;padding:10px 12px;margin:0 0 12px;border:1px solid var(--ui-line,#ccd7df);border-left:4px solid #64748b;border-radius:12px;background:var(--ui-surface,#fff);color:var(--ui-text,#172331);font:13px/1.4 Arial,sans-serif}
  .sigeko-save-state span{overflow-wrap:anywhere}
  .sigeko-save-state[data-state="saved"]{border-left-color:#218447}
  .sigeko-save-state[data-state="saving"]{border-left-color:#42618f}
  .sigeko-save-state[data-state="dirty"],.sigeko-save-state[data-state="local"]{border-left-color:#b7791f}
  .sigeko-save-state[data-state="error"]{border-left-color:#c43d3d}
  .sigeko-offline-queue{margin:10px 0 16px;padding:12px;border:1px solid var(--ui-line,#ccd7df);border-radius:12px;background:var(--ui-surface,#fff);color:var(--ui-text,#172331);font-size:13px;line-height:1.4}
  .sigeko-offline-queue summary{cursor:pointer;font-weight:700;min-height:32px}
  .sigeko-queue-row{padding:12px 0;border-top:1px solid var(--ui-line,#ccd7df);overflow-wrap:anywhere}
  .sigeko-queue-row p{margin:6px 0}
  .sigeko-queue-actions{display:flex;gap:8px;flex-wrap:wrap}
}
@media print{.sigeko-save-state,.sigeko-offline-queue{display:none!important}}
.sigeko-mobile-lock-status{min-height:20px;margin-top:12px;font-size:13px;line-height:1.4;color:var(--ui-danger)}

/* Ohne Authentik steht der Schalter als eigenes Element rechts im Header. */
@media screen{
  .wrap > .top.theme-picker-standalone-host{
    flex-direction:row!important;
    align-items:center!important;
  }
  .wrap > .top.theme-picker-standalone-host > .sigeko-theme-picker{
    margin-left:auto!important;
    flex:0 0 auto;
  }
}

/* Systemstatus: nur fachliche Anordnung; Shell und Controls sind gemeinsam. */
.page-systemstatus h1{font-size:30px;margin:0 0 8px}.page-systemstatus h2{font-size:21px;margin:0 0 16px}.page-systemstatus h3{font-size:17px;margin:8px 0;line-height:1.35}
.page-systemstatus .status-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.page-systemstatus .status-heading form{margin:0}.page-systemstatus .status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px}
.page-systemstatus .status-tile{min-width:0;padding:16px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);overflow-wrap:anywhere}
.page-systemstatus .status-tile p{line-height:1.5}.page-systemstatus .status-kicker{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ui-muted)}
.page-systemstatus .status-badge{display:inline-flex;padding:4px 9px;border:1px solid currentColor;border-radius:8px;font-weight:700;color:var(--ui-muted)}
.page-systemstatus .status-badge[data-state=ok]{color:var(--ui-green);background:var(--ui-green-soft)}
.page-systemstatus .status-badge:is([data-state=warning],[data-state=not_configured]){color:var(--ui-warn-text);background:var(--ui-warn-bg)}
.page-systemstatus .status-badge:is([data-state=critical],[data-state=unavailable],[data-state=unreachable],[data-state=http_error],[data-state=invalid_config],[data-state=missing_extension]){color:var(--ui-danger);background:var(--ui-danger-bg)}
.page-systemstatus .status-note{color:var(--ui-muted);font-size:13px;line-height:1.5}.page-systemstatus .status-table-wrap{overflow-x:auto}.page-systemstatus table{width:100%;border-collapse:collapse;text-align:left}.page-systemstatus th,.page-systemstatus td{padding:10px;border-bottom:1px solid var(--ui-line);vertical-align:top;overflow-wrap:anywhere}
.page-systemstatus .status-check{display:flex;align-items:center;gap:8px;margin:14px 0;line-height:1.5}.page-systemstatus .status-check input{width:18px;height:18px;flex:0 0 auto}.page-systemstatus .status-preview{margin-top:20px}.page-systemstatus code{overflow-wrap:anywhere}
@media(max-width:760px){.page-systemstatus h1{font-size:26px}.page-systemstatus .status-heading{align-items:flex-start}.page-systemstatus .status-grid{grid-template-columns:minmax(0,1fr)}.page-systemstatus .status-table-wrap{font-size:12px}}

/* Bauherrenauswahl: freigegebene bisherige Geometrie, in der zentralen Datei geschützt. */


/* Systemwartung: Rückmeldungen und Vorschau in beiden Farbschemata. */
.page-systemstatus .status-message{padding:14px 18px;margin:0 0 16px;border:1px solid currentColor;border-left-width:4px;border-radius:14px;font-weight:600;line-height:1.5}
.page-systemstatus .status-message[data-kind=success]{background:var(--ui-green-soft);color:var(--ui-green-strong)}
.page-systemstatus .status-message[data-kind=error]{background:var(--ui-danger-bg);color:var(--ui-danger)}
.page-systemstatus .status-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.page-systemstatus .status-summary>div{padding:14px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface)}
.page-systemstatus .status-summary dt{font-size:13px;color:var(--ui-muted)}
.page-systemstatus .status-summary dd{margin:6px 0 0;font-size:22px;font-weight:700;overflow-wrap:anywhere}
.page-systemstatus .status-table-wrap{border:1px solid var(--ui-line);border-radius:12px}
.page-systemstatus .status-table-wrap th{background:var(--ui-green-soft);font-size:13px;font-weight:700;padding:14px 16px}
.page-systemstatus .status-table-wrap td{padding:14px 16px}
.page-systemstatus .status-table-wrap tr:last-child td{border-bottom:0}
.page-systemstatus .status-number{text-align:right;white-space:nowrap}
.page-systemstatus .status-empty{text-align:center;color:var(--ui-muted)}
@media(max-width:480px){.page-systemstatus .status-summary{grid-template-columns:1fr}.page-systemstatus .status-summary>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.page-systemstatus .status-summary dd{margin:0;font-size:20px}}

.page-systemstatus .status-heading>.nav-block{flex:1 1 240px;width:auto}
html[data-theme="dark"] .page-systemstatus .status-message[data-kind=success]{color:#a5e8b8}

.page-systemstatus .status-refresh-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.page-systemstatus .status-refresh-row .status-note{margin:0}
.page-systemstatus .status-service-heading{margin-bottom:4px}
.page-systemstatus .status-service-heading h2{margin-bottom:0}
.page-systemstatus .status-service-heading+.status-note{margin-top:4px}

/* Beschriftete Messbalken: Zahlen bleiben auf Füllung und Hintergrund lesbar. */
.page-systemstatus .status-gauge{position:relative;height:46px;margin-top:12px;border:1px solid var(--ui-line);border-radius:10px;overflow:hidden;background:#edf2ef}
.page-systemstatus .status-gauge meter{display:block;width:100%;height:100%;appearance:none;-webkit-appearance:none;border:0;background:transparent}
.page-systemstatus .status-gauge meter::-webkit-meter-bar{height:100%;background:#edf2ef;border:0;border-radius:0;box-shadow:none}
.page-systemstatus .status-gauge meter::-webkit-meter-optimum-value{background:#a9dfb8}
.page-systemstatus .status-gauge meter::-moz-meter-bar{background:#a9dfb8}
.page-systemstatus .status-gauge-label{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px 6px;color:#12341d;pointer-events:none;text-align:center;line-height:1.2}
.page-systemstatus .status-gauge-label strong{font-size:12px}.page-systemstatus .status-gauge-label small{font-size:11px}
html[data-theme="dark"] .page-systemstatus .status-gauge{background:#26332c}
html[data-theme="dark"] .page-systemstatus .status-gauge meter::-webkit-meter-bar{background:#26332c}
html[data-theme="dark"] .page-systemstatus .status-gauge meter::-webkit-meter-optimum-value{background:#376647}
html[data-theme="dark"] .page-systemstatus .status-gauge meter::-moz-meter-bar{background:#376647}
html[data-theme="dark"] .page-systemstatus .status-gauge-label{color:#f0fff4}
/* Folienübersicht ist ausschließlich der Aufklapper für schmale Ansichten. */



/* Zentrale Suche und feldnahe Validierung. */
.ui-field-error{display:block;font-size:12px;line-height:1.4;color:var(--ui-danger,#a52b2b);margin:5px 0 8px}
[aria-invalid=true]{outline:2px solid var(--ui-danger,#a52b2b);outline-offset:1px}
a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--ui-green,#1a8e3c);outline-offset:3px}

/* Baustellendokumente verwenden die gemeinsamen Schriftverkehrslisten. */








/* Verbindliche gespeicherte Dokumentlisten: Baustellen, Buchhaltung und
   Schriftverkehr. Nur markierte Listen, niemals Auswahlkarten oder Druckseiten.
   Aktionen stehen unabhängig von ihrer Anzahl unter den Dokumentdaten.
   Die benannte Ebene gibt diesen wichtigen Komponentenregeln Vorrang vor
   historischen ungeschichteten !important-Modulregeln. */
@layer saved-documents{
@media screen{
  body [data-document-manager]{--manager-bg:#fff;--manager-line:#ccc;--manager-text:#132238;--manager-muted:#66758a;display:block!important;box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;margin:0 0 12px!important;padding:9px!important;border:1px solid var(--manager-line)!important;border-radius:6px!important;background:var(--manager-bg)!important;color:var(--manager-text)!important;box-shadow:none!important;font-family:Arial,Helvetica,sans-serif!important}
  body [data-document-manager] .letter-active-project{margin:0 0 4px!important;padding:0!important}
  body [data-document-manager]{font-size:13px!important;line-height:1.4!important;text-align:left!important}
  body [data-document-manager]>:is(.status,.save-status,#ln-status){display:block!important}
  body [data-document-manager] .letter-entry{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;gap:6px!important;padding:6px 0!important;border-top:1px solid var(--manager-line)!important;background:transparent!important}
  body [data-document-manager] .letter-entry-main{min-width:0!important;overflow-wrap:anywhere}
  body [data-document-manager] .letter-entry-main strong{display:block!important;font-size:12px!important;line-height:1.35!important}
  body [data-document-manager] .letter-entry-main small{display:block!important;font-size:10.5px!important;line-height:1.35!important;margin-top:2px!important;color:var(--manager-muted)!important}
  body [data-document-manager] .letter-active-project strong{font-size:16px!important;font-weight:700!important;line-height:1.25!important;color:var(--manager-text)!important}
  body [data-document-manager]>:is(.status,.save-status,#ln-status){box-sizing:border-box!important;margin:7px 0 12px!important;padding:8px 9px!important;border:1px solid var(--manager-line)!important;border-radius:14px!important;background:#f8fafb!important;color:var(--manager-muted)!important;font-size:11.5px!important;font-weight:400!important;line-height:1.35!important}
  body [data-document-manager]>.status.saved{background:#eef8f1!important;border-color:#cfe2d5!important}
  body [data-document-manager]>.status.dirty{background:#fff8e8!important;border-color:#ead4ad!important}
  body [data-document-manager] #moduleDraftBox{display:contents!important}
  body [data-document-manager] .letter-manager{margin:10px 0 16px!important;padding:12px!important;border:1px solid var(--manager-line)!important;border-radius:18px!important;background:var(--manager-bg)!important;color:var(--manager-muted)!important}
  body [data-document-manager] .letter-manager-head{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:8px!important;margin:0 0 5px!important}
  body [data-document-manager] .letter-manager-head strong{font-size:12px!important;font-weight:700!important;line-height:1.35!important;margin:0!important}
  body [data-document-manager] .letter-count{font-size:11px!important;color:var(--manager-muted)!important}
  body [data-document-manager] :is(.letter-list,[data-draft-list]){display:grid!important;gap:6px!important;margin:0!important;padding:0!important}
  body [data-document-manager] :is(.letter-empty,#draftStatus){font-size:11.5px!important;line-height:1.35!important;padding:5px 0!important;margin:0!important;color:var(--manager-muted)!important}
  body [data-document-manager] [data-draft-status][hidden]{display:none!important}
  body [data-document-manager] .saved-documents-heading>.letter-count,body [data-document-manager] .saved-documents-heading>.mini{display:none!important}
  body [data-document-manager] [data-saved-documents]{display:flow-root!important}
  body [data-document-manager] [data-saved-documents] h2{margin:6px 0 8px!important}
  html[data-theme="dark"] body [data-document-manager]{--manager-bg:#292d34;--manager-line:#4b535f;--manager-text:#eef1f4;--manager-muted:#b9c0ca}
  html[data-theme="dark"] body [data-document-manager]>:is(.status,.save-status,#ln-status){background:#292d34!important}
  html[data-theme="dark"] body [data-document-manager]>.status.saved{background:#1f3527!important;color:#c8ead1!important;border-color:#477158!important}
  html[data-theme="dark"] body [data-document-manager]>.status.dirty{background:#3a301f!important;color:#ffe1a6!important;border-color:#856f41!important}
}
@media screen{
  body [data-saved-documents]{--saved-bg:#fff;--saved-line:#dce2e7;--saved-text:#132238;--saved-muted:#66758a;
    display:block!important;min-width:0;max-width:100%;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-family:Arial,Helvetica,sans-serif}
  body [data-saved-documents][hidden]{display:none!important}
  body [data-saved-documents] h2{font-size:18px!important;font-weight:700!important;line-height:1.25!important;margin:22px 0 8px!important;color:var(--saved-text)!important}
  body [data-saved-documents] .order-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important;margin:10px 0 16px!important;padding:0!important;border:0!important;max-height:360px!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
  body [data-saved-documents] .order-list>.order-entry{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;grid-template-columns:none!important;gap:8px!important;align-items:center!important;min-width:0!important;margin:0!important;padding:8px 9px!important;border:1px solid var(--saved-line)!important;border-radius:9px!important;background:var(--saved-bg)!important;color:var(--saved-text)!important;box-shadow:none!important}
  body [data-saved-documents] .order-entry>div:first-child{flex:1 1 220px!important;min-width:0!important;max-width:100%!important;overflow-wrap:anywhere}
  body [data-saved-documents] .order-entry strong{display:block!important;font-size:12px!important;line-height:1.35!important;font-weight:700!important;color:var(--saved-text)!important}
  body [data-saved-documents] .order-entry small{display:block!important;font-size:10.5px!important;line-height:1.35!important;font-weight:400!important;margin-top:2px!important;color:var(--saved-muted)!important;overflow-wrap:anywhere}
  body [data-saved-documents] .order-entry .order-entry-actions{display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:6px!important;min-width:0!important;width:auto!important;flex:0 1 auto!important;padding:3px!important;margin:0!important;background:transparent!important;flex-direction:row!important;flex-wrap:wrap!important;max-width:100%!important;overflow:visible!important;box-sizing:border-box!important}
  body [data-saved-documents] .order-entry .order-entry-actions>:is(button,a.btn){display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;white-space:nowrap!important;width:auto!important;max-width:100%!important;overflow-wrap:anywhere;}
  
  body [data-saved-documents] .order-empty{margin:0!important;padding:10px!important;border:1px dashed var(--saved-line)!important;border-radius:9px!important;background:var(--saved-bg)!important;color:var(--saved-muted)!important;font-size:11.5px!important;line-height:1.35!important}
  html[data-theme="dark"] body [data-saved-documents]{--saved-bg:#292d34;--saved-line:#4b535f;--saved-text:#eef1f4;--saved-muted:#b9c0ca;}
}
@media screen and (max-width:760px){body [data-saved-documents] h2{font-size:17px!important}}
@media screen and (max-width:560px){body [data-document-manager] .letter-entry{grid-template-columns:1fr 1fr!important}body [data-document-manager] .letter-entry-main{grid-column:1/-1!important}body [data-document-manager] .letter-entry>button{width:100%!important}}
}

/* SiGePlan-Bedienbereich: gut lesbare Hilfen und deaktivierte Kopieraktion. */
@layer saved-documents{

}


@layer saved-documents {
@media screen {
  body :is(.order-entry,.letter-entry,.archive-row).sigeko-current-entry,
  body [data-saved-documents] .order-list>.order-entry.sigeko-current-entry,
  body [data-document-manager] .letter-entry.sigeko-current-entry {
    background:#f5f7f9!important;border-color:var(--saved-line,var(--ui-line,#dce2e7))!important;box-shadow:none!important;
  }
  body tr.sigeko-current-entry:not(.processing-changed)>td {background:#f5f7f9!important;}
  body tr.sigeko-current-entry:not(.processing-changed)>td:first-child {box-shadow:none!important;}
  html[data-theme="dark"] body tr.sigeko-current-entry:not(.processing-changed)>td {background:#30363e!important;color:#e8f1f7!important;}
  html[data-theme="dark"] body :is(.order-entry,.letter-entry,.archive-row).sigeko-current-entry,
  html[data-theme="dark"] body [data-saved-documents] .order-list>.order-entry.sigeko-current-entry {background:#30363e!important;border-color:var(--saved-line,var(--ui-line,#4b535f))!important;box-shadow:none!important;}
}
}

/* Wochenplanung: gemeinsame .card-, .projects- und .project-Basis. */
.weekly-heading,.weekly-navigation{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.weekly-heading h2{font-size:24px;margin:0;color:var(--ui-text)}
.weekly-heading h2 small{font-size:13px;font-weight:400;color:var(--ui-muted)}
.weekly-summary{color:var(--ui-muted);margin:14px 0}
.weekly-overview .weekly-count{font-size:12px;line-height:1.4;margin:10px 0 16px}
.weekly-project{min-width:0;overflow-wrap:anywhere}
.weekly-badge{font-size:12px;font-weight:400;border-radius:8px;padding:4px 8px;background:#edf8f0;color:#176b32}
.weekly-badge.weekly-overdue{background:#fff0d8;color:#854814}
.weekly-work{display:grid;gap:5px;margin:16px 0 0;line-height:1.4;color:var(--ui-text);overflow-wrap:anywhere}
.weekly-work strong{font-size:15px;font-weight:700;line-height:1.3}
.weekly-work span{font-size:13px;color:var(--ui-muted)}
.weekly-work .weekly-work-reference{font-size:12px;font-weight:600;color:var(--ui-muted);overflow-wrap:anywhere}
.weekly-empty{color:var(--ui-muted)}


.todo-search{display:grid;gap:7px}.todo-search>label{font-size:13px;font-weight:700}
.todo-search>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.todo-search input{flex:1 1 230px;min-width:0;min-height:var(--ui-control-touch-height);padding:var(--ui-field-padding)}
.todo-section .weekly-heading .weekly-summary{margin:0;font-size:12px}
.todo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,295px),1fr));gap:16px;margin-top:16px}
.todo-project{display:flex;flex-direction:column;gap:9px;min-width:0;padding:17px;border:1px solid var(--ui-line);border-radius:var(--ui-dialog-radius);background:var(--ui-surface)}
.todo-project .project-no{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:17px;font-weight:700}
.todo-project .status-badge{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:700}
.todo-project .status-badge.running{background:#e6f6ea;color:#157735}
.todo-project .status-badge.paused{background:#fff0d2;color:#9b6500}
.todo-project .status-badge.completed{background:#e9edf0;color:#64748b}
html[data-theme="dark"] .todo-project .status-badge.running{background:#243b2d;color:#9ee3b0}
html[data-theme="dark"] .todo-project .status-badge.paused{background:#49331f;color:#ffdda7}
html[data-theme="dark"] .todo-project .status-badge.completed{background:#303943;color:#c2ced9}
.todo-project .object{margin:0;font-size:19px;line-height:1.35;overflow-wrap:anywhere}
.todo-project .address{margin:0;color:var(--ui-muted);font-size:13px;overflow-wrap:anywhere}
.todo-project .todo-missing{display:flex;flex-wrap:wrap;gap:6px}.todo-project .todo-missing .project-document-badge{margin:0}
.todo-project .actions{margin-top:auto;padding-top:12px}






.billing-rule-fields input,.billing-rule-fields select{box-sizing:border-box;width:100%;min-height:var(--ui-control-touch-height);padding:var(--ui-field-padding);border:1px solid var(--ui-line);border-radius:var(--ui-field-radius);background:var(--ui-surface);color:var(--ui-text);font:inherit}
.billing-rule-fields{display:grid;gap:16px;max-width:600px;margin-top:20px}.billing-rule-fields label{display:grid;gap:7px;font-weight:700}.billing-rule-fields label[hidden]{display:none}.billing-rule-fields small{color:var(--ui-muted);font-size:12px;font-weight:400;line-height:1.4}.billing-rule-actions{display:flex;justify-content:flex-end;border-top:1px solid var(--ui-line);padding-top:16px}
body .billing-rule-dialog{width:min(620px,calc(100% - 24px))!important;max-height:90dvh!important}
.billing-rule-dialog .billing-rule-context{color:var(--ui-muted);line-height:1.5}
body .billing-rule-dialog .billing-rule-fields :is(input:not([type="hidden"]),select){width:100%!important}
.billing-rule-actions{gap:10px;flex-wrap:wrap}
.invoice-preparation .weekly-heading .weekly-summary{margin:0;font-size:12px;line-height:1.4}
.invoice-preparation-tools{display:flex;align-items:center;column-gap:14px;row-gap:8px;flex-wrap:wrap}
.invoice-preparation-tools .btn{flex:0 0 auto}
.invoice-preparation-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,295px),1fr));gap:16px;margin-top:16px}
.invoice-preparation-project{min-width:0;display:flex;flex-direction:column;gap:9px;padding:17px;border:1px solid var(--ui-line);border-radius:var(--ui-dialog-radius,16px);background:var(--ui-surface);box-shadow:none}
.invoice-preparation-project .project-no{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:700;color:var(--ui-muted)}
.invoice-preparation-project .object{font-size:19px;line-height:1.35;margin:0;color:var(--ui-text);overflow-wrap:anywhere}
.invoice-preparation-project .address{color:var(--ui-muted);margin:0;overflow-wrap:anywhere}
.invoice-preparation-project .weekly-work{margin:5px 0 0;color:var(--ui-text)}
.invoice-preparation-progress{height:10px;max-width:100%;overflow:hidden;border-radius:999px;background:var(--ui-line);margin:2px 0 0}
.invoice-preparation-progress span{display:block;height:100%;border-radius:inherit;background:var(--ui-green);transition:width .18s ease}
.invoice-preparation-project .actions{margin-top:auto;padding-top:12px}
.invoice-preparation-project .actions .btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px}
.invoice-preparation .weekly-empty[hidden],.invoice-preparation-project[hidden]{display:none!important}
html[data-theme="dark"] .weekly-badge{background:#243b2d;color:#9ee3b0}
html[data-theme="dark"] .weekly-badge.weekly-overdue{background:#49331f;color:#ffd49c}
@media(max-width:760px){.weekly-heading h2{font-size:21px}.weekly-navigation{justify-content:flex-start}}

/* Gemeinsame Gestaltung für alle Appdialoge; Dokument- und Druckflächen bleiben getrennt. */
@layer saved-documents{
@media screen{
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover){
  --ui-control-height:42px;--ui-control-radius:18px;--ui-field-radius:10px;
  box-sizing:border-box;color-scheme:light;background:var(--ui-surface,#fff)!important;color:var(--ui-text,#172331)!important;
  border:1px solid var(--ui-line,#ccd7df)!important;border-radius:var(--ui-dialog-radius,12px)!important;
  padding:20px!important;font:13px/1.45 Arial,Helvetica,sans-serif!important;box-shadow:0 16px 48px #0003;
}
html[data-theme="dark"] body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover){color-scheme:dark}
body dialog{width:min(600px,calc(100% - 32px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;outline:0}
body dialog::backdrop{background:#0007;backdrop-filter:blur(2px)}
body dialog:has(.photo-mark-stage){width:min(960px,calc(100% - 32px))}
body .sigeko-conflict{--ui-control-height:var(--ui-control-touch-height,44px);position:fixed;z-index:900;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(1000px,calc(100% - 24px));max-height:55vh;max-height:55dvh;overflow:auto;border-left:5px solid #c07b16!important}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(h1,h2){font:700 18px/1.3 Arial,Helvetica,sans-serif!important;color:inherit;margin:0 0 12px!important;overflow-wrap:anywhere}
body :is(dialog,.sigeko-leave-card) > h2{padding:0 0 12px;border-bottom:1px solid var(--ui-line,#ccd7df)}
body :is(dialog,.sigeko-leave-card) .dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--ui-line,#ccd7df)}
body :is(dialog,.sigeko-leave-card) .dialog-header h2{margin:0!important}
body :is(dialog,.sigeko-leave-card) .dialog-header button.dialog-close{flex:0 0 36px;width:36px!important;min-height:36px!important;height:36px;padding:0!important;font-size:20px!important;line-height:1!important}

body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) p{font-size:13px;line-height:1.45;margin:8px 0!important;overflow-wrap:anywhere}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :where(select,input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),textarea){
  box-sizing:border-box;min-height:var(--ui-control-height,40px)!important;padding:9px 11px!important;
  border:1px solid var(--ui-line,#ccd7df)!important;border-radius:var(--ui-control-radius,10px)!important;
  background-color:var(--ui-surface,#fff)!important;color:var(--ui-text,#172331)!important;
  font:400 13px/1.35 Arial,Helvetica,sans-serif!important;max-width:100%;min-width:0;white-space:normal!important;
}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),textarea,select){width:100%;}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) select:not([multiple]){
  appearance:none!important;-webkit-appearance:none!important;padding-right:34px!important;
  background-image:linear-gradient(45deg,transparent 50%,var(--ui-muted,#65758a) 50%),linear-gradient(135deg,var(--ui-muted,#65758a) 50%,transparent 50%)!important;
  background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%!important;background-size:5px 5px!important;background-repeat:no-repeat!important;
}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(input[type="checkbox"],input[type="radio"]){width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;flex:0 0 auto;accent-color:var(--ui-green,#198b3d)}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) button{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto!important;cursor:pointer}

body .sigeko-week-card button.sigeko-week-row:is(.is-selected,:hover){background-color:var(--ui-green-soft,#eef8f1)!important;border-color:var(--ui-green,#198b3d)!important}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) button:disabled{opacity:.5!important;cursor:not-allowed}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :focus-visible{outline:3px solid var(--theme-focus,#7aa2ff)!important;outline-offset:3px}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) [hidden]{display:none!important}
body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-conflict) :is(.sigeko-leave-actions,.photo-mark-actions,.conflict-actions,.report-mail-actions,.billing-rule-actions,.form-actions,.dialog-actions,.sigeko-week-actions),
body dialog :is(form>.document-tools:last-child, .toolbar),body dialog>.document-tools:last-child{
  display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;
  margin-top:16px;padding-top:12px;border-top:1px solid var(--ui-line,#ccd7df);
}
body dialog :is(.photo-mark-actions,.report-mail-actions,.billing-rule-actions,.form-actions,.dialog-actions,.document-tools:last-child,.toolbar)>.primary,
body .sigeko-leave-actions>.primary{order:1}
body .photo-mark-tools{display:flex;align-items:end;flex-wrap:wrap;gap:8px}
body .photo-mark-tools label{display:grid;flex:1 1 160px;gap:4px;margin:0!important}
body .photo-mark-stage{display:flex;justify-content:center;padding:8px;background:#15171b;border-radius:10px;margin-top:12px}
body .photo-mark-stage canvas{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:50vh!important;max-height:50dvh!important;touch-action:none;cursor:crosshair}
@media(max-width:560px){
  body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover){padding:16px!important}
  body dialog{max-height:calc(100dvh - 24px)}
}
@media(pointer:coarse){body :is(dialog,.sigeko-leave-card) .dialog-header button.dialog-close{flex-basis:44px;width:44px!important;min-height:44px!important;height:44px}body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) button,body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(select,input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),textarea){min-height:44px!important}body :is(dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover) :is(select,input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),textarea){font-size:16px!important}}
}
@media print{dialog,.sigeko-leave-card,.sigeko-week-card,.sigeko-mobile-lock-card,.sigeko-conflict,.date-range-popover{display:none!important}}
}
/* Einheitliche App-Fußzeile; Dokument-/PDF-Fußzeilen sind separate Elemente. */
@layer saved-documents{
@media screen{
html{--ui-footer-color:#788697}
html[data-theme="dark"]{--ui-footer-color:#b8c0ca}
body .page-footer{color:var(--ui-footer-color)!important;display:flex!important;flex-wrap:wrap!important;justify-content:space-between!important;align-items:center!important;gap:8px 16px!important;font-family:Arial,Helvetica,sans-serif!important;font-size:11px!important;line-height:1.4!important;font-weight:400!important;letter-spacing:normal!important}
body .page-footer>span{font:inherit!important;letter-spacing:inherit!important}
body .page-footer>span:last-child{margin-left:auto!important;white-space:nowrap!important}
}
}

/* Vorbereitung und Fotohistorie; dieselbe Dialogbasis wie die Fotobearbeitung. */
@media screen{

body .preparation-choice{display:flex;align-items:flex-start;gap:12px;padding:14px;margin:8px 0;border:1px solid var(--ui-line);border-radius:var(--ui-dialog-radius,12px);background:var(--ui-surface)}
body .preparation-choice span{min-width:0;overflow-wrap:anywhere}
body .preparation-choice small{display:block;margin-top:5px;color:var(--ui-muted);white-space:pre-wrap}
body .preparation-choice img{display:block;max-width:160px;max-height:110px;margin-bottom:8px;object-fit:contain}
body .panel .report-photo-origin{padding:8px 10px;border-radius:8px;background:var(--ui-surface-2);color:var(--ui-text);margin:8px 0;font-size:12px}
.recent-documents-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:16px}
.recent-documents-more{display:flex;justify-content:flex-end;margin-top:18px}
.recent-documents-more [hidden]{display:none!important}
.recent-documents-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.recent-documents-status.error{position:static;width:auto;height:auto;margin:8px 0 0;text-align:right;overflow:visible;clip:auto;white-space:normal;color:var(--ui-danger,#a2222c);font-size:13px}

}
.photo-cell .report-photo-origin{font-size:9pt;line-height:1.3;padding-top:2mm;color:#555;overflow-wrap:anywhere}

@media screen{
.home-favorites .favorite-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:10px;margin:12px 0}
.home-favorites .favorite-options label{display:flex;gap:9px;align-items:center;min-height:44px;color:var(--ui-text)}
.home-favorites .favorite-options input{width:18px;height:18px;accent-color:var(--ui-green)}
.home-favorites [data-favorite-status]{color:var(--ui-muted);font-size:13px}
}

/* Kompakte Startseitenkacheln nutzen die vorhandene area-card / icon-badge Basis. */
@media screen{



.home-shortcuts{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:14px}








.home-document-heading{display:flex;align-items:center;gap:12px}


.home-document-card time{font-size:12px;color:var(--ui-muted)}
.home-document-card .recent-document-action{margin-top:auto;padding-top:14px;border-top:1px solid var(--ui-line)}
.home-document-link{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--ui-green);font-size:13px;font-weight:700;text-decoration:none;min-height:28px}
.home-document-link:focus-visible{outline:2px solid var(--ui-green);outline-offset:4px}
.home-favorites #favoriteSettings{margin-top:16px}
.home-favorites [hidden]{display:none!important}
}

/* Gemeinsame Trennung zwischen Favoriten und Hauptmodulen. */
.page-index .home-module-divider{border:0;border-top:1px solid var(--ui-line);margin:24px 0;}

/* Projektpakete auf gemeinsamer Karten- und Formularbasis. */
.package-controls{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-top:20px}
.package-controls label{flex:1 1 280px}
.package-controls select{display:block;width:100%;margin-top:6px}
.package-render-frame{position:fixed;left:-20000px;top:0;width:1280px;height:960px;border:0;pointer-events:none}

/* Paketinhalt auf der gemeinsamen Dialogbasis. */
body .package-dialog{width:min(680px,calc(100% - 32px));overflow:hidden}
body .package-dialog[open]{display:flex;flex-direction:column}
.package-dialog .package-header{flex:0 0 auto}
.package-dialog .package-header>div{min-width:0}
.package-dialog [data-project]{margin:5px 0 0!important;color:var(--ui-muted);font-size:13px;overflow-wrap:anywhere}
.package-dialog form{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;margin:0;overflow:hidden}
.package-dialog .package-body{display:grid;gap:16px;min-height:0;overflow:auto;overscroll-behavior:contain}
.package-dialog .package-module-fieldset{margin:0;padding:0;border:0;min-width:0}
.package-dialog .package-module-fieldset legend,.package-dialog .package-selection h3{margin:0 0 8px;padding:0;font-size:13px;font-weight:700;line-height:1.45;color:var(--ui-text)}
.package-dialog .package-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:6px}
.package-dialog .preparation-choice{display:flex;align-items:center;gap:8px;margin:0;min-height:40px;padding:8px 10px;border:1px solid var(--ui-line);border-radius:10px;font-size:13px;font-weight:400}
.package-dialog .preparation-choice:has(input:checked){background:var(--ui-green-soft,var(--ui-surface-2))}
.package-dialog .package-selection{min-width:0;padding-top:14px;border-top:1px solid var(--ui-line)}
.package-dialog .package-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.package-dialog .package-dates label{display:grid;gap:4px;font-weight:600;font-size:13px;min-width:0}
.package-dialog .package-selection .mini{font-size:12px;color:var(--ui-muted)}
.package-dialog .package-selection-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.package-dialog .package-documents{max-height:240px;margin:0;overflow:auto}
.package-dialog .package-document{padding:8px 0;border-bottom:1px solid var(--ui-line);font-size:13px;font-weight:400}
.package-dialog .package-document:last-child{border-bottom:0}
.package-dialog [data-package-count]{font-size:12px;color:var(--ui-muted)}
.package-dialog .package-controls{display:grid;gap:5px;margin:0;padding-top:14px;border-top:1px solid var(--ui-line)}
.package-dialog .package-controls label{font-size:13px;font-weight:700;color:var(--ui-text)}
.package-dialog .package-controls select{box-sizing:border-box;width:100%;margin:0}
.package-dialog .package-footer{flex:0 0 auto;margin-top:16px;padding-top:12px;border-top:1px solid var(--ui-line)}
.package-dialog .package-footer>p{margin:0 0 10px!important;color:var(--ui-muted);font-size:12px;line-height:1.45}
.package-dialog .package-footer .dialog-actions{margin:0;padding:0;border:0}
@media(max-width:420px){.package-dialog .package-dates{grid-template-columns:1fr}}

:is(.page-index,.page-todo) button.favorite-edit{--ui-control-height:36px;--ui-control-padding:7px;display:inline-flex;align-items:center;justify-content:center;width:36px;min-width:36px;min-height:36px;padding:7px;border-color:transparent;background:transparent;color:var(--ui-muted,var(--ui-text));box-shadow:none}
:is(.page-index,.page-todo) button.favorite-edit:hover{background:var(--ui-surface);border-color:var(--ui-line)}
.page-index .favorite-dragging{opacity:.45}

body .pdf-check-dialog{width:min(640px,calc(100% - 24px))}
.pdf-check-dialog ul{padding-left:22px;max-height:50dvh;overflow:auto}.pdf-check-dialog li{margin:8px 0;overflow-wrap:anywhere}

@layer saved-documents {
body .project-master-card .project-main-fields input{width:100%!important;min-width:0}
}

/* SiGePlan: flow tables keep their intrinsic height, including multiline ggS/ggB. */
#planSheet .plan-main{display:block}
#planSheet .plan-main>.plan-table,#planSheet .plan-main>.bottom-grid{flex:none;height:auto;min-height:max-content}
#planSheet .bottom-grid{table-layout:fixed;line-height:1.4}
#planSheet .bottom-grid td{height:auto;padding:1mm .8mm;vertical-align:top;overflow-wrap:anywhere;white-space:normal}

/* Undo notification shared by report editing and personal tasks. */
.report-undo-bar{position:fixed;left:50%;bottom:22px;z-index:12000;display:flex;align-items:center;gap:14px;max-width:calc(100vw - 28px);padding:10px 12px 10px 14px;border-radius:7px;background:#222;color:#fff;box-shadow:0 5px 24px rgba(0,0,0,.28);opacity:0;pointer-events:none;transform:translate(-50%,12px);transition:opacity .16s ease,transform .16s ease}
.report-undo-bar.show{opacity:1;pointer-events:auto;transform:translate(-50%,0)}
.report-undo-text{font-size:14px;line-height:1.25}
.report-undo-button{border:1px solid #fff;border-radius:5px;background:#fff;color:#111;padding:7px 11px;font-weight:700;cursor:pointer;white-space:nowrap}
@media print{.report-undo-bar{display:none!important}}

.invoice-report-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.invoice-report-heading h2{margin:18px 0 6px}
.invoice-report-heading input[type="checkbox"]{width:18px;height:18px;min-width:18px;flex:none;margin:12px 2px 0 0;cursor:pointer}
.invoice-report-heading input[type="checkbox"]:disabled{cursor:default}

@media screen{
.task-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.task-settings-heading h1{font-size:22px;margin:12px 0}
.page-todo .task-settings-heading .favorite-edit{width:auto;gap:6px}
.page-todo .task-summary-controls{display:flex;flex-direction:column;align-items:flex-end;gap:0}
.page-todo .task-summary-controls .favorite-edit{width:auto;gap:6px}
[data-task]{position:relative}
[data-task] .task-toggle{position:absolute;right:6px;top:6px;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:50%;background:radial-gradient(circle,#b4232c 0 12px,transparent 12px);color:#fff;font-size:19px;font-weight:700;line-height:36px;z-index:2;cursor:pointer}
[data-task] .task-toggle:hover{background:radial-gradient(circle,#8f1921 0 12px,transparent 12px)}
[data-task] .task-toggle:focus-visible{outline:3px solid var(--ui-green);outline-offset:2px}
[data-task] .project-no{padding-right:76px}
[data-task-hidden="1"]{border-style:dashed}
[data-task-hidden="1"] .task-toggle{background:radial-gradient(circle,var(--ui-green) 0 12px,transparent 12px);color:#fff}
/* The shared button rules use !important; keep the hit area large and the icon visibly small. */



[data-task][hidden],.page-todo #taskSettings[hidden]{display:none!important}
[data-task-status]{color:var(--ui-muted)}
}

/* Begehungsvorbereitung: klare Abschnitte und kompakte auswählbare Inhalte. */
@media screen{
body .report-preparation{width:min(760px,calc(100% - 32px));overflow:auto}
body .report-preparation .preparation-header{padding:0 0 12px;background:var(--ui-surface,#fff);border-bottom:1px solid var(--ui-line,#d5dee6)}
body .report-preparation .preparation-eyebrow{display:block;margin-bottom:8px;color:var(--ui-green,#198b3d);font-size:11px;font-weight:800;letter-spacing:.11em}
body .report-preparation .preparation-header h2{font-size:18px!important;margin-bottom:5px!important}
body .report-preparation .preparation-header p{margin:0!important;color:var(--ui-muted,#536579)}
body .report-preparation .preparation-body{padding:0}
body .report-preparation .preparation-section{padding:14px 0;border-bottom:1px solid var(--ui-line,#d5dee6)}
body .report-preparation .preparation-section:last-child{border-bottom:0}
body .report-preparation .preparation-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
body .report-preparation .preparation-section-title h3{margin:0;font-size:14px;line-height:1.35}
body .report-preparation .preparation-section-title>span{color:var(--ui-muted,#536579);font-size:12px;white-space:nowrap}
body .report-preparation .preparation-choice,body .report-preparation .preparation-fixed{box-sizing:border-box;display:flex;align-items:flex-start;gap:12px;margin:6px 0;padding:10px 12px;border:1px solid var(--ui-line,#d5dee6);border-radius:10px;background:var(--ui-surface,#fff);line-height:1.4}
body .report-preparation .preparation-choice{cursor:pointer;font-family:Arial,Helvetica,sans-serif;font-size:13px;font-weight:400}
body .report-preparation .preparation-choice:hover{border-color:var(--ui-green,#198b3d)}
body .report-preparation .preparation-choice:has(input:focus-visible){outline:3px solid var(--theme-focus,#7aa2ff);outline-offset:2px}
body .report-preparation .preparation-choice:has(input:disabled){opacity:.65;cursor:default}
body .report-preparation .preparation-choice input[type=checkbox]{margin:2px 0 0!important;border-radius:5px!important;min-height:20px!important}
body .report-preparation .preparation-choice>span,body .report-preparation .preparation-fixed>span:nth-child(2){flex:1;min-width:0}
body .report-preparation .preparation-choice strong,body .report-preparation .preparation-fixed strong{display:block;font-size:13px;font-weight:700;color:var(--ui-text,#172331)}
body .report-preparation .preparation-choice small,body .report-preparation .preparation-fixed small{display:block;margin-top:3px;font-weight:400;color:var(--ui-muted,#536579);font-size:12px;line-height:1.45;white-space:pre-wrap}
body .report-preparation .preparation-fixed{background:color-mix(in srgb,var(--ui-green,#198b3d) 7%,var(--ui-surface,#fff));border-color:color-mix(in srgb,var(--ui-green,#198b3d) 26%,var(--ui-line,#d5dee6))}
body .report-preparation .preparation-check{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:5px;background:var(--ui-green,#198b3d);color:#fff;font-weight:700}
body .report-preparation .preparation-badge{flex:0 0 auto;border-radius:99px;padding:3px 9px;background:var(--ui-surface,#fff);color:var(--ui-green,#198b3d);font-size:11px;font-weight:700}
body .report-preparation .preparation-help{font-size:12px;color:var(--ui-muted,#536579);margin:0 0 10px!important}
body .report-preparation .preparation-empty{padding:10px 0;color:var(--ui-muted,#536579)}
body .report-preparation .preparation-photo-body{display:flex;gap:12px;align-items:flex-start}
body .report-preparation .preparation-photo-body img{width:76px;height:64px;max-width:none;max-height:none;margin:0;border-radius:7px;object-fit:cover}
body .report-preparation .preparation-photo-body>span{min-width:0}
body .report-preparation .preparation-footer{position:sticky;bottom:-20px;padding:12px 0 0;border-top:1px solid var(--ui-line,#d5dee6);background:var(--ui-surface,#fff);box-shadow:none}
body .report-preparation .preparation-footer>p{font-size:12px;color:var(--ui-muted,#536579);margin:0 0 9px!important}
body .report-preparation .photo-mark-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0}
@media(max-width:560px){body .report-preparation .preparation-header{padding:0 0 12px}body .report-preparation .preparation-body{padding:0}body .report-preparation .preparation-footer{bottom:-16px;padding:12px 0 0}body .report-preparation .preparation-badge{display:none}body .report-preparation .photo-mark-actions button{flex:1 1 auto}}
}

/* Berichtvorbereitung: Aktionsbuttons wie in der Fachmodul-Shell. */
@media screen{
body .report-preparation .preparation-footer .photo-mark-actions>button{
  display:inline-flex!important;align-items:center;justify-content:center;
  flex:0 0 auto;
  white-space:nowrap!important;width:auto!important;
}








@media(max-width:560px){body .report-preparation .preparation-footer .photo-mark-actions>button{flex:1 1 auto;white-space:normal!important}}
}

/* Build 29: one disclosure for the complete weekly overview, not its cards. */
.weekly-overview[data-weekly-overview]>.weekly-heading h2{width:100%;min-width:0}








/* Saved-document copy feedback remains independent of the editor. */
.document-copy-feedback{position:fixed;inset:auto 16px 16px auto;max-width:min(540px,calc(100vw - 32px));z-index:10000;padding:14px 18px;border:1px solid var(--ui-line,#d9e1e6);border-radius:10px;background:var(--ui-surface,#fff);color:var(--ui-text,#132238);box-shadow:0 4px 22px #0003;font:inherit;line-height:1.45}
.document-copy-feedback[hidden]{display:none!important}
html[data-theme="dark"] .document-copy-feedback{background:#25282c;color:#eee;border-color:#53565b}
.document-copy-feedback.error{border-width:2px}
@media print{.document-copy-feedback{display:none!important}}

/* Systemstatus: scoped permission maintenance; shared light/dark styling. */
.page-systemstatus .status-permissions{min-width:0}
.page-systemstatus #permissions-title{scroll-margin-top:18px}
.page-systemstatus .status-permission-details{margin:16px 0}
.page-systemstatus .status-permission-details>summary{cursor:pointer;font-weight:700;line-height:1.5;margin-bottom:12px}
.page-systemstatus .status-permission-details pre{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;padding:14px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface)}
.page-systemstatus .status-permission-mode{white-space:nowrap;font-variant-numeric:tabular-nums}
.page-systemstatus .status-permission-apply{margin-top:20px;padding-top:12px;border-top:1px solid var(--ui-line)}
.page-systemstatus .status-permission-apply .status-check{align-items:flex-start}
.page-systemstatus .status-permission-apply .status-check input{margin-top:2px}
.page-systemstatus [data-permissions-progress][hidden]{display:none}
.page-systemstatus .status-permissions .status-table-wrap table{min-width:620px}

.page-systemstatus .status-permission-scroll-hint{display:none}
@media(max-width:760px){.page-systemstatus .status-permission-scroll-hint{display:block}}


/* Fachmodul-Hover wird zentral zusammen mit den Aktionsfarben definiert. */


