﻿:root{
  --bg:#f4f6f8;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#6b7280;
  --line:#d9dde3;

  --blue:#173a5a;
  --blue2:#0f2a43;
  --susi-head-top:#173a5a;
  --susi-head-mid:#102d47;
  --susi-head-bottom:#0b2238;
  --susi-head-glow:rgba(77,139,190,.20);

  --shadow:0 10px 25px rgba(0,0,0,.08);
  --radius:12px;

  --okBg:#dcfce7; --okBd:#86efac;
  --warnBg:#fef3c7; --warnBd:#fcd34d;
  --badBg:#fee2e2; --badBd:#fca5a5;
}

/* Scrollbar ausblenden Ã¢â‚¬â€œ Scrollen bleibt aktiv */
html, body {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge alt */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;                /* Chrome, Edge, Safari */
}

body{
  margin:0;
  font-family: Roboto, "Helvetica Neue", sans-serif;
  background:var(--bg);
  color:var(--text);

  /* Typografie-Basis */
  font-weight:400;
  font-size:0.875rem;   /* = 14px */
}

*{box-sizing:border-box}
body{margin:0;font-family:Roboto, "Helvetica Neue", sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit}

.app-header{
  background:linear-gradient(180deg,var(--blue),var(--blue2));
  color:#fff;
  padding:10px 18px;
  display:flex;
  align-items:center;
  gap:18px;
  box-shadow:0 2px 10px rgba(0,0,0,.15);
  position:relative;
  z-index:30000;
}
.app-logo{font-weight:800;font-size:15px;letter-spacing:.5px}
.app-nav{display:flex;gap:14px;align-items:center}
.app-nav a{color:#e2e8f0;text-decoration:none;font-size:14px;font-weight:700}
.app-nav a:hover{color:#fff;text-decoration:underline}
.app-spacer{flex:1}
.app-testsystem-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border:1px solid #fb923c;
  border-radius:999px;
  background:linear-gradient(180deg,#ef4444,#c2410c);
  color:#fff;
  font-size:12px;
  line-height:1;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:0 0 0 2px rgba(251,146,60,.22),0 3px 10px rgba(0,0,0,.22);
}
.app-user{font-size:13px;color:#cbd5e1;margin-right:12px;white-space:nowrap}
.app-logout{
  padding:6px 12px;border-radius:9px;border:1px solid rgba(255,255,255,.4);
  background:rgba(255,255,255,.08);color:#fff;cursor:pointer;font-weight:700
}
.app-logout:hover{background:rgba(255,255,255,.18)}

.subheader{
  background:linear-gradient(180deg,var(--blue),var(--blue2));
  color:#fff;
  padding:18px 18px;
  border-top:1px solid rgba(255,255,255,.06);
  border-bottom:1px solid rgba(0,0,0,.08);
}
.subheader .title{font-size:22px;font-weight:800;margin:0}
.subheader .sub{font-size:13px;color:rgba(255,255,255,.78);margin-top:4px}

.wrap{padding:14px 16px}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  
}
.cardhead{
  padding:12px 14px;
  border-bottom:1px solid #edf2f7;
  display:block;          /* <-- WICHTIG: kein flex hier */
    background:#f5f7fa;
  border-bottom:1px solid #e2e8f0;
border-top-left-radius: var(--radius);
border-top-right-radius: var(--radius);
}
.cardhead .row{ width:100%; }

.cardbody{padding:12px 14px}
.row{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.hint{color:var(--muted);font-size:12px}

label{font-size:13px;color:var(--text);font-weight:700}
select,input{
  padding:7px 10px;
  border:1px solid #cfd8e3;
  border-radius:9px;
  background:#fff;
  font-size:13px;
}
.btn{
  padding:8px 12px;
  border-radius:10px;
  border:1px solid #cfd8e3;
  background:#fff;
  cursor:pointer;
  font-weight:800;
}
.btn:hover{background:#f8fafc}
.btn-primary{
  background:linear-gradient(180deg,#1f4b73,#173a5a);
  border-color:rgba(255,255,255,.0);
  color:#fff;
}
.btn-primary:hover{
  background:linear-gradient(180deg,#1f4b73,#173a5a);
  color:#fff;
  filter:brightness(1.08);
}

.btn.status{
  width:36px;
  text-align:center;
  padding-left:0;
  padding-right:0;
}

.tablewrap{
  overflow-x:auto;         /* wichtig fÃƒÂ¼r Tasks-Grid */
  overflow-y:hidden;
  border-radius:var(--radius);
  border-top-left-radius:0;
  border-top-right-radius:0;
}

table{border-collapse:separate;border-spacing:0;width:100%}
th,td{padding:9px 10px;font-size:13px;white-space:nowrap;border-bottom:1px solid #edf2f7}
th{background:#f8fafc;font-weight:800;border-bottom:1px solid var(--line)}
tbody tr:hover{background:#f7fbff}
td.right{text-align:right}
tr.clickable{cursor:pointer}

select.st-offen{background:var(--badBg);border:1px solid var(--badBd);font-weight:800}
select.st-inArbeit{background:var(--warnBg);border:1px solid var(--warnBd);font-weight:800}
select.st-erledigt{background:var(--okBg);border:1px solid var(--okBd);font-weight:800}

.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 8px;border-radius:999px;font-size:12px;font-weight:800;
  border:1px solid transparent;
}
.badge-warn{background:var(--warnBg);border-color:var(--warnBd)}
.badge-ok{background:var(--okBg);border-color:var(--okBd)}
.badge-bad{background:var(--badBg);border-color:var(--badBd)}

@media (max-width: 900px){
  .app-user{display:none}
}
/* Tabelle stabil halten */
.table { width: 100%; table-layout: fixed; }
.table td, .table th { vertical-align: top; overflow: hidden; }

/* sinnvolle Spaltenbreiten (anpassen nach Geschmack) */
th.col-doozer, td.col-doozer { width: 120px; }
th.col-projekt, td.col-projekt { width: 260px; }
th.col-mitarb,  td.col-mitarb  { width: 170px; }
th.col-status,  td.col-status  { width: 130px; }
th.col-date,    td.col-date    { width: 110px; }

/* Titel + Beschreibung sauber umbrechen und begrenzen */
.col-title { width: auto; }
.t-title { font-weight: 600; white-space: normal; word-break: break-word; }
.t-desc  {
  margin-top: 2px;
  font-size: 12px;
  opacity: .75;
  white-space: normal;
  word-break: break-word;

  /* max 2 Zeilen, dann "abgeschnitten" */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.modal{ position:fixed; inset:0; z-index:9999; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }
.modal-card{
  position:relative;
  max-width: 720px;
  margin: 8vh auto;
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid #e6edf6;
}
.modal-title{ font-weight:700; }
.modal-body{
  padding:14px;
  white-space:pre-wrap;      /* ZeilenumbrÃƒÂ¼che behalten */
  word-break:break-word;
  max-height: 60vh;
  overflow:auto;
}
.taskcell{ cursor:pointer; }

.modal{ position:fixed; inset:0; z-index:9999; display:none; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }
.modal-card{
  position:relative;
  max-width:760px;
  margin:90px auto 0 auto;
  background:#fff;
  border-radius:14px;
  border:1px solid #e5e7eb;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  overflow:hidden;
}
/* ======================================================
   BT APP Ã¢â‚¬â€œ TABLE GRID (Tasks-Referenz)
   ====================================================== */

/* kompakte Icon-Buttons */
.btn-mini{
  width:34px;
  height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
}
/* PDF-Auge transparent */
.btn-eye{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.btn-eye:hover{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.tgrid{
  width:100%;
  table-layout:auto;
  border-collapse:collapse;
  min-width:0;
}

/* Header */
.tgrid thead{
  background:#eef3f8;  /* oder deine Wunschfarbe */
}

.tgrid thead th{
  background:#eef3f8;
  border-bottom:1px solid #d6e2f0;
  font-weight:600;
  line-height:1.4;
  padding:8px 10px;
  vertical-align:middle;
  white-space:normal;

  position:sticky;
  top:0;
  z-index:5;
}

/* Body */
.tgrid tbody td{
  padding:6px 10px;
  line-height:1.2;
  vertical-align:middle;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:400;
  font-size:0.875rem; 
}




/* Gruppen-/Headerzeilen (wie Tasks) */
tr.grp > td{
  background:#f3f6fb;
  border-top:1px solid #e6ecf3;
  border-bottom:1px solid #e6ecf3;
  padding:10px 8px;
}

.grp-title{
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* dezente Status-Pills (nicht brachial) */
.st-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  border:1px solid transparent;
}

.st-pill.st-offen{ background:var(--badBg);  border-color:var(--badBd);  color:#6b0f0f; }
.st-pill.st-inArbeit{ background:var(--warnBg); border-color:var(--warnBd); color:#6b4a00; }
.st-pill.st-erledigt{ background:var(--okBg);  border-color:var(--okBd);   color:#0f5132; }

/* Modal (einheitlich) */
.modal{ position:fixed; inset:0; z-index:9999; display:none; }
.modal.show{ display:block !important; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }
.modal-card{
  position:relative;
  max-width:900px;
  width:calc(100% - 40px);
  margin:90px auto 0;
  background:#fff;
  border-radius:14px;
  border:1px solid #e5e7eb;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid #e6ecf3;
}
.modal-title{ font-weight:800; }
.modal-body{
  padding:14px;
  white-space:pre-wrap;
  word-break:break-word;
  max-height:60vh;
  overflow:auto;
}

/* Desktop-first -> Tablet brauchbar, Mobile spÃƒÂ¤ter reduzieren */
@media (max-width: 1100px){
  .tgrid{ min-width:900px; }
}

/* tgrid: Header nicht zentrieren (Browser-Default fÃƒÂ¼r th ist center) */
.tgrid th{ text-align:left; }
.tgrid td{ text-align:left; }
.tgrid th.right, .tgrid td.right{ text-align:right; }
.tgrid th.middle, .tgrid td.middle{ text-align:center; }

.doozer-nr{
  font-weight:700;
  color:#1f4b73;
}

.cardfoot{
  padding:12px 14px;
  border-top:1px solid #edf2f7;
}

#msg { display: inline; }

/* dezente Zell-Markierung (nur Zelle, nicht ganze Zeile) */
.cell-overdue{
  /*background: #fff1f2;           /* sehr helles Rot */
  /*box-shadow: inset 0 0 0 1px #fecdd3; /* feine Kontur */
  border-radius: 8px;
  color: mediumvioletred;
}
#btnMine.on{
  background:#1f4b73;
  color:#fff;
  border-color:#1f4b73;
}

.task-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:4px;          /* Quadrat mit leicht runden Kanten */
  background:#ef4444;         /* rot */
  color:#fff;
  font-size:12px;
  font-weight:800;
  margin-left:6px;
}
.app-logo{
  display:flex;
  align-items:center;
  padding-right:10px;
}

.app-logo img{
   display:block;
  height:30px;
  filter: brightness(1.15);
}

/* =========================
   LOGIN (hochwertig)
   ========================= */

.login-shell{
  min-height: calc(100vh - 0px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 16px;
  background:
    radial-gradient(1200px 500px at 50% -100px, rgba(31,75,115,.20), transparent 60%),
    linear-gradient(180deg, #f7fafc, #eef2f7);
}

.login-card{
  width:100%;
  max-width: 440px;
  background: #fff;
  border:1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,.10);
  overflow:hidden;
}

.login-head{
  padding:18px 22px 10px 22px;
}

.login-logo{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.login-logo img{
  display:block;
  height:28px;
}

.login-title{
  font-size:18px;
  font-weight:800;
  margin:0;
  color: var(--text);
}

.login-sub{
  margin:6px 0 0 0;
  font-size:13px;
  color: var(--muted);
}

.login-body{
  padding: 14px 22px 18px 22px;
}

.login-row{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:12px;
}

.login-row label{
  font-size:13px;
  font-weight:800;
}

.login-row input{
  height:40px;
  border-radius: 10px;
  border:1px solid #cfd8e3;
  background:#fff;
  padding: 0 12px;
  font-size:14px;
}

.login-row input:focus{
  outline:none;
  border-color: rgba(31,75,115,.55);
  box-shadow: 0 0 0 4px rgba(31,75,115,.15);
}

.login-actions{
  margin-top:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.login-actions .btn{
  width:100%;
  height:42px;
  border-radius: 12px;
}

.login-meta{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-size:12px;
  color: var(--muted);
}

.login-link{
  color:#1f4b73;
  font-weight:800;
  text-decoration:none;
}
.login-link:hover{ text-decoration:underline; }

.login-error{
  margin-top:12px;
  padding:10px 12px;
  border-radius: 12px;
  background: var(--badBg);
  border:1px solid var(--badBd);
  color:#7f1d1d;
  font-weight:700;
  font-size:13px;
  display:none;
}
.login-error.show{ display:block; }

/* Passwort-Input mit Eye-Button */
.pw-wrap{
  position:relative;
}

.pw-wrap input{
  padding-right:44px; /* Platz fÃƒÂ¼r Ã°Å¸â€˜Â */
}

.pw-toggle{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid #cfd8e3;
  background:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}

.pw-toggle:hover{
  background:#f8fafc;
}

.login-row input{
  width:100%;
}

.pw-wrap{
  position:relative;
  width:100%;        /* WICHTIG */
}


/* kleine Statusbox in der Login-Card (statt alert) */
.login-msg{
  margin-top:12px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #cfd8e3;
  background:#f8fafc;
  font-weight:700;
  font-size:13px;
}
.login-msg.ok{ background:#ecfdf5; border-color:#86efac; color:#065f46; }
.login-msg.bad{ background:#fff1f2; border-color:#fca5a5; color:#991b1b; }

/* Modal (schick & passend zum Design) */
.modal{ position:fixed; inset:0; z-index:9999; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.45); }

.modal-card{
  position:relative;
  width: min(520px, calc(100% - 32px));
  margin: 14vh auto 0;
  background:#fff;
  border-radius:14px;
  border:1px solid #e5e7eb;
  box-shadow:0 18px 55px rgba(0,0,0,.28);
  overflow:hidden;
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  background:#f5f7fa;
  border-bottom:1px solid #e6ecf3;
}

.modal-title{ font-weight:900; }
.modal-body{
  padding:14px;
  white-space:normal;      /* wichtig */
  word-break:break-word;
  max-height: 60vh;
  overflow:auto;
    padding: 20px;
}

/* ======================================================
   PROJECT DETAIL Ã¢â‚¬â€œ HEADER
   ====================================================== */

.phead{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap:16px;
}

.pbox{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:14px 16px;
  background:#fff;
}

/* ZBI rechts oben */
.pHeadLine{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.pNr{
  font-size:20px;
  font-weight:900;
  color:#173a5a;
  letter-spacing:.2px;
  white-space:nowrap;
      padding-top: 10px;
    padding-bottom: 5px;
}

/* 1 grauer Kasten */
.pGrayBox{
  padding:14px 16px;
  background:#f8fafc;;
  border:1px solid #e3e7ed;
  border-radius:12px;
  margin-top:0;
  padding-bottom: 34px;
}

/* 3 Spalten nebeneinander im grauen Kasten */
.pRow3{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:16px;
}

.pCol{ min-width:0; }

.pLbl{
  font-size:12px;
  font-weight:800;
  color:#6b7280;
  margin-bottom:3px;
}

.pVal{
  font-size:16px;
  font-weight:900;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------- Controlling ---------- */

.kpi{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  align-items:stretch;
}

.k{
  min-width:0;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px 14px;
  background:#f8fafc;
}

.k .t{
  font-size:12px;
  font-weight:800;
  color:#6b7280;
}

.k .v{
  font-size:20px;
  font-weight:900;
  margin-top:4px;
}

.k .s{
  font-size:12px;
  color:#6b7280;
  margin-top:4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px){
  .pRow3{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px){
  .phead{ grid-template-columns: 1fr; }
  .pRow3{ grid-template-columns: 1fr; }
  .pNr{ font-size:16px; }
}

@media (max-width: 700px){
  .kpi{
    grid-template-columns:1fr;
  }
}
/* ---------- Icons ---------- */
.col-icon{
  text-align:center;
}

.col-icon .btn{
  width:34px;
  height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
/* ======================================================
   TASKS + PROJECT: nur innerhalb der .tgrid Tabelle
   ====================================================== */

/* Icon-Spalten nur in tgrid */
.tgrid td.col-icon{
  text-align:left;
  width:50px;
  padding-right: 5px;
}
.tgrid td.col-icon .btn{
  width:34px;
  height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
}
/* Projekt-Dokumente: SUSI-Icons und ruhige Aktionsbuttons */
.doc-icon,
.doc-action-icon,
.doc-cat-icon-slot{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

.doc-icon{
  width:30px;
  height:30px;
  border-radius:9px;
  color:#1f4b73;
  background:#eef4f8;
  border:1px solid #d8e4ee;
}

.doc-icon svg,
.doc-action-icon svg{
  width:18px;
  height:18px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.doc-icon--angebot,
.doc-icon--angebot-einkauf{ color:#1f5f9c; background:#edf5fb; border-color:#c9ddeb; }
.doc-icon--auftrag{ color:#255c80; background:#edf6f8; border-color:#cbe0e6; }
.doc-icon--bestellung{ color:#735c18; background:#f8f3df; border-color:#e7d99d; }
.doc-icon--protokoll,
.doc-icon--checkliste{ color:#315773; background:#f0f5f8; border-color:#d3e0e8; }
.doc-icon--maengel{ color:#9a3412; background:#fff1e8; border-color:#f3c6a8; }
.doc-icon--echeck{ color:#22603b; background:#edf7ef; border-color:#c8e2ce; }
.doc-icon--bild,
.doc-icon--video{ color:#28628d; background:#edf5fb; border-color:#c9ddeb; }
.doc-icon--rechnung{ color:#365486; background:#f0f3fb; border-color:#d4dcec; }
.doc-icon--vertrag{ color:#513f7f; background:#f3f0fa; border-color:#dcd3ee; }
.doc-icon--sonstiges,
.doc-icon--neutral{ color:#526170; background:#f3f6f8; border-color:#dce4ea; }

.doc-cat-icon-slot{
  width:30px;
  min-width:30px;
  height:30px;
}

.doc-cat-pill{
  border-color:#d7e1ea !important;
  background:#f8fafc !important;
  color:#16354f !important;
  box-shadow:none !important;
}

.doc-cat-pill:hover,
.doc-cat-choice:hover,
.doc-row-cat-choice:hover{
  background:#eef4f8 !important;
}

.doc-upload-action,
.doc-action-btn{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:7px;
}

.doc-action-icon{
  width:20px;
  height:20px;
  color:currentColor;
}

.doc-action-btn{
  color:#1f4b73;
  border-color:#d7e1ea;
  background:#f8fafc;
}

.doc-action-btn:hover{
  color:#153a5c;
  border-color:#b9ccdc;
  background:#eef4f8;
}

.doc-action-btn--delete{
  color:#9f1d2d;
}

.doc-action-btn--delete:hover{
  color:#821727;
  border-color:#e3bbc2;
  background:#fff1f3;
}

.doc-row-thumb-placeholder{
  width:44px;
  height:34px;
  border-radius:8px;
  border:1px solid #d8e4ee;
  background:#f8fafc;
}
.doc-thumb{
  width:46px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
  border-radius:9px;
  border:1px solid #d8e4ee;
  background:#f7fafc;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.72);
}

.doc-thumb-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.doc-thumb-fallback{
  display:none;
  align-items:center;
  justify-content:center;
}

.doc-thumb.is-error .doc-thumb-img{
  display:none;
}

.doc-thumb.is-error .doc-thumb-fallback{
  display:inline-flex;
}

.doc-preview-modal{
  z-index:10020;
}

.doc-preview-card{
  width:min(980px, calc(100% - 32px));
  margin:5vh auto 0;
  border-radius:16px;
  overflow:hidden;
}

.doc-preview-head{
  align-items:center;
  background:linear-gradient(180deg,#1f4b73,#173a5a);
  color:#fff;
}

.doc-preview-head .modal-sub{
  color:rgba(255,255,255,.78);
  margin-top:3px;
}

.doc-preview-head .btn{
  color:#fff;
  border-color:rgba(255,255,255,.32);
  background:rgba(255,255,255,.10);
}

.doc-preview-body{
  background:#f5f8fb;
}

.doc-preview-frame{
  min-height:240px;
  max-height:70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  border:1px solid #d8e4ee;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}

.doc-preview-img{
  max-width:100%;
  max-height:68vh;
  object-fit:contain;
  display:block;
  border-radius:8px;
}

.doc-preview-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
  color:#334155;
  font-size:13px;
}

.doc-preview-meta span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border:1px solid #d8e4ee;
  border-radius:999px;
  background:#fff;
}

.doc-preview-meta strong{
  color:#64748b;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.doc-preview-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}

@media (max-width: 760px){
  .doc-preview-card{
    width:calc(100% - 18px);
    margin:3vh auto 0;
  }

  .doc-preview-frame{
    max-height:62vh;
    padding:8px;
  }

  .doc-preview-img{
    max-height:60vh;
  }

  .doc-preview-actions{
    justify-content:stretch;
  }

  .doc-preview-actions .btn{
    width:100%;
    justify-content:center;
  }
}

/* Projekt-Detail: einheitliche Zeilenaktionen ohne Breiten-/HÃƒÂ¶hensprung */
.tgrid td.project-row-actions{
  width:194px;
  min-width:194px;
  padding-right:5px;
  white-space:nowrap;
}

.project-row-action-list{
  display:flex;
  align-items:center;
  gap:6px;
  width:194px;
}

.tgrid td.project-row-actions .project-row-action{
  flex:0 0 34px;
  width:34px;
  min-width:34px;
  height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  box-sizing:border-box;
}

.tgrid td.project-row-actions .project-row-action + .project-row-action{
  margin-left:0;
}

.project-row-action img{
  display:block;
  width:18px;
  height:18px;
}

.project-row-euro{
  display:block;
  font-size:16px;
  font-weight:600;
  line-height:1;
  color:currentColor;
}

.project-row-action:not(.project-row-action-placeholder):hover{
  border-color:#173a5a;
  background:#eef4f8;
  box-shadow:0 3px 9px rgba(23,58,90,.16);
}

.project-row-action.is-active,
.project-row-action.is-active:hover{
  color:#fff;
  border-color:#173a5a;
  background:#173a5a;
  box-shadow:0 3px 9px rgba(23,58,90,.24);
}

.project-row-action.is-active img{
  filter:brightness(0) invert(1);
}

.project-row-action-placeholder{
  visibility:hidden;
  pointer-events:none;
}

/* Status-Pill nur in tgrid */
.tgrid select.sel-status{
  width:100%;
  max-width:120px;
  padding:6px 12px;
  min-height:34px;
  border-radius:999px;
  border:1px solid #ccd6e0;
  font-weight:700;
  line-height:1.1;
  background:#f8fafc;
  appearance:auto;
  font: inherit;
}

/* Farben (nur wenn select die st-* Klasse hat) */
.tgrid select.sel-status.st-offen{
  background:#fff2f2;
  border-color:#ffb4b4;
  color:#6b0f0f;
}
.tgrid select.sel-status.st-inArbeit{
  background:#fff7e6;
  border-color:#ffd18a;
  color:#6b4a00;
}
.tgrid select.sel-status.st-erledigt{
  background:#eafaf0;
  border-color:#9de0b5;
  color:#0f5132;
}

.cardbody .hint{
  display:block;
}

/* ======================================================
   NUR SEITE tasks
   (aus <style> der tasks.page.js)
====================================================== */

 /*Tabelle / Layout */

.tgrid th,
.tgrid td{
  vertical-align:middle;
}

/* Projekt-Header */
tr.grp > td{
  background:#f3f6fb;
  border-top:1px solid #e6ecf3;
  border-bottom:1px solid #e6ecf3;
  padding:10px 8px;
}
.grp-title{
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.grp-right{
  text-align:right;
  white-space:nowrap;
  color:#55687d;
  font-size:12px;
  font-weight:600;
}

/* Unterzeilen */
tr.sub td{
  padding:8px 8px;
  border-bottom:1px solid #eef3f9;
}
.subwide{ padding:6px 10px; }
.subline{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}
.subwho{
  width:170px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#223;
}
.substatus{
  width:130px;
  flex-shrink:0;
}
.subtask{
  flex:1;
  min-width:0;
}
.subtask .t-title{
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.subtask .t-desc{
  color:#607086;
  margin-top:2px;
  font-size:13px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Datum */
th.col-date,
td.col-date{
  width:110px;
  white-space:nowrap;
  text-align:right;
  color:#607086;
  font-size:12px;
}

/* Status Dropdown */
.tgrid select{ font:inherit; }
.sel-status{
  width:100%;
  max-width:120px;
  padding:4px 10px;
  border-radius:14px;
  border:1px solid #ccd6e0;
  font-weight:500;
  line-height:1.1;
  background:#f8fafc;
  appearance:auto;
}
.sel-status.st-offen{
  background:#fff2f2;
  border-color:#ffb4b4;
  color:#6b0f0f;
}
.sel-status.st-inArbeit{
  background:#fff7e6;
  border-color:#ffd18a;
  color:#6b4a00;
}
.sel-status.st-erledigt{
  background:#eafaf0;
  border-color:#9de0b5;
  color:#0f5132;
}

/* Modal */
.modal{ position:fixed; inset:0; z-index:9999; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }
.modal-card{
  position:relative;
  margin:90px auto 0;
  max-width:900px;
  width:calc(100% - 40px);
  background:#fff;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  overflow:hidden;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid #e6ecf3;
}
.modal-title{ font-weight:700; }
.modal-body{
  padding:14px;
  white-space:normal;
  line-height:1.35;
}
.modal.show{ display:block !important; }

.modal-body input,
.modal-body textarea,
.modal-body select{
  font:inherit;
  padding:8px 10px;
  border:1px solid #d7e2ee;
  border-radius:8px;
}
.modal-body textarea{
  min-height:140px;
  resize:vertical;
}

/* Responsive */
@media (max-width: 1100px){
  .tgrid{ min-width:900px; }
}
@media (max-width: 980px){
  th.col-date,
  td.col-date{ display:none; }
  .tgrid{ min-width:780px; }
}
@media (max-width: 700px){
  th.col-lage,
  td.col-lage{ display:none; }
  th.col-proj,
  td.col-proj{ display:none; }
  .tgrid{ min-width:520px; }
}

/* ======================================================
   ENDE NUR SEITE tasks
====================================================== */


/* ======================================================
   NUR SEITE projects
   (aus <style> der projects.page.js)
====================================================== */

/* Stern in der Tabelle */
.fav.on{
  background:linear-gradient(180deg,#fff7ed,#ffedd5);
  border-color:#fed7aa;
}

/* Button als Badge-Host */
.btn-badgehost{
  position:relative;
}

/* Rote Overlay-Badge */
.btn-badge{
  position:absolute;
  top:-4px;
  left:-5px;
  right:auto;

  min-width:18px;
  height:18px;
  padding:0 4px;

  display:flex;
  align-items:center;
  justify-content:center;

  background:#ef4444;
  color:#fff;

  font-size:11px;
  font-weight:800;
  border-radius:999px;

  box-shadow:0 0 0 2px #fff;
}


.projects-grid{
  table-layout:fixed;
}

.projects-grid th,
.projects-grid td{
  font-size:12.5px;
  color:#24384a;
}

.projects-grid tbody tr.project-row{
  cursor:pointer;
}

.projects-grid tbody tr.project-row:hover td{
  background:#f7fafc;
}

.projects-grid .project-icon-head,
.projects-grid .project-icon-cell{
  width:44px;
  min-width:44px;
  padding-left:7px;
  padding-right:7px;
  text-align:center;
}

.projects-grid .project-icon-cell{
  vertical-align:middle;
}

.project-icon-btn{
  width:28px;
  height:28px;
  min-width:28px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d8e3ee;
  border-radius:8px;
  background:#ffffff;
  color:#60768a;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  transition:background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.project-icon-btn:hover{
  background:#eef4f8;
  border-color:#b9cad8;
  color:#173a5a;
  box-shadow:0 1px 3px rgba(15,23,42,.08);
}


.project-fav-btn{
  position:relative;
  overflow:visible;
  font-size:16px;
  font-weight:700;
}

.project-fav-star{
  display:block;
  line-height:1;
}

.project-task-badge{
  position:absolute;
  top:-4px;
  left:-5px;
  right:auto;
  min-width:14px;
  height:14px;
  padding:0 3px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#d94848;
  color:#fff;
  border:1px solid #fff;
  box-shadow:0 1px 3px rgba(15,23,42,.18);
  font-size:8px;
  font-weight:800;
  line-height:1;
  pointer-events:none;
}

.project-fav-btn.on{
  color:#b7791f;
  background:#fff8e8;
  border-color:#efd39b;
}

.project-doozer-link img{
  width:15px;
  height:14px;
  display:block;
}

.projects-grid .doozer-nr.project-nr-cell{
  overflow:hidden;
  text-overflow:ellipsis;
}

.project-nr-wrap{
  min-width:0;
  max-width:100%;
  width:100%;
  display:flex;
  align-items:center;
  gap:5px;
  vertical-align:middle;
}

.project-nr-text{
  flex:0 1 auto;
  min-width:78px;
  overflow:hidden;
  text-overflow:clip;
  white-space:nowrap;
}

.project-nr-ampel{
  flex:0 0 11px;
  width:11px;
  height:11px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.22);
  background:#fff;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.72);
}

.project-nr-ampel.proj-ampel-neutral{
  background:#ffffff;
  border-color:#cbd7e2;
}

.project-nr-note{
  flex:0 0 16px;
  width:16px;
  height:16px;
  padding:0;
  border:1px solid #cbd8e4;
  border-radius:6px;
  background:#f8fbfd;
  position:relative;
  cursor:pointer;
}

.project-nr-note span::before{
  content:"";
  position:absolute;
  left:4px;
  top:4px;
  width:8px;
  height:6px;
  border:1.5px solid #58728a;
  border-radius:4px;
}

.project-nr-note span::after{
  content:"";
  position:absolute;
  left:7px;
  top:10px;
  width:4px;
  height:4px;
  border-left:1.5px solid #58728a;
  border-bottom:1.5px solid #58728a;
  transform:skew(-22deg);
  background:#f8fbfd;
}

.project-nr-note:hover{
  background:#eef4f8;
  border-color:#9fb4c6;
}

.projects-grid .project-lage-cell{
  max-width:158px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ======================================================
   ENDE NUR SEITE projects
====================================================== */

.btn-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* =========================================
   PROJECTS Ã¢â‚¬â€œ aktive Sortierspalte
========================================= */

.tgrid thead th.sortable{
  cursor:pointer;
  transition: background .12s ease, color .12s ease;
}

.tgrid thead th.sortable:hover{
  background:#c6cdd5;
}

.tgrid thead th.sortable.is-sort{
  
  background:#e7eef7;
  color:#1f4b73;
  font-weight:600;          /* nur leicht krÃƒÂ¤ftiger */
  box-shadow: inset 0 -2px 0 #1f4b73;  /* feine grÃƒÂ¼ne Linie unten */
}

/* =========================================
   Modal Ã¢â‚¬â€œ professionelles Layout (BT)
========================================= */
.modal{ position:fixed; inset:0; z-index:9999; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.45); }

.modal-card{
  position:relative;
  width:min(640px, calc(100% - 28px));
  margin:10vh auto 0;
  background:#fff;
  border-radius:16px;
  border:1px solid #d6e2f0;
  box-shadow:0 22px 60px rgba(0,0,0,.22);
  overflow:hidden;
}

.modal-card-lg{ width:min(760px, calc(100% - 28px)); }

/* Brand-Header */
.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.18);
  background: linear-gradient(135deg, #0f2f4a 0%, #1f4b73 55%, #2c5d8a 100%);
}

.modal-title{ font-weight:800; font-size:20px; line-height:1.2; color:#fff; padding-top: 10px; }
.modal-sub{ font-size:12px; margin-top:2px; color:rgba(255,255,255,.82); }

/* Close-Button im dunklen Header */
.modal-head .btn{
  border-color: rgba(255,255,255,.35);
  color:#fff;
  background: rgba(255,255,255,.08);
}
.modal-head .btn:hover{
  background: rgba(255,255,255,.14);
}

.modal-body{ padding:14px 16px; }
.modal-foot{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:12px 16px;
  border-top:1px solid #e5e7eb;
  background:#f8fafc;
}

/* Form */
.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px 14px;
}

.form-span-2{ grid-column: 1 / -1; }

.form-field{ display:flex; flex-direction:column; gap:6px; }
.form-label{ font-weight:700; font-size:12px; color:#111827; }

.form-control{
  width:100%;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid #d6e2f0;
  background:#fff;
  outline:none;
}

.form-control:focus{
  border-color:#9db8d6;
  box-shadow:0 0 0 3px rgba(31,75,115,.12);
}

.form-hint{ color:#6b7280; font-size:12px; }
.form-msg{ margin-top:10px; min-height:18px; }

@media (max-width: 820px){
  .modal-card{ margin:8vh auto 0; }
  .form-grid{ grid-template-columns: 1fr; }
  .form-span-2{ grid-column:auto; }
}
/* =========================================
   Input mit WÃƒÂ¤hrungs-AnhÃƒÂ¤ngsel
========================================= */

.input-group{
  position:relative;
  display:flex;
  align-items:center;
}

.input-group .form-control{
  padding-right:34px;
}

.input-suffix{
  position:absolute;
  right:10px;
  font-weight:700;
  color:#1f4b73;
  pointer-events:none;
}
/* ==========================================================
   MODAL Ã¢â‚¬â€œ PROJEKT BEARBEITEN
========================================================== */

.modal-projekt .modal-card-projekt {
  width: min(980px, 96%);
}

.modal-projekt .mp-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Reihen */
.modal-projekt .mp-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Spalten */
.modal-projekt .mp-col {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-projekt .mp-col-sm {
  min-width: 120px;
  max-width: 140px;
}

.modal-projekt .mp-col-md {
  min-width: 170px;
  max-width: 200px;
}

/* Inputs */
.modal-projekt .mp-input,
.modal-projekt .mp-input-sm {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d6d6d6;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-projekt .mp-input:focus,
.modal-projekt .mp-input-sm:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* Aktionen */
.modal-projekt .mp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .modal-projekt .modal-card-projekt {
    width: 96%;
  }

  .modal-projekt .mp-row {
    flex-direction: column;
  }

  .modal-projekt .mp-col,
  .modal-projekt .mp-col-sm,
  .modal-projekt .mp-col-md {
    min-width: 100%;
    max-width: 100%;
  }
}
/* Button Nachtrag */
#btnAddNachtrag {
  width: auto;
    height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
    margin-right: 10px;
}

.col-icon .btn + .btn {
  margin-left: 6px;
}



/* ==========================================
   Aufgaben Ã¢â‚¬â€œ Ersteller-KÃƒÂ¼rzel (eigene Spalte)
   ========================================== */

.col-init{
  width:44px;
  text-align:center;
}

.col-init span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:20px;

  font-size:11px;
  font-weight:700;
  letter-spacing:.5px;

  color:#374151;
  background:#e5e7eb;

  border-radius:12px;
}
.creator-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:20px;
  margin-right:8px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.5px;
  color:#374151;
  background:#e5e7eb;
  border-radius:12px;
}
/* -------------------------------
   Admin Dropdown Navigation
-------------------------------- */

.nav-dropdown{
  position:relative;
  display:inline-flex;
  align-items:center;
  height:40px;
}

.nav-dropbtn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:40px;
  padding:0 12px;
  border-radius:10px;
  color:#e2e8f0;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  transition:background .15s ease, color .15s ease;
}

.nav-dropbtn::after{
  content:'';
  width:0;
  height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid currentColor;
  opacity:.78;
  margin-top:1px;
}

.nav-dropbtn:hover{
  color:#fff;
  background:rgba(255,255,255,.08);
  text-decoration:none;
}

.nav-dropdown-content{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width:220px;
  margin-top:0;
  padding:4px;
  background:#d4e0ec;
  border:1px solid #afc2d7;
  border-radius:14px;
  box-shadow:0 8px 18px rgba(15,42,67,.14);
  z-index:30010;
}

.nav-dropdown-content a{
  display:flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  color:#173a5a;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
  background:transparent;
  border:none;
  border-radius:10px;
}

.nav-dropdown-content a:first-child{
  border:none;
}

.nav-dropdown-content a:last-child{
  border:none;
}

.nav-dropdown-content a:hover{
  background:#c2d3e5;
  color:#173a5a;
  text-decoration:none;
}

.nav-dropdown:hover .nav-dropdown-content{
  display:block;
}

.nav-dropdown:hover .nav-dropbtn{
  color:#fff;
  background:rgba(255,255,255,.08);
}

.nav-disabled{
  opacity:0.5;
  cursor:default;
}
.btn-slot{
  display:inline-block;
  width:32px;
  height:32px;
}
/* ==============================
   Angebots-Modal Ã¢â‚¬â€œ Mobile
============================== */
@media (max-width: 600px){

  .modal-card{
    width:calc(100% - 16px);
    margin:6vh auto 0;
  }

  .modal-body{
    padding:16px;
  }

  .modal-projekt .mp-row{
    flex-direction:column;
    gap:10px;
  }

  .modal-projekt .mp-col{
    min-width:100%;
  }

  .modal-projekt .mp-input-sm{
    font-size:16px;
    height:42px;
  }

  .modal-foot{
    flex-direction:column;
  }

  .modal-foot .btn{
    width:100%;
  }

}
/* =========================================
   Projekt-Detail: Rechnungen
========================================= */

#erRows td,
#arRows td{
  background:#f7f4df;
}

#erRows tr:nth-child(even) td,
#arRows tr:nth-child(even) td{
  background:#f3efd2;
}

/* Statusspalte jetzt in beiden Tabellen auf Position 9 */
#erRows td:nth-child(9),
#arRows td:nth-child(9){
  text-align:center;
}

/* letzte schmale Spalte: Lexwarestatus / leer */
#erRows td:nth-child(10),
#arRows td:nth-child(10){
  text-align:center;
  white-space:nowrap;
  padding-left:6px;
  padding-right:6px;
}
#erRows td:nth-child(2){
  text-align:center;
}
#erRows td:first-child,
#arRows td:first-child{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Rechnungsstufe-Badge */
.rstufe-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:4px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  color:#fff;
  margin:0 auto;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.10);
}

.rstufe-blue{
  background:#2563eb;
}

.rstufe-green{
  background:#16a34a;
}

/* RE-Status Punkt */
.re-status-dot{
  display:block;
  width:14px;
  height:14px;
  border-radius:3px;
  border:1px solid rgba(0,0,0,.12);
  margin:0 auto;
}

.re-status-offen{
  background:#dc2626;
}

.re-status-teilbezahlt{
  background:#facc15;
}

.re-status-bezahlt{
  background:#16a34a;
}

.re-status-unbekannt{
  background:#cbd5e1;
}

.re-neg{
  color:#dc2626;
  font-weight:700;
}

/* =========================================
   Controlling Ã¢â‚¬â€œ Rechnungs-Card
========================================= */

.k-fin-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  margin-top:4px;
}

.k-fin-row strong{
  font-weight:700;
}

.k-fin-diff{
  margin-top:6px;
  padding-top:6px;
  border-top:1px solid #d6d3c4;
  font-weight:700;
}

/* Differenzfarben */

#sumDiff.pos{
  color:#16a34a;   /* grÃƒÂ¼n */
}

#sumDiff.neg{
  color:#dc2626;   /* rot */
}

/* Modal Ã¢â‚¬â€œ kein Scrollbalken */
.modal-body{
  max-height:none !important;
  overflow:visible !important;
}

/* Ampel Ausgangsrechnungen in Projects-Liste */
.ampel-box{
  display:inline-block;
  width:16px;
  height:16px;
  border-radius:4px;
  border:1px solid rgba(0,0,0,.12);
  vertical-align:middle;
}

.ampel-rot{
  background:#dc2626;
}

.ampel-blau{
  background:#2563eb;
}

.ampel-gelb{
  background:#facc15;
}

.ampel-gruen{
  background:#16a34a;
}

/* Projektampel links in der Projects-Liste */
.proj-ampel-dot{
  display:inline-block;
  width:12px;
  height:12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.18);
  vertical-align:middle;
}

.proj-ampel-1{
  background:#dc2626;
}

.proj-ampel-2{
  background:#facc15;
}

.proj-ampel-3{
  background:#16a34a;
}
/* Erste Projektampel-Spalte sauber zentrieren */
.tgrid td:first-child,
.tgrid th:first-child{
  text-align:center;
  padding-left:16px;
  padding-right:6px;
}

/* Projekt-Detail Ã¢â‚¬â€œ Interne Bemerkung */
.pGrayBoxNote{
  margin-top:12px;
  padding:10px 14px;
  cursor:pointer;
}

.proj-note-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.proj-note-icon{
  flex:0 0 auto;
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
  margin-top:2px;
}

.proj-note-content{
  flex:1;
  min-width:0;
}

.proj-note-preview{
  margin-top:2px;
  font-size:13px;
  line-height:1.35;
  color:#334155;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Projekte Liste Ã¢â‚¬â€œ interne Hinweise */
.proj-note-list-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  font-size:14px;
  line-height:1;

  background:transparent;
  border:none;
  padding:0;
  cursor:pointer;
}
.proj-note-list-icon-empty{
  display:inline-block;
  width:20px;
  height:20px;
}

/* =========================================
   Mobile Navigation / Hamburger-MenÃƒÂ¼
========================================= */

.app-burger{
  display:none;
  width:40px;
  height:40px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
  font-size:22px;
  line-height:1;
  align-items:center;
  justify-content:center;
}

.app-burger:hover{
  background:rgba(255,255,255,.18);
}

.mobile-menu{
  display:none;
  background:linear-gradient(180deg,var(--blue),var(--blue2));
  border-top:1px solid rgba(255,255,255,.08);
  padding:8px 12px 12px;
}

.mobile-menu a,
.mobile-logout{
  display:block;
  width:100%;
  text-align:left;
  padding:12px 10px;
  margin:4px 0;
  border-radius:10px;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  color:#fff;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

.mobile-menu a:hover,
.mobile-logout:hover{
  background:rgba(255,255,255,.14);
}

.mobile-logout{
  cursor:pointer;
}

@media (max-width: 1100px){
  html,
  body{
    max-width:100%;
    overflow-x:hidden;
  }

  .app-header{
    gap:10px;
    padding:10px 12px;
    max-width:100%;
  }

  .app-logo img{
    height:24px;
  }

  .app-nav,
  .app-user,
  .app-logout{
    display:none;
  }

  .app-burger{
    display:inline-flex;
    flex:0 0 40px;
  }

  .mobile-menu.open{
    display:block;
  }

  .mobile-menu{
    max-width:100vw;
    overflow-x:hidden;
  }

  .mobile-submenu{
    max-width:100%;
    overflow-x:hidden;
  }

  .subheader{
    padding:14px 12px;
  }

  .wrap{
    padding:12px 10px;
  }
}
/* =========================================
   Mobile Admin-UntermenÃƒÂ¼
========================================= */

.mobile-admin-toggle{
  display:block;
  width:100%;
  text-align:left;
  padding:12px 10px;
  margin:4px 0;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  color:#fff;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  cursor:pointer;
}

.mobile-admin-toggle:hover{
  background:rgba(255,255,255,.14);
}

.mobile-submenu{
  display:none;
  padding-left:10px;
}

.mobile-submenu.open{
  display:block;
}

.mobile-submenu a{
  background:rgba(255,255,255,.04);
  font-size:13px;
}

/* =========================================
   Projects-Filter Ã¢â‚¬â€œ Mobile
========================================= */

@media (max-width: 700px){

  .cardhead .row{
    align-items:stretch !important;
    gap:10px !important;
  }

  .cardhead .row > .btn,
  .cardhead .row > .btn-outline,
  .cardhead .row > #btnMine{
    align-self:flex-start;
  }

  .cardhead .row > div[style*="Suche + Filter"],
  .cardhead .row > div[style*="display:flex;align-items:center;gap:12px;flex-wrap:wrap"]{
    width:100%;
  }

  .cardhead input,
  .cardhead select{
    width:100%;
    max-width:none !important;
    min-width:0 !important;
  }

  .cardhead label{
    width:100%;
  }

  .cardhead label.hint{
    display:flex !important;
    flex-direction:column;
    align-items:flex-start !important;
    gap:6px !important;
    width:100%;
  }

  .cardhead .row > div[style*="display:flex;align-items:center;gap:8px"]{
    display:flex !important;
    flex-direction:column;
    align-items:flex-start !important;
    gap:6px !important;
    width:100%;
  }

  .cardhead .row > div[style*="display:flex;align-items:center;gap:12px;flex-wrap:wrap"]{
    display:flex !important;
    flex-direction:column;
    align-items:stretch !important;
    gap:10px !important;
    width:100%;
  }

  #resetFilters{
    align-self:flex-start;
  }

  .project-detail-actions-row{
    display:grid !important;
    grid-template-columns:44px minmax(0, 1fr) 44px;
    align-items:center !important;
    gap:10px !important;
  }

  .project-detail-actions-row > .app-spacer{
    display:none !important;
  }

  .project-detail-actions-row > #btnBack{
    grid-column:1 / -1;
    justify-self:start;
    width:auto;
    max-width:100%;
  }

  .cardhead .project-detail-actions-row > .project-quick-search{
    grid-column:1 / -1;
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) 44px !important;
    grid-template-rows:auto 42px;
    align-items:stretch !important;
    gap:6px 8px !important;
    width:100%;
    min-width:0;
  }

  .cardhead .project-detail-actions-row > .project-quick-search label{
    grid-column:1 / -1;
    grid-row:1;
    width:auto;
    margin:0;
  }

  .cardhead .project-detail-actions-row > .project-quick-search input{
    grid-column:1;
    grid-row:2;
    width:100% !important;
    height:42px;
    min-width:0 !important;
    max-width:100% !important;
  }

  .cardhead .project-detail-actions-row > .project-quick-search #projectQuickSearchBtn{
    grid-column:2;
    grid-row:2;
    width:44px;
    height:42px;
    min-width:44px;
    align-self:stretch;
    justify-self:end;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .project-detail-actions-row > #projStatusBtn{
    grid-column:1;
    width:44px;
    height:42px;
    min-width:44px !important;
    justify-self:stretch;
  }

  .project-detail-actions-row > #projectAccessBtn{
    grid-column:2;
    width:100%;
    min-width:0;
    justify-content:center;
    white-space:normal;
  }

  .project-detail-actions-row > #portalLink{
    grid-column:3;
    width:44px;
    height:42px;
    min-width:44px;
    justify-content:center;
  }

  .project-detail-actions-row > #controllingPdfBtn{
    grid-column:1 / -1;
    width:100%;
    justify-content:center;
    white-space:normal;
  }

  .project-detail-actions-row > #msg{
    grid-column:1 / -1;
    min-width:0;
    overflow-wrap:anywhere;
  }

  .project-doc-head-row{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    gap:8px !important;
    min-width:0;
  }

  .project-doc-head-row > .app-spacer,
  .project-doc-head-row > #docMsg{
    display:none !important;
  }

  .project-doc-head-row > div:first-child{
    flex:0 1 auto;
    min-width:0;
    white-space:nowrap;
  }

  .project-doc-head-row > #docCount{
    flex:0 1 auto;
    font-size:12px;
    margin:0;
    min-width:0;
    white-space:nowrap;
  }

  .project-doc-head-row > #docZipBtn{
    margin-left:auto;
    height:38px;
    min-height:38px;
    padding:0 12px;
    align-self:center !important;
    white-space:nowrap;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .project-doc-head-row > #docToggleBtn{
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
    padding:0;
    align-self:center !important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  #docCardBody > .row{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    width:100%;
  }

  #docDropZone,
  #docCatDd,
  #docUpload{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    flex:0 0 auto !important;
    align-self:stretch !important;
  }

  #docCatDd{
    height:48px;
  }

  #docUpload{
    justify-content:center;
  }

  .project-action-head .project-action-row{
    display:grid !important;
    grid-template-columns:44px 44px minmax(0, 1fr);
    align-items:center !important;
    gap:10px !important;
    width:100%;
  }

  .project-action-head .project-action-row > .app-spacer{
    display:none !important;
  }

  .project-action-head #btnBack{
    grid-column:1 / -1;
    grid-row:1;
    justify-self:start;
    width:auto;
    max-width:100%;
  }

  .project-action-head .project-search-block{
    grid-column:1 / -1;
    grid-row:2;
    display:block !important;
    width:100%;
    min-width:0;
  }

  .project-action-head .project-search-block label{
    display:block;
    width:auto;
    margin:0 0 6px 0 !important;
  }

  .project-action-head .project-search-line{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    gap:8px !important;
    width:100%;
    min-width:0;
  }

  .project-action-head .project-search-line #projectQuickSearch{
    flex:1 1 0;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:42px;
  }

  .project-action-head .project-search-line #projectQuickSearchBtn{
    flex:0 0 44px;
    width:44px;
    min-width:44px;
    height:42px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .project-action-head #projectAccessBtn{
    grid-column:1 / -1;
    grid-row:3;
    width:100%;
    min-width:0;
    justify-content:center;
    white-space:normal;
  }

  .project-action-head #controllingPdfBtn{
    grid-column:1 / -1;
    grid-row:4;
    width:100%;
    justify-content:center;
    white-space:normal;
  }

  .project-action-head #projStatusBtn{
    grid-column:1;
    grid-row:5;
    width:44px;
    min-width:44px !important;
    height:42px;
    justify-self:start;
  }

  .project-action-head #portalLink{
    grid-column:2;
    grid-row:5;
    width:44px;
    min-width:44px;
    height:42px;
    justify-self:start;
    justify-content:center;
  }

  .project-action-head #msg{
    grid-column:1 / -1;
    grid-row:6;
    min-width:0;
    overflow-wrap:anywhere;
  }

  #pager{
    width:100%;
    justify-content:flex-start;
  }

  #pageSizeSel{
    max-width:120px !important;
  }
}

