:root{
  --bg:#f5f9ff;
  --panel:#ffffff;
  --text:#0b1731;
  --muted:#5f6f89;
  --line:#dce7f4;
  --blue:#0875e1;
  --blue-dark:#0757bc;
  --blue-soft:#eaf4ff;
  --danger:#b91c1c;
  --success:#16794b;
  --shadow:0 24px 70px rgba(35,72,117,.14);
  --radius:22px;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
button,input,select{font:inherit}
button{cursor:pointer}
[hidden]{display:none!important}
.view{min-height:100vh}

.haspl-logo{display:block;object-fit:contain;object-position:left center}

/* LOGIN */
.login-landing{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(420px,.88fr);
  background:
    radial-gradient(circle at 13% 18%, rgba(66,149,238,.09), transparent 25%),
    radial-gradient(circle at 88% 25%, rgba(66,149,238,.10), transparent 30%),
    linear-gradient(135deg,#fbfdff 0%,#f4f9ff 62%,#edf6ff 100%);
  overflow:hidden;
}

.login-brand-side{
  position:relative;
  display:flex;
  align-items:center;
  min-height:100vh;
  padding:72px clamp(44px,9vw,150px);
  isolation:isolate;
}

.brand-area{position:relative;z-index:3;max-width:660px}
.login-logo{width:min(500px,70vw);height:auto;max-height:230px;margin-bottom:68px}
.brand-copy{max-width:590px}
.eyebrow{font-size:.78rem;font-weight:850;letter-spacing:.24em;color:var(--blue);margin-bottom:14px}
.apps-word{
  font-size:clamp(3rem,5vw,4.25rem);
  line-height:.95;
  font-weight:550;
  letter-spacing:-.04em;
  color:var(--blue-dark);
  margin-bottom:20px;
}
.brand-subtitle{
  margin:0;
  color:#263e62;
  font-size:clamp(1.1rem,1.7vw,1.55rem);
  line-height:1.45;
  max-width:590px;
}
.feature-chips{display:flex;flex-wrap:wrap;gap:14px;margin-top:44px}
.feature-chip{
  display:inline-flex;align-items:center;gap:10px;
  padding:12px 17px;border:1px solid #cfe0f4;border-radius:13px;
  background:rgba(255,255,255,.66);backdrop-filter:blur(10px);
  color:var(--blue-dark);font-weight:700;box-shadow:0 8px 28px rgba(57,110,168,.05)
}
.feature-chip-icon{font-size:1.15rem;font-weight:800}
.more-chip{color:var(--muted);background:rgba(255,255,255,.45)}

.login-decoration{position:absolute;pointer-events:none;z-index:1}
.deco-dots{
  width:86px;height:70px;top:13%;right:9%;
  background-image:radial-gradient(circle,rgba(13,115,220,.2) 1.8px,transparent 2px);
  background-size:15px 15px;
}
.wave{left:-14%;bottom:-14%;width:115%;height:37%;border:1px solid rgba(19,120,229,.17);border-radius:48% 52% 0 0 / 60% 58% 0 0;transform:rotate(5deg)}
.wave-b{bottom:-19%;transform:rotate(-7deg);opacity:.65}

.login-card-side{
  display:flex;align-items:center;justify-content:center;
  padding:70px clamp(34px,6vw,110px) 70px 24px;
}
.login-card{
  width:min(560px,100%);
  padding:58px 58px 38px;
  background:rgba(255,255,255,.94);
  border:1px solid #cadbec;
  border-radius:24px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(16px);
}
.login-card-head h2{font-size:2rem;margin:0 0 12px;letter-spacing:-.03em}
.login-card-head p{margin:0 0 42px;color:var(--muted);font-size:1.02rem}
.field-label{display:grid;gap:10px;margin:0 0 24px;font-weight:650}
.input-wrap{position:relative}
.input-wrap input{
  width:100%;height:58px;border:1px solid #cad9eb;border-radius:11px;
  padding:0 48px;background:#fff;outline:none;color:var(--text)
}
.input-wrap input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(8,117,225,.10)}
.field-icon{position:absolute;left:17px;top:50%;transform:translateY(-50%);color:#41628e;font-size:1.1rem}
.password-toggle{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  width:36px;height:36px;border:0;border-radius:9px;background:transparent;color:#41628e
}
.password-toggle:hover{background:#f0f6fd}
.check-row{display:flex;align-items:center;gap:10px;font-weight:500}
.check-row input{width:19px;height:19px;accent-color:var(--blue)}
.login-submit{
  width:100%;height:58px;border:0;border-radius:11px;color:#fff;font-size:1.05rem;font-weight:800;
  background:linear-gradient(180deg,#0d83ed,#0569d6);box-shadow:0 12px 28px rgba(0,104,213,.22)
}
.login-submit:hover{filter:brightness(.97)}
.login-security{
  margin-top:34px;padding-top:28px;border-top:1px solid #dbe7f3;
  display:flex;gap:13px;color:#445c7c;line-height:1.45;font-size:.9rem
}
.security-lock{color:var(--blue-dark)}
.demo-note{margin-top:22px;color:#8a97aa;font-size:.78rem}
.demo-note code{background:#f1f5fa;border-radius:5px;padding:2px 5px}

/* APP SHELL */
.topbar{
  position:sticky;top:0;z-index:20;height:76px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 28px;border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.93);backdrop-filter:blur(16px)
}
.topbar-brand{
  display:flex;align-items:center;gap:11px;border:0;background:transparent;padding:6px 8px;border-radius:12px
}
.topbar-brand:hover{background:#f2f7fd}
.topbar-logo{width:190px;height:50px}
.topbar-apps{font-size:1rem;color:var(--blue-dark);font-weight:700;border-left:1px solid var(--line);padding-left:12px}
.version-pill{font-size:.72rem;color:var(--muted);background:#f0f5fb;border-radius:999px;padding:4px 8px}
.user-menu{position:relative}
.user-button{display:flex;align-items:center;gap:12px;border:0;background:transparent;padding:8px 10px;border-radius:12px;color:var(--text)}
.user-button:hover{background:#f2f7fd}
.user-copy{display:grid;text-align:right}
.user-copy small{color:var(--muted)}
.dropdown{
  position:absolute;right:0;top:58px;min-width:220px;background:#fff;border:1px solid var(--line);
  border-radius:14px;padding:8px;box-shadow:0 18px 50px rgba(35,72,117,.18)
}
.dropdown button{width:100%;border:0;background:transparent;padding:11px 12px;border-radius:10px;text-align:left}
.dropdown button:hover{background:#f2f7fd}
.danger-text{color:var(--danger)!important}

.content{max-width:1240px;margin:0 auto;padding:48px 28px 72px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:28px}
.page-head p{margin:6px 0 0;color:var(--muted)}
.portal-title{font-size:clamp(2rem,4vw,3.2rem);letter-spacing:-.04em;margin:0}

.app-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));
  gap:20px;
}
.app-card{
  min-height:280px;background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;
  box-shadow:0 15px 42px rgba(35,72,117,.08);
  display:grid;grid-template-rows:auto 1fr auto;transition:.2s ease
}
.app-card:hover{transform:translateY(-2px);box-shadow:0 20px 55px rgba(35,72,117,.12)}
.app-icon{
  width:56px;height:56px;border-radius:16px;display:grid;place-items:center;
  background:linear-gradient(145deg,#e8f4ff,#d8ecff);color:var(--blue-dark);
  font-size:1.25rem;font-weight:900;margin-bottom:20px
}
.app-card h3{font-size:1.35rem;margin:0 0 8px}
.app-card p{color:var(--muted);line-height:1.55;margin:0}
.app-meta{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin-top:18px;color:var(--muted);font-size:.83rem}
.status-chip{padding:5px 8px;border-radius:999px;background:#edf6ff;color:var(--blue-dark);font-weight:750}
.app-actions{display:flex;gap:10px;margin-top:22px}
.btn{border:0;border-radius:11px;padding:11px 16px;font-weight:750}
.btn.primary{background:var(--blue);color:#fff}
.btn.primary:hover{background:var(--blue-dark)}
.btn.secondary{background:#eef4fa;color:var(--text)}
.btn.danger{background:#fee2e2;color:var(--danger)}
.app-actions .btn{flex:1}
.empty-state{padding:28px;background:#fff;border:1px dashed #cbd9e8;border-radius:16px;color:var(--muted);text-align:center}

/* ADMIN */
.admin-head .btn{white-space:nowrap}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px}
.stat span{display:block;color:var(--muted);font-size:.86rem;margin-bottom:6px}
.stat strong{font-size:1.75rem}
.panel{background:#fff;border:1px solid var(--line);border-radius:18px}
.table-panel{overflow:hidden}
.table-tools{padding:14px;border-bottom:1px solid var(--line)}
.table-tools input{width:min(340px,100%);padding:11px 13px;border:1px solid #d2deec;border-radius:11px;background:#f9fbfe}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:760px}
th,td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
th{font-size:.76rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);background:#fbfdff}
tbody tr:hover{background:#fbfdff}
.badge{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:.77rem;font-weight:750;background:#eef3f8;color:#41526b}
.badge.success{background:#def7e9;color:#16683f}
.badge.off{background:#f0f2f5;color:#7a8594}
.action-link{border:0;background:transparent;color:var(--blue-dark);font-weight:800}

/* DIALOG */
dialog{border:0;padding:0;background:transparent;max-width:min(680px,94vw);width:100%}
dialog::backdrop{background:rgba(5,19,42,.45);backdrop-filter:blur(3px)}
.dialog-card{background:#fff;border-radius:20px;padding:25px;box-shadow:0 24px 80px rgba(0,0,0,.24)}
.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.dialog-head h3{font-size:1.45rem;margin:0}
.icon-button{width:38px;height:38px;border:0;background:#eef3f8;border-radius:10px;font-size:24px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.dialog-card label{display:grid;gap:7px;margin:15px 0;font-weight:650}
.dialog-card input,.dialog-card select{
  width:100%;padding:11px 12px;border:1px solid #d1ddea;border-radius:10px;outline:none;background:#fff
}
.permission-box{border:1px solid var(--line);border-radius:14px;padding:15px 16px;margin:17px 0}
.permission-title{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.permission-title small{color:var(--muted)}
.permission-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:9px;margin-top:13px}
.permission-item{
  display:flex!important;align-items:center;gap:10px!important;margin:0!important;
  padding:10px 11px;border-radius:10px;background:#f7fbff;border:1px solid #e0ebf5;font-weight:600!important
}
.permission-item input{width:18px!important}
.dialog-actions{display:flex;align-items:center;gap:10px;margin-top:22px}
.spacer{flex:1}
.install-text{color:var(--muted);line-height:1.55}
.toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:100;
  max-width:min(90vw,540px);padding:12px 16px;border-radius:11px;
  background:#0b1731;color:#fff;box-shadow:0 15px 45px rgba(0,0,0,.22)
}

@media (max-width:980px){
  .login-landing{grid-template-columns:1fr}
  .login-brand-side{min-height:auto;padding:46px 28px 34px}
  .login-logo{width:min(420px,80vw);margin-bottom:38px}
  .login-card-side{padding:10px 28px 50px}
  .login-card{width:min(650px,100%);padding:38px}
  .feature-chips{margin-top:30px}
}
@media (max-width:720px){
  .content{padding:34px 15px 54px}
  .topbar{padding:0 13px}
  .topbar-logo{width:155px}
  .topbar-apps{display:none}
  .user-copy{display:none}
  .stats-grid{grid-template-columns:1fr 1fr}
  .page-head{align-items:flex-start;flex-direction:column}
  .admin-head .btn{width:100%}
  .form-grid{grid-template-columns:1fr}
}
@media (max-width:520px){
  .login-brand-side{padding:34px 20px 22px}
  .login-card-side{padding:8px 14px 32px}
  .login-card{padding:28px 21px}
  .login-logo{width:min(350px,88vw);margin-bottom:30px}
  .apps-word{font-size:3rem}
  .brand-subtitle{font-size:1.04rem}
  .feature-chips{gap:8px}
  .feature-chip{padding:9px 12px;font-size:.9rem}
  .stats-grid{grid-template-columns:1fr 1fr}
  .app-actions{flex-direction:column}
}


/* V0.3.3 Admin-Erweiterungen */
.admin-tabs{
  display:flex;
  gap:8px;
  margin:0 0 20px;
  padding:5px;
  width:max-content;
  max-width:100%;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
}
.admin-tab{
  border:0;
  background:transparent;
  color:var(--muted);
  padding:10px 15px;
  border-radius:9px;
  font-weight:800;
}
.admin-tab.active{
  background:var(--blue-soft);
  color:var(--blue-dark);
}
.audit-panel{overflow:hidden}
.audit-tools{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:14px;
  border-bottom:1px solid var(--line);
}
.audit-tools input{
  width:min(420px,100%);
  padding:11px 13px;
  border:1px solid #d2deec;
  border-radius:11px;
  background:#f9fbfe;
}
.audit-table{min-width:900px}
.audit-action{
  font-weight:800;
  color:var(--blue-dark);
}
.audit-details{
  max-width:330px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--muted);
  font-size:.83rem;
}
.last-login{
  color:var(--muted);
  font-size:.8rem;
}
.dialog-info{
  color:var(--muted);
  margin:12px 0 6px;
  line-height:1.5;
}
@media (max-width:720px){
  .admin-tabs{width:100%}
  .admin-tab{flex:1}
  .audit-tools{align-items:stretch;flex-direction:column}
  .audit-tools input,.audit-tools .btn{width:100%}
}


/* V0.4.0 – zentrale Projekte */
.project-tools{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 210px 210px;
  gap:12px;
  padding:14px;
  margin-bottom:18px;
}
.project-tools input,.project-tools select,
.project-form-grid input,.project-form-grid select,.project-form-grid textarea{
  width:100%;
  min-height:44px;
  border:1px solid #d2deec;
  border-radius:11px;
  background:#fff;
  padding:10px 12px;
  font:inherit;
}
.project-table{min-width:950px}
.project-number{font-weight:850;color:var(--blue-dark)}
.project-name{font-weight:800}
.project-address{color:var(--muted);font-size:.82rem;margin-top:3px}
.project-status{display:inline-flex;border-radius:999px;padding:6px 9px;font-size:.78rem;font-weight:850;background:#eef5fb}
.project-status.preparation{background:#f3f4f6;color:#475569}
.project-status.active{background:#eaf7ef;color:#146c3a}
.project-status.paused{background:#fff6df;color:#8a5a00}
.project-status.completed{background:#edf1f6;color:#4b5563}
.project-inactive{opacity:.56}
.project-dialog-card{width:min(780px,calc(100vw - 28px))}
.project-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
.project-form-grid label{display:flex;flex-direction:column;gap:7px}
.project-span-2{grid-column:1/-1}
.project-form-grid textarea{resize:vertical;min-height:110px}
.project-active-row{align-self:end;min-height:46px;flex-direction:row!important;align-items:center}
.project-active-row input{width:auto;min-height:auto}
@media(max-width:820px){
  .project-tools{grid-template-columns:1fr}
  .project-form-grid{grid-template-columns:1fr}
  .project-span-2{grid-column:auto}
  .project-dialog-card{width:min(100%,calc(100vw - 16px))}
}


/* V0.4.1 – Hinweis beim Benutzer-Startpasswort */
.password-start-hint{
  margin-top:8px;
  padding:10px 12px;
  border-radius:10px;
  background:#fff7df;
  border:1px solid #f0d58a;
  color:#6d5100;
  font-size:.86rem;
  line-height:1.45;
}
.password-start-hint strong{font-weight:850}


/* V0.4.2 – Projektdialog responsive / kein horizontales Abschneiden */
#projectDialog{
  width:min(820px, calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:calc(100vh - 24px);
  padding:0;
  border:0;
  overflow:hidden;
}

#projectDialog::backdrop{
  background:rgba(30, 50, 70, .42);
}

#projectDialog .project-dialog-card{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  max-height:calc(100vh - 24px);
  overflow-y:auto;
  overflow-x:hidden;
  margin:0;
  padding:28px;
}

#projectDialog .form-grid,
#projectDialog .form-grid.two-columns{
  min-width:0;
  width:100%;
}

#projectDialog label,
#projectDialog input,
#projectDialog select,
#projectDialog textarea{
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}

#projectDialog input,
#projectDialog select,
#projectDialog textarea{
  width:100%;
}

#projectDialog .dialog-head{
  position:sticky;
  top:-28px;
  z-index:5;
  background:#fff;
  padding-top:28px;
  padding-bottom:14px;
}

#projectDialog .dialog-actions{
  position:sticky;
  bottom:-28px;
  z-index:5;
  background:#fff;
  padding-top:14px;
  padding-bottom:28px;
  margin-bottom:-28px;
}

@media (max-width:760px){
  #projectDialog{
    width:calc(100vw - 12px);
    max-width:calc(100vw - 12px);
    max-height:calc(100vh - 12px);
  }

  #projectDialog .project-dialog-card{
    max-height:calc(100vh - 12px);
    padding:20px 16px;
  }

  #projectDialog .form-grid.two-columns{
    grid-template-columns:1fr !important;
  }

  #projectDialog .form-span-2{
    grid-column:auto !important;
  }

  #projectDialog .dialog-head{
    top:-20px;
    padding-top:20px;
  }

  #projectDialog .dialog-actions{
    bottom:-20px;
    padding-bottom:20px;
    margin-bottom:-20px;
    flex-wrap:wrap;
  }

  #projectDialog .dialog-actions .btn{
    min-height:46px;
  }
}


/* V0.4.3 – Funktionsrechte + Passwortregeln */
.feature-permission-list{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.feature-permission-item{display:flex;gap:10px;align-items:flex-start;padding:11px 12px;border:1px solid #dce6f0;border-radius:11px;background:#fff}
.feature-permission-item input{margin-top:3px;flex:0 0 auto}
.feature-permission-item span,.feature-permission-item strong,.feature-permission-item small{display:block}
.feature-permission-item small{margin-top:3px;color:var(--muted);line-height:1.35}
.permission-admin-notice{margin-top:10px;padding:9px 11px;border-radius:9px;background:#eaf3ff;color:var(--blue-dark);font-size:.84rem;font-weight:750}
.password-rule-list{display:grid;gap:3px;margin-top:8px}
.password-rule-list span{display:block}
.password-rule-list span.rule-ok{font-weight:750;color:#146c3a}
@media(max-width:720px){.feature-permission-list{grid-template-columns:1fr}}


/* V0.4.4 – App-Logo sichtbarer + Passwort-Hinweise schöner */
.brand-headline-row{
  display:flex;
  align-items:center;
  gap:18px;
  margin:10px 0 0;
  flex-wrap:wrap;
}
.brand-headline-logo{
  height:38px;
  width:auto;
  display:block;
  object-fit:contain;
  filter:drop-shadow(0 6px 16px rgba(11,99,206,.10));
}
.password-policy-note{
  margin-top:8px;
  padding:10px 12px;
  border-radius:10px;
  background:#f3f8ff;
  border:1px solid #d7e6f9;
  color:var(--blue-dark);
  font-size:.84rem;
  line-height:1.45;
}
.password-rule-list{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.password-rule-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 11px;
  border-radius:11px;
  background:#f3f5f8;
  border:1px solid #e0e4ea;
  color:#556274;
  font-weight:650;
  line-height:1.35;
}
.password-rule-item::before{
  content:"○";
  width:22px;
  height:22px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#dde3eb;
  color:#6d7887;
  font-size:.9rem;
  font-weight:900;
  flex:0 0 auto;
}
.password-rule-item.rule-ok{
  background:#eefaf1;
  border-color:#bfe0c8;
  color:#145f33;
}
.password-rule-item.rule-ok::before{
  content:"✓";
  background:#1e8f4f;
  color:#fff;
}
.app-card .app-icon{
  overflow:hidden;
}
.app-card .app-icon svg,
.feature-chip-icon svg{
  width:28px;
  height:28px;
  display:block;
}
.feature-chip-icon{
  display:grid;
  place-items:center;
}
@media (max-width:720px){
  .brand-headline-logo{height:32px}
}


/* V0.4.5 – Originale App-Icons + saubere Login-Symbole */
.brand-headline-row,
.brand-headline-logo{
  display:none !important;
}
.app-logo-image{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:inherit;
}
.feature-chip-icon{
  width:38px;
  height:38px;
  border-radius:10px;
  overflow:hidden;
  padding:0 !important;
  background:transparent !important;
}
.feature-chip-icon .app-logo-image{
  width:38px;
  height:38px;
}
.app-card .app-icon{
  padding:0;
  background:transparent;
}
.app-card .app-icon .app-logo-image{
  width:56px;
  height:56px;
  border-radius:16px;
}
.field-icon svg{
  width:18px;
  height:18px;
  display:block;
}
.password-toggle svg{
  width:19px;
  height:19px;
  display:block;
}
.security-lock{
  width:28px;
  height:28px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#eef6ff;
  color:var(--blue);
}
.security-lock svg{
  width:19px;
  height:19px;
  display:block;
}
.login-security{
  align-items:flex-start;
}


/* V0.4.6 – Passwort-Lebenszyklus */
.password-change-status{
  margin:12px 0 4px;
  padding:11px 13px;
  border-radius:11px;
  background:#f3f8ff;
  border:1px solid #d7e6f9;
  color:var(--blue-dark);
  font-size:.86rem;
  line-height:1.45;
}
.password-change-status.required{
  background:#fff7df;
  border-color:#f0d58a;
  color:#6d5100;
}

/* V0.5.0 – Fahrzeuge */
.vehicle-license{font-weight:850;color:var(--blue-dark);white-space:nowrap}
.vehicle-stock-chip{display:inline-flex;border-radius:999px;padding:5px 8px;background:#edf6ff;color:var(--blue-dark);font-size:.78rem;font-weight:750}
#vehicleDialog{width:min(820px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);padding:0;border:0;overflow:hidden}
#vehicleDialog::backdrop{background:rgba(30,50,70,.42)}
#vehicleDialog .project-dialog-card{box-sizing:border-box;width:100%;max-width:100%;max-height:calc(100vh - 24px);overflow-y:auto;overflow-x:hidden;margin:0;padding:28px}
@media(max-width:760px){
  #vehicleDialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100vh - 12px)}
  #vehicleDialog .project-dialog-card{max-height:calc(100vh - 12px);padding:20px 16px}
}


/* V0.6.0 – Zentrale Mitarbeiter */
.employee-name{font-weight:850}
.employee-sub{font-size:.78rem;color:var(--muted);margin-top:3px}
.employee-role-chip{
  display:inline-flex;
  border-radius:999px;
  padding:5px 8px;
  background:#edf3f7;
  color:#31576d;
  font-size:.78rem;
  font-weight:750;
}
.employee-project-access{
  padding:13px;
  border:1px solid #dce6ee;
  border-radius:12px;
  background:#f8fbfd;
}
.employee-project-access-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:10px;
  max-height:230px;
  overflow:auto;
}
.employee-project-access-list label{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:0;
  padding:9px 10px;
  background:#fff;
  border:1px solid #dce6ee;
  border-radius:9px;
  color:var(--text);
  font-weight:650;
}
.employee-project-access-list input{
  width:auto;
  min-height:0;
  margin-top:2px;
}
#employeeDialog{
  width:min(860px,calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:calc(100vh - 24px);
  padding:0;
  border:0;
  overflow:hidden;
}
#employeeDialog::backdrop{background:rgba(30,50,70,.42)}
#employeeDialog .project-dialog-card{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  max-height:calc(100vh - 24px);
  overflow-y:auto;
  overflow-x:hidden;
  margin:0;
  padding:28px;
}
@media(max-width:760px){
  .employee-project-access-list{grid-template-columns:1fr}
  #employeeDialog{
    width:calc(100vw - 12px);
    max-width:calc(100vw - 12px);
    max-height:calc(100vh - 12px);
  }
  #employeeDialog .project-dialog-card{
    max-height:calc(100vh - 12px);
    padding:20px 16px;
  }
}


/* V0.6.2 – Baustellenzuweisung je Mitarbeiter */
.employee-assignment-card{
  border:1px solid #cfdde7;
  border-radius:14px;
  padding:14px;
  background:linear-gradient(180deg,#f9fcfe,#f3f8fb);
}
.employee-assignment-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.project-assignment-summary{
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  background:#e8f1f7;
  color:#1f5f8b;
  font-size:.78rem;
  font-weight:800;
  white-space:nowrap;
}
.employee-project-access-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.employee-project-access-list label{
  cursor:pointer;
}
@media(max-width:700px){
  .employee-assignment-head,
  .employee-project-access-toolbar{
    flex-direction:column;
    align-items:stretch;
  }
}


/* V0.7.0 – Geschäftsstellen + Baustellenhierarchie */
.project-hierarchy-name{font-weight:800;line-height:1.3}
.project-hierarchy-path{font-size:.75rem;color:var(--muted);margin-top:3px}
.branch-chip{display:inline-flex;padding:5px 8px;border-radius:999px;background:#edf4f8;color:#315f76;font-size:.76rem;font-weight:800}
.branch-manager-grid{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(320px,1.2fr);gap:16px}
.branch-form{padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fbfd}
.branches-list{display:flex;flex-direction:column;gap:8px;max-height:55vh;overflow:auto}
.branch-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:11px;border:1px solid var(--line);border-radius:11px;background:#fff}
.branch-item.inactive{opacity:.6}
.branch-item .name{font-weight:850}
.branch-item .meta{font-size:.75rem;color:var(--muted);margin-top:3px}
.project-tree-indent{display:inline-block;width:calc(var(--project-depth,0) * 18px)}
@media(max-width:780px){.branch-manager-grid{grid-template-columns:1fr}}

.admin-branch-panel{display:flex;justify-content:space-between;align-items:center;gap:16px}.admin-branch-panel h2{margin:3px 0 4px}@media(max-width:700px){.admin-branch-panel{flex-direction:column;align-items:stretch}.admin-branch-panel button{width:100%}}


/* V0.7.2 – Geschäftsstellen-Dialog: vollständig sichtbar auf Desktop, Tablet und Mobil */
#branchesDialog.branches-dialog{
  box-sizing:border-box;
  width:min(980px,calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  max-height:calc(100dvh - 32px);
  margin:auto;
  padding:0;
  border:0;
  border-radius:18px;
  overflow:hidden;
}
#branchesDialog.branches-dialog::backdrop{
  background:rgba(26,42,56,.48);
}
#branchesDialog .branches-dialog-card{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  max-height:calc(100dvh - 32px);
  margin:0;
  padding:0;
  overflow-y:auto;
  overflow-x:hidden;
}
#branchesDialog .dialog-head{
  position:sticky;
  top:0;
  z-index:3;
  background:var(--card,#fff);
  padding:22px 24px 14px;
  border-bottom:1px solid var(--line,#d7dee5);
}
#branchesDialog .branch-manager-grid{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:18px;
  padding:18px 24px 24px;
  overflow:hidden;
}
#branchesDialog .branch-form,
#branchesDialog .branches-list,
#branchesDialog input,
#branchesDialog textarea{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
#branchesDialog .branches-list{
  overflow-x:hidden;
}

@media(max-width:800px){
  #branchesDialog.branches-dialog{
    width:calc(100vw - 16px);
    max-width:calc(100vw - 16px);
    max-height:calc(100dvh - 16px);
  }
  #branchesDialog .branches-dialog-card{
    max-height:calc(100dvh - 16px);
  }
  #branchesDialog .branch-manager-grid{
    grid-template-columns:1fr;
    padding:14px 16px 18px;
  }
  #branchesDialog .dialog-head{
    padding:16px;
  }
}
@media(max-width:520px){
  #branchesDialog.branches-dialog{
    width:100vw;
    max-width:100vw;
    max-height:100dvh;
    height:100dvh;
    border-radius:0;
  }
  #branchesDialog .branches-dialog-card{
    max-height:100dvh;
    min-height:100dvh;
  }
}


/* V0.7.3 – Baustellen nach Geschäftsstellen gruppieren */
.employee-project-group {
  border: 1px solid rgba(31,95,139,.10);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: rgba(255,255,255,.7);
}

.employee-project-group-title {
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(31,95,139,.12);
}

.employee-project-access-list .employee-project-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.employee-project-access-list .employee-project-group label + label {
  margin-top: 8px;
}

#projectParent optgroup {
  font-style: normal;
  font-weight: 700;
}


/* V0.7.4 – einheitliche Formular- und Auswahlfelder */
:root{
  --field-height:46px;
  --field-radius:11px;
  --field-border:#cbd9e8;
  --field-focus:#0875e1;
}

/* Alle normalen Selects einheitlich darstellen. */
select{
  -webkit-appearance:none;
  appearance:none;
  box-sizing:border-box;
  min-width:0;
  height:var(--field-height);
  min-height:var(--field-height);
  max-width:100%;
  border:1px solid var(--field-border);
  border-radius:var(--field-radius);
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%235f6f89' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 13px center;
  background-size:16px 16px;
  padding:0 42px 0 13px!important;
  color:var(--text);
  line-height:1.2;
  outline:none;
  white-space:nowrap;
  text-overflow:ellipsis;
  cursor:pointer;
}

select:focus{
  border-color:var(--field-focus);
  box-shadow:0 0 0 4px rgba(8,117,225,.10);
}

select:disabled{
  cursor:not-allowed;
  opacity:.62;
  background-color:#f3f6fa;
}

/* Browser-eigene IE/Legacy-Pfeile sicher ausblenden. */
select::-ms-expand{display:none}

/* Text-/Suchfelder in Filterleisten auf exakt gleiche Höhe bringen. */
.project-tools input[type="search"],
.project-tools input[type="text"]{
  box-sizing:border-box;
  min-width:0;
  height:var(--field-height);
  min-height:var(--field-height);
  padding:0 13px;
}

/* Projekte haben 1 Suchfeld + 3 Dropdowns. */
#projectsSection .project-tools{
  grid-template-columns:minmax(280px,1.8fr) repeat(3,minmax(185px,1fr));
  align-items:center;
}

