:root{
  --bg:#f4f6f8;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#6b7280;
  --line:#d9dde3;

  --blue:#173a5a;
  --blue2:#0f2a43;

  --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);
}
.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-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;
}

.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.3fr 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: 1fr 1fr;
  gap:14px;
}

.k{
  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:right;
  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;
}

/* 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;
  right:-4px;

  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;
}

/* ======================================================
   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;
}