/* =========================================================
   PWA Installationshinweis
========================================================= */

.pwa-install-banner{
  position:fixed;
  left:18px;
  right:18px;
  bottom:18px;
  z-index:12000;

  display:flex;
  align-items:center;
  gap:16px;

  max-width:920px;
  margin:0 auto;
  padding:14px 16px;

  background:#ffffff;
  border:1px solid #cbd5e1;
  border-radius:16px;
  box-shadow:0 18px 45px rgba(15,23,42,.24);
}

.pwa-install-text{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.pwa-install-text strong{
  color:#173a5a;
  font-size:14px;
  font-weight:900;
}

.pwa-install-text span{
  color:#475569;
  font-size:13px;
  line-height:1.35;
}

.pwa-install-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  flex-shrink:0;
}

@media (max-width: 700px){
  .pwa-install-banner{
    left:10px;
    right:10px;
    bottom:10px;
    flex-direction:column;
    align-items:stretch;
  }

  .pwa-install-actions{
    width:100%;
    margin-left:0;
    justify-content:flex-end;
  }
}
.nav-menu-title{
  padding:8px 14px 4px;
  font-size:12px;
  font-weight:900;
  color:#0f3d68;
  text-transform:uppercase;
  letter-spacing:.04em;
  opacity:1;
  pointer-events:none;
}
.mobile-menu-title{
  padding:9px 14px 4px;
  font-size:12px;
  font-weight:900;
  color:#FFF;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.nav-dropdown-content .nav-menu-title{
  color:#0f3d68 !important;
}
.nav-dropdown-content{
  min-width:260px;
  padding:10px 0;
  border-radius:14px;
  z-index:60010;
}