/* Mitarbeiter/Fahrzeuge: Suchfeld + GS + Status. */
#employeesSection .project-tools,
#vehiclesSection .project-tools{
  grid-template-columns:minmax(280px,1.8fr) repeat(2,minmax(210px,1fr));
  align-items:center;
}

/* In Dialogen ebenfalls gleiche Höhe und genug Platz für den Pfeil. */
.dialog-card select,
.project-form-grid select{
  height:var(--field-height);
  min-height:var(--field-height);
  padding-left:13px!important;
  padding-right:42px!important;
}

/* Kein Grid-Kind darf durch lange Optionstexte die Spalte aufdrücken. */
.project-tools > *,
.project-form-grid > *,
.form-grid > *{
  min-width:0;
}

@media(max-width:1180px){
  #projectsSection .project-tools,
  #employeesSection .project-tools,
  #vehiclesSection .project-tools{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #projectsSection .project-tools > input[type="search"],
  #employeesSection .project-tools > input[type="search"],
  #vehiclesSection .project-tools > input[type="search"]{
    grid-column:1/-1;
  }
}

@media(max-width:680px){
  #projectsSection .project-tools,
  #employeesSection .project-tools,
  #vehiclesSection .project-tools{
    grid-template-columns:1fr;
  }
  #projectsSection .project-tools > input[type="search"],
  #employeesSection .project-tools > input[type="search"],
  #vehiclesSection .project-tools > input[type="search"]{
    grid-column:auto;
  }
  select,
  .project-tools input[type="search"],
  .project-tools input[type="text"]{
    height:48px;
    min-height:48px;
    font-size:16px;
  }
}

/* Touch-Geräte: Pfeil nicht zu nah am Rand. */
@media(pointer:coarse){
  select{
    background-position:right 15px center;
    padding-right:46px!important;
  }
}


/* V0.7.5 – Native Dropdown-Pfeile wiederhergestellt
   Keine Custom-SVG-Pfeile mehr: robuster auf Windows, iPadOS und Android. */
select{
  -webkit-appearance:auto!important;
  appearance:auto!important;
  background-image:none!important;
  background-repeat:initial!important;
  background-position:initial!important;
  background-size:initial!important;
  padding-left:13px!important;
  padding-right:14px!important;
}

/* Legacy-Regel aus V0.7.4 neutralisieren. */
select::-ms-expand{display:block}

/* Dialoge und Filter behalten gleiche Höhe, aber native Pfeile bekommen ihren eigenen Platz. */
.dialog-card select,
.project-form-grid select,
.project-tools select{
  padding-left:13px!important;
  padding-right:14px!important;
}

@media(pointer:coarse){
  select,
  .dialog-card select,
  .project-form-grid select,
  .project-tools select{
    padding-right:16px!important;
  }
}


/* V0.7.8 – Einheitliche Passwort-Anzeige im gesamten Portal */
.password-input-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.password-input-wrap > input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 58px !important;
}