.app-header{
  position:relative;
  z-index:60000;
  overflow:hidden;
}

.app-nav{
  position:relative;
  z-index:60001;
  overflow:hidden;
}

.nav-dropdown{
  position:relative;
  z-index:60002;
  overflow:hidden;
}

.nav-dropdown-content,
.finanzen-dropdown-menu,
.premium-dropdown-menu{
  z-index:60010 !important;
  overflow:hidden;
}

.nav-dropdown-content .nav-menu-title{
  padding:10px 18px 5px;
  font-size:11px;
  font-weight:900;
  color:#31516c !important;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.95;
}

.nav-dropdown-content a{
  display:block;
  padding:8px 18px;
  font-size:14px;
  font-weight:700;
  color:#0f2f4a;
  border-radius:0;
}

.nav-dropdown-content a:hover{
  background:rgba(23,58,90,.10);
  color:#08243b;
}

.nav-dropdown-content > div[style*="height:1px"]{
  background:rgba(15,23,42,.16) !important;
  margin:8px 16px !important;
}
.nav-dropdown-content .nav-menu-title + a,
.nav-dropdown-content .nav-menu-title + a + a,
.nav-dropdown-content .nav-menu-title + a + a + a{
  padding-left:30px;
  position:relative;
}

.nav-dropdown-content .nav-menu-title + a::before,
.nav-dropdown-content .nav-menu-title + a + a::before,
.nav-dropdown-content .nav-menu-title + a + a + a::before{
  content:"Ã¢â‚¬Âº";
  position:absolute;
  left:17px;
  color:#5c7890;
  font-weight:900;
}