.password-field-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted, #66727f);
  cursor: pointer;
  z-index: 2;
  touch-action: manipulation;
}

.password-field-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.password-field-toggle:hover {
  background: rgba(31,95,139,.08);
  color: var(--primary, #1f5f8b);
}

.password-field-toggle:focus-visible {
  outline: 3px solid rgba(31,95,139,.18);
  outline-offset: 1px;
}

@media (pointer: coarse) {
  .password-input-wrap > input {
    padding-right: 62px !important;
  }
  .password-field-toggle {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    right: 6px;
  }
}


/* V0.7.9 – Einheitliche Schiebe-Schalter für binäre Ja/Nein-Felder */
.switch-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between;
  gap:16px;
  width:100%;
  min-height:58px;
  padding:11px 14px;
  box-sizing:border-box;
  border:1px solid var(--line,#d6e0e8);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}

.switch-row > input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  position:relative;
  display:inline-block;
  flex:0 0 52px;
  width:52px !important;
  min-width:52px !important;
  max-width:52px !important;
  height:30px !important;
  min-height:30px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background:#c7d2da !important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.05);
  cursor:pointer;
  transition:background .18s ease;
}

.switch-row > input[type="checkbox"]::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 6px rgba(30,50,70,.22);
  transition:transform .18s ease;
}