.nav-dropdown-content .nav-menu-title{
  margin-top:2px;
}

.nav-dropdown-content a{
  line-height:1.25;
}

.nav-menu-section{
  margin:7px 10px 3px;
  padding:7px 10px 5px !important;
  border-radius:8px;
  color:#17324a !important;
}

.nav-menu-section-er{ background:#e8f3ff; }
.nav-menu-section-ar{ background:#e9f7ef; }
.nav-menu-section-forms{ background:#fdecef; }
.nav-menu-section-tools{ background:#fff1dc; }

.mobile-submenu .mobile-menu-title.nav-menu-section{
  margin:8px 8px 3px;
  color:#17324a;
}

.finanzen-dropdown-menu{
  width:340px;
  min-width:340px;
  max-width:340px;
  padding:9px 8px;
  border-radius:14px;
  background:#fbfcfe;
  border:1px solid rgba(15,35,55,.10);
  box-shadow:0 18px 34px rgba(15,35,55,.18), 0 2px 8px rgba(15,35,55,.10);
}

.finanzen-dropdown-menu .nav-menu-section{
  display:flex;
  align-items:center;
  gap:8px;
  margin:9px 2px 3px;
  padding:4px 6px !important;
  border:none;
  background:transparent;
  font-size:10.5px;
  color:#60758a !important;
}

.finanzen-dropdown-menu .nav-menu-section:first-child{
  margin-top:0;
}

.finanzen-dropdown-menu .nav-menu-section::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#6b8fb3;
  flex:0 0 auto;
}

.finanzen-dropdown-menu .nav-menu-section-er::before{ background:#3b82c4; }
.finanzen-dropdown-menu .nav-menu-section-ar::before{ background:#3a9b62; }
.finanzen-dropdown-menu .nav-menu-section-forms::before{ background:#c95f72; }
.finanzen-dropdown-menu .nav-menu-section-tools::before{ background:#d4942f; }

.finanzen-dropdown-menu a{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:1px 0;
  padding:7px 7px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#102d45;
  text-decoration:none;
  transition:background .15s ease, border-color .15s ease;
}

.finanzen-dropdown-menu a:hover{
  background:#eef4f9;
  border-color:#d9e4ee;
  color:#08243b;
  text-decoration:none;
}

.finanzen-dropdown-menu a::before{
  content:none !important;
  display:none !important;
}

.finanzen-dropdown-menu .nav-item-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  flex:0 0 22px;
  margin-top:1px;
  line-height:1;
}

.finanzen-dropdown-menu .nav-item-icon img{
  width:20px;
  height:20px;
  display:block;
}

.finanzen-dropdown-menu .nav-item-copy{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:0;
}

.finanzen-dropdown-menu .nav-item-title{
  font-size:14px;
  font-weight:600;
  color:#102d45;
  line-height:1.18;
}

.finanzen-dropdown-menu .nav-item-desc{
  font-size:12px;
  font-weight:400;
  color:#738496;
  line-height:1.2;
}

.premium-dropdown-menu{
  width:300px;
  min-width:300px;
  max-width:300px;
  padding:9px 8px;
  border-radius:14px;
  background:#fbfcfe;
  border:1px solid rgba(15,35,55,.10);
  box-shadow:0 18px 34px rgba(15,35,55,.18), 0 2px 8px rgba(15,35,55,.10);
}

.premium-dropdown-menu.admin-dropdown-menu{
  width:310px;
  max-width:310px;
}

.premium-dropdown-menu .nav-menu-section{
  display:flex;
  align-items:center;
  gap:8px;
  margin:9px 2px 3px;
  padding:4px 6px !important;
  border:none;
  background:transparent;
  font-size:10.5px;
  color:#60758a !important;
}

.premium-dropdown-menu .nav-menu-section:first-child{
  margin-top:0;
}

.premium-dropdown-menu .nav-menu-section::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#6b8fb3;
  flex:0 0 auto;
}

.premium-dropdown-menu .nav-menu-section-er::before{ background:#3b82c4; }
.premium-dropdown-menu .nav-menu-section-ar::before{ background:#3a9b62; }
.premium-dropdown-menu .nav-menu-section-forms::before{ background:#a4465a; }
.premium-dropdown-menu .nav-menu-section-tools::before{ background:#b57522; }

.premium-dropdown-menu a{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:1px 0;
  padding:7px 7px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#102d45;
  text-decoration:none;
  transition:background .15s ease, border-color .15s ease;
}

.premium-dropdown-menu a:hover{
  background:#eef4f9;
  border-color:#d9e4ee;
  color:#08243b;
  text-decoration:none;
}

.premium-dropdown-menu a::before{
  content:none !important;
  display:none !important;
}

.premium-dropdown-menu .nav-item-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  flex:0 0 22px;
  margin-top:1px;
  line-height:1;
}

.premium-dropdown-menu .nav-item-icon img{
  width:20px;
  height:20px;
  display:block;
}

.premium-dropdown-menu .nav-item-copy{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:0;
}

.premium-dropdown-menu .nav-item-title{
  font-size:14px;
  font-weight:600;
  color:#102d45;
  line-height:1.18;
}

.premium-dropdown-menu .nav-item-desc{
  font-size:12px;
  font-weight:400;
  color:#738496;
  line-height:1.2;
}


/* SUSI Sidebar Navigation Test */
@media (min-width: 1101px){
  html:not(.app-popup) body{
    padding-left:220px;
  }

  html:not(.app-popup) body:has(.login-shell){
    padding-left:0;
  }

  html:not(.app-popup) .app-header{
    position:fixed;
    inset:0 auto 0 0;
    width:220px;
    height:100vh;
    max-height:100vh;
    box-sizing:border-box;
    padding:18px 14px 16px;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    overflow:hidden;
    background:
      radial-gradient(circle at 20% 0%, var(--susi-head-glow), transparent 32%),
      linear-gradient(180deg,var(--susi-head-top) 0%,var(--susi-head-mid) 48%,var(--susi-head-bottom) 100%);
    border-right:1px solid rgba(255,255,255,.08);
    box-shadow:12px 0 32px rgba(10,28,45,.18);
    z-index:60000;
  }
  html:not(.app-popup) .subheader{
    background:
      radial-gradient(circle at 0% 0%, var(--susi-head-glow), transparent 34%),
      linear-gradient(135deg,var(--susi-head-top) 0%,var(--susi-head-mid) 54%,var(--susi-head-bottom) 100%);
    border-top:0;
    border-bottom:1px solid rgba(8,24,40,.22);
    box-shadow:inset 1px 0 0 rgba(255,255,255,.05), 0 8px 20px rgba(10,28,45,.10);
    padding:22px 24px 20px;
  }

  html:not(.app-popup) .app-logo{
    display:flex;
    align-items:center;
    min-height:68px;
    padding:4px 3px 20px;
    border-bottom:1px solid rgba(255,255,255,.11);
  }

  html:not(.app-popup) .app-logo img{
    max-width:174px;
    height:auto;
    display:block;
  }

  html:not(.app-popup) .app-nav{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:5px;
    width:100%;
    min-height:0;
    flex:1 1 auto;
    max-height:100%;
    overflow-y:auto;
    overflow-x:hidden;
    padding:2px 0 6px;
    scrollbar-width:none;
  }

  html:not(.app-popup) .app-nav::-webkit-scrollbar{
    display:none;
  }

  html:not(.app-popup) .app-nav > a,
  html:not(.app-popup) .nav-dropbtn{
    min-height:38px;
    height:auto;
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:4px 10px;
    border-radius:10px;
    color:#d9e8f6;
    text-decoration:none;
    font-size:13px;
    font-weight:500;
    background:transparent;
    border:1px solid transparent;
    transition:background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
  }

  html:not(.app-popup) .app-nav > a:hover,
  html:not(.app-popup) .nav-dropbtn:hover,
  html:not(.app-popup) .nav-dropdown:hover > .nav-dropbtn,
  html:not(.app-popup) .nav-dropdown.is-open > .nav-dropbtn{
    background:rgba(255,255,255,.08);
    border-color:rgba(255,255,255,.10);
    color:#fff;
    text-decoration:none;
  }

  html:not(.app-popup) .app-nav > a.is-active,
  html:not(.app-popup) .app-nav > .nav-dropdown > .nav-dropbtn.is-active,
  html:not(.app-popup) .nav-dropdown.is-active > .nav-dropbtn{
    background:linear-gradient(180deg,#2f7fbd,#22699f);
    border-color:rgba(155,205,244,.34);
    color:#fff;
    box-shadow:0 8px 18px rgba(25,93,143,.22);
  }

  html:not(.app-popup) .nav-main-icon,
  html:not(.app-popup) .finanzen-dropdown-menu .nav-item-icon,
  html:not(.app-popup) .premium-dropdown-menu .nav-item-icon{
    width:24px;
    height:24px;
    flex:0 0 24px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:rgba(255,255,255,.10);
  }

  html:not(.app-popup) .nav-main-icon img,
  html:not(.app-popup) .finanzen-dropdown-menu .nav-item-icon img,
  html:not(.app-popup) .premium-dropdown-menu .nav-item-icon img{
    width:17px;
    height:17px;
    display:block;
    filter:brightness(0) invert(1);
    opacity:.92;
  }

  html:not(.app-popup) .nav-dropdown{
    display:block;
    width:100%;
    height:auto;
    position:relative;
    z-index:auto;
    overflow:visible;
  }

  html:not(.app-popup) .nav-dropbtn::after{
    content:'';
    width:0;
    height:0;
    margin-left:auto;
    border-top:4px solid transparent;
    border-bottom:4px solid transparent;
    border-left:5px solid currentColor;
    opacity:.62;
    transform:rotate(0deg);
    transition:transform .16s ease, opacity .16s ease;
  }

  html:not(.app-popup) .nav-dropdown:hover > .nav-dropbtn::after,
  html:not(.app-popup) .nav-dropdown:focus-within > .nav-dropbtn::after,
  html:not(.app-popup) .nav-dropdown.is-open > .nav-dropbtn::after{
    transform:rotate(90deg);
    opacity:.82;
  }

  html:not(.app-popup) .nav-dropdown-content,
  html:not(.app-popup) .finanzen-dropdown-menu,
  html:not(.app-popup) .premium-dropdown-menu,
  html:not(.app-popup) .premium-dropdown-menu.admin-dropdown-menu{
    display:block;
    position:static;
    width:auto;
    min-width:0;
    max-width:none;
    max-height:0;
    overflow:hidden !important;
    padding:0;
    margin:0 0 0 16px;
    border:0;
    border-left:1px solid rgba(189,216,238,.18);
    border-radius:0;
    background:transparent;
    box-shadow:none;
    opacity:0;
    transition:max-height .22s ease, opacity .18s ease, padding .18s ease;
  }

  html:not(.app-popup) .nav-dropdown:hover > .nav-dropdown-content,
  html:not(.app-popup) .nav-dropdown:focus-within > .nav-dropdown-content,
  html:not(.app-popup) .nav-dropdown.is-open > .nav-dropdown-content,
  html:not(.app-popup) .nav-dropdown.is-active > .nav-dropdown-content{
    max-height:900px;
    opacity:1;
    padding:5px 0 8px 9px;
  }

  html:not(.app-popup) .nav-dropdown-content .nav-menu-title,
  html:not(.app-popup) .finanzen-dropdown-menu .nav-menu-section,
  html:not(.app-popup) .premium-dropdown-menu .nav-menu-section{
    margin:8px 0 3px;
    padding:3px 4px !important;
    background:transparent;
    border:0;
    color:rgba(220,235,248,.56) !important;
    font-size:10px;
    font-weight:900;
    letter-spacing:.06em;
  }

  html:not(.app-popup) .finanzen-dropdown-menu .nav-menu-section::before,
  html:not(.app-popup) .premium-dropdown-menu .nav-menu-section::before{
    display:none;
  }

  html:not(.app-popup) .nav-dropdown-content a,
  html:not(.app-popup) .finanzen-dropdown-menu a,
  html:not(.app-popup) .premium-dropdown-menu a{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:34px;
    margin:2px 0;
    padding:7px 8px;
    border:1px solid transparent;
    border-radius:9px;
    color:#d8e7f4;
    background:transparent;
    text-decoration:none;
    white-space:normal;
  }

  html:not(.app-popup) .nav-dropdown-content .nav-item-title,
  html:not(.app-popup) .finanzen-dropdown-menu .nav-item-title,
  html:not(.app-popup) .premium-dropdown-menu .nav-item-title{
    font-weight:200;
  }

  html:not(.app-popup) .nav-dropdown-content a[data-sd-open]{
    margin-left:0;
    padding-left:8px;
  }

  html:not(.app-popup) .nav-dropdown-content a:hover,
  html:not(.app-popup) .finanzen-dropdown-menu a:hover,
  html:not(.app-popup) .premium-dropdown-menu a:hover{
    color:#fff;
    background:rgba(255,255,255,.07);
    border-color:rgba(255,255,255,.08);
  }

  html:not(.app-popup) .nav-dropdown-content a::before,
  html:not(.app-popup) .finanzen-dropdown-menu a::before,
  html:not(.app-popup) .premium-dropdown-menu a::before{
    content:none !important;
    display:none !important;
  }
  html:not(.app-popup) .premium-dropdown-menu .nav-menu-title + a,
  html:not(.app-popup) .premium-dropdown-menu .nav-menu-title + a + a,
  html:not(.app-popup) .premium-dropdown-menu .nav-menu-title + a + a + a{
    padding-left:8px;
  }

  html:not(.app-popup) .premium-dropdown-menu .nav-menu-title + a::before,
  html:not(.app-popup) .premium-dropdown-menu .nav-menu-title + a + a::before,
  html:not(.app-popup) .premium-dropdown-menu .nav-menu-title + a + a + a::before{
    content:none !important;
    display:none !important;
  }

  html:not(.app-popup) .finanzen-dropdown-menu .nav-item-title,
  html:not(.app-popup) .premium-dropdown-menu .nav-item-title{
    font-size:12px;
    color:inherit;
    line-height:1.18;
  }

  html:not(.app-popup) .finanzen-dropdown-menu .nav-item-desc,
  html:not(.app-popup) .premium-dropdown-menu .nav-item-desc{
    display:none;
  }

  html:not(.app-popup) .app-spacer{
    flex:0 0 auto;
    min-height:0;
  }

  html:not(.app-popup) .app-testsystem-badge{
    align-self:stretch;
    border-radius:10px;
    font-size:10px;
    padding:7px 8px;
    margin-top:4px;
  }

  html:not(.app-popup) .app-user-menu{
    display:block;
    margin-top:0;
    padding:8px 2px 0;
    border-top:1px solid rgba(199,220,238,.16);
    color:#d9e8f6;
  }

  html:not(.app-popup) .app-user-status{
    margin:0 0 3px;
    color:rgba(217,232,246,.56);
    font-size:10px;
    font-weight:500;
    line-height:1.2;
  }

  html:not(.app-popup) .app-user-footer-row{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
  }

  html:not(.app-popup) .app-user-mini-icon{
    flex:0 0 18px;
    width:18px;
    height:18px;
    border-radius:999px;
    border:1px solid rgba(199,220,238,.28);
    background:rgba(255,255,255,.08);
    position:relative;
  }

  html:not(.app-popup) .app-user-mini-icon::before{
    content:"";
    position:absolute;
    left:6px;
    top:4px;
    width:4px;
    height:4px;
    border-radius:999px;
    background:rgba(238,246,253,.82);
  }

  html:not(.app-popup) .app-user-mini-icon::after{
    content:"";
    position:absolute;
    left:4px;
    bottom:4px;
    width:8px;
    height:5px;
    border-radius:999px 999px 5px 5px;
    background:rgba(238,246,253,.82);
  }

  html:not(.app-popup) .app-user-copy{
    min-width:0;
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
    gap:1px;
  }

  html:not(.app-popup) .app-user-name{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px;
    font-weight:600;
    line-height:1.2;
    color:rgba(255,255,255,.86);
  }

  html:not(.app-popup) .app-user-role{
    font-size:10px;
    font-weight:500;
    line-height:1.1;
    color:rgba(217,232,246,.58);
  }

  html:not(.app-popup) .app-user-logout{
    flex:0 0 26px;
    width:26px;
    height:26px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
    border:1px solid rgba(199,220,238,.18);
    border-radius:7px;
    background:rgba(255,255,255,.05);
    color:#eef6fd;
    text-decoration:none;
    font-size:0;
    line-height:1;
    cursor:pointer;
  }

  html:not(.app-popup) .app-user-logout::before{
    content:'';
    width:11px;
    height:11px;
    display:inline-block;
    border:1.5px solid currentColor;
    border-left:0;
    border-bottom:0;
    transform:rotate(45deg);
    opacity:.72;
  }

  html:not(.app-popup) .app-user-logout:hover{
    background:rgba(255,255,255,.10);
    border-color:rgba(199,220,238,.28);
    color:#fff;
  }

  html:not(.app-popup) .app-burger{
    display:none;
  }
}

html.app-popup body,
body.fsb-popup-page{
  padding-left:0 !important;
  margin-left:0 !important;
  width:100%;
  max-width:none;
}

html.app-popup .app-header,
body.fsb-popup-page .app-header{
  display:none !important;
}

html.app-popup .subheader,
body.fsb-popup-page .subheader,
html.app-popup .wrap,
body.fsb-popup-page .wrap,
body.fsb-popup-page .fsb-page-shell{
  margin-left:0 !important;
  width:auto;
  max-width:none;
}

@media (max-width:1100px){
  html:not(.app-popup) body{
    padding-left:0;
  }

  html:not(.app-popup) .app-header{
    position:relative;
    inset:auto;
    width:auto;
    height:auto;
    padding:10px 12px;
    flex-direction:row;
    align-items:center;
    gap:10px;
    overflow:hidden;
    background:linear-gradient(180deg,var(--blue),var(--blue2));
    box-shadow:0 2px 10px rgba(0,0,0,.15);
  }

  html:not(.app-popup) .app-logo{
    min-height:0;
    padding:0;
    border-bottom:0;
  }

  html:not(.app-popup) .app-logo img{
    height:24px;
    max-width:none;
  }

  html:not(.app-popup) .app-nav,
  html:not(.app-popup) .app-user-menu,
  html:not(.app-popup) .app-testsystem-badge{
    display:none;
  }

  html:not(.app-popup) .app-spacer{
    flex:1;
  }

  html:not(.app-popup) .app-burger{
    display:inline-flex;
    flex:0 0 40px;
  }
}





/* Dokumentbereich Block 3: Upload-Leiste, Filter und kompaktere Vorschau */
.doc-upload-panel{
  display:grid;
  grid-template-columns:minmax(280px, 1fr) minmax(260px, 360px);
  gap:12px;
  align-items:stretch;
  margin-bottom:12px;
  padding:12px;
  border:1px solid #dbe6ef;
  border-radius:14px;
  background:linear-gradient(180deg,#f8fbfd,#f3f7fb);
}

.doc-upload-drop{
  min-height:72px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1.5px dashed #b9ccdc;
  border-radius:12px;
  background:#fff;
  color:#334155;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.doc-upload-drop:hover{
  border-color:#7fa5c1;
  background:#f8fbfd;
  box-shadow:0 8px 20px rgba(31,75,115,.08);
}

.doc-upload-drop-icon{
  width:42px;
  height:42px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#1f4b73;
  background:#edf5fb;
  border:1px solid #c9ddeb;
  flex:0 0 auto;
}

.doc-upload-drop-title{
  font-size:14px;
  line-height:1.2;
  font-weight:800;
  color:#16354f;
}

.doc-upload-drop-sub{
  margin-top:2px;
  font-size:12px;
  color:#64748b;
}

.doc-upload-drop-info{
  margin-top:5px;
  font-size:12px;
  color:#475569;
  font-weight:600;
}

.doc-upload-controls{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:stretch;
}

.doc-upload-category{
  position:relative;
  min-width:0;
}

#docCatBtn{
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 12px;
}

.doc-upload-category-label{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}

.doc-upload-category-text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.doc-upload-caret{
  font-size:12px;
  color:#64748b;
}

.doc-upload-category-menu{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:52px;
  z-index:50;
  background:#fff;
  border:1px solid #cfd8e3;
  border-radius:12px;
  box-shadow:0 12px 28px rgba(15,42,67,.16);
  overflow:hidden;
}

.doc-upload-button{
  min-width:104px;
  min-height:48px;
  padding:0 18px;
}

.doc-filter-bar{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:0 0 10px;
}

.doc-filter-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:0 10px;
  border:1px solid #d7e1ea;
  border-radius:999px;
  background:#fff;
  color:#334155;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:background .16s ease, border-color .16s ease, color .16s ease;
}

.doc-filter-chip span{
  min-width:20px;
  height:20px;
  padding:0 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#eef4f8;
  color:#526170;
  font-size:11px;
}

.doc-filter-chip:hover{
  background:#f3f7fb;
  border-color:#b9ccdc;
}

.doc-filter-chip.active{
  color:#fff;
  background:#1f4b73;
  border-color:#1f4b73;
}

.doc-filter-chip.active span{
  color:#1f4b73;
  background:#fff;
}

.doc-tablewrap{
  border:1px solid #e1e8ef !important;
  overflow-x:auto;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  border-radius:12px;
}

.doc-tablewrap .tgrid tbody tr{
  min-height:48px;
}

.doc-tablewrap .tgrid td{
  vertical-align:middle;
  padding-top:7px;
  padding-bottom:7px;
}

.doc-file-cell{
  min-width:0;
}

.doc-file-name{
  font-weight:700;
  color:#102d45;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.doc-file-sub{
  margin-top:2px;
  font-size:11px;
  color:#64748b;
  font-weight:500;
}

.doc-empty-row{
  padding:16px !important;
  color:#64748b;
  font-size:13px;
  text-align:center;
}

.doc-preview-card{
  max-height:82vh;
  display:flex;
  flex-direction:column;
  margin:4vh auto 0;
}

.doc-preview-head{
  padding:10px 14px;
  flex:0 0 auto;
}

.doc-preview-head .modal-title{
  font-size:17px;
  line-height:1.2;
}

.doc-preview-body{
  padding:12px 14px;
  overflow:auto;
}

.doc-preview-frame{
  min-height:180px;
  max-height:60vh;
  padding:10px;
}

.doc-preview-img{
  max-height:58vh;
}

.doc-preview-meta{
  gap:7px;
  margin-top:9px;
  font-size:12px;
}

.doc-preview-meta span{
  padding:5px 8px;
}

.doc-preview-actions{
  margin-top:10px;
}

@media (max-width: 840px){
  .doc-upload-panel{
    grid-template-columns:1fr;
  }

  .doc-upload-controls{
    grid-template-columns:1fr;
  }

  .doc-upload-button{
    width:100%;
  }
}

@media (max-width: 760px){
  .doc-preview-card{
    max-height:88vh;
  }

  .doc-preview-frame{
    max-height:58vh;
  }

  .doc-preview-img{
    max-height:56vh;
  }
}

/* Dokumentbereich Block 4: zweispaltige Liste mit rechter Bildvorschau */
.doc-content-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(280px, 360px);
  gap:12px;
  align-items:start;
}

.doc-list-panel{
  min-width:0;
}

.doc-side-preview{
  min-height:280px;
  border:1px solid #dbe6ef;
  border-radius:14px;
  background:#f8fbfd;
  box-shadow:0 10px 26px rgba(15,42,67,.08);
  overflow:hidden;
  position:sticky;
  top:12px;
}

.doc-side-preview-empty{
  min-height:280px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:24px;
  text-align:center;
  color:#64748b;
}

.doc-side-preview-empty-icon{
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  color:#1f4b73;
  background:#edf5fb;
  border:1px solid #c9ddeb;
}

.doc-side-preview-empty-title{
  font-size:15px;
  font-weight:900;
  color:#173a5a;
}

.doc-side-preview-empty-text{
  font-size:13px;
  line-height:1.35;
}

.doc-side-preview-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px 10px;
  background:linear-gradient(180deg,#1f4b73,#173a5a);
  color:#fff;
}

.doc-side-preview-title{
  font-size:14px;
  font-weight:900;
  line-height:1.25;
  word-break:break-word;
}

.doc-side-preview-sub{
  margin-top:2px;
  font-size:12px;
  color:rgba(255,255,255,.78);
}

.doc-side-preview-clear{
  color:#fff !important;
  border-color:rgba(255,255,255,.35) !important;
  background:rgba(255,255,255,.1) !important;
  flex:0 0 auto;
}

.doc-side-preview-image-btn{
  width:100%;
  min-height:190px;
  max-height:310px;
  padding:10px;
  border:0;
  border-bottom:1px solid #dbe6ef;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.doc-side-preview-img{
  max-width:100%;
  max-height:290px;
  object-fit:contain;
  display:block;
  border-radius:10px;
}

.doc-side-preview-meta{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px 12px 0;
}

.doc-side-preview-meta span{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  padding:7px 9px;
  border:1px solid #dbe6ef;
  border-radius:10px;
  background:#fff;
  color:#334155;
  font-size:12px;
  line-height:1.25;
  word-break:break-word;
}

.doc-side-preview-meta strong{
  color:#64748b;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.doc-side-preview-actions{
  display:flex;
  gap:8px;
  padding:12px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.doc-side-preview-actions .btn{
  min-height:36px;
}

.doc-row-selected td{
  background:#eef6fb !important;
  box-shadow:inset 3px 0 0 #1f4b73;
}

.doc-preview-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  padding-top:10px;
  margin-top:10px;
  border-top:1px solid #dbe6ef;
}

.doc-preview-actions .btn{
  max-width:100%;
  white-space:normal;
}

@media (max-width: 1180px){
  .doc-content-grid{
    grid-template-columns:1fr;
  }

  .doc-side-preview{
    position:static;
  }
}

@media (max-width: 760px){
  .doc-side-preview-actions{
    flex-direction:column;
  }

  .doc-side-preview-actions .btn{
    width:100%;
    justify-content:center;
  }
}

/* Dokumentbereich Block 5: optischer Feinschliff */
.doc-upload-panel{
  grid-template-columns:minmax(300px, 1fr) minmax(260px, 330px);
  gap:10px;
  align-items:center;
  padding:10px;
  margin-bottom:10px;
}

.doc-upload-drop{
  min-height:58px;
  padding:9px 12px;
  gap:10px;
}

.doc-upload-drop-icon{
  width:36px;
  height:36px;
  border-radius:10px;
}

.doc-upload-drop-title{
  font-size:13px;
}

.doc-upload-drop-sub,
.doc-upload-drop-info{
  font-size:11px;
}

.doc-upload-drop-info{
  margin-top:3px;
}

.doc-upload-controls{
  align-items:center;
  gap:8px;
}

#docCatBtn,
.doc-upload-button{
  min-height:44px;
  height:44px;
}

.doc-upload-button{
  min-width:96px;
  padding:0 16px;
}

.doc-side-preview{
  position:sticky;
  top:90px;
  align-self:flex-start;
}

.doc-side-preview-head{
  padding:10px 11px 8px;
}

.doc-side-preview-image-btn{
  min-height:170px;
  max-height:270px;
  padding:8px;
}

.doc-side-preview-img{
  max-height:250px;
}

.doc-side-preview-meta{
  gap:4px;
  padding:8px 10px 0;
}

.doc-side-preview-meta span{
  padding:5px 7px;
  border-radius:8px;
  font-size:11px;
  gap:1px;
}

.doc-side-preview-meta strong{
  font-size:9px;
}

.doc-side-preview-actions{
  gap:7px;
  padding:10px;
}

.doc-side-preview-actions .btn{
  min-height:34px;
  padding:0 10px;
}

.doc-tablewrap .tgrid tbody tr:hover td{
  background:#f7fbfe;
}

.doc-tablewrap .tgrid tbody tr.doc-row-selected td,
.doc-tablewrap .tgrid tbody tr.doc-row-selected:hover td{
  background:#edf6fb !important;
  border-left-color:transparent !important;
  border-right-color:transparent !important;
  box-shadow:none !important;
}

.doc-tablewrap .tgrid tbody tr.doc-row-selected td:first-child{
  box-shadow:inset 3px 0 0 #2f7fbd !important;
}

.doc-row-selected .doc-file-name{
  color:#123a5a;
  font-weight:700;
}

.doc-file-name{
  font-weight:650;
}

.doc-preview-card{
  max-height:82vh;
}

.doc-preview-body{
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}

.doc-preview-frame{
  flex:1 1 auto;
  min-height:160px;
  max-height:58vh;
}

.doc-preview-img{
  max-height:56vh;
}

.doc-preview-meta{
  flex:0 0 auto;
  gap:6px;
  margin-top:8px;
}

.doc-preview-actions{
  flex:0 0 auto;
  justify-content:flex-end;
  padding:10px 0 0;
  margin:8px 0 0;
  border-top:1px solid #dbe6ef;
  overflow:visible;
}

.doc-preview-actions .btn{
  min-height:36px;
  padding:0 12px;
  flex:0 1 auto;
}

@media (max-width: 1180px){
  .doc-side-preview{
    position:static;
    top:auto;
  }
}

@media (max-width: 840px){
  .doc-upload-panel{
    grid-template-columns:1fr;
  }

  #docCatBtn,
  .doc-upload-button{
    height:44px;
  }
}

/* Dokumentbereich Block 6: Sticky-Preview, flache Uploadzeile, Löschmodal */
.doc-upload-drop{
  min-height:50px;
  padding:8px 11px;
}

.doc-upload-drop-sub{
  display:flex;
  align-items:center;
  gap:0;
  flex-wrap:wrap;
}

.doc-upload-drop-info{
  display:inline;
  margin-top:0;
  font-weight:700;
  color:#334155;
}

.doc-side-preview{
  position:relative;
  top:auto;
  overflow:visible;
  min-height:0;
  border:0;
  background:transparent;
  box-shadow:none;
}

.doc-side-preview-inner{
  position:sticky;
  top:90px;
  align-self:flex-start;
  max-height:calc(100vh - 110px);
  overflow:auto;
  border:1px solid #dbe6ef;
  border-radius:14px;
  background:#f8fbfd;
  box-shadow:0 10px 26px rgba(15,42,67,.08);
}

.doc-delete-card{
  max-width:520px;
}

.doc-delete-head{
  background:linear-gradient(180deg,#1f4b73,#173a5a);
  color:#fff;
}

.doc-delete-head .modal-sub{
  color:rgba(255,255,255,.78);
}

.doc-delete-head .btn{
  color:#fff;
  border-color:rgba(255,255,255,.35);
  background:rgba(255,255,255,.10);
}

.doc-delete-body{
  background:#f8fbfd;
}

.doc-delete-warning{
  font-weight:900;
  color:#102d45;
  margin-bottom:8px;
}

.doc-delete-name{
  padding:9px 10px;
  border:1px solid #dbe6ef;
  border-radius:10px;
  background:#fff;
  color:#334155;
  font-size:13px;
  font-weight:700;
  word-break:break-word;
  margin-bottom:10px;
}

.doc-delete-foot{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:12px 14px;
  background:#f8fbfd;
  border-top:1px solid #dbe6ef;
}

.doc-delete-confirm{
  background:#b91c1c !important;
  border-color:#b91c1c !important;
  color:#fff !important;
}

.doc-delete-confirm:hover{
  background:#991b1b !important;
  border-color:#991b1b !important;
}

@media (max-width: 1180px){
  .doc-side-preview-inner{
    position:static;
    top:auto;
    max-height:none;
  }
}

@media (max-width: 640px){
  .doc-delete-foot{
    flex-direction:column-reverse;
  }

  .doc-delete-foot .btn{
    width:100%;
    justify-content:center;
  }
}

/* Dokumentbereich: rechte Vorschau auf Desktop fest sichtbar */
@media (min-width: 1281px){
  .doc-content-grid{
    grid-template-columns:minmax(0, 1fr);
    padding-right:390px;
  }

  .doc-list-panel{
    min-width:0;
  }

  .doc-side-preview{
    position:static;
    min-height:0;
    border:0;
    background:transparent;
    box-shadow:none;
    overflow:visible;
  }

  .doc-side-preview-inner{
    position:fixed;
    top:96px;
    right:18px;
    width:360px;
    max-height:calc(100vh - 120px);
    overflow:auto;
    z-index:8000;
    border:1px solid #dbe6ef;
    border-radius:14px;
    background:#f8fbfd;
    box-shadow:0 18px 40px rgba(15,42,67,.18);
  }
}

@media (min-width: 1500px){
  .doc-content-grid{
    padding-right:420px;
  }

  .doc-side-preview-inner{
    right:24px;
    width:390px;
  }
}

@media (max-width: 1280px){
  .doc-content-grid{
    padding-right:0;
  }

  .doc-side-preview-inner{
    position:static;
    top:auto;
    right:auto;
    width:auto;
    max-height:none;
    z-index:auto;
  }
}

/* Dokumentbereich Korrektur: Preview nur innerhalb der Dokumenten-Card */
.doc-content-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 360px;
  gap:16px;
  align-items:start;
  padding-right:0 !important;
}

.doc-list-panel{
  min-width:0;
}

.doc-tablewrap{
  max-height:calc(100vh - 330px);
  overflow:auto !important;
}

.doc-side-preview{
  position:relative !important;
  top:auto !important;
  right:auto !important;
  min-height:0;
  align-self:start;
  border:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}

.doc-side-preview-inner{
  position:sticky !important;
  top:12px !important;
  right:auto !important;
  width:auto !important;
  max-height:calc(100vh - 330px) !important;
  overflow:auto !important;
  z-index:auto !important;
  border:1px solid #dbe6ef;
  border-radius:14px;
  background:#f8fbfd;
  box-shadow:0 10px 26px rgba(15,42,67,.08);
}

@media (max-width: 1180px){
  .doc-content-grid{
    grid-template-columns:1fr;
    padding-right:0 !important;
  }

  .doc-tablewrap{
    max-height:none;
  }

  .doc-side-preview-inner{
    position:static !important;
    top:auto !important;
    max-height:none !important;
  }
}

/* Dokumentbereich Kopfzeile: kompakte Upload-/Aktionsleiste */
.doc-header-main{
  min-height:32px;
}

.doc-toolbar-row{
  display:flex;
  align-items:stretch;
  gap:10px;
  padding:0 14px 10px;
  margin-top:-2px;
}

.doc-toolbar-row .doc-upload-panel{
  flex:1 1 auto;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(300px, .95fr) minmax(300px, .8fr);
  gap:10px;
  align-items:center;
  margin:0;
  padding:8px;
}

.doc-toolbar-row .doc-upload-drop{
  min-height:46px;
  padding:7px 10px;
}

.doc-toolbar-row .doc-upload-drop-icon{
  width:34px;
  height:34px;
}

.doc-toolbar-row .doc-upload-controls{
  display:grid;
  grid-template-columns:minmax(210px, 1fr) auto;
  gap:8px;
  align-items:center;
}

.doc-toolbar-row #docCatBtn,
.doc-toolbar-row .doc-upload-button{
  min-height:42px;
  height:42px;
}

.doc-toolbar-row .doc-upload-button{
  min-width:112px;
  padding:0 16px;
}

.doc-toolbar-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.doc-toolbar-actions #docZipBtn{
  height:42px;
  min-height:42px;
  padding:0 12px;
  white-space:nowrap;
}

.doc-toolbar-actions #docToggleBtn{
  width:42px;
  height:42px;
  min-width:42px;
  min-height:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

@media (max-width: 1180px){
  .doc-toolbar-row{
    flex-wrap:wrap;
  }

  .doc-toolbar-row .doc-upload-panel{
    flex-basis:100%;
    grid-template-columns:minmax(260px, 1fr) minmax(280px, 360px);
  }

  .doc-toolbar-actions{
    margin-left:auto;
  }
}

@media (max-width: 760px){
  .doc-toolbar-row{
    padding:0 10px 10px;
  }

  .doc-toolbar-row .doc-upload-panel{
    grid-template-columns:1fr;
  }

  .doc-toolbar-row .doc-upload-controls{
    grid-template-columns:1fr;
  }

  .doc-toolbar-row .doc-upload-button,
  .doc-toolbar-actions #docZipBtn,
  .doc-toolbar-actions #docToggleBtn{
    height:40px;
    min-height:40px;
  }
}

.project-row-return-focus {
  background: rgba(47, 128, 237, 0.10) !important;
  transition: background 0.2s ease;
}



/* ======================================================
   Projekte  mobile Filterleiste
   ====================================================== */
@media (max-width: 700px){
  .cardhead .project-filter-head{
    display:grid !important;
    grid-template-columns:auto minmax(0, 1fr);
    align-items:start !important;
    gap:8px !important;
  }

  .cardhead .project-filter-head > #btnMine{
    grid-column:1;
    grid-row:1;
    width:38px;
    min-width:38px;
    height:38px;
    padding:0;
  }

  .cardhead .project-filter-left{
    grid-column:1 / -1;
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px !important;
    align-items:end !important;
    width:100%;
    min-width:0;
  }

  .cardhead .project-search-wrap{
    grid-column:1 / -1;
    display:grid !important;
    grid-template-columns:auto minmax(0, 1fr);
    align-items:center !important;
    gap:6px !important;
    width:100%;
    min-width:0;
  }

  .cardhead .project-search-wrap label{
    width:auto;
    white-space:nowrap;
  }

  .cardhead .project-search-wrap #q{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box;
  }

  .cardhead .project-filter-field{
    display:flex !important;
    flex-direction:column;
    align-items:stretch !important;
    gap:4px !important;
    width:100%;
    min-width:0;
  }

  .cardhead .project-filter-field select,
  .cardhead .project-pagesize-wrap select{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box;
  }

  .cardhead .project-filter-actions{
    justify-self:end;
    align-self:end;
    width:38px;
    min-width:38px;
    height:38px;
    padding:0;
  }

  .cardhead .project-filter-head .app-spacer{
    display:none;
  }

  .cardhead .project-pager-wrap{
    grid-column:2;
    grid-row:1;
    justify-content:flex-end;
    min-width:0;
    width:100%;
  }

  .cardhead .project-pager-wrap #pager{
    display:none !important;
  }

  .cardhead .project-pager-wrap #msg{
    max-width:100%;
    text-align:right;
    overflow-wrap:anywhere;
  }

  .cardhead .project-pagesize-wrap{
    grid-column:1 / -1;
    display:flex !important;
    justify-content:flex-end;
    align-items:center !important;
    gap:6px !important;
    width:100%;
  }

  .cardhead .project-pagesize-wrap #pageSizeSel{
    width:72px !important;
    max-width:72px !important;
  }
}

@media (max-width: 430px){
  .cardhead .project-filter-left{
    grid-template-columns:1fr;
  }

  .cardhead .project-filter-actions{
    justify-self:end;
  }
}