.switch-row > input[type="checkbox"]:checked{
  background:var(--primary,#0b63ce) !important;
}

.switch-row > input[type="checkbox"]:checked::after{
  transform:translateX(22px);
}

.switch-row > input[type="checkbox"]:focus-visible{
  outline:3px solid rgba(11,99,206,.20);
  outline-offset:3px;
}

.switch-row > span:not(.password-field-toggle){
  min-width:0;
}

.switch-label-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.switch-label-copy small{
  color:var(--muted,#6d7884);
  font-weight:500;
}

/* dynamisch erzeugte App-Schalter */
.permission-list .app-permission-switch{
  margin:0;
}

.permission-list .app-permission-switch + .app-permission-switch{
  margin-top:8px;
}

/* Passwort & Sicherheit */
.user-security-section{
  margin-top:18px;
  padding:18px;
  border:1px solid var(--line,#d6e0e8);
  border-radius:14px;
  background:#f8fbfd;
}

.security-section-head h4{
  margin:3px 0 4px;
  font-size:1.08rem;
}

.security-password-box{
  margin-top:14px;
}

.security-password-box > label{
  margin:0;
}

.security-actions-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.security-action-card{
  display:flex;
  align-items:flex-start;
  gap:11px;
  width:100%;
  min-height:92px;
  padding:13px 14px;
  border:1px solid var(--line,#d6e0e8);
  border-radius:12px;
  background:#fff;
  color:var(--text,#182631);
  text-align:left;
  cursor:pointer;
}

.security-action-card:hover{
  background:#f2f7fa;
}

.security-action-card:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.security-action-card > span:last-child{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.security-action-card small{
  color:var(--muted,#6d7884);
  line-height:1.35;
}

.security-action-icon{
  flex:0 0 auto;
  font-size:1.25rem;
  line-height:1;
  margin-top:2px;
}

.security-action-card.danger-soft{
  border-color:#efcccc;
  background:#fffafa;
}

@media(max-width:700px){
  .security-actions-grid{
    grid-template-columns:1fr;
  }
}

/* Mehrfachauswahl bleibt bewusst Checkbox:
   feature-permission-item + employee-project-access-list werden NICHT verändert. */


/* V0.8.0 – Funktionsberechtigungen */
.feature-permission-groups{display:grid;grid-template-columns:1fr;gap:14px;margin-top:12px}
.feature-permission-group{border:1px solid #d9e4ec;border-radius:14px;padding:13px;background:#f8fbfd}
.feature-group-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:10px}
.feature-group-head>div:first-child{display:flex;flex-direction:column;gap:3px}.feature-group-head small{color:var(--muted)}
.feature-group-actions{display:flex;gap:6px;flex:0 0 auto}
.mini-action{min-height:32px;padding:5px 10px;border:1px solid #cfdce5;border-radius:9px;background:#fff;font:inherit;font-size:.78rem;font-weight:750;color:var(--text);cursor:pointer}
.mini-action:hover:not(:disabled){background:#eef5f9}.mini-action:disabled{opacity:.45;cursor:not-allowed}
.feature-permission-group .feature-permission-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
.feature-permission-group .feature-permission-item{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:10px 11px;border:1px solid #dde6ed;border-radius:10px;background:#fff;cursor:pointer}
.feature-permission-item>input[type="checkbox"]{-webkit-appearance:auto!important;appearance:auto!important;display:inline-block!important;position:static!important;opacity:1!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;margin:2px 0 0!important;padding:0!important;border-radius:3px!important;background:initial!important;box-shadow:none!important;pointer-events:auto!important;cursor:pointer;z-index:auto!important;flex:0 0 18px}
.feature-permission-item>input[type="checkbox"]::after{content:none!important;display:none!important}
.feature-permission-item:has(input:checked){border-color:#9fc2dc;background:#f4f9fc}.feature-permission-item:has(input:disabled){cursor:not-allowed;opacity:.68}
@media(max-width:760px){.feature-permission-group .feature-permission-list{grid-template-columns:1fr}.feature-group-head{flex-direction:column}}


/* V0.8.1 – Zentraler CSV-Export */
.export-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  margin-bottom:14px;
}
.export-hero h2{margin:3px 0 5px}
.export-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.export-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:118px;
}
.export-card h3{margin:0 0 5px;font-size:1rem}
.export-card p{margin:0;color:var(--muted,#6d7884);line-height:1.45}
.export-card .btn{flex:0 0 auto;white-space:nowrap}
.export-security-note{
  margin-top:14px;
  padding:13px 15px;
  border:1px solid #cfe0ec;
  border-radius:12px;
  background:#f6fbff;
  color:#42586a;
}
@media(max-width:900px){
  .export-grid{grid-template-columns:1fr}
}
@media(max-width:650px){
  .export-hero,.export-card{flex-direction:column;align-items:stretch}
  .export-hero .btn,.export-card .btn{width:100%}
}


/* V0.8.4 – Aktivitätsprotokoll */
.audit-overview{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:14px;
}
.audit-overview h2{margin:3px 0 5px}
.audit-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(90px,1fr));
  gap:8px;
}
.audit-summary > div{
  padding:10px 14px;
  border:1px solid var(--line,#d6e0e8);
  border-radius:11px;
  background:#f8fbfd;
  text-align:center;
}
.audit-summary span{
  display:block;
  font-size:.78rem;
  color:var(--muted,#6d7884);
}
.audit-summary strong{
  display:block;
  margin-top:2px;
  font-size:1.25rem;
}
.audit-status{
  margin:10px 0 12px;
  padding:9px 11px;
  border-radius:9px;
  background:#f4f8fb;
  color:#526675;
  font-size:.88rem;
}
.audit-status.error{
  background:#fff4f4;
  color:#a33c3c;
}
.audit-details{
  max-width:520px;
  white-space:normal;
  line-height:1.35;
}
@media(max-width:700px){
  .audit-overview{align-items:stretch;flex-direction:column}
  .audit-summary{width:100%}
}


/* V0.8.5 – ZeitApp-Rechte */
.feature-permission-group-wide{
  grid-column:1 / -1;
}

.zeitapp-permission-subgroup{
  margin-top:14px;
}

.zeitapp-permission-subgroup + .zeitapp-permission-subgroup{
  padding-top:14px;
  border-top:1px solid var(--line,#d6e0e8);
}

.zeitapp-permission-subtitle{
  margin-bottom:8px;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted,#6d7884);
}

@media(min-width:900px){
  .feature-permission-group-wide .feature-permission-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* V0.8.6 – Mitarbeiterzuweisung in Baustellen */
.project-employee-assignment-card{
  margin-top:4px;
  padding:15px;
  border:1px solid var(--line,#d6e0e8);
  border-radius:14px;
  background:#f8fbfd;
}

.project-assignment-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.project-assignment-head > div{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.project-assignment-head small{
  color:var(--muted,#6d7884);
}

.project-employee-assignment-list{
  margin-top:10px;
  max-height:330px;
  overflow:auto;
  padding-right:3px;
}

.project-employee-option{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:8px 6px;
  border-radius:8px;
  cursor:pointer;
}

.project-employee-option:hover{
  background:rgba(11,99,206,.05);
}

.project-employee-option > input[type="checkbox"]{
  margin-top:3px;
  flex:0 0 auto;
}

.project-employee-option > span{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  min-width:0;
}

.project-employee-option small{
  flex-basis:100%;
  color:var(--muted,#6d7884);
}

@media(max-width:620px){
  .project-assignment-head{
    flex-direction:column;
  }
}


/* V0.8.7 – kompakte Mitarbeiterzuweisung nach GS */
.project-employee-global-toolbar{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.project-employee-assignment-list{
  margin-top:12px;
  max-height:420px;
  overflow:auto;
  padding-right:4px;
}

.project-employee-group{
  border:1px solid var(--line,#d6e0e8);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}

.project-employee-group + .project-employee-group{
  margin-top:10px;
}

.project-employee-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  background:#f6f9fb;
  border-bottom:1px solid var(--line,#d6e0e8);
}

.project-employee-group-head > div:first-child{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}

.project-employee-group-head strong{
  font-size:.98rem;
}

.project-employee-group-head small{
  color:var(--muted,#6d7884);
}

.project-employee-group-actions{
  display:flex;
  gap:6px;
  flex:0 0 auto;
}

.project-employee-rows{
  display:flex;
  flex-direction:column;
}

.project-employee-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 12px;
  cursor:pointer;
  transition:background .15s ease;
}

.project-employee-row + .project-employee-row{
  border-top:1px solid #edf1f4;
}

.project-employee-row:hover{
  background:#f9fbfc;
}

.project-employee-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.project-employee-name-line{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
}

.project-employee-name-line strong{
  font-weight:750;
}

.project-employee-main small{
  color:var(--muted,#6d7884);
}

.employee-number-badge{
  display:inline-flex;
  align-items:center;
  padding:2px 7px;
  border-radius:999px;
  background:#eaf3f8;
  color:#245a7a;
  font-size:.74rem;
  font-weight:700;
}

.project-employee-row > input[type="checkbox"]{
  appearance:auto !important;
  -webkit-appearance:checkbox !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  min-height:18px !important;
  margin:0 !important;
  flex:0 0 auto;
  cursor:pointer;
  accent-color:var(--primary,#0b63ce);
}

@media(max-width:620px){
  .project-employee-group-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .project-employee-row{
    align-items:flex-start;
  }
}

/* V0.8.8 – Fahrzeug-Kilometer */
.field-hint{
  display:block;
  margin-top:5px;
  color:var(--muted,#6d7884);
  font-size:.75rem;
  font-weight:500;
  line-height:1.35;
}
#vehicleCurrentKm[readonly]{
  background:#f4f7f9;
  font-weight:800;
}


/* V0.8.9 – Mitarbeiter: Kilometer-Erfassung */
#employeeMileageRequiredRow > span{
  display:flex;
  flex-direction:column;
  gap:2px;
}
#employeeMileageRequiredRow small{
  color:var(--muted,#6d7884);
  font-weight:500;
  line-height:1.35;
}
.badge.mileage-off{
  background:#edf3f6;
  color:#52636e;
}

/* V0.9.0 – E-Auto & klarere Hinweise */
.vehicle-electric-row > span,
.switch-row > span{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.vehicle-electric-row small,
.switch-row small{
  color:var(--muted,#6d7884);
  font-weight:500;
  line-height:1.35;
}
.badge.vehicle-electric{
  background:#e8f3f0;
  color:#216653;
}

/* V0.9.1 – kontextbezogene Hinweise im gesamten Portal */
.dialog-help,
.section-help{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #d8e4eb;
  border-radius:10px;
  background:#f6fafc;
  color:#52636e;
  font-size:.82rem;
  line-height:1.45;
}

.dialog-help strong,
.section-help strong{
  color:#243946;
}

.field-hint{
  display:block;
  margin-top:5px;
  color:var(--muted,#6d7884);
  font-size:.74rem;
  font-weight:500;
  line-height:1.35;
}

.switch-row > span small{
  display:block;
  margin-top:2px;
  color:var(--muted,#6d7884);
  font-size:.74rem;
  font-weight:500;
  line-height:1.3;
}

button[title]{
  position:relative;
}

:root[data-theme="dark"] .dialog-help,
:root[data-theme="dark"] .section-help{
  background:#12222b;
  border-color:#30434e;
  color:#aebdc5;
}

@media(max-width:650px){
  .dialog-help,
  .section-help{
    font-size:.78rem;
    padding:9px 10px;
  }
}

/* V0.9.2 – strukturierter Export */
.export-structure-help{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #d8e4eb;
  border-radius:10px;
  background:#f6fafc;
  color:#52636e;
  font-size:.82rem;
  line-height:1.45;
}
.export-structure-help strong{color:#243946}
:root[data-theme="dark"] .export-structure-help{
  background:#12222b;
  border-color:#30434e;
  color:#aebdc5;
}

.branch-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* V0.11.0 – kompakte Stundenbericht-Auswertung ohne Redesign */
.time-report-tools{align-items:end}
.time-report-tools label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted,#667085)}
.time-report-tools label input{min-width:150px}
.time-report-table td{vertical-align:top}
.time-report-table td:nth-child(8){min-width:220px;max-width:360px;white-space:normal}
@media (max-width:760px){
  .time-report-tools{grid-template-columns:1fr 1fr}
  .time-report-tools label,.time-report-tools select,.time-report-tools button{width:100%}
}


/* V0.11.4 – übersichtliche, filterbare Mitarbeiterzuweisung */
.project-employee-filterbar{
  display:grid;
  grid-template-columns:minmax(220px,1.5fr) minmax(160px,1fr) minmax(160px,1fr) auto auto;
  gap:8px;
  align-items:center;
  margin-top:12px;
  padding:10px;
  border:1px solid var(--line,#d6e0e8);
  border-radius:12px;
  background:#fff;
}
.project-employee-filterbar input[type="search"],
.project-employee-filterbar select{
  min-width:0;
  height:40px;
  padding:7px 10px;
}
.project-employee-active-filter{
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
  font-weight:650;
  cursor:pointer;
}
.project-employee-active-filter input{width:18px;height:18px;}
.project-employee-assignment-list{max-height:360px;}
.project-employee-row{
  justify-content:flex-start;
  gap:11px;
  padding:8px 11px;
  min-height:54px;
}
.project-employee-checkbox{
  flex:0 0 auto;
  width:20px;
  height:20px;
  margin:0;
}
.project-employee-main{flex:1 1 auto;}
.project-employee-group-head{padding:8px 11px;}
.project-employee-group-actions .mini-action{padding:6px 9px;}
.project-employee-empty{
  padding:22px 14px;
  text-align:center;
  color:var(--muted,#6d7884);
  border:1px dashed var(--line,#d6e0e8);
  border-radius:12px;
  background:#fff;
}
@media(max-width:900px){
  .project-employee-filterbar{grid-template-columns:1fr 1fr;}
  .project-employee-filterbar input[type="search"]{grid-column:1/-1;}
}
@media(max-width:620px){
  .project-employee-filterbar{grid-template-columns:1fr;}
  .project-employee-filterbar input[type="search"]{grid-column:auto;}
  .project-employee-group-head{align-items:flex-start;flex-direction:column;}
  .project-employee-group-actions{width:100%;}
  .project-employee-group-actions .mini-action{flex:1;}
}


/* ============================================================
   V0.11.6 – Mobile/Tablet UX für alle Portal-Bereiche
   Keine Funktions- oder Datenänderungen.
   ============================================================ */

html,body{max-width:100%;overflow-x:hidden}
*{box-sizing:border-box}

/* Horizontale Tabellen bleiben innerhalb ihrer Karte scrollbar. */
.table-panel,.table-wrap,.panel{max-width:100%}
.table-wrap{
  overflow-x:auto;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
}

/* Tabs dürfen am Handy horizontal gescrollt werden statt aus dem Viewport zu laufen. */
.admin-tabs{
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
  width:100%;
  max-width:100%;
}
.admin-tab{
  flex:0 0 auto;
  white-space:nowrap;
  scroll-snap-align:start;
}

/* Formulare und Dialoge dürfen nie breiter als der Viewport werden. */
dialog,
.dialog-card,
.project-dialog-card{
  box-sizing:border-box;
  max-width:100%;
}
.dialog-card input,
.dialog-card select,
.dialog-card textarea,
.project-form-grid input,
.project-form-grid select,
.project-form-grid textarea{
  min-width:0;
  max-width:100%;
}

/* Lange Texte/Werte dürfen umbrechen statt Layout aufzublasen. */
.content,.panel,.stat,.app-card,.export-card,.security-action-card,
.feature-permission-item,.project-employee-row,
td,th{
  min-width:0;
  overflow-wrap:anywhere;
}

@media (max-width: 760px){
  /* Grundlayout */
  .content{
    width:100%;
    max-width:100%;
    padding:24px 12px 48px;
  }
  .page-head{
    gap:14px;
    margin-bottom:18px;
  }
  .portal-title{
    font-size:clamp(1.75rem,9vw,2.35rem);
    line-height:1.08;
  }
  .page-head p{
    font-size:.92rem;
    line-height:1.45;
  }
  .eyebrow{font-size:.68rem;letter-spacing:.1em}

  /* Topbar */
  .topbar{
    min-height:64px;
    height:auto;
    padding:7px 10px;
    gap:8px;
  }
  .topbar-brand{
    min-width:0;
    max-width:calc(100% - 52px);
    padding:4px;
    gap:7px;
  }
  .topbar-logo{
    width:min(132px,38vw);
    height:auto;
    object-fit:contain;
  }
  .version-pill{
    flex:0 0 auto;
    font-size:.66rem;
    padding:4px 7px;
  }
  .user-button{
    padding:7px;
    min-width:42px;
    min-height:42px;
    justify-content:center;
  }
  .dropdown{
    position:fixed;
    top:64px;
    right:10px;
    left:10px;
    min-width:0;
    width:auto;
    max-height:calc(100dvh - 78px);
    overflow-y:auto;
  }

  /* App Portal */
  .app-grid{grid-template-columns:1fr;gap:14px}
  .app-card{
    min-height:0;
    padding:18px;
    border-radius:16px;
  }
  .app-icon{width:50px;height:50px;margin-bottom:14px}
  .app-card h3{font-size:1.18rem}
  .app-actions{margin-top:16px}

  /* Kennzahlen: auf kleinen Handys bewusst einspaltig. */
  .stats-grid{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .stat{
    padding:14px;
    border-radius:14px;
  }
  .stat span{
    font-size:.78rem;
    line-height:1.3;
    margin-bottom:5px;
  }
  .stat strong{font-size:1.45rem}

  /* Filterbereiche */
  .project-tools,
  #projectsSection .project-tools,
  #employeesSection .project-tools,
  #vehiclesSection .project-tools,
  .time-report-tools{
    grid-template-columns:1fr!important;
    gap:9px;
    padding:11px;
  }
  .project-tools > *,
  .time-report-tools > *,
  .time-report-tools label,
  .time-report-tools input,
  .time-report-tools select,
  .time-report-tools button{
    width:100%;
    max-width:100%;
    min-width:0!important;
  }

  /* Administration Tabs */
  .admin-tabs{
    margin:0 -2px 16px;
    padding:4px;
    gap:5px;
    border-radius:11px;
  }
  .admin-tab{
    padding:9px 12px;
    font-size:.88rem;
  }

  /* Tabellen */
  table{font-size:.88rem}
  th,td{padding:11px 12px}
  .table-panel{
    border-radius:14px;
    overflow:hidden;
  }
  .table-wrap{
    width:100%;
    max-width:100%;
  }
  .table-wrap::after{
    content:"Tabelle seitlich wischbar";
    display:block;
    position:sticky;
    left:0;
    width:max-content;
    max-width:100%;
    padding:6px 10px;
    color:var(--muted,#6d7884);
    font-size:.68rem;
    background:linear-gradient(90deg,#fff 80%,rgba(255,255,255,0));
    pointer-events:none;
  }

  /* Dialoge */
  dialog{
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
    max-height:calc(100dvh - 12px);
    margin:auto;
  }
  .dialog-card,
  .project-dialog-card,
  #projectDialog .project-dialog-card,
  #employeeDialog .project-dialog-card,
  #vehicleDialog .project-dialog-card,
  #branchesDialog .branches-dialog-card{
    width:100%!important;
    max-width:100%!important;
    max-height:calc(100dvh - 12px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:18px 14px!important;
    border-radius:16px!important;
  }
  .dialog-head{
    position:sticky;
    top:-18px;
    z-index:4;
    margin:-18px -14px 10px;
    padding:15px 14px 10px;
    background:#fff;
    border-bottom:1px solid var(--line,#d6e0e8);
  }
  .dialog-head h3{font-size:1.22rem;line-height:1.2}
  .icon-button{width:40px;height:40px;flex:0 0 40px}
  .project-form-grid,.form-grid{grid-template-columns:1fr!important;gap:0!important}
  .project-span-2{grid-column:auto!important}
  .dialog-card label{margin:10px 0;font-size:.9rem}
  .dialog-card input,.dialog-card select,.dialog-card textarea,
  .project-form-grid input,.project-form-grid select,.project-form-grid textarea{
    font-size:16px; /* verhindert iOS Auto-Zoom */
    min-height:44px;
  }
  .dialog-actions{
    position:sticky;
    bottom:-18px;
    z-index:4;
    margin:16px -14px -18px!important;
    padding:10px 14px max(10px,env(safe-area-inset-bottom));
    background:#fff;
    border-top:1px solid var(--line,#d6e0e8);
    flex-wrap:wrap;
  }
  .dialog-actions .spacer{display:none}
  .dialog-actions .btn{
    flex:1 1 140px;
    min-height:44px;
  }

  /* Mitarbeiterzuweisung */
  .project-employee-assignment-list{max-height:48dvh}
  .project-employee-row{
    display:grid;
    grid-template-columns:28px minmax(0,1fr);
    align-items:start;
    gap:9px;
    padding:10px;
  }
  .project-employee-checkbox{grid-column:1;grid-row:1/3;margin-top:2px!important}
  .project-employee-main{grid-column:2;min-width:0}
  .project-employee-group-actions{display:flex;gap:6px}

  /* Audit / Export / Rechte */
  .audit-overview,.export-hero,.export-card{gap:12px}
  .audit-summary{grid-template-columns:1fr 1fr}
  .feature-group-actions{width:100%;display:flex}
  .feature-group-actions .mini-action{flex:1}
  .feature-permission-item{font-size:.88rem}
  .export-card{padding:14px}
  .export-card .btn{min-height:44px}

  /* Branch/Kostenstellenverwaltung */
  .branch-manager-grid{grid-template-columns:1fr!important}
  .branch-actions{width:100%}
  .branch-actions .btn{flex:1 1 120px}
}

@media (max-width: 430px){
  .content{padding-left:10px;padding-right:10px}
  .stats-grid{grid-template-columns:1fr}
  .stat{display:flex;align-items:center;justify-content:space-between;gap:12px}
  .stat span{margin:0;max-width:72%}
  .stat strong{font-size:1.5rem;flex:0 0 auto}
  .admin-tab{font-size:.82rem;padding:8px 10px}
  .btn{padding:10px 12px}
  .page-head .btn{min-height:44px}
  .app-actions .btn{min-height:44px}
  .audit-summary{grid-template-columns:1fr 1fr}
}

@media (max-width: 360px){
  .topbar-logo{width:112px}
  .version-pill{font-size:.62rem;padding:3px 6px}
  .admin-tab{padding:8px 9px}
  .audit-summary{grid-template-columns:1fr}
}

/* V0.11.7 – stabile Stundenbericht-Filter */
.time-report-tools{
  min-height:92px;
  align-content:end;
}
.time-report-tools > *{
  min-width:0;
}
#timeReportsEmployeeFilter,
#timeReportsBranchFilter,
#timeReportsProjectFilter,
#timeReportsStatusFilter{
  display:block!important;
  visibility:visible!important;
}
#timeReportsSection .table-panel{
  min-height:220px;
}
#timeReportsStatus{
  min-height:1.5em;
}
@media(max-width:760px){
  .time-report-tools{min-height:0;}
  #timeReportsSection .stats-grid{min-height:0;}
}


/* ===== V0.11.8 Stundenberichte PDF-Export ===== */
.time-report-export-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.time-report-export-actions .btn{min-width:140px}
@media(max-width:700px){
  .time-report-export-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .time-report-export-actions .btn{
    width:100%;
    min-width:0;
    min-height:48px;
  }
}
@media(max-width:380px){
  .time-report-export-actions{grid-template-columns:1fr}
}


/* V0.11.36 – Stundenberichte Filter/UX */
.time-report-filter-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px;
}
.time-filter-group{
  border:1px solid var(--line, #d8e2e7);
  border-radius:14px;
  padding:12px;
  background:color-mix(in srgb, var(--panel, #fff) 94%, #eaf4fb);
}
.time-filter-group-title{
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted, #6b7d89);
  margin:0 0 9px;
}
.time-filter-grid{
  display:grid;
  gap:10px;
}
.time-filter-grid.period-grid{
  grid-template-columns:minmax(220px,1.4fr) minmax(150px,.8fr) minmax(150px,.8fr);
}
.time-filter-grid.selection-grid{
  grid-template-columns:repeat(4,minmax(170px,1fr));
}
.time-report-filter-panel label{
  min-width:0;
}
.time-report-filter-panel select,
.time-report-filter-panel input[type="date"]{
  width:100%;
  min-height:44px;
}
.time-filter-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.time-filter-action-buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-left:auto;
}
.time-filter-action-buttons .btn{
  min-height:44px;
}
.time-report-appendix-option{
  margin:0!important;
  min-height:44px;
  padding:8px 10px;
  border-radius:10px;
  background:var(--panel, #fff);
  border:1px solid var(--line, #d8e2e7);
}
.time-report-appendix-option input{
  width:22px;
  height:22px;
}
.time-activity-missing{
  display:inline-flex;
  align-items:center;
  padding:4px 7px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  background:#fff4d8;
  color:#76550f;
  border:1px solid #e7c879;
}
.time-report-table td,
.time-report-table th{
  white-space:normal;
}
.time-report-table td:nth-child(1),
.time-report-table td:nth-child(2){
  white-space:nowrap;
}

@media(max-width:1100px){
  .time-filter-grid.selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .time-report-filter-panel{padding:10px;gap:10px}
  .time-filter-grid.period-grid,
  .time-filter-grid.selection-grid{grid-template-columns:1fr}
  .time-filter-actions{align-items:stretch}
  .time-report-appendix-option{width:100%}
  .time-filter-action-buttons{width:100%;margin-left:0}
  .time-filter-action-buttons .btn{flex:1 1 180px}
}


/* V0.11.37 – kompakte Stundenberichte Filter */
.time-report-filter-panel.compact{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.time-filter-row{
  display:grid;
  gap:10px;
  align-items:end;
}
.time-filter-row-top{
  grid-template-columns:minmax(230px,1.4fr) minmax(150px,.65fr) minmax(150px,.65fr) auto;
}
.time-filter-row-bottom{
  grid-template-columns:minmax(190px,1.1fr) minmax(160px,.8fr) minmax(200px,1fr) minmax(150px,.7fr) auto;
}
.time-filter-field{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0!important;
  font-size:12px;
  color:var(--muted,#6b7d89);
}
.time-filter-field select,
.time-filter-field input{
  min-height:42px!important;
  border-radius:11px!important;
}
.time-filter-actions-inline{
  display:flex;
  gap:8px;
  align-items:center;
}
.time-filter-actions-inline .btn{
  min-height:42px;
  white-space:nowrap;
}
.time-report-appendix-option.compact-check{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 11px;
  border:1px solid var(--line,#d8e2e7);
  border-radius:11px;
  background:var(--panel,#fff);
  white-space:nowrap;
}
.time-report-appendix-option.compact-check input{
  width:19px;
  height:19px;
  margin:0;
}
.time-activity-sync-hint{
  margin-top:8px;
  padding:8px 11px;
  border-radius:10px;
  background:#fff4d8;
  border:1px solid #e5c36c;
  color:#76550f;
  font-size:12px;
  font-weight:800;
}
@media(max-width:1150px){
  .time-filter-row-top{grid-template-columns:1fr 1fr 1fr}
  .time-filter-actions-inline{grid-column:1/-1;justify-content:flex-end}
  .time-filter-row-bottom{grid-template-columns:1fr 1fr 1fr}
  .time-report-appendix-option.compact-check{grid-column:auto/span 1}
}
@media(max-width:760px){
  .time-filter-row-top,
  .time-filter-row-bottom{grid-template-columns:1fr}
  .time-filter-actions-inline{grid-column:auto;width:100%}
  .time-filter-actions-inline .btn{flex:1}
  .time-report-appendix-option.compact-check{width:100%}
}


/* V0.11.38 – Stundenberichte Filter final refined */
.time-report-filter-panel.refined{
  padding:16px 18px;
  border-radius:16px;
  display:flex;
  flex-direction:column;
  gap:13px;
}
.time-filter-primary{
  display:grid;
  grid-template-columns:minmax(220px,1.05fr) minmax(330px,1.35fr) auto;
  gap:18px;
  align-items:end;
}
.time-filter-section{
  min-width:0;
}
.time-filter-section-label{
  font-size:10px;
  line-height:1;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--muted,#708091);
  margin-bottom:8px;
}
.time-filter-period-section{
  min-width:0;
}
.time-filter-date-pair{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.time-filter-field{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0!important;
}
.time-filter-field > span{
  font-size:11px;
  font-weight:700;
  color:var(--muted,#6c7d8d);
}
.time-filter-field select,
.time-filter-field input{
  width:100%;
  min-height:43px!important;
  height:43px!important;
  border-radius:10px!important;
  padding-top:0!important;
  padding-bottom:0!important;
}
.time-filter-primary-actions{
  display:flex;
  gap:8px;
  align-items:center;
}
.time-filter-primary-actions .compact-action{
  min-height:43px;
  height:43px;
  padding-inline:16px;
  white-space:nowrap;
}
.time-filter-divider{
  height:1px;
  background:var(--line,#dbe5ec);
  margin:0 -2px;
}
.time-filter-secondary{
  display:grid;
  grid-template-columns:minmax(180px,1fr) minmax(160px,.85fr) minmax(210px,1.15fr) minmax(145px,.75fr) auto;
  gap:10px;
  align-items:end;
}
.time-report-appendix-switch{
  min-height:43px;
  height:43px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:6px 11px;
  margin:0!important;
  border:1px solid var(--line,#d8e2e7);
  border-radius:10px;
  background:var(--panel,#fff);
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.time-report-appendix-switch input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.time-report-appendix-switch .switch-ui{
  width:34px;
  height:20px;
  border-radius:999px;
  background:#cfd9e1;
  position:relative;
  flex:0 0 auto;
  transition:.18s ease;
}
.time-report-appendix-switch .switch-ui::after{
  content:"";
  position:absolute;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#fff;
  top:3px;
  left:3px;
  box-shadow:0 1px 3px rgba(0,0,0,.18);
  transition:.18s ease;
}
.time-report-appendix-switch input:checked + .switch-ui{
  background:#1681df;
}
.time-report-appendix-switch input:checked + .switch-ui::after{
  transform:translateX(14px);
}
.time-report-appendix-switch .switch-copy{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}
.time-report-appendix-switch .switch-copy strong{
  font-size:11px;
}
.time-report-appendix-switch .switch-copy small{
  font-size:10px;
  color:var(--muted,#6c7d8d);
  margin-top:2px;
}

@media(max-width:1180px){
  .time-filter-primary{
    grid-template-columns:minmax(200px,1fr) minmax(300px,1.4fr);
  }
  .time-filter-primary-actions{
    grid-column:1/-1;
    justify-content:flex-end;
  }
  .time-filter-secondary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .time-report-appendix-switch{
    width:max-content;
  }
}
@media(max-width:720px){
  .time-report-filter-panel.refined{
    padding:12px;
  }
  .time-filter-primary,
  .time-filter-secondary{
    grid-template-columns:1fr;
    gap:9px;
  }
  .time-filter-date-pair{
    grid-template-columns:1fr 1fr;
  }
  .time-filter-primary-actions{
    grid-column:auto;
    width:100%;
  }
  .time-filter-primary-actions .btn{
    flex:1;
  }
  .time-report-appendix-switch{
    width:100%;
  }
}
@media(max-width:460px){
  .time-filter-date-pair{
    grid-template-columns:1fr;
  }
}


/* V0.11.40 – Kundenstamm */
.customer-admin-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.customer-admin-head h2{margin:4px 0}
.customer-table-tools{
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(170px,220px);
  gap:10px;
}
#customerDialog .project-form-grid{
  align-items:start;
}
#projectCustomerSelect{
  width:100%;
}
@media(max-width:760px){
  .customer-admin-head{
    align-items:stretch;
    flex-direction:column;
  }
  .customer-admin-head .toolbar{
    width:100%;
  }
  .customer-admin-head .toolbar .btn{
    flex:1 1 150px;
  }
  .customer-table-tools{
    grid-template-columns:1fr;
  }
}


/* V0.11.41 – durchsuchbare Kundenauswahl im Projekt */
.project-customer-picker{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px 12px;
  padding:12px;
  border:1px solid var(--line,#d8e2e7);
  border-radius:12px;
  background:color-mix(in srgb,var(--panel,#fff) 96%,#eef6fc);
}
.project-customer-picker > label{
  margin:0!important;
}
.project-customer-picker > .field-hint,
.project-customer-picker > small{
  grid-column:1/-1;
}
#projectCustomerSearch,
#projectCustomerSelect{
  width:100%;
  min-height:44px;
}
#projectCustomerSearch{
  padding-left:13px;
}
.project-customer-select-label{
  min-width:0;
}
@media(max-width:720px){
  .project-customer-picker{
    grid-template-columns:1fr;
    padding:10px;
  }
  .project-customer-picker > .field-hint,
  .project-customer-picker > small{
    grid-column:auto;
  }
}


/* V0.11.42 – Kundenmaske kompakt und übersichtlich */
.customer-dialog{
  width:min(760px,calc(100vw - 24px));
  max-width:760px;
}
.customer-dialog-card{
  width:100%;
  max-width:none;
  padding:18px 20px 16px;
}
.customer-dialog-head{
  margin-bottom:12px;
}
.customer-dialog-head h3{
  margin:3px 0 2px;
}
.customer-dialog-head p{
  margin:0;
}
.customer-form-sections{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.customer-form-section{
  border:1px solid var(--line,#d8e2e7);
  border-radius:12px;
  padding:11px 12px;
  background:color-mix(in srgb,var(--panel,#fff) 97%,#edf5fb);
}
.customer-form-section-title{
  margin-bottom:9px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted,#718192);
}
.customer-form-grid{
  display:grid;
  gap:9px 12px;
}
.customer-form-grid.two-col{
  grid-template-columns:1fr 1fr;
}
.customer-form-grid.address-grid{
  grid-template-columns:.7fr 1.3fr 1fr;
}
.customer-span-2{
  grid-column:1/-1;
}
.customer-form-section label{
  margin:0!important;
  min-width:0;
}
.customer-form-section input,
.customer-form-section textarea{
  width:100%;
}
.customer-form-section input{
  min-height:41px!important;
  height:41px!important;
}
.customer-form-section textarea{
  min-height:72px;
  resize:vertical;
}
.customer-active-toggle{
  margin-top:10px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--line,#d8e2e7);
  background:var(--panel,#fff);
  cursor:pointer;
}
.customer-active-toggle input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.customer-active-toggle .switch-ui{
  width:38px;
  height:22px;
  border-radius:999px;
  background:#ccd8e1;
  position:relative;
  flex:0 0 auto;
  transition:.18s ease;
}
.customer-active-toggle .switch-ui::after{
  content:"";
  position:absolute;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#fff;
  top:3px;
  left:3px;
  box-shadow:0 1px 3px rgba(0,0,0,.18);
  transition:.18s ease;
}
.customer-active-toggle input:checked + .switch-ui{
  background:#1681df;
}
.customer-active-toggle input:checked + .switch-ui::after{
  transform:translateX(16px);
}
.customer-active-toggle > span:last-child{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.customer-active-toggle strong{
  font-size:12px;
}
.customer-active-toggle small{
  color:var(--muted,#6f8090);
  font-size:10px;
}
.customer-dialog-actions{
  margin-top:12px;
}

@media(max-width:650px){
  .customer-dialog-card{
    padding:14px;
  }
  .customer-form-grid.two-col,
  .customer-form-grid.address-grid{
    grid-template-columns:1fr;
  }
  .customer-span-2{
    grid-column:auto;
  }
}


/* V0.11.45 – übersichtliche Stundenbericht-Liste */
.time-report-table{
  min-width:1180px;
  table-layout:fixed;
}
.time-report-table th{
  white-space:normal;
  word-break:normal;
  overflow-wrap:normal;
  hyphens:none;
  line-height:1.2;
  font-size:11px;
}
.time-report-table th:nth-child(1){width:90px}
.time-report-table th:nth-child(2){width:76px}
.time-report-table th:nth-child(3){width:135px}
.time-report-table th:nth-child(4){width:220px}
.time-report-table th:nth-child(5){width:92px}
.time-report-table th:nth-child(6){width:100px}
.time-report-table th:nth-child(7){width:100px}
.time-report-table th:nth-child(8){width:220px}
.time-report-table th:nth-child(9){width:170px}
.time-report-table th:nth-child(10){width:115px}

.time-report-table td{
  vertical-align:middle;
  line-height:1.35;
}
.time-report-date,
.time-report-time,
.time-report-hours,
.time-report-travel{
  white-space:nowrap;
}
.time-report-hours{
  font-weight:800;
}
.time-report-hours.absence{
  color:#8a5a00;
}
.time-report-row-absence{
  background:color-mix(in srgb,#fff4d8 38%,transparent);
}
.time-report-row-absence .time-report-hours.absence{
  color:#7a4f00;
}
.time-report-branch{
  font-size:10px;
  color:var(--muted,#6e7f8f);
  margin-bottom:2px;
}
.time-report-project{
  font-weight:700;
}
.time-report-type-badge{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:4px 9px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
}
.time-report-type-badge.absence{
  background:#fff1c9;
  color:#7a5000;
  border:1px solid #e4bf60;
}
.time-report-status{
  display:inline-flex;
  align-items:center;
  padding:5px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.time-report-status.locked{
  background:#eaf5ed;
  color:#24633c;
}
.time-report-status.open{
  background:#eef3f7;
  color:#516371;
}
.time-report-activity{
  word-break:normal;
  overflow-wrap:break-word;
}
.time-report-vehicle{
  overflow-wrap:break-word;
}
.time-report-table .small{
  font-size:10px;
  color:var(--muted,#6e7f8f);
  margin-top:2px;
}

@media(max-width:900px){
  .time-report-table{
    min-width:1080px;
  }
}


/* V0.11.50 – sichtbare Rückmeldung beim Baustellen-Speichern */
.project-save-message{
  margin:12px 0 0;
  padding:10px 12px;
  border:1px solid #e4b1b1;
  border-radius:10px;
  background:#fff0f0;
  color:#8b2424;
  font-size:12px;
  font-weight:700;
}
.project-save-message.success{
  border-color:#a8d6b5;
  background:#edf9f0;
  color:#24633c;
}


/* V0.11.51 – Pausen in der Stundenbericht-Tabelle */
.time-report-table{min-width:1260px}
.time-report-table th:nth-child(1){width:88px}
.time-report-table th:nth-child(2){width:72px}
.time-report-table th:nth-child(3){width:130px}
.time-report-table th:nth-child(4){width:205px}
.time-report-table th:nth-child(5){width:90px}
.time-report-table th:nth-child(6){width:98px}
.time-report-table th:nth-child(7){width:80px}
.time-report-table th:nth-child(8){width:98px}
.time-report-table th:nth-child(9){width:205px}
.time-report-table th:nth-child(10){width:165px}
.time-report-table th:nth-child(11){width:110px}
.time-report-pause{white-space:nowrap;font-weight:700}

/* V0.11.56 – benutzerfreundliche Tageszusammenfassung */
.time-report-day-summary td{
  background:#eef5fb;
  border-top:2px solid #bdd3e4;
  border-bottom:2px solid #bdd3e4;
  padding-top:10px;
  padding-bottom:10px;
}
.time-report-day-summary-title{font-weight:900;color:var(--navy,#17324d);white-space:nowrap}
.time-report-day-summary-values{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:11px}
.time-report-day-summary-values span{white-space:nowrap}
.time-report-day-summary-values .combined{padding:5px 9px;border-radius:8px;background:#dcecf8;color:#123e64}
.time-report-hours,.time-report-travel{white-space:nowrap}
