:root{--bg:#0b1417;--panel:#111f23;--line:rgba(255,255,255,.12);--text:#f4f0e8;--muted:#aeb8b8;--accent:#244d55;--accent2:#d8c7a1;--ok:#4caf50;--warn:#e6b450;--open:#7d8b8d}
*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:radial-gradient(circle at top left,#244d55 0,#0b1417 38%,#071013 100%);color:var(--text)}.hidden{display:none!important}
.app{min-height:100vh;display:grid;grid-template-columns:390px 1fr;gap:22px;padding:24px}.sidebar,.main-panel,.admin-card{background:rgba(17,31,35,.92);border:1px solid var(--line);border-radius:24px;box-shadow:0 25px 80px rgba(0,0,0,.35)}
.sidebar{padding:22px;overflow:auto;max-height:calc(100vh - 48px)}.main-panel{padding:22px;display:flex;flex-direction:column;gap:18px}.brand-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.brand{font-family:"Playfair Display", Georgia, serif;font-size:34px;letter-spacing:6px;font-weight:700;color:#a6c9c4;text-transform:uppercase;margin-bottom:24px}
.customer-logo{max-width:120px;max-height:54px;object-fit:contain;background:rgba(255,255,255,.06);border-radius:12px;padding:8px}.cover{width:100%;aspect-ratio:1/1.414;object-fit:cover;border-radius:18px;border:1px solid var(--line);background:#0d171a}.project-meta h2{margin:18px 0 5px;font-size:22px}.muted{color:var(--muted)}
.progress-card{margin:18px 0;padding:14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.04)}.progress-head{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin-bottom:10px}.progressbar{height:9px;border-radius:999px;background:rgba(255,255,255,.10);overflow:hidden}#progressFill{height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent2))}
.clip-list-head{display:flex;justify-content:space-between;align-items:center;margin-top:18px}.clip-list{display:flex;flex-direction:column;gap:10px;margin-top:12px}.clip-item{display:grid;grid-template-columns:72px 1fr 28px;gap:12px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035);cursor:pointer;position:relative}.clip-item.active{outline:2px solid var(--accent2)}.clip-thumb{width:72px;height:46px;border-radius:10px;object-fit:cover;background:#000}.clip-title{font-weight:650;font-size:14px}.clip-sub,.status-line,.small{font-size:12px;color:var(--muted);margin-top:4px}.status-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;background:var(--open)}.status-approved .status-dot{background:var(--ok)}.status-comment .status-dot{background:var(--warn)}
.kebab{border:0;background:transparent;color:var(--text);font-size:22px;cursor:pointer;border-radius:8px}.menu{position:absolute;right:12px;top:42px;background:#0e1b1f;border:1px solid var(--line);border-radius:12px;min-width:185px;z-index:5;box-shadow:0 20px 60px rgba(0,0,0,.5)}.menu button{display:block;width:100%;text-align:left;background:transparent;color:var(--text);border:0;padding:10px 12px;cursor:pointer}.menu button:hover{background:rgba(255,255,255,.08)}
.video-wrap{width:100%;background:#000;border-radius:22px;overflow:hidden;border:1px solid var(--line)}video{width:100%;display:block;aspect-ratio:16/9;background:#000}.clip-detail{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:16px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.035)}.clip-detail h1{margin:0 0 6px;font-size:28px}.meta-line{font-size:13px;color:var(--accent2)}.action-row,.admin-actions{display:flex;gap:8px;flex-wrap:wrap}
button,.secondary{border:1px solid var(--line);border-radius:12px;padding:10px 12px;color:var(--text);background:rgba(255,255,255,.06);cursor:pointer}.primary{background:var(--accent);border-color:rgba(255,255,255,.18);font-weight:700}.full{width:100%;margin-top:14px}.comments-section{padding:16px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.035)}.comment{padding:10px 0;border-bottom:1px solid var(--line)}.comment strong{color:var(--accent2)}
.login-overlay{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}.login-card{width:min(460px,100%);background:rgba(17,31,35,.96);border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:0 25px 80px rgba(0,0,0,.42)}.brand-small{letter-spacing:.18em;color:var(--accent2);font-weight:800;font-size:24px}.login-card label,.admin-card label{display:block;margin:14px 0 6px;color:var(--muted)}.login-card input,.admin-card input,.admin-card select,.admin-card textarea{width:100%;padding:12px;border-radius:12px;border:1px solid var(--line);background:#071013;color:var(--text)}.error{color:#ffb4a8}
.admin-page{min-height:100vh;padding:24px}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.admin-card{padding:22px}.user-list{display:flex;flex-direction:column;gap:10px}.user-row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.035)}.notice{padding:10px 12px;border-radius:12px;background:rgba(216,199,161,.12);border:1px solid rgba(216,199,161,.25);color:var(--accent2)}
@media(max-width:980px){.app,.admin-grid{grid-template-columns:1fr}.sidebar{max-height:none}}

.portal-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0;
}

.portal-nav button {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: default;
}

.portal-nav .nav-active {
  background: rgba(166, 141, 103, 0.18);
  border-color: rgba(166, 141, 103, 0.4);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.kpi-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.kpi-card strong {
  font-size: 34px;
  color: var(--text);
}

.portal-highlight {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-highlight strong {
  font-size: 20px;
}

.portal-highlight span {
  color: var(--muted);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 0;
}

.summary-line:last-child {
  border-bottom: none;
}

/* ==========================================
   LUMINA PLAYER v1.6a
   Fixed Viewer Layout / Fit-to-Page
   ========================================== */

.viewer-shell{
  height:100vh;
  display:grid;
  grid-template-columns:360px 1fr;
  gap:18px;
  padding:18px;
  overflow:hidden;
}

.viewer-sidebar{
  background:rgba(17,31,35,.92);
  border:1px solid var(--line);
  border-radius:24px;
  padding:22px;
  overflow:auto;
}

.viewer-main{
  background:rgba(17,31,35,.92);
  border:1px solid var(--line);
  border-radius:24px;
  display:grid;
  grid-template-rows:auto 1fr auto auto;
  overflow:hidden;
}

.viewer-toolbar{
  padding:18px 22px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}

.viewer-toolbar h1{
  margin:0 0 6px;
  font-size:26px;
}

.toolbar-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.viewer-preview{
  min-height:0;
  overflow:hidden;
  padding:16px 22px;
  display:flex;
  flex-direction:column;
}

.viewer-preview-inner{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.viewer-preview-meta{
  flex:0 0 auto;
  margin-bottom:10px;
}

.viewer-image-stage{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  overflow:hidden;
}

.viewer-image-stage img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}

.viewer-page-card{
  height:100%;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.viewer-page-label{
  margin-top:8px;
  color:var(--muted);
  font-size:14px;
}

.review-toggle-row{
  padding:12px 22px;
  border-top:1px solid var(--line);
}

.review-panel{
  max-height:36vh;
  overflow:auto;
  border-top:1px solid var(--line);
  padding:18px 22px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
  background:rgba(255,255,255,.025);
}

.review-column h3{
  font-size:22px;
  margin-top:0;
}

.review-column label{
  display:block;
  margin:14px 0 7px;
  font-size:17px;
  font-weight:600;
}

#reviewerName,
#reviewStatus{
  width:100%;
  height:54px;
  font-size:18px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#071013;
  color:var(--text);
}

#reviewComment{
  width:100%;
  height:180px;
  font-size:18px;
  line-height:1.55;
  padding:14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#071013;
  color:var(--text);
}

#saveReviewButton{
  margin-top:14px;
  min-height:56px;
  font-size:18px;
  padding:14px 24px;
}

.sidebar-section{
  margin-top:22px;
  padding-top:16px;
  border-top:1px solid var(--line);
}

#pageNavigator button{
  width:100%;
  text-align:left;
  margin-bottom:6px;
  min-height:42px;
  font-size:15px;
}

#reviewTargetArea .comment{
  font-size:17px;
  line-height:1.7;
}

#reviewTargetArea input[type="radio"]{
  transform:scale(1.25);
  margin-right:8px;
}

@media(max-width:980px){
  .viewer-shell{
    grid-template-columns:1fr;
    height:auto;
    overflow:auto;
  }

  .viewer-main{
    min-height:80vh;
  }

  .review-panel{
    grid-template-columns:1fr;
    max-height:none;
  }
}

/* ==========================================
   LUMINA PLAYER v1.6d
   Premium Navigation Fix / Branding
   ========================================== */

.viewer-sidebar .brand{
  font-family:"Playfair Display", Georgia, "Times New Roman", serif;
  font-size:34px;
  line-height:1;
  font-weight:700;
  letter-spacing:.18em;
  color:#4e8c84;
  text-transform:uppercase;
  margin-bottom:26px;
  text-shadow:0 1px 0 rgba(255,255,255,.10);
}

#pageNavigator .page-nav-button{
  width:100%;
  min-height:44px;
  display:flex;
  align-items:center;
  gap:8px;
  text-align:left;
  margin-bottom:7px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;
  background:rgba(255,255,255,.045);
  opacity:.88;
  font-size:15px;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease,opacity .15s ease;
}

#pageNavigator .page-nav-button:hover{
  background:rgba(255,255,255,.075);
  opacity:1;
}

#pageNavigator .page-active{
  opacity:1;
  font-weight:800;
  border:2px solid rgba(216,199,161,.96);
  border-left:7px solid rgba(216,199,161,1);
  background:linear-gradient(90deg,rgba(216,199,161,.22),rgba(255,255,255,.075));
  box-shadow:0 0 0 1px rgba(255,255,255,.09),0 0 20px rgba(216,199,161,.22),0 10px 26px rgba(0,0,0,.26);
  transform:translateX(3px);
}

#pageNavigator .page-active:hover{
  background:linear-gradient(90deg,rgba(216,199,161,.26),rgba(255,255,255,.09));
}

#pageNavigator .page-active span:last-child{
  color:#ffffff;
}

#pageNavigator .page-marker{
  width:20px;
  min-width:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#ffffff;
  font-size:22px;
  line-height:1;
  font-weight:900;
}

#pageNavigator .page-marker-placeholder{
  width:20px;
  min-width:20px;
  display:inline-flex;
}

#pageNavigator .page-status-icon{
  width:20px;
  min-width:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}


/* ==========================================
   LUMINA PLAYER v1.6e
   Review Correction / Brand Color
   ========================================== */

.review-current-status{
  margin-bottom:14px;
  padding:12px 14px;
  border:1px solid rgba(78,140,132,.35);
  border-radius:12px;
  background:rgba(78,140,132,.08);
  font-size:16px;
  line-height:1.55;
}

.review-current-status strong{
  color:#d8c7a1;
}

.review-change-note{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}


/* ==========================================
   LUMINA PLAYER v1.7b
   Professional Report Button
   ========================================== */

#reviewReportButton{
  white-space:nowrap;
}

/* ==========================================
   LUMINA PLAYER v1.9a3
   Rollenabhängige Statusauswahl Fix
   ========================================== */

#reviewStatus{
  font-weight:700;
}

/* ==========================================
   LUMINA PLAYER v1.9e
   Reviewer-Einzelstimmen in der Navigation
   ========================================== */

.workflow-markers-votes{
  display:inline-flex;
  gap:3px;
  align-items:center;
  margin:0 5px 0 2px;
  min-width:42px;
}

.reviewer-vote-marker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:13px;
  height:13px;
  font-size:12px;
  line-height:1;
  filter:drop-shadow(0 0 2px rgba(0,0,0,.55));
}

.reviewer-vote-recommend_approved{
  color:#d8c7a1;
}

.reviewer-vote-recommend_changes{
  color:#d0b600;
}

.reviewer-vote-recommend_rejected{
  color:#d92935;
}

/* ==========================================
   LPMS v1.10
   Portal Layoutbasis / Bildschirmaufteilung
   ========================================== */

.portal-app{
  height:100vh;
  min-height:0;
  grid-template-columns:360px minmax(0,1fr);
  gap:18px;
  padding:18px;
  overflow:hidden;
}

.portal-sidebar{
  height:calc(100vh - 36px);
  max-height:none;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding:22px;
}

.portal-sidebar .brand-row{
  flex:0 0 auto;
  margin-bottom:8px;
}

.portal-sidebar .brand{
  margin-bottom:8px;
  color:#4e8c84;
}

.portal-sidebar .portal-nav{
  flex:0 0 auto;
  margin:10px 0 14px;
}

.portal-sidebar .portal-nav button{
  min-height:44px;
  font-size:15px;
  padding:11px 13px;
  cursor:pointer;
}

.sidebar-spacer{
  flex:1 1 auto;
  min-height:22px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:16px;
}

.portal-project-meta{
  flex:0 0 auto;
  margin:0;
}

.sidebar-label,
.eyebrow{
  font-size:11px;
  line-height:1;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--accent2);
  font-weight:800;
  margin-bottom:10px;
}

.portal-project-meta h2{
  margin:0 0 8px;
  font-size:21px;
  line-height:1.18;
}

.portal-project-meta p{
  margin:5px 0;
}

.portal-progress-card{
  flex:0 0 auto;
  margin:16px 0 12px;
}

.sidebar-status-card{
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.035);
  padding:12px 14px;
}

.sidebar-status-line{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:13px;
}

.sidebar-status-line:last-child{
  border-bottom:0;
}

.sidebar-status-line span{
  color:var(--muted);
}

.sidebar-status-line strong{
  color:var(--text);
  text-align:right;
}

.portal-main-panel{
  height:calc(100vh - 36px);
  min-width:0;
  min-height:0;
  overflow:hidden;
  padding:0;
  display:grid;
  grid-template-rows:auto auto auto 1fr auto;
  gap:0;
}

.portal-header{
  padding:24px 26px 18px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  border-bottom:1px solid var(--line);
}

.portal-header h1{
  margin:0 0 6px;
  font-size:34px;
  line-height:1.1;
}

.portal-header p{
  margin:0;
}

.portal-header-status{
  border:1px solid rgba(216,199,161,.34);
  background:rgba(216,199,161,.10);
  color:var(--accent2);
  border-radius:999px;
  padding:10px 14px;
  font-weight:800;
  white-space:nowrap;
}

.portal-filterbar{
  padding:16px 26px;
  border-bottom:1px solid var(--line);
  display:grid;
  grid-template-columns:minmax(280px,1fr) 220px 220px;
  gap:14px;
  align-items:end;
  background:rgba(255,255,255,.02);
}

.filter-group label{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin:0 0 6px;
}

.filter-group input,
.filter-group select{
  width:100%;
  min-height:44px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#071013;
  color:var(--text);
  padding:10px 12px;
  font-size:14px;
}

.portal-kpi-grid{
  margin:0;
  padding:16px 26px;
  border-bottom:1px solid var(--line);
  grid-template-columns:repeat(4,minmax(150px,1fr));
}

.portal-kpi-grid .kpi-card{
  min-height:104px;
}

.portal-content-scroll{
  min-height:0;
  overflow:auto;
  padding:20px 26px 24px;
}

.media-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(320px,1fr));
  gap:16px;
  align-items:stretch;
}

.media-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(255,255,255,.04);
  padding:18px;
  cursor:pointer;
  min-height:236px;
  display:flex;
  flex-direction:column;
  gap:16px;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease,transform .15s ease;
}

.media-card:hover,
.media-card:focus-visible{
  outline:none;
  border-color:rgba(216,199,161,.55);
  background:rgba(255,255,255,.06);
}

.media-card-selected{
  border-color:rgba(216,199,161,.95);
  box-shadow:0 0 0 1px rgba(216,199,161,.28),0 18px 42px rgba(0,0,0,.28);
  transform:translateY(-1px);
}

.media-card-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}

.media-id{
  color:var(--accent2);
  font-weight:800;
  font-size:12px;
  letter-spacing:.10em;
  margin-bottom:8px;
}

.media-card h2{
  margin:0;
  font-size:24px;
  line-height:1.15;
}

.media-status-pill{
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  color:var(--muted);
  background:rgba(255,255,255,.04);
  white-space:nowrap;
}

.media-status-pill.status-approved,
.media-status-pill.status-final{
  color:#c9f0c9;
  border-color:rgba(76,175,80,.35);
  background:rgba(76,175,80,.10);
}

.media-status-pill.status-planned,
.media-status-pill.status-open{
  color:#d7dedf;
}

.media-status-pill.status-review,
.media-status-pill.status-active{
  color:#ffe2a0;
  border-color:rgba(230,180,80,.35);
  background:rgba(230,180,80,.10);
}

.media-card-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.media-card-grid div{
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:10px;
  background:rgba(0,0,0,.10);
  min-width:0;
}

.media-card-grid span{
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-bottom:6px;
}

.media-card-grid strong{
  display:block;
  font-size:14px;
  color:var(--text);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.media-card p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.empty-state{
  border:1px dashed rgba(255,255,255,.18);
  border-radius:18px;
  padding:24px;
  color:var(--muted);
  background:rgba(255,255,255,.025);
}

.portal-actionbar{
  min-height:76px;
  padding:14px 18px;
  border-top:1px solid var(--line);
  background:rgba(7,16,19,.72);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.actionbar-selection{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.actionbar-selection span{
  color:var(--muted);
  font-size:12px;
}

.actionbar-selection strong{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:48vw;
}

.actionbar-buttons{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.actionbar-buttons button:disabled{
  opacity:.42;
  cursor:not-allowed;
}

@media(max-width:1180px){
  .portal-app{grid-template-columns:320px minmax(0,1fr);}
  .portal-filterbar{grid-template-columns:1fr 1fr;}
  .filter-group.wide{grid-column:1 / -1;}
  .media-grid{grid-template-columns:1fr;}
  .media-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media(max-width:980px){
  .portal-app{
    height:auto;
    min-height:100vh;
    overflow:auto;
    grid-template-columns:1fr;
  }
  .portal-sidebar,
  .portal-main-panel{
    height:auto;
    min-height:auto;
    overflow:visible;
  }
  .sidebar-spacer{display:none;}
  .portal-main-panel{display:flex;}
  .portal-filterbar,
  .portal-kpi-grid,
  .media-grid{grid-template-columns:1fr;}
  .portal-actionbar{position:sticky;bottom:0;z-index:10;align-items:flex-start;flex-direction:column;}
  .actionbar-selection strong{max-width:82vw;}
}

/* ==========================================
   LPMS v1.10a – Medienansicht als Startansicht
   ========================================== */
.portal-main-panel{padding:0;overflow:hidden;}
.portal-header{padding:28px 30px 22px;}
.portal-header h1{font-size:34px;}
.portal-filterbar{background:rgba(255,255,255,.025);}
.portal-content-scroll{flex:1 1 auto;}
.media-grid{grid-template-columns:repeat(2,minmax(420px,1fr));}
.media-card{min-height:255px;}
.dashboard-cards{display:grid;grid-template-columns:repeat(2,minmax(360px,1fr));gap:16px;}
.portal-actionbar{position:relative;bottom:0;}
@media(max-width:1280px){.media-grid,.dashboard-cards{grid-template-columns:1fr;}}

/* ==========================================
   LPMS R004.4.1a
   Viewer Layout / Responsive Flächennutzung

   Scope:
   - Nur Layoutoptimierung
   - Keine Funktionsänderung
   - Keine Änderungen an Reviewlogik, Workflow oder Dispatcher
   ========================================== */

.viewer-shell{
  height:100dvh;
  min-height:0;
  display:grid;
  grid-template-columns:clamp(300px,18vw,330px) minmax(0,1fr);
  gap:12px;
  padding:12px;
  overflow:hidden;
}

.viewer-sidebar{
  min-width:0;
  min-height:0;
  height:calc(100dvh - 24px);
  border-radius:20px;
  padding:18px;
  overflow:auto;
}

.viewer-sidebar .brand{
  font-size:30px;
  letter-spacing:.16em;
  margin-bottom:22px;
}

.viewer-sidebar .project-meta h2{
  margin:14px 0 6px;
  font-size:20px;
  line-height:1.18;
}

.viewer-sidebar .project-meta p{
  margin:7px 0;
  font-size:14px;
}

.viewer-sidebar #backButton{
  min-height:40px;
  padding:9px 12px;
  font-size:14px;
}

.viewer-main{
  min-width:0;
  min-height:0;
  height:calc(100dvh - 24px);
  border-radius:20px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto auto;
  overflow:hidden;
}

.viewer-toolbar{
  min-width:0;
  padding:14px 16px;
  gap:16px;
  align-items:center;
}

.viewer-toolbar h1{
  margin:0 0 5px;
  font-size:23px;
  line-height:1.12;
}

.viewer-toolbar p{
  margin:0;
  font-size:14px;
  line-height:1.35;
}

.toolbar-actions{
  align-items:center;
  gap:7px;
}

.toolbar-actions button{
  min-height:40px;
  padding:8px 11px;
  border-radius:10px;
  font-size:13px;
  line-height:1.1;
  white-space:nowrap;
}

.viewer-preview{
  min-width:0;
  min-height:0;
  padding:10px 14px;
  overflow:auto;
}

.viewer-preview-inner{
  min-height:100%;
  height:auto;
}

.viewer-preview-inner > div{
  max-width:none !important;
  min-height:100%;
  margin:0 auto !important;
  padding:0 !important;
}

.viewer-preview-inner h2{
  font-size:clamp(20px,1.6vw,28px) !important;
}

.viewer-image-stage{
  min-width:0;
  min-height:0 !important;
  height:auto !important;
  max-height:none;
  padding:12px !important;
  overflow:auto !important;
}

.viewer-image-stage > div{
  max-width:min(1180px,98%) !important;
  width:min(1180px,98%) !important;
  height:min(82vh, calc(100dvh - 218px)) !important;
  min-height:520px;
}

.review-toggle-row{
  padding:9px 14px;
}

#toggleReviewButton{
  min-height:40px;
  padding:8px 13px;
  border-radius:10px;
  font-size:14px;
}

.review-panel{
  max-height:min(32dvh,360px);
  min-height:0;
  overflow:auto;
  padding:14px 16px;
  gap:18px;
}

.review-column h3{
  margin:0 0 10px;
  font-size:20px;
}

.review-column label{
  margin:12px 0 6px;
  font-size:16px;
}

#reviewStatus,
#reviewerName{
  min-height:46px;
  height:46px;
  font-size:16px;
}

#reviewComment{
  height:138px;
  font-size:16px;
}

#saveReviewButton{
  min-height:48px;
  font-size:16px;
}

.sidebar-section{
  margin-top:20px;
  padding-top:14px;
}

#pageNavigator .page-nav-button,
#pageNavigator button{
  min-height:42px;
  margin-bottom:6px;
  font-size:14px;
  padding:9px 10px;
}

@media(max-width:1365px){
  .viewer-shell{
    grid-template-columns:300px minmax(0,1fr);
    gap:10px;
    padding:10px;
  }

  .viewer-sidebar,
  .viewer-main{
    height:calc(100dvh - 20px);
    border-radius:18px;
  }

  .viewer-sidebar{
    padding:16px;
  }

  .viewer-toolbar{
    align-items:flex-start;
  }

  .toolbar-actions{
    max-width:520px;
  }

  .viewer-image-stage > div{
    height:min(82vh, calc(100dvh - 232px)) !important;
    min-height:480px;
  }
}

@media(max-width:1120px){
  .viewer-shell{
    grid-template-columns:280px minmax(0,1fr);
  }

  .viewer-sidebar .brand{
    font-size:27px;
    letter-spacing:.14em;
  }

  .viewer-toolbar h1{
    font-size:21px;
  }

  .toolbar-actions button{
    min-height:42px;
    font-size:13px;
  }
}

@media(max-width:900px){
  .viewer-shell{
    height:auto;
    min-height:100dvh;
    grid-template-columns:1fr;
    overflow:auto;
  }

  .viewer-sidebar,
  .viewer-main{
    height:auto;
    min-height:auto;
  }

  .viewer-main{
    min-height:82dvh;
  }

  .viewer-toolbar{
    flex-direction:column;
  }

  .toolbar-actions{
    width:100%;
    justify-content:flex-start;
  }

  .viewer-image-stage > div{
    height:72dvh !important;
    min-height:420px;
  }

  .review-panel{
    grid-template-columns:1fr;
    max-height:none;
  }
}


/* ==========================================
   LPMS R004.4.1a FIX 01
   Sidebar-Layout / Touch-Navigation

   Scope:
   - nur Layout
   - keine Funktionsänderung
   - Sidebar breiter und intern scrollbar
   - Viewerfläche bleibt unverändert nutzbar
   ========================================== */

.viewer-shell{
  grid-template-columns:clamp(360px,24vw,440px) minmax(0,1fr);
}

.viewer-sidebar{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.viewer-sidebar .brand,
.viewer-sidebar .project-meta,
.viewer-sidebar #backButton{
  flex:0 0 auto;
}

.viewer-sidebar #backButton{
  width:fit-content;
  min-height:44px;
}

.viewer-sidebar .sidebar-section{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  margin-top:22px;
  padding-top:16px;
}

.viewer-sidebar .sidebar-section h3{
  flex:0 0 auto;
  margin:0 0 12px;
  font-size:20px;
}

#pageNavigator{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:0 6px 2px 0;
  scrollbar-width:thin;
}

#pageNavigator .page-nav-button,
#pageNavigator button{
  min-height:52px;
  margin-bottom:8px;
  padding:11px 13px;
  font-size:15px;
  line-height:1.25;
  border-radius:12px;
}

#pageNavigator .page-marker,
#pageNavigator .page-marker-placeholder,
#pageNavigator .page-status-icon{
  width:24px;
  min-width:24px;
}

.workflow-markers-votes{
  min-width:50px;
  gap:4px;
}

.reviewer-vote-marker{
  min-width:16px;
  height:16px;
  font-size:14px;
}

.viewer-toolbar{
  min-height:72px;
}

.toolbar-actions button,
#toggleReviewButton,
#saveReviewButton,
#reviewStatus,
#reviewerName{
  min-height:48px;
}

@media(max-width:1365px){
  .viewer-shell{
    grid-template-columns:clamp(340px,30vw,400px) minmax(0,1fr);
  }

  #pageNavigator .page-nav-button,
  #pageNavigator button{
    min-height:54px;
    font-size:15px;
  }
}

@media(max-width:1120px){
  .viewer-shell{
    grid-template-columns:340px minmax(0,1fr);
  }

  .viewer-sidebar{
    padding:15px;
  }

  .viewer-sidebar .brand{
    font-size:26px;
  }

  #pageNavigator .page-nav-button,
  #pageNavigator button{
    min-height:56px;
  }
}

@media(max-width:900px){
  .viewer-shell{
    grid-template-columns:1fr;
  }

  .viewer-sidebar{
    max-height:42dvh;
  }

  .viewer-sidebar .sidebar-section{
    min-height:220px;
  }
}


/* ==========================================
   LPMS R004.4.2
   Viewer-Arbeitsfläche mit PDF.js

   Scope:
   - Browser-PDF-Plugin wird durch LPMS-Arbeitsfläche vorbereitet
   - PDF wird in Canvas gerendert
   - Standardansicht: Fit Width
   - Keine Änderungen an Workflow, Reviewlogik oder Dispatcher
   ========================================== */

.viewer-preview{
  background:rgba(7,16,19,.22);
}

.lpms-pdf-viewer{
  width:100%;
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:10px;
}

.lpms-pdf-head{
  flex:0 0 auto;
  text-align:center;
  color:var(--muted);
  padding:0 12px;
}

.lpms-pdf-eyebrow{
  font-size:12px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#4e8c84;
  font-weight:900;
  margin-bottom:6px;
}

.lpms-pdf-title{
  margin:0;
  color:#4e8c84;
  font-size:clamp(22px,1.7vw,30px);
  line-height:1.18;
}

.lpms-pdf-meta{
  margin-top:6px;
  font-size:13px;
  color:var(--muted);
}

.lpms-pdf-workspace{
  min-height:0;
  width:100%;
  height:100%;
  overflow:auto;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(0,0,0,.16),rgba(0,0,0,.24));
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:18px;
  scrollbar-width:thin;
}

.lpms-pdf-page-shell{
  width:100%;
  min-height:100%;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}

.lpms-pdf-canvas{
  display:block;
  max-width:100%;
  height:auto;
  background:#fff;
  box-shadow:0 18px 44px rgba(0,0,0,.42);
  border-radius:4px;
}

.lpms-pdf-state{
  width:min(780px,92%);
  min-height:360px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--muted);
  border:1px dashed rgba(255,255,255,.18);
  border-radius:18px;
  padding:34px;
  background:rgba(255,255,255,.035);
}

.lpms-pdf-state strong{
  color:var(--text);
  font-size:20px;
  margin-bottom:8px;
}

.lpms-pdf-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin-top:16px;
}

.lpms-pdf-actions a,
.lpms-pdf-actions button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:10px 18px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  border:1px solid rgba(255,255,255,.16);
}

.lpms-pdf-actions .primary-link{
  background:#244d55;
  color:#fff;
}

.lpms-pdf-actions .secondary-link{
  background:rgba(255,255,255,.08);
  color:var(--text);
}

@media(max-width:1365px){
  .lpms-pdf-workspace{padding:14px;}
}

@media(max-width:900px){
  .lpms-pdf-workspace{min-height:68dvh;}
}

/* ==========================================
   LPMS R004.4.2a
   PDF-Lesemodus und Basis-Zoom

   Scope:
   - Dokumentenanzeige bleibt PDF.js/Canvas
   - Standard: Lesemodus mit Marge (88%)
   - Zoom + / Zoom - / Lesemodus / Fit Breite
   - Keine Änderung an Reviewlogik, Workflow oder Dispatcher
   ========================================== */

.lpms-pdf-viewer{
  grid-template-rows:auto auto minmax(0,1fr);
}

.lpms-pdf-controlbar{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 12px 2px;
}

.lpms-pdf-tool{
  min-height:44px;
  min-width:44px;
  padding:9px 14px;
  font-size:14px;
  font-weight:800;
  border-radius:12px;
}

.lpms-pdf-zoomlabel{
  min-height:44px;
  min-width:72px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  background:rgba(255,255,255,.045);
  color:var(--accent2);
  font-weight:900;
  font-size:14px;
}

.lpms-pdf-workspace{
  padding:22px 28px;
}

.lpms-pdf-page-shell{
  min-width:max-content;
}

.lpms-pdf-canvas{
  max-width:none;
}

@media(max-width:1365px){
  .lpms-pdf-workspace{padding:18px 22px;}
  .lpms-pdf-controlbar{justify-content:flex-start;overflow:auto;}
}

@media(max-width:900px){
  .lpms-pdf-controlbar{padding:0 8px 4px;}
  .lpms-pdf-tool{min-height:48px;min-width:48px;}
  .lpms-pdf-workspace{padding:14px;}
}


/* ==========================================
   LPMS R004.4.2b FIX 01
   Magazinseiten-Regression nach PDF.js-Arbeitsfläche

   Scope:
   - Magazinseiten wieder sichtbar machen
   - PDF.js-Dokumentenviewer nicht verändern
   - Reviewlogik, Workflow und Dispatcher unverändert
   ========================================== */

.viewer-preview-inner{
  height:100%;
  min-height:0;
}

.viewer-preview-inner .viewer-preview-meta{
  flex:0 0 auto;
  text-align:center;
  padding:0 10px 8px;
}

.viewer-preview-inner .viewer-image-stage{
  flex:1 1 auto;
  min-width:0;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  overflow:auto !important;
  padding:12px 16px 18px !important;
}

.viewer-preview-inner .viewer-image-stage .viewer-page-card{
  width:auto !important;
  min-width:0 !important;
  max-width:calc(50% - 12px) !important;
  height:auto !important;
  min-height:0 !important;
  max-height:100% !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.viewer-preview-inner .viewer-image-stage .viewer-page-card:only-child{
  max-width:min(92%,980px) !important;
}

.viewer-preview-inner .viewer-image-stage .viewer-page-card img{
  display:block !important;
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:calc(100dvh - 245px) !important;
  object-fit:contain !important;
  border-radius:12px;
  box-shadow:0 18px 44px rgba(0,0,0,.42);
}

.viewer-preview-inner .viewer-page-label{
  flex:0 0 auto;
  margin-top:8px;
}

@media(max-width:1365px){
  .viewer-preview-inner .viewer-image-stage .viewer-page-card img{
    max-height:calc(100dvh - 260px) !important;
  }
}

@media(max-width:900px){
  .viewer-preview-inner .viewer-image-stage{
    align-items:flex-start;
    justify-content:flex-start;
  }

  .viewer-preview-inner .viewer-image-stage .viewer-page-card,
  .viewer-preview-inner .viewer-image-stage .viewer-page-card:only-child{
    max-width:100% !important;
  }

  .viewer-preview-inner .viewer-image-stage .viewer-page-card img{
    max-height:none !important;
    max-width:100% !important;
  }
}


/* ==========================================
   LPMS R004.4.4 BASELINE
   Handwerkzeug und Pan-Steuerung

   Scope:
   - Handmodus über eigenen Toolbar-Button
   - Pointer-Drag zum Verschieben gezoomter Dokumente
   - sichtbarer Aktiv- und Ziehzustand
   - bestehende Zoom-, Workflow- und Reviewlogik unverändert
   ========================================== */

.lpms-pdf-handtool.is-active{
  background:var(--accent);
  border-color:rgba(255,255,255,.24);
  color:#fff;
  box-shadow:0 0 0 2px rgba(78,140,132,.2);
}

.lpms-pdf-workspace.is-pan-enabled{
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
  touch-action:none;
}

.lpms-pdf-workspace.is-pan-enabled .lpms-pdf-canvas{
  pointer-events:none;
}

.lpms-pdf-workspace.is-dragging{
  cursor:grabbing;
}

/* ==========================================
   LPMS R004.4.4 M3 TEST
   Absolute Zoom- und Ansichtsmodi

   Scope:
   - 100 %, Fit Breite und Fit Höhe mit eindeutigem Aktivzustand
   - Prozentanzeige entspricht dem tatsächlichen PDF-Maßstab
   - Handwerkzeug bleibt unverändert erhalten
   ========================================== */

.lpms-pdf-viewtool.is-active{
  background:var(--accent);
  border-color:rgba(255,255,255,.24);
  color:#fff;
  box-shadow:0 0 0 2px rgba(78,140,132,.2);
}

.lpms-pdf-zoomlabel{
  font-variant-numeric:tabular-nums;
}


/* ==========================================
   LPMS R004.4.5 M4.1 TEST
   Dokumentaktionen im PDF-Viewer
   ========================================== */
.lpms-pdf-head .lpms-pdf-actions{
  margin-top:12px;
  margin-bottom:2px;
}

.lpms-pdf-actions button{
  font:inherit;
  cursor:pointer;
}

.lpms-pdf-actions [data-lpms-edit-document="true"]{
  background:#c6a46a;
  border-color:#c6a46a;
  color:#102a2f;
}

.lpms-pdf-actions [data-lpms-edit-document="true"].lpms-edit-locked-by-me{
  background:#2f7d63;
  border-color:#2f7d63;
  color:#fff;
}

.lpms-pdf-actions [data-lpms-edit-document="true"].lpms-edit-locked-by-other{
  background:rgba(255,255,255,.08);
  border-color:rgba(198,164,106,.75);
  color:var(--text);
}

/* ==========================================
   LPMS R004.4.5 M4.5 TEST
   Mehrseitige PDF-Dokumentansicht

   Scope:
   - Alle PDF-Seiten untereinander
   - Einheitlicher Zoom fuer das gesamte Dokument
   - Seitenzaehler und Seitenbeschriftung
   - Handwerkzeug bleibt fuer die gesamte Arbeitsflaeche aktiv
   ========================================== */

.lpms-pdf-workspace{
  justify-content:flex-start;
}

.lpms-pdf-page-shell{
  width:max-content;
  min-width:100%;
  min-height:100%;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

.lpms-pdf-pages{
  width:max-content;
  min-width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:28px;
  padding:0 0 8px;
}

.lpms-pdf-page-card{
  flex:0 0 auto;
  width:max-content;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.lpms-pdf-page-label,
.lpms-pdf-pagecount{
  font-variant-numeric:tabular-nums;
}

.lpms-pdf-page-label{
  min-height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:3px 10px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:999px;
  background:rgba(0,0,0,.24);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.lpms-pdf-pagecount{
  min-height:44px;
  min-width:76px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  background:rgba(255,255,255,.045);
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}

.lpms-pdf-workspace.is-pan-enabled .lpms-pdf-page-card{
  pointer-events:none;
}

@media(max-width:900px){
  .lpms-pdf-pages{gap:20px;}
  .lpms-pdf-pagecount{min-height:48px;}
}

/* ==========================================
   LPMS R004.4.5 M4.5c
   Klare Trennung von Arbeits- und Kundenfassung
   ========================================== */

.lpms-document-state{
  width:min(920px,100%);
  margin:12px auto 0;
  padding:11px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  text-align:left;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  background:rgba(255,255,255,.045);
  box-shadow:inset 4px 0 0 rgba(255,255,255,.12);
}

.lpms-document-state-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.lpms-document-state strong{
  color:var(--text);
  font-size:14px;
  line-height:1.3;
}

.lpms-document-state span,
.lpms-document-state small{
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.lpms-document-state small{
  flex:0 0 auto;
  white-space:nowrap;
}

.lpms-document-state-approved{
  border-color:rgba(79,201,129,.42);
  background:rgba(24,134,79,.13);
  box-shadow:inset 4px 0 0 #29a866;
}

.lpms-document-state-split{
  border-color:rgba(214,174,99,.46);
  background:rgba(214,174,99,.10);
  box-shadow:inset 4px 0 0 #d6ae63;
}

.lpms-document-state-unpublished{
  border-color:rgba(255,255,255,.14);
  background:rgba(255,255,255,.035);
  box-shadow:inset 4px 0 0 rgba(255,255,255,.28);
}

@media(max-width:900px){
  .lpms-document-state{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
  }

  .lpms-document-state small{
    white-space:normal;
  }
}



/* ==========================================
   LPMS R004.4.5 M4.5d
   Vereinfachte Kundenstatus- und Freigabeansicht
   ========================================== */

#pageNavigator .nav-item-label{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.customer-nav-state{
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
  min-width:64px;
  padding:3px 7px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.13);
  background:rgba(255,255,255,.055);
  font-size:12px;
  font-weight:800;
  line-height:1.1;
  white-space:nowrap;
}

.customer-nav-state-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:15px;
  min-width:15px;
  height:15px;
  border-radius:50%;
  font-size:13px;
  line-height:1;
}

.customer-nav-state-open{color:#d7dddf;}
.customer-nav-state-partial{color:#e2c66e;border-color:rgba(226,198,110,.35);background:rgba(226,198,110,.08);}
.customer-nav-state-recommended,
.customer-nav-state-final-approved{color:#78d99a;border-color:rgba(120,217,154,.38);background:rgba(44,168,91,.12);}
.customer-nav-state-changes,
.customer-nav-state-final-changes{color:#f0c55c;border-color:rgba(240,197,92,.4);background:rgba(240,197,92,.1);}
.customer-nav-state-rejected,
.customer-nav-state-final-rejected{color:#ff7f88;border-color:rgba(255,127,136,.42);background:rgba(217,41,53,.12);}

.customer-review-overview{
  margin-top:10px;
  padding:16px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  background:rgba(255,255,255,.035);
}

.customer-review-overview-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.customer-review-overview-head strong,
.reviewer-own-decision strong{
  display:block;
  margin-top:3px;
  color:#fff;
  font-size:18px;
}

.customer-review-kicker{
  display:block;
  color:#79b8b0;
  font-size:12px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.customer-review-counts{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.review-count{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:12px;
  font-weight:800;
}
.review-count-approved{color:#78d99a;background:rgba(44,168,91,.11);border-color:rgba(120,217,154,.3);}
.review-count-changes{color:#f0c55c;background:rgba(240,197,92,.1);border-color:rgba(240,197,92,.3);}
.review-count-rejected{color:#ff7f88;background:rgba(217,41,53,.11);border-color:rgba(255,127,136,.3);}
.review-count-open{color:var(--muted);}

.customer-review-guidance{
  margin:13px 0 4px;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(0,0,0,.18);
  color:#fff;
  font-weight:800;
}

.customer-review-list,
.customer-final-decision{
  margin-top:14px;
}

.reviewer-summary-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.reviewer-summary-row:last-child{border-bottom:0;}
.reviewer-summary-name{font-weight:700;color:#fff;}
.reviewer-summary-decision{text-align:right;color:#d8e0e1;}
.reviewer-summary-final{padding:10px 12px;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:rgba(255,255,255,.04);}

.customer-review-overview-recommended{border-color:rgba(120,217,154,.35);}
.customer-review-overview-changes{border-color:rgba(240,197,92,.38);}
.customer-review-overview-rejected{border-color:rgba(255,127,136,.4);}
.customer-review-overview-final-approved{border-color:rgba(120,217,154,.45);background:rgba(44,168,91,.08);}
.customer-review-overview-final-changes{border-color:rgba(240,197,92,.45);background:rgba(240,197,92,.07);}
.customer-review-overview-final-rejected{border-color:rgba(255,127,136,.45);background:rgba(217,41,53,.07);}

.reviewer-own-decision{
  padding:12px 14px;
  border-radius:11px;
  background:rgba(78,140,132,.12);
  border:1px solid rgba(78,140,132,.32);
}

.customer-review-progress{margin-top:12px;color:#d8e0e1;}
.customer-review-details{margin-top:12px;}
.customer-review-details summary{cursor:pointer;color:#d8c7a1;font-weight:800;}

@media(max-width:1180px){
  .customer-nav-state{min-width:54px;padding:3px 6px;}
  .customer-nav-state-text{font-size:11px;}
}


.review-current-status-customer{
  padding:14px;
  background:rgba(78,140,132,.055);
}

.review-target-title{
  margin-top:6px;
  color:#d8c7a1;
}


/* ==========================================
   LPMS R004.4.5 M4.5e
   Interne Artikelnavigation in Klartext
   ========================================== */

#pageNavigator .page-nav-button-internal{
  align-items:flex-start;
  min-height:58px;
}

#pageNavigator .page-nav-button-internal .page-marker,
#pageNavigator .page-nav-button-internal .page-marker-placeholder{
  margin-top:2px;
}

.internal-nav-content{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.internal-nav-content .nav-item-label{
  display:block;
  width:100%;
  color:#eef3f3;
  line-height:1.25;
}

.internal-nav-summary{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  min-height:20px;
}

.internal-nav-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:20px;
  padding:3px 7px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:999px;
  background:rgba(255,255,255,.055);
  color:#d9e0e1;
  font-size:11px;
  font-weight:750;
  line-height:1.1;
  white-space:nowrap;
}

.internal-nav-chip-lock{
  color:#f0d58b;
  border-color:rgba(240,213,139,.34);
  background:rgba(240,213,139,.08);
}

.internal-nav-chip-open{color:#d7dddf;}
.internal-nav-chip-partial{color:#e2c66e;border-color:rgba(226,198,110,.35);background:rgba(226,198,110,.08);}
.internal-nav-chip-recommended,
.internal-nav-chip-final-approved{color:#78d99a;border-color:rgba(120,217,154,.38);background:rgba(44,168,91,.12);}
.internal-nav-chip-changes,
.internal-nav-chip-final-changes{color:#f0c55c;border-color:rgba(240,197,92,.4);background:rgba(240,197,92,.1);}
.internal-nav-chip-rejected,
.internal-nav-chip-final-rejected{color:#ff7f88;border-color:rgba(255,127,136,.42);background:rgba(217,41,53,.12);}

#pageNavigator .page-nav-button-internal.page-active{
  min-height:62px;
}

@media(max-width:1180px){
  .internal-nav-chip{font-size:10px;padding:3px 6px;}
}

/* LPMS R004.4.6 M4.6b - Erstupload neuer Textdokumente */
.text-empty-state {
  width: min(680px, calc(100% - 48px));
  margin: 72px auto;
  padding: 48px 42px;
  border: 1px dashed rgba(104, 154, 160, 0.55);
  border-radius: 16px;
  background: rgba(17, 43, 47, 0.72);
  text-align: center;
  color: #e7f0ef;
}

.text-empty-state h2 {
  margin: 0 0 12px;
  color: #f4f7f6;
  font-size: 24px;
}

.text-empty-state p {
  margin: 0 auto 22px;
  max-width: 560px;
  color: #b9c9c8;
  line-height: 1.55;
}

.text-empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #245d66;
  color: #ffffff;
  font-size: 34px;
  font-weight: 400;
}

.text-create-document-button {
  min-height: 46px;
  padding: 10px 22px;
  font-weight: 700;
}

.text-empty-state .text-empty-state-note {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 13px;
  color: #93aaa9;
}

#reviewReportButton:disabled,
#toggleReviewButton:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


/* ==========================================
   LPMS R004.4.6g
   Eindeutige Statusführung und Kundenreview-Sperre
   ========================================== */
#pageNavigator .page-nav-button-customer{
  align-items:flex-start;
  min-height:62px;
}

#pageNavigator .page-nav-button-customer .page-marker,
#pageNavigator .page-nav-button-customer .page-marker-placeholder{
  margin-top:2px;
}

.customer-nav-content{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}

.customer-nav-content .nav-item-label{
  display:block;
  width:100%;
  color:#eef3f3;
  line-height:1.25;
}

.customer-nav-summary{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  min-height:20px;
}

.customer-nav-detail,
.internal-nav-detail{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  color:#aebdbc;
  font-size:10px;
  font-weight:700;
  line-height:1.15;
}

.customer-nav-state-working{
  color:#f0d58b;
  border-color:rgba(240,213,139,.42);
  background:rgba(240,213,139,.10);
}

.customer-nav-state-internal-review,
.customer-nav-state-waiting{
  color:#e2c66e;
  border-color:rgba(226,198,110,.38);
  background:rgba(226,198,110,.09);
}

.customer-nav-state-expected,
.internal-nav-chip-expected{
  color:#ffe08a;
  border-color:rgba(255,224,138,.5);
  background:rgba(255,196,58,.13);
  box-shadow:inset 0 0 0 1px rgba(255,224,138,.08);
}

.customer-nav-state-submitted{
  color:#78d99a;
  border-color:rgba(120,217,154,.38);
  background:rgba(44,168,91,.12);
}

.internal-nav-chip-internal-approved{
  color:#78d99a;
  border-color:rgba(120,217,154,.42);
  background:rgba(44,168,91,.13);
}

.internal-nav-chip-paused{
  color:#b8c5c4;
  border-color:rgba(184,197,196,.24);
  background:rgba(184,197,196,.055);
}

.internal-nav-chip-waiting{
  color:#e2c66e;
  border-color:rgba(226,198,110,.35);
  background:rgba(226,198,110,.08);
}

.internal-nav-chip-expected{
  font-weight:850;
}

.review-entry-blocked{
  opacity:.72;
}

.review-entry-blocked select:disabled,
.review-entry-blocked textarea:disabled,
.review-entry-blocked button:disabled{
  cursor:not-allowed;
}

.review-entry-blocked-note{
  border-color:rgba(240,213,139,.38)!important;
  background:rgba(240,213,139,.08)!important;
  color:#f0e3bd!important;
}

.review-entry-blocked-note span{
  color:#bdc9c8;
}

@media(max-width:1180px){
  .customer-nav-state{min-width:0;}
  .customer-nav-detail,.internal-nav-detail{width:100%;padding-left:2px;}
}

.customer-review-overview-paused{
  border-color:rgba(240,213,139,.40);
  background:rgba(240,213,139,.075);
}
.customer-review-overview-paused strong{
  display:block;
  margin-top:4px;
  color:#f0d58b;
  font-size:18px;
}
.customer-review-paused-note{
  margin-top:10px;
  color:#bdc9c8;
  font-size:13px;
}


/* ==========================================
   LPMS R004.4.6h
   Reviewer-Entscheidungen in der Seitenleiste
   ========================================== */
.customer-nav-reviewer-list{
  display:flex;
  flex-direction:column;
  gap:3px;
  width:100%;
  margin-top:1px;
}

.customer-nav-reviewer-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-height:19px;
  padding:3px 6px;
  border-left:2px solid rgba(190,205,205,.32);
  border-radius:4px;
  background:rgba(255,255,255,.025);
  color:#b9c6c6;
  font-size:10px;
  line-height:1.15;
}

.customer-nav-reviewer-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:700;
}

.customer-nav-reviewer-decision{
  flex:0 0 auto;
  white-space:nowrap;
  font-weight:800;
}

.customer-nav-reviewer-approved{
  border-left-color:#78d99a;
  background:rgba(44,168,91,.07);
}
.customer-nav-reviewer-approved .customer-nav-reviewer-decision{color:#78d99a;}

.customer-nav-reviewer-changes{
  border-left-color:#f0c55c;
  background:rgba(240,197,92,.07);
}
.customer-nav-reviewer-changes .customer-nav-reviewer-decision{color:#f0c55c;}

.customer-nav-reviewer-rejected{
  border-left-color:#ff7f88;
  background:rgba(217,41,53,.07);
}
.customer-nav-reviewer-rejected .customer-nav-reviewer-decision{color:#ff7f88;}

.customer-nav-reviewer-open .customer-nav-reviewer-decision{color:#aebdbc;}

#pageNavigator .page-nav-button:has(.customer-nav-reviewer-list){
  min-height:92px;
}

@media(max-width:1180px){
  .customer-nav-reviewer-row{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }
  .customer-nav-reviewer-decision{white-space:normal;}
}


/* ==========================================
   LPMS R004.4.6j
   Konsistente Reviewer-Stati in der Seitenleiste
   ========================================== */
#pageNavigator .page-nav-button-internal .customer-nav-reviewer-list{
  margin-top:4px;
}


/* ==========================================
   LPMS R004.4.6k
   Einheitliche Review-Zeilen und Freigabeanzeige
   ========================================== */
.customer-nav-reviewer-approved,
.customer-nav-reviewer-changes,
.customer-nav-reviewer-rejected,
.customer-nav-reviewer-open{
  border-left-color:rgba(190,205,205,.32);
  background:rgba(255,255,255,.025);
}

.customer-nav-approver-row{
  margin-top:2px;
}

.customer-nav-approver-row .customer-nav-reviewer-name{
  font-weight:700;
}

/* Die globale Aktiv-Markierung darf nicht die jeweils letzte Personenzeile hervorheben. */
#pageNavigator .page-active span.customer-nav-reviewer-name{
  color:#b9c6c6;
}

#pageNavigator .page-active span.customer-nav-reviewer-decision{
  color:#aebdbc;
}

#pageNavigator .page-active .customer-nav-reviewer-approved span.customer-nav-reviewer-decision{
  color:#78d99a;
}

#pageNavigator .page-active .customer-nav-reviewer-changes span.customer-nav-reviewer-decision{
  color:#f0c55c;
}

#pageNavigator .page-active .customer-nav-reviewer-rejected span.customer-nav-reviewer-decision{
  color:#ff7f88;
}

/* ==========================================
   LPMS R004.5.0a
   Projektbeteiligte und zentrale Rollenübersicht
   Scope: ausschließlich Projektportal / lesende Übersicht
   ========================================== */

.participants-view{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.participants-intro{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  padding:20px 22px;
  border:1px solid rgba(166,201,196,.20);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(36,77,85,.28),rgba(255,255,255,.025));
}

.participants-intro-eyebrow{
  margin-bottom:7px;
  color:#a6c9c4;
  font-size:12px;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.participants-intro h2{
  margin:0 0 8px;
  font-size:24px;
}

.participants-intro p{
  max-width:900px;
  margin:0;
  color:var(--muted);
  line-height:1.55;
}

.participants-mode-badge{
  flex:0 0 auto;
  padding:8px 11px;
  border:1px solid rgba(216,199,161,.30);
  border-radius:999px;
  background:rgba(216,199,161,.09);
  color:var(--accent2);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.participants-list{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.025);
}

.participants-list-head,
.participant-row{
  display:grid;
  grid-template-columns:minmax(240px,1.25fr) minmax(220px,1fr) minmax(300px,1.45fr) minmax(170px,.75fr);
  gap:16px;
  align-items:center;
}

.participants-list-head{
  padding:11px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(0,0,0,.16);
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.participant-row{
  min-height:104px;
  padding:16px 18px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.participant-row:last-child{
  border-bottom:0;
}

.participant-row:hover{
  background:rgba(255,255,255,.025);
}

.participant-person{
  display:flex;
  align-items:center;
  min-width:0;
  gap:13px;
}

.participant-avatar{
  flex:0 0 44px;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid rgba(166,201,196,.28);
  border-radius:14px;
  background:rgba(36,77,85,.34);
  color:#c8e1dd;
  font-size:14px;
  font-weight:900;
  letter-spacing:.04em;
}

.participant-identity{
  min-width:0;
}

.participant-identity h3{
  margin:0 0 5px;
  overflow:hidden;
  color:var(--text);
  font-size:17px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.participant-identity p{
  margin:0;
  overflow:hidden;
  color:var(--muted);
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.participant-contact,
.participant-roles{
  min-width:0;
}

.participant-contact > span,
.participant-roles > span{
  display:block;
  margin-bottom:7px;
  color:var(--muted);
  font-size:11px;
}

.participant-contact strong{
  display:block;
  overflow:hidden;
  color:var(--text);
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.participant-contact small{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:11px;
}

.participant-value-muted{
  color:var(--muted)!important;
  font-weight:500;
}

.participant-role-list{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.participant-role{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:5px 9px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  background:rgba(255,255,255,.045);
  color:#e8eceb;
  font-size:11px;
  font-weight:750;
}

.participant-role.role-project_admin{
  border-color:rgba(166,201,196,.34);
  background:rgba(36,77,85,.30);
  color:#c8e1dd;
}

.participant-role.role-editor{
  border-color:rgba(92,171,180,.30);
  background:rgba(92,171,180,.10);
  color:#bee6e8;
}

.participant-role.role-reviewer{
  border-color:rgba(230,180,80,.34);
  background:rgba(230,180,80,.10);
  color:#ffe2a0;
}

.participant-role.role-approver{
  border-color:rgba(76,175,80,.34);
  background:rgba(76,175,80,.10);
  color:#c9f0c9;
}

.participant-role.role-observer{
  color:#d7dedf;
}

.participant-role.role-production_access{
  border-color:rgba(190,150,230,.30);
  background:rgba(190,150,230,.10);
  color:#e4cef6;
}

.participant-statuses{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:7px;
}

.participant-access,
.participant-project-status{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

.participant-access.access-active{
  border-color:rgba(76,175,80,.34);
  background:rgba(76,175,80,.10);
  color:#c9f0c9;
}

.participant-access.access-locked{
  border-color:rgba(220,90,75,.34);
  background:rgba(220,90,75,.10);
  color:#ffc2ba;
}

.participant-access.access-not_created{
  color:#d7dedf;
  background:rgba(255,255,255,.035);
}

.participant-project-status{
  color:var(--muted);
  font-weight:650;
}

.participants-next-step{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  border:1px dashed rgba(216,199,161,.28);
  border-radius:15px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.participants-next-step strong{
  flex:0 0 auto;
  color:var(--accent2);
}

@media(max-width:1320px){
  .participants-list-head{
    display:none;
  }
  .participant-row{
    grid-template-columns:minmax(230px,1fr) minmax(220px,1fr);
    align-items:start;
  }
  .participant-roles,
  .participant-statuses{
    padding-left:57px;
  }
}

@media(max-width:760px){
  .participants-intro{
    flex-direction:column;
  }
  .participant-row{
    grid-template-columns:1fr;
  }
  .participant-roles,
  .participant-statuses{
    padding-left:0;
  }
  .participants-next-step{
    flex-direction:column;
  }
}

/* ==========================================
   LPMS R004.5.0b
   Projektbeteiligte verwalten
   Scope: zentrale Personen-, Rollen- und Zugangsverwaltung
   ========================================== */

#participantFilterbar{
  grid-template-columns:minmax(280px,1.55fr) minmax(170px,.75fr) minmax(170px,.75fr) minmax(170px,.72fr);
}

.participant-admin-control{
  align-self:end;
}

.participant-add-button{
  width:100%;
  min-height:42px;
  white-space:nowrap;
}

.participants-mode-badge.participants-mode-admin{
  border-color:rgba(166,201,196,.38);
  background:rgba(36,77,85,.38);
  color:#c8e1dd;
}

.participants-signed-in{
  display:block;
  margin-top:10px;
  color:#a6c9c4;
  font-size:12px;
  font-weight:750;
}

.participants-notice{
  margin-top:12px;
  padding:9px 11px;
  border:1px solid rgba(76,175,80,.28);
  border-radius:11px;
  background:rgba(76,175,80,.08);
  color:#c9f0c9;
  font-size:12px;
  line-height:1.4;
}

.participant-row-inactive{
  opacity:.68;
  background:rgba(0,0,0,.08);
}

.participant-role.role-publication_approval{
  border-color:rgba(216,199,161,.34);
  background:rgba(216,199,161,.09);
  color:#eadbb8;
}

.participant-row-actions{
  width:100%;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:3px;
}

.participant-inline-button{
  min-height:31px;
  padding:6px 9px;
  border-radius:9px;
  background:rgba(255,255,255,.045);
  color:#e4eaea;
  font-size:11px;
  font-weight:750;
}

.participant-inline-button:hover{
  background:rgba(255,255,255,.09);
}

.participant-lock-button{
  border-color:rgba(220,90,75,.26);
  color:#ffc2ba;
}

.participant-activate-button{
  border-color:rgba(76,175,80,.28);
  color:#c9f0c9;
}

body.participant-modal-open{
  overflow:hidden;
}

.participant-modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(3,9,11,.78);
  backdrop-filter:blur(7px);
}

.participant-dialog{
  width:min(900px,calc(100vw - 36px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  border:1px solid rgba(166,201,196,.25);
  border-radius:22px;
  background:linear-gradient(145deg,#122428,#0b171a 72%);
  box-shadow:0 28px 90px rgba(0,0,0,.58);
}

#participantForm{
  padding:24px;
}

.participant-dialog-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.09);
}

.participant-dialog-header h2{
  margin:0 0 6px;
  color:var(--text);
  font-size:25px;
}

.participant-dialog-header p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}

.participant-dialog-close{
  flex:0 0 38px;
  width:38px;
  height:38px;
  padding:0;
  border-radius:50%;
  font-size:25px;
  line-height:1;
}

.participant-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:20px;
}

.participant-form-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}

.participant-form-field > span,
.participant-role-fieldset legend{
  color:#c8d7d8;
  font-size:12px;
  font-weight:800;
}

.participant-form-field input,
.participant-form-field select{
  width:100%;
  min-height:44px;
  margin:0;
  padding:10px 12px;
  border:1px solid rgba(166,201,196,.22);
  border-radius:11px;
  background:rgba(255,255,255,.055);
  color:var(--text);
  font:inherit;
  outline:none;
}

.participant-form-field input:focus,
.participant-form-field select:focus{
  border-color:rgba(166,201,196,.55);
  box-shadow:0 0 0 3px rgba(166,201,196,.10);
}

.participant-form-field select option{
  background:#132428;
  color:#eef4f3;
}

.participant-form-field small{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.participant-input-readonly{
  opacity:.68;
  cursor:not-allowed;
}

.participant-role-fieldset{
  margin:22px 0 0;
  padding:0;
  border:0;
}

.participant-role-fieldset legend{
  margin-bottom:10px;
}

.participant-role-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}

.participant-role-option{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-height:68px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  background:rgba(255,255,255,.028);
  cursor:pointer;
}

.participant-role-option:hover{
  background:rgba(255,255,255,.055);
}

.participant-role-option input{
  flex:0 0 auto;
  width:17px;
  height:17px;
  margin:2px 0 0;
  accent-color:#6faaa6;
}

.participant-role-option span{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.participant-role-option strong{
  color:var(--text);
  font-size:13px;
}

.participant-role-option small{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.participant-status-grid{
  margin-top:20px;
}

.participant-form-note{
  margin-top:20px;
  padding:12px 14px;
  border:1px dashed rgba(216,199,161,.26);
  border-radius:12px;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

.participant-form-message{
  min-height:22px;
  margin-top:12px;
  color:#ffd38a;
  font-size:12px;
  font-weight:700;
}

.participant-dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.09);
}

.participant-dialog-actions button{
  min-width:120px;
}

@media(max-width:1180px){
  #participantFilterbar{
    grid-template-columns:1fr 1fr;
  }
  #participantFilterbar .filter-group.wide{
    grid-column:1 / -1;
  }
}

@media(max-width:760px){
  #participantFilterbar{
    grid-template-columns:1fr;
  }
  #participantFilterbar .filter-group.wide{
    grid-column:auto;
  }
  .participant-form-grid,
  .participant-role-options{
    grid-template-columns:1fr;
  }
  .participant-modal{
    padding:10px;
  }
  .participant-dialog{
    width:calc(100vw - 20px);
    max-height:calc(100vh - 20px);
  }
  #participantForm{
    padding:18px;
  }
  .participant-dialog-actions{
    flex-direction:column-reverse;
  }
  .participant-dialog-actions button{
    width:100%;
  }
}


/* R004.5.0d – Produktionszugriff: ausschließlich finale Downloads */
.production-access-mode .portal-sidebar{
  grid-template-rows:auto auto 1fr;
}
.production-access-mode .portal-project-meta{
  margin-top:24px;
}
.production-files-grid{
  display:grid;
  gap:18px;
  padding:16px;
}
.production-access-intro{
  border:1px solid rgba(113,178,181,.28);
  border-radius:18px;
  padding:22px;
  background:rgba(35,77,82,.2);
}
.production-access-intro h2{
  margin:5px 0 8px;
  font-size:1.45rem;
}
.production-access-intro p{
  margin:0 0 12px;
  max-width:900px;
  color:var(--muted);
  line-height:1.55;
}
.production-file-list{
  display:grid;
  gap:12px;
}
.production-file-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:20px;
  background:rgba(255,255,255,.025);
}
.production-file-card h2{
  margin:5px 0 9px;
  font-size:1.2rem;
}
.production-file-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}
.production-file-meta span{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid rgba(197,177,113,.35);
  color:var(--cream);
  background:rgba(197,177,113,.08);
  font-size:.8rem;
}
.production-file-name{
  font-weight:700;
  overflow-wrap:anywhere;
}
.production-file-approval{
  margin-top:5px;
  color:var(--muted);
  font-size:.86rem;
}
.production-file-action{
  display:flex;
  align-items:center;
}
.production-download-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border-radius:10px;
  text-decoration:none;
  white-space:nowrap;
}
@media (max-width:900px){
  .production-file-card{grid-template-columns:1fr;}
  .production-file-action{justify-content:flex-start;}
}

/* R004.5.1c – angemeldete Person und lokaler Test-Benutzerwechsel */
.portal-header-right,
.viewer-toolbar-right{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:12px;
  min-width:0;
}

.viewer-toolbar-right{
  flex-direction:column;
}

.lpms-user-header{
  min-width:0;
}

.lpms-user-header-card{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:0;
}

.lpms-user-header-copy{
  display:grid;
  gap:1px;
  min-width:170px;
  padding:7px 10px;
  border:1px solid rgba(126,194,190,.25);
  border-radius:10px;
  background:rgba(126,194,190,.07);
  text-align:right;
}

.lpms-user-header-copy span{
  color:var(--muted);
  font-size:10px;
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.lpms-user-header-copy strong{
  overflow:hidden;
  color:var(--text);
  font-size:13px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.lpms-user-header-copy small{
  overflow:hidden;
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.lpms-test-badge{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 9px;
  border:1px solid rgba(216,199,161,.45);
  border-radius:999px;
  background:rgba(216,199,161,.12);
  color:var(--accent2);
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  white-space:nowrap;
}

.lpms-user-switch-button{
  min-height:34px;
  padding:7px 11px;
  border-radius:9px;
  white-space:nowrap;
}

.lpms-user-header-error{
  color:var(--warning, #d8c7a1);
  font-size:12px;
}

body.lpms-user-switch-open{
  overflow:hidden;
}

.lpms-user-switch-modal{
  position:fixed;
  inset:0;
  z-index:4000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(2,10,13,.78);
  backdrop-filter:blur(5px);
}

.lpms-user-switch-modal.hidden{
  display:none;
}

.lpms-user-switch-dialog{
  width:min(820px, 96vw);
  max-height:min(780px, 92vh);
  overflow:hidden;
  border:1px solid rgba(126,194,190,.32);
  border-radius:20px;
  background:#0d2328;
  box-shadow:0 22px 70px rgba(0,0,0,.45);
}

.lpms-user-switch-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:24px 26px 20px;
  border-bottom:1px solid var(--line);
}

.lpms-test-eyebrow{
  margin-bottom:5px;
  color:var(--accent2);
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.lpms-user-switch-head h2{
  margin:0 0 5px;
  font-size:26px;
}

.lpms-user-switch-head p{
  margin:0;
  color:var(--muted);
}

.lpms-user-switch-close{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  flex:0 0 auto;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-size:25px;
  line-height:1;
}

.lpms-user-switch-list{
  display:grid;
  gap:8px;
  max-height:58vh;
  overflow:auto;
  padding:16px 20px;
}

.lpms-user-switch-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:20px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.025);
}

.lpms-user-switch-row.is-current{
  border-color:rgba(126,194,190,.48);
  background:rgba(126,194,190,.08);
}

.lpms-user-switch-identity{
  display:grid;
  gap:3px;
  min-width:0;
}

.lpms-user-switch-identity strong{
  font-size:15px;
}

.lpms-user-switch-identity span,
.lpms-user-switch-identity small{
  color:var(--muted);
  font-size:12px;
}

.lpms-user-switch-identity small{
  color:var(--accent2);
  font-weight:800;
}

.lpms-user-switch-actions{
  display:flex;
  gap:8px;
}

.lpms-user-switch-actions button{
  min-height:36px;
  padding:7px 11px;
  white-space:nowrap;
}

.lpms-user-switch-foot{
  padding:13px 24px 17px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
}

@media (max-width: 1100px){
  .portal-header{
    align-items:stretch;
  }
  .portal-header-right{
    align-items:flex-end;
    flex-direction:column;
  }
  .lpms-user-header-card{
    flex-wrap:wrap;
  }
}

@media (max-width: 760px){
  .portal-header,
  .viewer-toolbar{
    flex-direction:column;
  }
  .portal-header-right,
  .viewer-toolbar-right{
    width:100%;
    align-items:stretch;
  }
  .lpms-user-header-card{
    justify-content:flex-start;
  }
  .lpms-user-header-copy{
    flex:1 1 180px;
    text-align:left;
  }
  .lpms-user-switch-row{
    grid-template-columns:1fr;
  }
  .lpms-user-switch-actions{
    flex-wrap:wrap;
  }
}


/* ==========================================
   LPMS R004.5.1d
   Geschützte Administration und Verwaltung
   ========================================== */

.participant-role.role-management{
  border-color:rgba(95,170,225,.36);
  background:rgba(95,170,225,.11);
  color:#cae6fb;
}

.participant-protected-badge{
  display:inline-flex;
  align-items:center;
  width:fit-content;
  margin:-1px 0 6px;
  padding:4px 7px;
  border:1px solid rgba(216,199,161,.34);
  border-radius:999px;
  background:rgba(216,199,161,.09);
  color:#eadbb8;
  font-size:10px;
  font-weight:850;
  letter-spacing:.02em;
}

.participant-protected-note{
  display:inline-flex;
  align-items:center;
  min-height:31px;
  padding:6px 9px;
  border:1px solid rgba(216,199,161,.30);
  border-radius:9px;
  background:rgba(216,199,161,.08);
  color:#eadbb8;
  font-size:11px;
  font-weight:800;
}

.participant-role-option-protected{
  border-color:rgba(216,199,161,.28);
  background:rgba(216,199,161,.07);
  cursor:not-allowed;
}

.participant-role-option-protected input{
  opacity:.8;
}

/* ==========================================
   LPMS R004.5.1e
   PIN-Anmeldung und PIN-Verwaltung
   ========================================== */

.participant-pin-status{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

.participant-pin-status.pin-active{
  border-color:rgba(76,175,80,.30);
  background:rgba(76,175,80,.08);
  color:#c9f0c9;
}

.participant-pin-status.pin-change_required{
  border-color:rgba(216,199,161,.38);
  background:rgba(216,199,161,.10);
  color:#eadbb8;
}

.participant-pin-status.pin-temporarily_locked{
  border-color:rgba(220,90,75,.34);
  background:rgba(220,90,75,.10);
  color:#ffc2ba;
}

.participant-pin-status.pin-not_configured{
  color:#d7dedf;
  background:rgba(255,255,255,.035);
}

.participant-pin-button{
  border-color:rgba(216,199,161,.28);
  color:#eadbb8;
}

.temporary-pin-dialog{
  width:min(590px,calc(100vw - 36px));
  padding:24px;
}

.temporary-pin-content{
  display:grid;
  grid-template-columns:minmax(130px,.6fr) minmax(0,1fr);
  gap:12px 18px;
  align-items:center;
  padding:24px 0 4px;
}

.temporary-pin-content > span{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.temporary-pin-content > strong{
  color:var(--text);
  font-size:15px;
}

.temporary-pin-content output{
  display:inline-flex;
  width:fit-content;
  padding:10px 16px;
  border:1px solid rgba(216,199,161,.42);
  border-radius:12px;
  background:rgba(216,199,161,.10);
  color:#fff0c9;
  font-size:28px;
  font-weight:900;
  letter-spacing:.24em;
}

.temporary-pin-content p{
  grid-column:1 / -1;
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

.lpms-pin-change-button{
  min-height:34px;
  padding:7px 11px;
  border-radius:9px;
  white-space:nowrap;
}

body.lpms-pin-modal-open{
  overflow:hidden;
}

.lpms-pin-modal{
  position:fixed;
  inset:0;
  z-index:4100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(2,10,13,.80);
  backdrop-filter:blur(6px);
}

.lpms-pin-dialog{
  width:min(540px,96vw);
  overflow:hidden;
  border:1px solid rgba(126,194,190,.32);
  border-radius:20px;
  background:#0d2328;
  box-shadow:0 22px 70px rgba(0,0,0,.48);
}

.lpms-pin-dialog form{
  padding:20px 26px 0;
}

.lpms-pin-field{
  display:grid;
  gap:7px;
  margin-bottom:15px;
}

.lpms-pin-field span{
  color:#c8d7d8;
  font-size:12px;
  font-weight:800;
}

.lpms-pin-field input{
  width:100%;
  box-sizing:border-box;
  min-height:46px;
  margin:0;
  padding:10px 14px;
  border:1px solid rgba(166,201,196,.22);
  border-radius:11px;
  background:rgba(255,255,255,.055);
  color:var(--text);
  font:700 19px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:.28em;
  text-align:center;
  outline:none;
}

.lpms-pin-field input:focus{
  border-color:rgba(166,201,196,.55);
  box-shadow:0 0 0 3px rgba(166,201,196,.10);
}

.lpms-pin-message{
  min-height:22px;
  margin:2px 0 4px;
  color:#ffd38a;
  font-size:12px;
  font-weight:700;
  line-height:1.45;
}

.lpms-pin-message.is-success{
  color:#c9f0c9;
}

.lpms-pin-actions{
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin:18px -26px 0;
}

.lpms-pin-actions button{
  min-width:120px;
}

@media(max-width:620px){
  .temporary-pin-content{
    grid-template-columns:1fr;
  }
  .temporary-pin-content p{
    grid-column:auto;
  }
  .lpms-pin-actions{
    flex-direction:column-reverse;
  }
  .lpms-pin-actions button{
    width:100%;
  }
}

/* ==========================================
   LPMS R004.6.0a
   Einladungsverwaltung und Mail-Testmodus
   ========================================== */

.participants-mode-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

.participants-mail-mode-badge{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:5px 10px;
  border:1px solid rgba(216,199,161,.34);
  border-radius:999px;
  background:rgba(216,199,161,.09);
  color:#eadbb8;
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.participant-invitation-status{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:11px;
  font-weight:800;
}

.participant-invitation-status.invitation-activated{
  border-color:rgba(76,175,80,.30);
  background:rgba(76,175,80,.08);
  color:#c9f0c9;
}

.participant-invitation-status.invitation-sent{
  border-color:rgba(74,160,181,.34);
  background:rgba(74,160,181,.10);
  color:#c6edf5;
}

.participant-invitation-status.invitation-expired{
  border-color:rgba(220,90,75,.34);
  background:rgba(220,90,75,.10);
  color:#ffc2ba;
}

.participant-invitation-status.invitation-not_sent,
.participant-invitation-status.invitation-not_available{
  background:rgba(255,255,255,.035);
  color:#d7dedf;
}

.participant-invitation-meta{
  display:block;
  color:var(--muted);
  font-size:10px;
  line-height:1.35;
}

.participant-invite-button{
  border-color:rgba(74,160,181,.34);
  color:#c6edf5;
}

.participant-mail-missing{
  border-color:rgba(216,199,161,.28);
  color:#eadbb8;
}

.mail-preview-dialog{
  width:min(760px,calc(100vw - 36px));
  padding:24px;
}

.mail-preview-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:20px 0 14px;
}

.mail-preview-meta > div{
  min-width:0;
  padding:13px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.025);
}

.mail-preview-meta span{
  display:block;
  margin-bottom:5px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.mail-preview-meta strong{
  display:block;
  overflow-wrap:anywhere;
  color:var(--text);
  font-size:13px;
}

.mail-preview-body{
  max-height:380px;
  overflow:auto;
  margin:0;
  padding:18px;
  border:1px solid rgba(166,201,196,.20);
  border-radius:14px;
  background:#071114;
  color:#edf5f4;
  font:13px/1.55 Arial,sans-serif;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.mail-preview-note{
  margin-top:14px;
  padding:11px 13px;
  border:1px dashed rgba(216,199,161,.28);
  border-radius:11px;
  color:#eadbb8;
  font-size:11px;
  line-height:1.5;
}

@media (max-width:760px){
  .participants-mode-stack{align-items:flex-start;}
  .mail-preview-meta{grid-template-columns:1fr;}
}

/* R004.6.0a – Fotoworkflow */
.lpms-photo-viewer{
  display:flex;
  flex-direction:column;
  min-height:100%;
}

.lpms-photo-head{
  padding:16px 18px 8px;
  text-align:center;
}

.lpms-photo-preview-inner{
  display:flex;
  flex:1;
  min-height:420px;
  align-items:center;
  justify-content:center;
  padding:22px;
  overflow:auto;
}

.lpms-photo-stage{
  display:flex;
  width:100%;
  min-height:360px;
  align-items:center;
  justify-content:center;
}

.lpms-photo-stage img{
  display:block;
  width:auto;
  max-width:100%;
  max-height:72vh;
  object-fit:contain;
  border-radius:4px;
  box-shadow:0 14px 38px rgba(0,0,0,.30);
}


/* =========================================================
   R004.6.0b – Medienübergreifende Versionshistorie
   ========================================================= */
body.lpms-version-history-open,
body.lpms-version-preview-open { overflow: hidden; }

.lpms-version-history-modal,
.lpms-version-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(10, 20, 30, .72);
  backdrop-filter: blur(4px);
}

.lpms-version-history-dialog,
.lpms-version-preview-dialog {
  width: min(1240px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
}

.lpms-version-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #d9e0e5;
}
.lpms-version-dialog-head h2 { margin: 4px 0 6px; font-size: 25px; }
.lpms-version-dialog-head p { margin: 0; color: #60717d; }
.lpms-version-close {
  border: 0;
  background: transparent;
  font-size: 34px;
  line-height: 1;
  color: #52636e;
  cursor: pointer;
}

.lpms-version-table-head,
.lpms-version-row {
  display: grid;
  grid-template-columns: 92px minmax(210px, 1.35fr) minmax(220px, 1fr) minmax(190px, .9fr) minmax(180px, auto);
  gap: 16px;
  align-items: center;
}
.lpms-version-table-head {
  padding: 12px 28px;
  background: #f3f6f8;
  border-bottom: 1px solid #dde4e8;
  color: #52636e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.lpms-version-list { overflow: auto; padding: 0 28px; }
.lpms-version-row {
  padding: 16px 0;
  border-bottom: 1px solid #e5eaed;
}
.lpms-version-row.is-current { background: linear-gradient(90deg, rgba(18, 113, 88, .07), transparent 70%); }
.lpms-version-visual { width: 78px; height: 62px; display: grid; place-items: center; }
.lpms-version-thumb { width: 78px; height: 62px; object-fit: cover; border-radius: 6px; border: 1px solid #d4dde2; background: #eef2f4; }
.lpms-version-file-icon { width: 58px; height: 46px; display: grid; place-items: center; border-radius: 6px; background: #e9eff2; color: #48606f; font-weight: 800; font-size: 12px; }
.lpms-version-main { min-width: 0; }
.lpms-version-revision-line { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.lpms-version-revision-line strong { font-size: 17px; }
.lpms-version-current-badge,
.lpms-version-archive-badge { padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.lpms-version-current-badge { background: #dff2ea; color: #176d55; }
.lpms-version-archive-badge { background: #edf1f3; color: #5b6b75; }
.lpms-version-filename { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #647580; font-size: 13px; }
.lpms-version-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lpms-version-meta span { color: #647580; }
.lpms-version-status-chip { display: inline-flex; padding: 6px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.25; }
.lpms-version-status-chip.is-approved { background: #dff2ea; color: #176d55; }
.lpms-version-status-chip.is-changes { background: #fff1cf; color: #855b00; }
.lpms-version-status-chip.is-editing { background: #e7eff8; color: #285d8d; }
.lpms-version-status-chip.is-neutral { background: #edf1f3; color: #52636e; }
.lpms-version-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.lpms-version-actions .secondary,
.lpms-version-actions .secondary-link { min-width: 78px; text-align: center; }
.lpms-version-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 28px; border-top: 1px solid #dce3e7; background: #f8fafb; color: #62737e; font-size: 13px; }
.lpms-version-empty { padding: 48px 20px; text-align: center; color: #657681; }

.lpms-version-preview-dialog { width: min(1320px, 96vw); }
.lpms-version-preview-stage { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 20px; background: #e9eef1; }
.lpms-version-large-image { max-width: 100%; max-height: 70vh; object-fit: contain; box-shadow: 0 8px 32px rgba(0,0,0,.18); background: #fff; }
.lpms-version-pdf-frame { width: 100%; height: 70vh; border: 0; background: #fff; box-shadow: 0 8px 32px rgba(0,0,0,.15); }

@media (max-width: 980px) {
  .lpms-version-table-head { display: none; }
  .lpms-version-row { grid-template-columns: 82px 1fr; gap: 10px 14px; }
  .lpms-version-visual { grid-row: 1 / 5; }
  .lpms-version-main,
  .lpms-version-meta,
  .lpms-version-status,
  .lpms-version-actions { grid-column: 2; }
  .lpms-version-actions { justify-content: flex-start; }
}


/* R004.6.2b – Grafikworkflow */
.lpms-graphic-preview-inner{
  min-height:620px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.lpms-graphic-pdf-frame{
  display:block;
  width:100%;
  min-height:720px;
  border:0;
  background:#fff;
}
.lpms-graphic-viewer .lpms-photo-stage{
  min-height:620px;
}


/* Filmworkflow – übernommen aus der validierten Film-Baseline */
.lpms-film-preview-inner{
  display:flex;
  flex:1;
  min-height:520px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:22px;
  background:#071114;
}
.lpms-film-stage{
  display:flex;
  width:100%;
  min-height:420px;
  align-items:center;
  justify-content:center;
}
.lpms-film-stage video{
  display:block;
  width:min(100%, 1280px);
  max-height:72vh;
  background:#000;
  border-radius:6px;
  box-shadow:0 14px 38px rgba(0,0,0,.38);
}
.lpms-film-format-note{
  margin:0;
  color:#9db0b3;
  font-size:12px;
  text-align:center;
}
.lpms-version-large-video{
  display:block;
  width:min(100%, 1280px);
  max-height:70vh;
  background:#000;
  box-shadow:0 8px 32px rgba(0,0,0,.2);
}

/* R004.6.6a – Audioworkflow */
.lpms-audio-preview-inner{
  display:flex;
  flex:1;
  min-height:460px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:28px;
  background:linear-gradient(180deg,#071114 0%,#0c1b1f 100%);
}
.lpms-audio-stage{
  display:flex;
  width:min(760px,100%);
  min-height:230px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:26px;
  padding:38px;
  border:1px solid rgba(119,181,182,.28);
  border-radius:18px;
  background:rgba(255,255,255,.035);
  box-shadow:0 18px 44px rgba(0,0,0,.24);
}
.lpms-audio-icon{
  display:grid;
  width:86px;
  height:86px;
  place-items:center;
  border:1px solid rgba(208,180,111,.45);
  border-radius:50%;
  color:#d0b46f;
  background:rgba(208,180,111,.08);
  font-family:Georgia,serif;
  font-size:48px;
  line-height:1;
}
.lpms-audio-stage audio{
  display:block;
  width:100%;
  min-height:54px;
}
.lpms-audio-format-note{
  margin:0;
  color:#9db0b3;
  font-size:12px;
  text-align:center;
}
.lpms-version-large-audio{
  display:block;
  width:min(760px,92vw);
  min-height:54px;
}


/* ==========================================
   R004.6.8b – Touch- und Zoomsteuerung für Magazinseiten
   ========================================== */

.magazine-zoom-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding:4px 8px 12px;
}

.magazine-zoom-group{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.magazine-zoom-button{
  min-height:42px;
  min-width:42px;
  padding:10px 14px;
  border-radius:12px;
}

.magazine-zoom-button.is-active{
  background:rgba(204,173,96,.24);
  border-color:rgba(233,208,145,.5);
  color:var(--gold);
  box-shadow:0 0 0 1px rgba(233,208,145,.18) inset;
}

.magazine-zoom-status{
  font-size:13px;
  color:var(--muted);
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.02);
}

.viewer-preview-inner .viewer-image-stage.magazine-zoom-stage{
  overflow:hidden !important;
  align-items:center;
  justify-content:center;
  touch-action:none;
}

.magazine-zoom-content{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  width:max-content;
  max-width:none;
}

.viewer-preview-inner .viewer-image-stage.magazine-zoom-stage .viewer-page-card{
  flex:0 0 auto;
}

@media(max-width:900px){
  .magazine-zoom-toolbar{
    padding:2px 4px 10px;
  }

  .magazine-zoom-group{
    width:100%;
  }

  .magazine-zoom-button{
    min-height:46px;
    padding:10px 12px;
    flex:0 0 auto;
  }

  .magazine-zoom-status{
    width:100%;
    border-radius:14px;
    text-align:center;
  }
}


/* R004.6.8c – Magazinseiten Asset-Viewer: echte Toolbar-/Touch-Ansicht */
.lpms-magazine-zoom-viewer{
  min-height:0;
  display:flex;
  flex-direction:column;
}

.lpms-magazine-zoom-viewer .magazine-zoom-stage{
  flex:1 1 auto;
  min-height:360px !important;
  height:calc(100dvh - 410px) !important;
  max-height:none !important;
  padding:12px !important;
}

.magazine-zoom-content-asset{
  display:flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  height:max-content;
  min-width:1px;
  min-height:1px;
}

.magazine-zoom-content-asset img{
  display:block;
  width:auto;
  height:auto;
  max-width:none !important;
  max-height:none !important;
  border-radius:10px;
  box-shadow:0 18px 44px rgba(0,0,0,.42);
}

.magazine-zoom-content-asset.is-pdf{
  width:1100px;
  height:760px;
}

.magazine-zoom-content-asset .lpms-graphic-pdf-frame{
  width:100%;
  height:100%;
  min-height:760px;
  border:0;
  border-radius:10px;
  background:#fff;
}

@media(max-width:900px){
  .lpms-magazine-zoom-viewer .magazine-zoom-stage{
    min-height:300px !important;
    height:calc(100dvh - 470px) !important;
  }

  .magazine-zoom-content-asset.is-pdf{
    width:900px;
    height:650px;
  }
}


/* =========================================================
   R004.6.8d – Magazinseiten Zoom/Layout Korrektur
   Harte Entkopplung von alten generischen Viewer-Regeln.
   ========================================================= */
.lpms-magazine-page-viewer{
  min-height:0;
  height:100%;
}

.lpms-magazine-page-viewer .lpms-magazine-zoom-viewer{
  flex:1 1 auto;
  min-height:0 !important;
  height:auto !important;
  width:100% !important;
  display:grid !important;
  grid-template-rows:auto minmax(360px,1fr);
  align-items:stretch !important;
  justify-content:stretch !important;
  padding:0 18px 18px !important;
  overflow:hidden !important;
}

.lpms-magazine-page-viewer .lpms-magazine-zoom-viewer > .magazine-zoom-toolbar{
  min-height:0 !important;
  height:auto !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:4px 0 10px !important;
  align-self:start;
}

.lpms-magazine-page-viewer .lpms-magazine-zoom-viewer > .magazine-zoom-stage{
  position:relative !important;
  inset:auto !important;
  flex:none !important;
  min-width:0 !important;
  min-height:360px !important;
  width:100% !important;
  height:calc(100dvh - 395px) !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  display:block !important;
  align-items:initial !important;
  justify-content:initial !important;
  background:#071316;
  border:1px solid rgba(159,194,190,.12);
  border-radius:12px;
}

.lpms-magazine-page-viewer .magazine-zoom-stage > .magazine-zoom-content-asset{
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  display:block !important;
  width:auto !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  transform-origin:center center !important;
}

.lpms-magazine-page-viewer .magazine-zoom-content-asset img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  object-fit:fill !important;
  user-select:none;
  -webkit-user-drag:none;
}

.lpms-magazine-page-viewer .magazine-zoom-content-asset.is-pdf{
  width:1100px !important;
  height:760px !important;
}

.lpms-magazine-page-viewer .magazine-zoom-content-asset .lpms-graphic-pdf-frame{
  display:block;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
}

@media(max-width:900px){
  .lpms-magazine-page-viewer .lpms-magazine-zoom-viewer{
    grid-template-rows:auto minmax(300px,1fr);
    padding:0 8px 10px !important;
  }
  .lpms-magazine-page-viewer .lpms-magazine-zoom-viewer > .magazine-zoom-stage{
    min-height:300px !important;
    height:calc(100dvh - 455px) !important;
  }
}


/* =========================================================
   R004.6.8f – Fit Breite / Fit Hoehe Korrektur
   Die vom Zoom-Controller gesetzte intrinsische Mediengroesse darf nicht
   durch auto-Dimensionen aus der vorherigen Layout-Korrektur neutralisiert
   werden. Die konkreten Pixelwerte kommen als Inline-!important aus JS.
   ========================================================= */
.lpms-magazine-page-viewer .magazine-zoom-stage > .magazine-zoom-content-asset{
  box-sizing:border-box !important;
}

/* ==========================================
   R004.7.0b – Dokumentenablage
   ========================================== */

.participant-form-field-wide{grid-column:1 / -1;}
.participant-form-field textarea{
  width:100%;
  min-height:96px;
  resize:vertical;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--bg-deep);
  color:var(--text);
  padding:12px 14px;
  font:inherit;
}
.document-dialog{max-width:920px;}
.document-detail-dialog{max-width:min(1180px,94vw);}
.document-check-option{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:18px 0;
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(255,255,255,.025);
  cursor:pointer;
}
.document-check-option input{width:20px;height:20px;margin-top:2px;accent-color:var(--teal);}
.document-check-option span{display:flex;flex-direction:column;gap:4px;}
.document-check-option small{color:var(--muted);line-height:1.45;}
.document-category-actions{display:flex;justify-content:flex-start;margin:0 0 14px;}
.document-workspace{
  display:grid;
  grid-template-columns:minmax(210px,260px) minmax(0,1fr);
  gap:16px;
  align-items:start;
}
.document-category-panel{
  position:sticky;
  top:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--panel);
}
.document-category-heading{
  padding:4px 6px 10px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12px;
  font-weight:800;
}
.document-category-button{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  width:100%;
  text-align:left;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.02);
  color:var(--text);
}
.document-category-button strong{
  min-width:28px;
  text-align:center;
  border-radius:999px;
  padding:3px 7px;
  background:rgba(255,255,255,.06);
  color:var(--muted);
}
.document-category-button:hover,
.document-category-button.is-active{
  border-color:var(--gold);
  background:rgba(204,173,96,.12);
}
.document-category-button.is-active strong{color:var(--gold);}
.document-list-panel{display:flex;flex-direction:column;gap:12px;min-width:0;}
.document-notice{
  padding:12px 14px;
  border:1px solid rgba(74,181,130,.35);
  border-radius:12px;
  background:rgba(35,126,88,.16);
  color:#bff3d7;
}
.document-card{
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  gap:16px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--panel);
}
.document-card-icon{
  width:66px;
  height:78px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid rgba(103,181,184,.35);
  background:rgba(32,108,111,.18);
  color:#b8eaeb;
  font-weight:900;
  letter-spacing:.06em;
}
.document-card-main{min-width:0;}
.document-card-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.document-card-heading h2{margin:2px 0 0;font-size:20px;overflow-wrap:anywhere;}
.document-chip-row{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;}
.document-chip{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:3px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.document-chip-category{color:#d8d3bf;border-color:rgba(204,173,96,.32);}
.document-chip-project{color:#b8e7d0;border-color:rgba(61,164,111,.35);background:rgba(32,118,73,.12);}
.document-chip-internal{color:#bae5e8;border-color:rgba(72,162,167,.35);background:rgba(34,113,119,.12);}
.document-chip-ack{color:#b8e7d0;border-color:rgba(61,164,111,.4);}
.document-chip-open{color:#f4d98b;border-color:rgba(217,178,68,.45);background:rgba(151,114,18,.14);}
.document-card p{margin:11px 0 13px;color:var(--muted);line-height:1.5;}
.document-meta-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-bottom:14px;
}
.document-meta-grid>div{
  min-width:0;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.018);
}
.document-meta-grid span{display:block;color:var(--muted);font-size:11px;margin-bottom:3px;}
.document-meta-grid strong{display:block;font-size:13px;overflow-wrap:anywhere;}
.document-card-actions{display:flex;flex-wrap:wrap;gap:8px;}
.document-card-actions button{min-height:38px;}
.document-ack-button{border-color:rgba(217,178,68,.55)!important;color:#f4d98b!important;}
.document-preview-warning{
  margin-top:12px;
  padding:10px 12px;
  border-left:3px solid #cba447;
  background:rgba(151,114,18,.1);
  color:#e6d49d;
  font-size:13px;
}
.document-detail-content{min-height:180px;max-height:72vh;overflow:auto;padding:2px;}
.document-preview-frame{
  display:block;
  width:100%;
  height:min(68vh,850px);
  border:1px solid var(--line);
  border-radius:12px;
  background:white;
}
.document-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;margin-bottom:20px;}
.document-history-table{width:100%;border-collapse:collapse;min-width:720px;}
.document-history-table th,
.document-history-table td{padding:11px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;}
.document-history-table th{background:rgba(255,255,255,.035);color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.04em;}
.document-history-table tr:last-child td{border-bottom:0;}
.document-table-actions{display:flex;gap:6px;flex-wrap:wrap;}
.document-log-note{color:var(--muted);font-size:13px;line-height:1.5;}

@media(max-width:1100px){
  .document-workspace{grid-template-columns:1fr;}
  .document-category-panel{position:static;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));}
  .document-category-heading{grid-column:1/-1;}
  .document-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:700px){
  .document-card{grid-template-columns:1fr;}
  .document-card-icon{width:58px;height:58px;}
  .document-card-heading{flex-direction:column;}
  .document-chip-row{justify-content:flex-start;}
  .document-meta-grid{grid-template-columns:1fr;}
  .document-card-actions button{width:100%;}
}

/* ==========================================
   R004.7.0b – Dynamische Dokumentrubriken
   ========================================== */
.document-workspace.document-workspace-empty{
  grid-template-columns:minmax(0,1fr);
}
.document-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:260px;
  text-align:center;
}
.document-empty-state strong{
  font-size:20px;
  color:var(--text);
}
.document-empty-state span{
  max-width:620px;
  color:var(--muted);
  line-height:1.55;
}
.document-empty-state .primary{
  margin-top:8px;
}
#documentNewCategoryField.hidden{
  display:none;
}


/* ==========================================
   R004.8.0a – Projekt-LOP und Direkterfassung
   ========================================== */
.task-admin-control{min-width:180px;}
#taskFilterbar{grid-template-columns:minmax(360px,1fr) 190px 190px 180px;}
.lop-workspace{display:flex;flex-direction:column;gap:14px;min-width:0;}
.lop-viewbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.lop-view-tabs{display:flex;gap:8px;flex-wrap:wrap;}
.lop-view-tabs button{min-height:40px;padding:9px 14px;background:rgba(255,255,255,.035);}
.lop-view-tabs button.is-active{border-color:rgba(216,199,161,.75);background:rgba(216,199,161,.14);color:var(--accent2);}
.lop-entry-legend{display:flex;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:12px;}
.lop-entry-legend span{display:inline-flex;align-items:center;gap:5px;}
.lop-entry-legend b{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:7px;border:1px solid rgba(216,199,161,.34);background:rgba(216,199,161,.08);color:var(--accent2);}
.lop-quick-hint,.lop-notice{padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.025);color:var(--muted);font-size:13px;line-height:1.45;}
.lop-quick-hint strong{color:var(--text);}
.lop-notice{border-color:rgba(230,180,80,.45);background:rgba(151,114,18,.14);color:#f4d98b;}
.lop-table-shell{overflow:auto;border:1px solid var(--line);border-radius:15px;background:rgba(6,14,17,.5);}
.lop-table{width:100%;min-width:1510px;border-collapse:separate;border-spacing:0;table-layout:fixed;}
.lop-table th{position:sticky;top:0;z-index:3;padding:11px 10px;text-align:left;background:#132329;color:var(--muted);border-bottom:1px solid var(--line);font-size:11px;letter-spacing:.055em;text-transform:uppercase;}
.lop-table th:nth-child(1){width:82px;left:0;z-index:5;}
.lop-table th:nth-child(2){width:115px;}
.lop-table th:nth-child(3){width:110px;}
.lop-table th:nth-child(4){width:165px;}
.lop-table th:nth-child(5){width:190px;}
.lop-table th:nth-child(6){width:360px;}
.lop-table th:nth-child(7){width:155px;}
.lop-table th:nth-child(8){width:125px;}
.lop-table th:nth-child(9){width:115px;}
.lop-table th:nth-child(10){width:105px;}
.lop-table td{padding:8px 7px;border-bottom:1px solid rgba(255,255,255,.07);vertical-align:middle;background:rgba(17,31,35,.72);}
.lop-table tr:last-child td{border-bottom:0;}
.lop-table tr:hover td{background:rgba(255,255,255,.045);}
.lop-table .lop-id-cell{position:sticky;left:0;z-index:2;padding:10px 11px;border-right:1px solid var(--line);background:#111f23;}
.lop-id-cell strong,.lop-id-cell small{display:block;}
.lop-id-cell strong{color:var(--accent2);font-size:13px;letter-spacing:.04em;}
.lop-id-cell small{margin-top:4px;color:var(--muted);font-size:10px;}
.lop-cell-control{display:block;width:100%;min-height:40px;border:1px solid rgba(255,255,255,.1);border-radius:9px;background:#091417;color:var(--text);padding:8px 9px;font:inherit;font-size:13px;}
.lop-cell-control:focus{outline:2px solid rgba(216,199,161,.34);border-color:rgba(216,199,161,.65);}
.lop-cell-control:disabled{opacity:.72;cursor:default;background:rgba(255,255,255,.025);}
.lop-subject-input{font-weight:600;}
.lop-type-select{font-weight:800;color:var(--accent2);}
.lop-status-select{font-weight:700;}
.lop-save-cell{text-align:center;}
.lop-save-status{display:inline-flex;align-items:center;justify-content:center;min-width:98px;min-height:28px;padding:5px 8px;border-radius:999px;border:1px solid var(--line);font-size:11px;color:var(--muted);white-space:nowrap;}
.lop-save-status.is-saved{color:#b8e7d0;border-color:rgba(61,164,111,.36);background:rgba(32,118,73,.12);}
.lop-save-status.is-saving,.lop-save-status.is-pending{color:#f4d98b;border-color:rgba(217,178,68,.42);background:rgba(151,114,18,.13);}
.lop-save-status.is-error{color:#ffb4a8;border-color:rgba(217,41,53,.42);background:rgba(137,31,39,.16);}
.lop-save-status.is-draft{color:#b8e5e8;border-color:rgba(72,162,167,.35);background:rgba(34,113,119,.12);}
.lop-row.is-overdue td{box-shadow:inset 0 3px 0 rgba(217,41,53,.5),inset 0 -3px 0 rgba(217,41,53,.2);}
.lop-row.is-overdue .lop-id-cell{border-left:4px solid #d92935;}
.lop-row.is-due-today .lop-id-cell{border-left:4px solid var(--warn);}
.lop-row.is-done td{opacity:.72;}
.lop-row.is-done .lop-id-cell{border-left:4px solid var(--ok);}
.lop-row.is-postponed .lop-id-cell{border-left:4px solid #7d8b8d;}
.lop-row.is-draft .lop-id-cell{border-left:4px solid #67b5b8;}
.lop-empty{display:flex;flex-direction:column;gap:8px;}
.lop-empty strong{color:var(--text);font-size:18px;}
@media(max-width:1180px){
  #taskFilterbar{grid-template-columns:1fr 1fr;}
  #taskFilterbar .filter-group.wide{grid-column:1/-1;}
  .task-admin-control{grid-column:auto;}
}
@media(max-width:700px){
  .lop-viewbar{align-items:flex-start;flex-direction:column;}
  .lop-view-tabs{width:100%;}
  .lop-view-tabs button{flex:1 1 42%;}
}


/* R004.9.0a – Meilensteinvorlagen und automatische LOP-Erzeugung */
.lop-milestone-cell{padding:8px 9px!important;}
.lop-milestone-badge{display:flex;flex-direction:column;gap:3px;min-height:40px;justify-content:center;padding:7px 9px;border:1px solid rgba(216,199,161,.24);border-radius:9px;background:rgba(216,199,161,.07);}
.lop-milestone-badge strong{font-size:11px;color:var(--accent2);letter-spacing:.04em;}
.lop-milestone-badge small{font-size:11px;line-height:1.25;color:var(--text);white-space:normal;}
.lop-milestone-empty{display:inline-flex;align-items:center;min-height:40px;color:var(--muted);font-size:11px;}
.milestone-filterbar{align-items:flex-end;}
.milestone-filterbar .filter-group.wide{min-width:300px;}
.milestone-workspace{display:flex;flex-direction:column;gap:16px;min-width:0;}
.milestone-viewbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.milestone-source-card{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(240px,.6fr);gap:14px;padding:16px 18px;border:1px solid var(--line);border-radius:15px;background:linear-gradient(135deg,rgba(216,199,161,.09),rgba(18,34,39,.72));}
.milestone-source-card>div{display:flex;flex-direction:column;gap:4px;}
.milestone-source-card span,.milestone-template-intro span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);}
.milestone-source-card strong{font-size:17px;color:var(--accent2);}
.milestone-source-card small{color:var(--muted);line-height:1.4;}
.milestone-card{overflow:hidden;border:1px solid var(--line);border-radius:15px;background:rgba(9,20,23,.74);}
.milestone-card[open]{border-color:rgba(216,199,161,.33);}
.milestone-card.is-completed{border-left:4px solid var(--ok);}
.milestone-summary{display:grid;grid-template-columns:78px minmax(260px,1fr) 120px 120px 62px;align-items:center;gap:12px;padding:15px 17px;cursor:pointer;list-style:none;background:rgba(255,255,255,.025);}
.milestone-summary::-webkit-details-marker{display:none;}
.milestone-summary:hover{background:rgba(255,255,255,.045);}
.milestone-sequence{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:5px 8px;border:1px solid rgba(216,199,161,.35);border-radius:8px;color:var(--accent2);font-size:11px;font-weight:800;letter-spacing:.04em;white-space:nowrap;}
.milestone-summary-main{display:flex;flex-direction:column;gap:4px;min-width:0;}
.milestone-summary-main strong{font-size:16px;color:var(--text);}
.milestone-summary-main small,.milestone-summary-date{font-size:12px;color:var(--muted);}
.milestone-status-badge{display:inline-flex;justify-content:center;padding:6px 9px;border:1px solid var(--line);border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap;}
.milestone-status-badge.status-completed{border-color:rgba(61,164,111,.42);background:rgba(32,118,73,.14);color:#b8e7d0;}
.milestone-status-badge.status-active{border-color:rgba(217,178,68,.42);background:rgba(151,114,18,.13);color:#f4d98b;}
.milestone-status-badge.status-deferred{color:#bbc6c7;}
.milestone-progress-value{text-align:right;color:var(--accent2);font-weight:800;}
.milestone-card-body{display:flex;flex-direction:column;gap:15px;padding:0 17px 18px;}
.milestone-progressbar{height:6px;margin:0 -17px;background:rgba(255,255,255,.055);}
.milestone-progressbar span{display:block;height:100%;background:var(--accent);transition:width .2s ease;}
.milestone-project-form{display:grid;grid-template-columns:minmax(260px,1.2fr) 170px 160px;gap:12px;}
.milestone-project-form label,.milestone-template-intro label{display:flex;flex-direction:column;gap:6px;}
.milestone-project-form label>span,.milestone-template-intro label>span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;}
.milestone-project-form input,.milestone-project-form select,.milestone-project-form textarea,.milestone-template-intro input,.milestone-template-intro textarea,.milestone-template-title-fields input,.milestone-template-title-fields textarea,.milestone-template-control{width:100%;border:1px solid rgba(255,255,255,.11);border-radius:9px;background:#091417;color:var(--text);padding:9px 10px;font:inherit;}
.milestone-project-form input:focus,.milestone-project-form select:focus,.milestone-project-form textarea:focus,.milestone-template-intro input:focus,.milestone-template-intro textarea:focus,.milestone-template-title-fields input:focus,.milestone-template-title-fields textarea:focus,.milestone-template-control:focus{outline:2px solid rgba(216,199,161,.32);border-color:rgba(216,199,161,.62);}
.milestone-project-form input:disabled,.milestone-project-form select:disabled,.milestone-project-form textarea:disabled{opacity:.72;}
.milestone-description-field{grid-column:1/-1;}
.milestone-package-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;}
.milestone-package-table{width:100%;min-width:800px;border-collapse:collapse;}
.milestone-package-table th{padding:9px 10px;text-align:left;background:#132329;color:var(--muted);font-size:10px;letter-spacing:.05em;text-transform:uppercase;}
.milestone-package-table td{padding:9px 10px;border-top:1px solid rgba(255,255,255,.07);font-size:12px;vertical-align:middle;}
.milestone-package-table th:nth-child(1),.milestone-package-table td:nth-child(1){width:90px;}
.milestone-package-table th:nth-child(2),.milestone-package-table td:nth-child(2){width:170px;}
.milestone-package-table th:nth-child(4),.milestone-package-table td:nth-child(4){width:210px;}
.milestone-package-state{display:inline-flex;align-items:center;justify-content:center;min-height:29px;padding:5px 9px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--muted);font-size:10px;white-space:nowrap;}
button.milestone-package-state{cursor:pointer;}
.milestone-package-state.is-generated{border-color:rgba(72,162,167,.35);background:rgba(34,113,119,.12);color:#b8e5e8;}
.milestone-package-state.is-complete{border-color:rgba(61,164,111,.36);background:rgba(32,118,73,.12);color:#b8e7d0;}
.milestone-package-state.is-missing{border-color:rgba(217,178,68,.35);color:#f4d98b;}
.milestone-template-intro{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(360px,1.2fr);gap:14px;padding:17px;border:1px solid var(--line);border-radius:15px;background:rgba(216,199,161,.06);}
.milestone-template-intro>div{display:flex;flex-direction:column;gap:6px;}
.milestone-template-intro input{font-size:17px;font-weight:700;}
.milestone-template-intro p{grid-column:1/-1;margin:0;color:var(--muted);font-size:12px;line-height:1.5;}
.milestone-template-list{display:flex;flex-direction:column;gap:14px;}
.milestone-template-card{padding:15px;border:1px solid var(--line);border-radius:15px;background:rgba(9,20,23,.72);}
.milestone-template-card-header{display:grid;grid-template-columns:74px minmax(0,1fr) auto;gap:12px;align-items:start;margin-bottom:12px;}
.milestone-template-title-fields{display:flex;flex-direction:column;gap:8px;}
.milestone-template-title-fields input{font-weight:700;font-size:15px;}
.milestone-template-card-actions,.milestone-template-row-actions{display:flex;gap:5px;justify-content:flex-end;}
.icon-button{min-width:32px;min-height:32px;padding:4px 8px;border-radius:8px;background:rgba(255,255,255,.03);}
.icon-button.is-danger{color:#ffb4a8;border-color:rgba(217,41,53,.35);}
.icon-button:disabled{opacity:.3;cursor:not-allowed;}
.milestone-template-table th:nth-child(4),.milestone-template-table td:nth-child(4){width:130px;}
.milestone-template-control{min-height:38px;padding:7px 8px;font-size:12px;}
.milestone-add-package,.milestone-add-milestone{margin-top:12px;align-self:flex-start;}
.milestone-empty-package-row td{color:var(--muted);text-align:center;padding:16px;}
@media(max-width:1100px){
  .milestone-summary{grid-template-columns:72px minmax(220px,1fr) 105px 110px 52px;}
  .milestone-project-form{grid-template-columns:1fr 160px;}
  .milestone-project-form label:nth-child(3){grid-column:1/-1;}
  .milestone-source-card,.milestone-template-intro{grid-template-columns:1fr;}
  .milestone-template-intro p{grid-column:auto;}
}
@media(max-width:760px){
  .milestone-summary{grid-template-columns:66px 1fr;}
  .milestone-summary-date,.milestone-status-badge,.milestone-progress-value{grid-column:2;justify-self:start;text-align:left;}
  .milestone-project-form{grid-template-columns:1fr;}
  .milestone-project-form label:nth-child(3),.milestone-description-field{grid-column:auto;}
  .milestone-template-card-header{grid-template-columns:1fr;}
  .milestone-template-card-actions{justify-content:flex-start;}
}


/* R004.9.0b – Großformatiger Meilenstein- und Vorlageneditor */
.milestone-editor-workspace{gap:18px;}
.milestone-editor-toolbar{position:sticky;top:-20px;z-index:8;margin:-20px -26px 0;padding:14px 26px;background:rgba(12,27,31,.97);border-bottom:1px solid var(--line);box-shadow:0 10px 28px rgba(0,0,0,.18);}
.milestone-editor-tools{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap;}
.milestone-autosave-status{display:inline-flex;align-items:center;min-height:38px;padding:7px 11px;border:1px solid var(--line);border-radius:10px;color:var(--muted);font-size:12px;white-space:nowrap;}
.milestone-autosave-status.is-saved{color:#b8e7d0;border-color:rgba(61,164,111,.28);background:rgba(32,118,73,.10);}
.milestone-autosave-status.is-pending,.milestone-autosave-status.is-saving{color:#f4d98b;border-color:rgba(217,178,68,.30);background:rgba(151,114,18,.10);}
.milestone-autosave-status.is-error{color:#ffb4a8;border-color:rgba(217,41,53,.35);background:rgba(137,31,39,.13);}
.milestone-density-switch{display:flex;padding:3px;border:1px solid var(--line);border-radius:10px;background:#091417;}
.milestone-density-switch button{min-height:32px;padding:5px 10px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:12px;}
.milestone-density-switch button.is-active{background:rgba(216,199,161,.14);color:var(--accent2);}
.milestone-source-card-compact{padding:12px 16px;}
.milestone-editor-shell{display:grid;grid-template-columns:clamp(300px,22vw,390px) minmax(0,1fr);gap:18px;align-items:start;min-height:560px;}
.milestone-editor-nav{position:sticky;top:54px;display:flex;flex-direction:column;max-height:calc(100vh - 300px);min-height:520px;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:rgba(9,20,23,.78);}
.milestone-editor-nav>header{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding:17px 16px;border-bottom:1px solid var(--line);}
.milestone-editor-nav>header span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);}
.milestone-editor-nav>header strong{font-size:14px;color:var(--accent2);}
.milestone-editor-nav-list{display:flex;flex-direction:column;gap:7px;overflow:auto;padding:10px;}
.milestone-editor-nav-item{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:68px;padding:10px 11px;border:1px solid transparent;border-radius:11px;background:rgba(255,255,255,.025);color:var(--text);text-align:left;cursor:pointer;}
.milestone-editor-nav-item:hover{border-color:rgba(216,199,161,.25);background:rgba(255,255,255,.045);}
.milestone-editor-nav-item.is-selected{border-color:rgba(216,199,161,.58);background:rgba(216,199,161,.11);box-shadow:inset 4px 0 0 var(--accent2);}
.milestone-editor-nav-item.is-completed{box-shadow:inset 4px 0 0 var(--ok);}
.milestone-editor-nav-item.is-selected.is-completed{box-shadow:inset 4px 0 0 var(--ok),0 0 0 1px rgba(216,199,161,.22);}
.milestone-editor-nav-code{font-size:11px;font-weight:800;color:var(--accent2);white-space:nowrap;}
.milestone-editor-nav-copy{display:flex;flex-direction:column;gap:5px;min-width:0;}
.milestone-editor-nav-copy strong{font-size:14px;line-height:1.25;white-space:normal;}
.milestone-editor-nav-copy small{font-size:11px;line-height:1.3;color:var(--muted);}
.milestone-editor-nav-progress{font-size:12px;font-weight:800;color:var(--accent2);}
.milestone-nav-add{margin:10px;margin-top:auto;min-height:44px;}
.milestone-editor-main{min-width:0;padding:22px;border:1px solid rgba(216,199,161,.27);border-radius:17px;background:rgba(9,20,23,.78);}
.milestone-editor-main-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px;}
.milestone-editor-main-header>div:first-child{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 12px;min-width:0;}
.milestone-editor-main-header h2{grid-column:2;margin:0;font-size:25px;line-height:1.2;}
.milestone-editor-main-header p{grid-column:2;margin:0;color:var(--muted);font-size:13px;}
.milestone-editor-progress{height:8px;margin:0 0 22px;border-radius:999px;overflow:hidden;}
.milestone-editor-form{grid-template-columns:minmax(330px,1fr) 210px 190px;gap:16px;}
.milestone-editor-form label>span,.milestone-template-editor-fields label>span{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.055em;}
.milestone-editor-form input,.milestone-editor-form select,.milestone-editor-form textarea,.milestone-template-editor-fields input,.milestone-template-editor-fields textarea,.milestone-template-intro-large input,.milestone-template-intro-large textarea{min-height:48px;padding:12px 14px;border-radius:11px;font-size:15px;line-height:1.4;}
.milestone-editor-form textarea,.milestone-template-editor-fields textarea,.milestone-template-intro-large textarea{min-height:104px;resize:vertical;}
.milestone-editor-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:24px 0 10px;}
.milestone-editor-section-heading>div{display:flex;flex-direction:column;gap:3px;}
.milestone-editor-section-heading span{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);}
.milestone-editor-section-heading strong{font-size:18px;color:var(--text);}
.milestone-editor-section-heading small{max-width:520px;color:var(--muted);text-align:right;line-height:1.35;}
.milestone-editor-table{min-width:980px;table-layout:fixed;}
.milestone-editor-table th{height:42px;padding:11px 12px;font-size:11px;}
.milestone-editor-table td{min-height:54px;padding:11px 12px;font-size:14px;line-height:1.35;}
.milestone-editor-table th:nth-child(1),.milestone-editor-table td:nth-child(1){width:56px;text-align:center;}
.milestone-editor-table th:nth-child(2),.milestone-editor-table td:nth-child(2){width:126px;}
.milestone-editor-table th:nth-child(3),.milestone-editor-table td:nth-child(3){width:210px;}
.milestone-editor-table th:nth-child(4),.milestone-editor-table td:nth-child(4){width:auto;}
.milestone-editor-table th:nth-child(5),.milestone-editor-table td:nth-child(5){width:225px;}
.milestone-row-number{color:var(--muted);font-weight:800;}
.milestone-package-subject{font-size:15px!important;}
.milestone-empty-table{text-align:center;color:var(--muted);padding:30px!important;}
.milestone-template-intro-large{grid-template-columns:minmax(320px,.8fr) minmax(480px,1.2fr);padding:18px 20px;}
.milestone-template-editor-header{padding-bottom:17px;border-bottom:1px solid var(--line);}
.milestone-template-editor-fields{display:grid;grid-template-columns:1fr;gap:15px;}
.milestone-template-editor-fields label{display:flex;flex-direction:column;gap:7px;}
.milestone-template-editor-fields input{font-size:18px;font-weight:750;}
.milestone-template-table .milestone-template-control{min-height:48px;padding:10px 12px;font-size:14px;}
.milestone-template-table textarea.milestone-template-control{min-height:56px;resize:vertical;line-height:1.35;}
.milestone-template-table th:nth-child(5),.milestone-template-table td:nth-child(5){width:142px;}
.milestone-template-row-actions{align-items:center;}
.milestone-template-row-actions .icon-button{min-width:38px;min-height:38px;font-size:17px;}
.milestone-add-package{min-height:46px;padding:10px 16px;}
.is-danger-text{color:#ffb4a8!important;border-color:rgba(217,41,53,.35)!important;}
.density-compact .milestone-editor-nav-item{min-height:54px;padding:7px 9px;}
.density-compact .milestone-editor-main{padding:17px;}
.density-compact .milestone-editor-form input,.density-compact .milestone-editor-form select,.density-compact .milestone-template-editor-fields input,.density-compact .milestone-template-table .milestone-template-control{min-height:40px;padding:8px 10px;font-size:13px;}
.density-compact .milestone-editor-form textarea,.density-compact .milestone-template-editor-fields textarea{min-height:76px;padding:9px 10px;font-size:13px;}
.density-compact .milestone-editor-table td{padding:7px 9px;font-size:12px;}
.density-compact .milestone-editor-table th{height:35px;padding:7px 9px;font-size:10px;}
.density-compact .milestone-template-table textarea.milestone-template-control{min-height:42px;}
body.milestone-focus-mode .portal-app{grid-template-columns:minmax(0,1fr);padding:0;gap:0;}
body.milestone-focus-mode .portal-sidebar,body.milestone-focus-mode .portal-header,body.milestone-focus-mode #milestoneFilterbar,body.milestone-focus-mode #milestoneKpiGrid,body.milestone-focus-mode .portal-actionbar{display:none!important;}
body.milestone-focus-mode .portal-main-panel{height:100vh;border-radius:0;border:0;grid-template-rows:1fr;}
body.milestone-focus-mode .portal-content-scroll{padding:20px 28px 28px;}
body.milestone-focus-mode .milestone-editor-toolbar{top:-20px;margin-top:-20px;}
body.milestone-focus-mode .milestone-editor-nav{top:54px;max-height:calc(100vh - 100px);}
@media(max-width:1300px){
  .milestone-editor-shell{grid-template-columns:300px minmax(0,1fr);}
  .milestone-editor-form{grid-template-columns:1fr 180px;}
  .milestone-editor-form label:nth-child(3){grid-column:1/-1;}
  .milestone-template-intro-large{grid-template-columns:1fr;}
  .milestone-template-intro-large p{grid-column:auto;}
}
@media(max-width:980px){
  .milestone-editor-toolbar{position:static;margin:-20px -26px 0;}
  .milestone-editor-tools{justify-content:flex-start;}
  .milestone-editor-shell{grid-template-columns:1fr;}
  .milestone-editor-nav{position:static;max-height:360px;min-height:0;}
  .milestone-editor-form{grid-template-columns:1fr;}
  .milestone-editor-form label:nth-child(3),.milestone-description-field{grid-column:auto;}
  .milestone-editor-main-header,.milestone-editor-section-heading{align-items:flex-start;flex-direction:column;}
  .milestone-editor-section-heading small{text-align:left;}
}


/* R004.9.0c – Responsive Vollbreiten- und Touch-Editor */
.milestone-editor-workspace{
  --ms-font:clamp(15.5px,calc(13px + .18vw),19px);
  --ms-small-font:clamp(11.5px,calc(10px + .09vw),13px);
  --ms-control-height:clamp(50px,2.7vw,64px);
  --ms-row-height:clamp(68px,4.1vw,94px);
  --ms-row-max:clamp(88px,5.2vw,116px);
  --ms-editor-padding:clamp(20px,1.45vw,34px);
  --ms-gap:clamp(16px,1.15vw,28px);
  --ms-nav-width:clamp(300px,18vw,430px);
  width:100%;
  max-width:none;
  font-size:var(--ms-font);
}
.milestone-editor-workspace.density-comfortable{--ms-font:16px;--ms-control-height:52px;--ms-row-height:66px;--ms-row-max:88px;--ms-editor-padding:22px;--ms-nav-width:330px;}
.milestone-editor-workspace.density-large{--ms-font:18px;--ms-control-height:58px;--ms-row-height:78px;--ms-row-max:102px;--ms-editor-padding:28px;--ms-nav-width:370px;}
.milestone-editor-workspace.density-xlarge{--ms-font:20px;--ms-small-font:13px;--ms-control-height:66px;--ms-row-height:94px;--ms-row-max:122px;--ms-editor-padding:34px;--ms-nav-width:420px;}
.milestone-editor-workspace.density-compact{--ms-font:13px;--ms-small-font:10px;--ms-control-height:40px;--ms-row-height:48px;--ms-row-max:62px;--ms-editor-padding:17px;--ms-nav-width:300px;--ms-gap:14px;}
.milestone-density-select{display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 6px 4px 10px;border:1px solid var(--line);border-radius:10px;background:#091417;color:var(--muted);}
.milestone-density-select span{font-size:11px;font-weight:700;letter-spacing:.045em;text-transform:uppercase;white-space:nowrap;}
.milestone-density-select select{min-height:34px;border:0;border-radius:7px;background:rgba(216,199,161,.10);color:var(--accent2);padding:5px 30px 5px 10px;font-size:13px;font-weight:700;cursor:pointer;}
.milestone-density-select select:focus{outline:2px solid rgba(216,199,161,.34);}
.milestone-editor-shell{grid-template-columns:var(--ms-nav-width) minmax(0,1fr);gap:var(--ms-gap);width:100%;max-width:none;min-height:0;align-items:stretch;}
.milestone-editor-nav{min-width:0;min-height:0;}
.milestone-editor-nav-item{min-height:max(68px,calc(var(--ms-row-height) * .9));padding:clamp(10px,.75vw,16px);gap:clamp(10px,.65vw,16px);}
.milestone-editor-nav-code{font-size:var(--ms-small-font);}
.milestone-editor-nav-copy strong{font-size:calc(var(--ms-font) * .88);line-height:1.3;}
.milestone-editor-nav-copy small{font-size:var(--ms-small-font);line-height:1.4;}
.milestone-editor-nav-progress{font-size:calc(var(--ms-font) * .78);}
.milestone-editor-main{width:100%;max-width:none;padding:var(--ms-editor-padding);font-size:var(--ms-font);}
.milestone-editor-main-header h2{font-size:clamp(25px,calc(20px + .55vw),36px);}
.milestone-editor-main-header p{font-size:calc(var(--ms-font) * .78);line-height:1.45;}
.milestone-editor-main .milestone-sequence{min-height:clamp(32px,2.2vw,42px);padding:6px 10px;font-size:var(--ms-small-font);}
.milestone-editor-form{grid-template-columns:minmax(360px,1fr) minmax(190px,240px) minmax(170px,220px);gap:var(--ms-gap);}
.milestone-editor-form label>span,.milestone-template-editor-fields label>span{font-size:var(--ms-small-font);}
.milestone-editor-form input,.milestone-editor-form select,.milestone-editor-form textarea,.milestone-template-editor-fields input,.milestone-template-editor-fields textarea,.milestone-template-intro-large input,.milestone-template-intro-large textarea{min-height:var(--ms-control-height);padding:clamp(12px,.8vw,18px);font-size:var(--ms-font);}
.milestone-editor-form textarea,.milestone-template-editor-fields textarea,.milestone-template-intro-large textarea{min-height:clamp(110px,8vw,160px);}
.milestone-editor-section-heading{margin:clamp(24px,1.7vw,38px) 0 12px;}
.milestone-editor-section-heading span{font-size:var(--ms-small-font);}
.milestone-editor-section-heading strong{font-size:calc(var(--ms-font) * 1.2);}
.milestone-editor-section-heading small{font-size:calc(var(--ms-font) * .74);max-width:620px;}
.milestone-package-table-wrap{width:100%;max-width:none;overflow:auto;}
.milestone-editor-table{width:100%;min-width:0;max-width:none;table-layout:fixed;font-size:var(--ms-font);}
.milestone-editor-table thead th{height:clamp(46px,3vw,60px);padding:12px clamp(12px,.9vw,20px);font-size:var(--ms-small-font);}
.milestone-editor-table tbody tr{height:var(--ms-row-height);}
.milestone-editor-table td{height:var(--ms-row-height);padding:clamp(14px,1vw,22px);font-size:var(--ms-font);line-height:1.45;vertical-align:middle;}
.milestone-editor-table:not(.milestone-template-table) th:nth-child(1),.milestone-editor-table:not(.milestone-template-table) td:nth-child(1){width:6%;}
.milestone-editor-table:not(.milestone-template-table) th:nth-child(2),.milestone-editor-table:not(.milestone-template-table) td:nth-child(2){width:8%;}
.milestone-editor-table:not(.milestone-template-table) th:nth-child(3),.milestone-editor-table:not(.milestone-template-table) td:nth-child(3){width:18%;}
.milestone-editor-table:not(.milestone-template-table) th:nth-child(4),.milestone-editor-table:not(.milestone-template-table) td:nth-child(4){width:44%;}
.milestone-editor-table:not(.milestone-template-table) th:nth-child(5),.milestone-editor-table:not(.milestone-template-table) td:nth-child(5){width:24%;}
.milestone-package-subject{font-size:calc(var(--ms-font) * 1.04)!important;font-weight:650;line-height:1.5;overflow-wrap:anywhere;}
.milestone-package-state{min-height:max(44px,calc(var(--ms-control-height) * .82));max-width:100%;padding:9px 13px;font-size:calc(var(--ms-font) * .72);line-height:1.35;white-space:normal;text-align:center;}
.milestone-template-table th:nth-child(1),.milestone-template-table td:nth-child(1){width:5%;}
.milestone-template-table th:nth-child(2),.milestone-template-table td:nth-child(2){width:13%;}
.milestone-template-table th:nth-child(3),.milestone-template-table td:nth-child(3){width:20%;}
.milestone-template-table th:nth-child(4),.milestone-template-table td:nth-child(4){width:auto;}
.milestone-template-table th:nth-child(5),.milestone-template-table td:nth-child(5){width:clamp(142px,10vw,190px);}
.milestone-template-table .milestone-template-control{min-height:var(--ms-control-height);padding:clamp(10px,.75vw,16px);font-size:var(--ms-font);}
.milestone-template-table textarea.milestone-template-control{min-height:calc(var(--ms-row-height) - 18px);line-height:1.45;}
.milestone-template-row-actions{gap:clamp(6px,.5vw,10px);}
.milestone-template-row-actions .icon-button{min-width:max(44px,calc(var(--ms-control-height) * .78));min-height:max(44px,calc(var(--ms-control-height) * .78));font-size:calc(var(--ms-font) * 1.05);}
.milestone-add-package,.milestone-nav-add{min-height:max(48px,var(--ms-control-height));font-size:calc(var(--ms-font) * .84);}
body.milestone-focus-mode .portal-content-scroll{display:flex;min-height:0;overflow:hidden;padding:14px clamp(16px,1.5vw,34px) 20px;}
body.milestone-focus-mode .milestone-editor-workspace{flex:1 1 auto;height:100%;min-height:0;overflow:hidden;}
body.milestone-focus-mode .milestone-editor-toolbar,body.milestone-focus-mode .lop-notice,body.milestone-focus-mode .milestone-source-card,body.milestone-focus-mode .milestone-template-intro{flex:0 0 auto;}
body.milestone-focus-mode .milestone-editor-shell{flex:1 1 auto;height:auto;min-height:0;overflow:hidden;}
body.milestone-focus-mode .milestone-editor-nav{position:relative;top:auto;height:100%;max-height:none;min-height:0;}
body.milestone-focus-mode .milestone-editor-main{height:100%;min-height:0;overflow:auto;}
body.milestone-focus-mode .milestone-editor-table tbody tr{height:clamp(var(--ms-row-height),calc((100dvh - 515px) / var(--package-count)),var(--ms-row-max));}
body.milestone-focus-mode .milestone-editor-table td{height:inherit;}
@media(min-width:1900px){
  .milestone-editor-workspace.density-auto{--ms-font:18px;--ms-control-height:60px;--ms-row-height:82px;--ms-row-max:110px;--ms-editor-padding:30px;--ms-nav-width:390px;}
}
@media(min-width:2400px){
  .milestone-editor-workspace.density-auto{--ms-font:20px;--ms-small-font:13px;--ms-control-height:68px;--ms-row-height:96px;--ms-row-max:124px;--ms-editor-padding:36px;--ms-nav-width:440px;}
}
@media (max-width:1100px), (pointer:coarse) and (max-width:1366px){
  .milestone-editor-workspace.density-auto{--ms-font:17px;--ms-small-font:12px;--ms-control-height:54px;--ms-row-height:76px;--ms-row-max:96px;--ms-editor-padding:20px;}
  .milestone-editor-shell{grid-template-columns:1fr;overflow:visible;}
  .milestone-editor-nav{position:static!important;top:auto!important;height:auto!important;max-height:none!important;min-height:0;overflow:hidden;}
  .milestone-editor-nav-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(260px,78vw);gap:10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;padding:10px;}
  .milestone-editor-nav-item{scroll-snap-align:start;min-height:max(76px,var(--ms-row-height));}
  .milestone-nav-add{margin:10px;}
  .milestone-editor-main{height:auto!important;min-height:0;overflow:visible!important;}
  .milestone-editor-form{grid-template-columns:minmax(0,1fr) minmax(180px,.55fr);}
  .milestone-editor-form label:nth-child(3){grid-column:1/-1;}
  .milestone-package-table-wrap{overflow:visible;border:0;background:transparent;}
  .milestone-editor-table,.milestone-editor-table tbody,.milestone-editor-table tr,.milestone-editor-table td{display:block;width:100%!important;min-width:0;}
  .milestone-editor-table thead{display:none;}
  .milestone-editor-table tbody{display:grid;gap:14px;}
  .milestone-editor-table tbody tr{height:auto!important;min-height:0;padding:clamp(14px,2vw,22px);border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.025);}
  .milestone-editor-table td{display:grid;grid-template-columns:minmax(105px,145px) minmax(0,1fr);align-items:center;gap:12px;height:auto!important;min-height:48px;padding:9px 0!important;border:0!important;font-size:var(--ms-font);}
  .milestone-editor-table td::before{content:attr(data-label);font-size:var(--ms-small-font);font-weight:800;letter-spacing:.055em;text-transform:uppercase;color:var(--muted);}
  .milestone-editor-table td[data-label="LOP-Arbeitspaket"]{grid-template-columns:1fr;align-items:start;padding:15px 0!important;border-top:1px solid rgba(255,255,255,.07)!important;border-bottom:1px solid rgba(255,255,255,.07)!important;}
  .milestone-editor-table td[data-label="LOP-Arbeitspaket"]::before{margin-bottom:2px;}
  .milestone-editor-table td[data-label="LOP-Status"]{grid-template-columns:minmax(105px,145px) minmax(0,1fr);}
  .milestone-template-row-actions{display:flex!important;align-items:center;justify-content:flex-start;flex-wrap:wrap;}
  .milestone-template-row-actions::before{flex:0 0 133px;}
  .milestone-template-table .milestone-template-control{width:100%;}
  .milestone-template-table textarea.milestone-template-control{min-height:92px;}
  body.milestone-focus-mode .portal-content-scroll{overflow:auto;}
  body.milestone-focus-mode .milestone-editor-workspace{height:auto;overflow:visible;}
  body.milestone-focus-mode .milestone-editor-shell{height:auto;overflow:visible;}
}
@media(max-width:720px){
  .milestone-editor-toolbar{padding:12px 16px;margin:-20px -20px 0;}
  .milestone-editor-tools{width:100%;justify-content:flex-start;}
  .milestone-autosave-status{order:3;width:100%;justify-content:center;}
  .milestone-density-select{flex:1 1 180px;justify-content:space-between;}
  .milestone-density-select select{flex:1;min-width:0;}
  .milestone-editor-form{grid-template-columns:1fr;}
  .milestone-editor-form label:nth-child(3),.milestone-description-field{grid-column:auto;}
  .milestone-editor-main-header,.milestone-template-editor-header{gap:14px;}
  .milestone-editor-main-header h2{font-size:25px;}
  .milestone-editor-table td{grid-template-columns:1fr;gap:5px;}
  .milestone-editor-table td[data-label="LOP-Status"]{grid-template-columns:1fr;}
  .milestone-template-row-actions::before{flex-basis:100%;}
}


/* ============================================================
   R004.9.0e – LOP-Komfortdarstellung, adaptive Zeilenhöhe und Filter-FIX
   Ausschließlich Darstellungs- und Bedienergonomie der Projekt-LOP
   ============================================================ */
body.lop-section-active .portal-content-scroll{
  display:flex;
  min-height:0;
  overflow:hidden;
}
.lop-workspace{
  --lop-font:15px;
  --lop-small-font:11px;
  --lop-control-height:48px;
  --lop-row-height:60px;
  --lop-cell-pad-y:8px;
  --lop-cell-pad-x:8px;
  --lop-radius:10px;
  flex:1 1 auto;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  overflow:hidden;
  gap:12px;
}
.lop-workspace.density-compact{
  --lop-font:13px;
  --lop-small-font:10px;
  --lop-control-height:38px;
  --lop-row-height:44px;
  --lop-cell-pad-y:5px;
  --lop-cell-pad-x:6px;
  --lop-radius:8px;
}
.lop-workspace.density-comfortable{
  --lop-font:15.5px;
  --lop-small-font:11px;
  --lop-control-height:48px;
  --lop-row-height:60px;
  --lop-cell-pad-y:8px;
  --lop-cell-pad-x:8px;
}
.lop-workspace.density-xlarge{
  --lop-font:17.5px;
  --lop-small-font:12px;
  --lop-control-height:56px;
  --lop-row-height:74px;
  --lop-cell-pad-y:10px;
  --lop-cell-pad-x:10px;
  --lop-radius:12px;
}
.lop-workspace.density-auto{
  --lop-font:15.5px;
  --lop-small-font:11px;
  --lop-control-height:48px;
  --lop-row-height:60px;
  --lop-cell-pad-y:8px;
  --lop-cell-pad-x:8px;
}
.lop-editor-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  min-height:52px;
}
.lop-editor-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.lop-density-select{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:5px 7px 5px 11px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.025);
}
.lop-density-select span{
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.lop-density-select select{
  min-width:148px;
  min-height:34px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:8px;
  background:#081417;
  color:var(--text);
  padding:6px 30px 6px 9px;
  font-size:13px;
}
.lop-editor-tools button{
  min-height:42px;
}
.lop-support-row{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.lop-support-row .lop-quick-hint{
  flex:1 1 auto;
  min-width:0;
}
.lop-support-row .lop-entry-legend{
  flex:0 0 auto;
}
.lop-table-shell{
  flex:1 1 auto;
  width:100%;
  min-width:0;
  min-height:320px;
  height:auto;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  border-radius:14px;
}
.lop-table{
  width:100%;
  min-width:1780px;
  table-layout:fixed;
  font-size:var(--lop-font);
}
.lop-table col.lop-col-id{width:84px;}
.lop-table col.lop-col-date{width:150px;}
.lop-table col.lop-col-type{width:138px;}
.lop-table col.lop-col-category{width:190px;}
.lop-table col.lop-col-milestone{width:220px;}
.lop-table col.lop-col-subject{width:auto;}
.lop-table col.lop-col-owner{width:195px;}
.lop-table col.lop-col-status{width:150px;}
.lop-table col.lop-col-due{width:150px;}
.lop-table col.lop-col-save{width:78px;}
.lop-table th:nth-child(n){width:auto!important;}
.lop-table th{
  height:46px;
  padding:11px 10px;
  font-size:var(--lop-small-font);
  line-height:1.25;
  white-space:normal;
  vertical-align:middle;
}
.lop-table tbody tr{
  height:var(--lop-row-height);
}
.lop-table td{
  height:var(--lop-row-height);
  min-height:var(--lop-row-height);
  padding:var(--lop-cell-pad-y) var(--lop-cell-pad-x);
  font-size:var(--lop-font);
  line-height:1.4;
}
.lop-table .lop-id-cell{
  padding:var(--lop-cell-pad-y) calc(var(--lop-cell-pad-x) + 3px);
}
.lop-id-cell strong{
  font-size:calc(var(--lop-font) * .92);
  line-height:1.2;
}
.lop-id-cell small{
  margin-top:6px;
  font-size:var(--lop-small-font);
  line-height:1.25;
}
.lop-cell-control{
  min-height:var(--lop-control-height);
  height:var(--lop-control-height);
  padding:10px 11px;
  border-radius:var(--lop-radius);
  font-size:var(--lop-font);
  line-height:1.35;
}
select.lop-cell-control{
  padding-right:32px;
}
textarea.lop-subject-input{
  display:block;
  min-height:var(--lop-control-height);
  height:auto;
  max-height:none;
  overflow:hidden;
  resize:none;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.42;
  padding-top:10px;
  padding-bottom:10px;
}
.lop-subject-cell{
  vertical-align:top!important;
}
.lop-milestone-cell{
  padding:var(--lop-cell-pad-y) var(--lop-cell-pad-x)!important;
}
.lop-milestone-badge,
.lop-milestone-empty{
  min-height:var(--lop-control-height);
  border-radius:var(--lop-radius);
  padding:9px 11px;
}
.lop-milestone-badge strong{
  font-size:var(--lop-small-font);
}
.lop-milestone-badge small,
.lop-milestone-empty{
  font-size:calc(var(--lop-font) * .78);
  line-height:1.35;
}
.lop-save-cell{
  padding-left:4px!important;
  padding-right:4px!important;
}
.lop-save-status{
  min-width:0;
  min-height:28px;
  padding:4px 6px;
  border-radius:8px;
  font-size:var(--lop-small-font);
  line-height:1.2;
  white-space:normal;
}
.lop-save-status.is-saved{
  min-width:28px;
  border-color:transparent;
  background:transparent;
  color:#8fc9ad;
  font-size:calc(var(--lop-font) * 1.05);
}
.lop-save-status.is-saving,
.lop-save-status.is-pending,
.lop-save-status.is-error,
.lop-save-status.is-draft{
  border-radius:8px;
}
.lop-row:focus-within td{
  background:rgba(216,199,161,.045);
}
.lop-cell-control:focus{
  outline:3px solid rgba(216,199,161,.30);
  outline-offset:1px;
}

/* Fokusmodus: Suche und Filter bleiben erhalten, Navigation/Kopf/KPI weichen. */
body.lop-focus-mode{
  overflow:hidden;
}
body.lop-focus-mode .portal-app{
  grid-template-columns:minmax(0,1fr);
  gap:0;
  padding:0;
}
body.lop-focus-mode .portal-sidebar,
body.lop-focus-mode .portal-header,
body.lop-focus-mode #taskKpiGrid{
  display:none!important;
}
body.lop-focus-mode .portal-main-panel{
  width:100vw;
  height:100dvh;
  min-height:0;
  border:0;
  border-radius:0;
  grid-template-rows:auto 1fr;
}
body.lop-focus-mode #taskFilterbar{
  display:grid!important;
  padding:12px clamp(16px,1.4vw,30px);
}
body.lop-focus-mode .portal-content-scroll{
  display:flex;
  min-height:0;
  overflow:hidden;
  padding:12px clamp(16px,1.4vw,30px) 18px;
}
body.lop-focus-mode .lop-workspace{
  flex:1 1 auto;
  height:100%;
  min-height:0;
}
body.lop-focus-mode .lop-table-shell{
  min-height:0;
}

@media(min-width:1900px){
  .lop-workspace.density-auto{
    --lop-font:17px;
    --lop-small-font:12px;
    --lop-control-height:54px;
    --lop-row-height:68px;
    --lop-cell-pad-y:9px;
    --lop-cell-pad-x:9px;
  }
  .lop-table{min-width:1900px;}
  .lop-table col.lop-col-subject{width:auto;}
}
@media(min-width:2400px){
  .lop-workspace.density-auto{
    --lop-font:18px;
    --lop-small-font:12.5px;
    --lop-control-height:60px;
    --lop-row-height:76px;
    --lop-cell-pad-y:10px;
    --lop-cell-pad-x:10px;
  }
  .lop-table{min-width:2050px;}
  .lop-table col.lop-col-date{width:165px;}
  .lop-table col.lop-col-type{width:150px;}
  .lop-table col.lop-col-category{width:220px;}
  .lop-table col.lop-col-milestone{width:250px;}
  .lop-table col.lop-col-owner{width:220px;}
  .lop-table col.lop-col-status{width:165px;}
  .lop-table col.lop-col-due{width:165px;}
}
@media(max-width:1180px), (pointer:coarse) and (max-width:1366px){
  .lop-workspace.density-auto{
    --lop-font:17px;
    --lop-small-font:12px;
    --lop-control-height:54px;
    --lop-row-height:70px;
    --lop-cell-pad-y:9px;
    --lop-cell-pad-x:9px;
  }
  .lop-editor-toolbar,
  .lop-support-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .lop-editor-tools,
  .lop-view-tabs{
    width:100%;
  }
  .lop-editor-tools{
    justify-content:flex-start;
  }
  .lop-density-select{
    min-height:48px;
  }
  .lop-density-select select,
  .lop-editor-tools button,
  .lop-view-tabs button{
    min-height:48px;
  }
  .lop-support-row .lop-entry-legend{
    flex:0 0 auto;
  }
  .lop-table{
    min-width:1900px;
  }
  .lop-table-shell{
    -webkit-overflow-scrolling:touch;
  }
}
@media(max-width:720px){
  body.lop-focus-mode #taskFilterbar{
    grid-template-columns:1fr;
  }
  .lop-density-select{
    width:100%;
    justify-content:space-between;
  }
  .lop-density-select select{
    flex:1 1 auto;
    min-width:0;
  }
  .lop-editor-tools button{
    flex:1 1 180px;
  }
  .lop-support-row .lop-entry-legend{
    display:none;
  }
}


/* R004.9.0e – Erledigt-Ansicht und LOP-Filterlogik FIX */
#taskKpiGrid .kpi-card-action{cursor:pointer;transition:border-color .16s ease,background .16s ease,transform .16s ease}
#taskKpiGrid .kpi-card-action:hover{border-color:rgba(212,190,111,.52);background:rgba(255,255,255,.045)}
#taskKpiGrid .kpi-card-action:focus-visible{outline:2px solid rgba(212,190,111,.9);outline-offset:2px}
#taskKpiGrid .kpi-card-action:active{transform:translateY(1px)}

/* R004.10.0a – Automatischer Projektverlauf und Aktivitätenjournal */
.activity-filterbar{
  grid-template-columns:minmax(360px,1fr) 230px auto;
}
.activity-note-control button{
  min-height:44px;
  white-space:nowrap;
}
.activity-journal{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:24px;
  min-height:100%;
}
.activity-notice{
  border:1px solid rgba(76,175,80,.34);
  background:rgba(76,175,80,.10);
  color:#c9f0c9;
  border-radius:14px;
  padding:13px 16px;
  font-weight:700;
}
.activity-day-group{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.activity-day-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  padding:0 2px 9px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.activity-day-header h2{
  margin:0;
  font-size:19px;
  color:var(--text);
}
.activity-day-header span{
  color:var(--muted);
  font-size:12px;
}
.activity-timeline{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-left:66px;
}
.activity-timeline::before{
  content:"";
  position:absolute;
  left:25px;
  top:6px;
  bottom:6px;
  width:1px;
  background:linear-gradient(180deg,rgba(166,201,196,.42),rgba(166,201,196,.08));
}
.activity-event{
  position:relative;
  min-width:0;
}
.activity-marker{
  position:absolute;
  left:-66px;
  top:15px;
  z-index:2;
  width:52px;
  display:flex;
  justify-content:center;
}
.activity-marker span{
  min-width:48px;
  min-height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(166,201,196,.34);
  border-radius:999px;
  background:#102126;
  color:#b8d8d3;
  box-shadow:0 8px 20px rgba(0,0,0,.28);
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  padding:6px 8px;
}
.activity-source-milestone .activity-marker span{
  border-color:rgba(216,199,161,.46);
  color:#eadab7;
}
.activity-source-note .activity-marker span{
  border-color:rgba(230,180,80,.42);
  color:#ffe2a0;
}
.activity-source-system .activity-marker span{
  border-color:rgba(174,184,184,.30);
  color:#c9d0d1;
}
.activity-card{
  min-width:0;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.018));
  overflow:hidden;
  transition:border-color .15s ease,background .15s ease,transform .15s ease;
}
.activity-card:hover{
  border-color:rgba(166,201,196,.30);
  background:linear-gradient(145deg,rgba(255,255,255,.06),rgba(255,255,255,.025));
}
.activity-card-header{
  min-height:48px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:10px 16px;
  border-bottom:1px solid rgba(255,255,255,.075);
  background:rgba(0,0,0,.08);
}
.activity-card-heading{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}
.activity-time{
  color:var(--accent2);
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.activity-source-label,
.activity-visibility{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:3px 8px;
  color:var(--muted);
  background:rgba(255,255,255,.035);
  font-size:11px;
  font-weight:700;
}
.activity-visibility{
  color:#ffe2a0;
  border-color:rgba(230,180,80,.30);
  background:rgba(230,180,80,.08);
}
.activity-actor{
  color:var(--muted);
  font-size:13px;
  text-align:right;
}
.activity-card-body{
  padding:16px 18px 17px;
}
.activity-action{
  margin:0 0 5px;
  color:#a6c9c4;
  font-size:12px;
  font-weight:850;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.activity-card h3{
  margin:0;
  color:var(--text);
  font-size:18px;
  line-height:1.35;
}
.activity-description{
  margin:10px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}
.activity-card-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:10px 16px 13px;
  border-top:1px solid rgba(255,255,255,.065);
}
.activity-target-button{
  min-height:38px;
  padding:8px 12px;
}
.activity-empty{
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-align:center;
}
.activity-empty strong{
  color:var(--text);
  font-size:18px;
}
.activity-empty span{
  color:var(--muted);
}
.activity-note-dialog{
  width:min(760px,calc(100vw - 36px));
}
#activityNoteForm{
  padding:24px;
}
#activityNoteText{
  min-height:160px;
  resize:vertical;
  line-height:1.5;
}
#activityNoteMessage{
  min-height:22px;
  margin-top:14px;
  color:#ffcfbf;
}

@media(max-width:1080px){
  .activity-filterbar{
    grid-template-columns:1fr 220px;
  }
  .activity-note-control{
    grid-column:1 / -1;
  }
  .activity-note-control button{
    width:100%;
  }
}
@media(max-width:720px){
  .activity-filterbar{
    grid-template-columns:1fr;
  }
  .activity-timeline{
    padding-left:0;
  }
  .activity-timeline::before{
    display:none;
  }
  .activity-marker{
    position:static;
    width:auto;
    justify-content:flex-start;
    margin-bottom:7px;
  }
  .activity-event{
    display:block;
  }
  .activity-card-header{
    align-items:flex-start;
    flex-direction:column;
  }
  .activity-actor{
    text-align:left;
  }
  .activity-card-actions{
    justify-content:stretch;
  }
  .activity-target-button{
    width:100%;
    min-height:46px;
  }
}


/* R004.10.0b - LOP search filter and status change FIX */
.lop-search-control{
  position:relative;
  width:100%;
}
.lop-search-control #lopSearch{
  width:100%;
  padding-right:46px;
}
.lop-search-clear{
  position:absolute;
  top:50%;
  right:8px;
  width:32px;
  height:32px;
  min-height:32px;
  padding:0;
  transform:translateY(-50%);
  border:1px solid rgba(255,255,255,.16);
  border-radius:9px;
  background:rgba(255,255,255,.055);
  color:var(--text);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.lop-search-clear:hover,
.lop-search-clear:focus-visible{
  border-color:rgba(212,190,111,.72);
  background:rgba(212,190,111,.13);
  outline:none;
}
#taskFilterbar .filter-group{
  border:1px solid transparent;
  border-radius:12px;
  padding:6px;
  margin:-6px;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease;
}
#taskFilterbar .filter-group.is-filter-active{
  border-color:rgba(212,190,111,.64);
  background:rgba(212,190,111,.08);
  box-shadow:0 0 0 1px rgba(212,190,111,.08) inset;
}
#taskFilterbar .filter-group.is-filter-active label::after{
  content:"aktiv";
  display:inline-flex;
  margin-left:7px;
  padding:1px 6px;
  border-radius:999px;
  background:rgba(212,190,111,.17);
  color:#f1dda0;
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.lop-empty .lop-reset-filters{
  margin-top:14px;
  min-height:40px;
  align-self:flex-start;
}
.lop-notice{
  display:flex;
  align-items:center;
  min-height:44px;
}
@media(max-width:720px){
  .lop-search-clear{
    width:38px;
    height:38px;
    min-height:38px;
  }
  .lop-search-control #lopSearch{
    padding-right:52px;
  }
}

/* R004.10.0c - Alle-Status-Filter und vollstaendige Projekt-LOP FIX */

/* R004.11.0a - Dynamisches Projekt-Dashboard und persoenliche Arbeitsuebersicht */
.dashboard-kpi-grid .kpi-card-action{
  cursor:pointer;
}
.dashboard-kpi-grid .kpi-card-action:hover,
.dashboard-kpi-grid .kpi-card-action:focus-visible{
  outline:none;
  border-color:rgba(216,199,161,.72);
  background:rgba(216,199,161,.10);
}
.dashboard-view{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(390px,.82fr);
  gap:18px;
  align-items:start;
  width:100%;
  max-width:1900px;
  margin:0 auto;
}
.dashboard-project-hero{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(360px,1.2fr) minmax(320px,.8fr) auto;
  gap:22px;
  align-items:center;
  padding:24px 26px;
  border:1px solid rgba(216,199,161,.28);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(216,199,161,.10),rgba(70,143,137,.07) 55%,rgba(255,255,255,.025));
  box-shadow:0 16px 44px rgba(0,0,0,.18);
}
.dashboard-overline,
.dashboard-card-header>div>span{
  display:block;
  color:var(--accent2);
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.dashboard-hero-main h2{
  margin:5px 0 5px;
  font-size:29px;
  line-height:1.12;
}
.dashboard-hero-main>p{
  margin:0;
  color:var(--muted);
  font-size:15px;
}
.dashboard-project-facts{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:18px;
}
.dashboard-project-facts span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;
  background:rgba(0,0,0,.16);
  color:var(--muted);
  font-size:12px;
}
.dashboard-project-facts strong{
  color:var(--text);
}
.dashboard-progress-panel{
  padding:16px 18px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:15px;
  background:rgba(3,12,15,.46);
}
.dashboard-progress-panel>div:first-child{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:14px;
}
.dashboard-progress-panel>div:first-child span{
  color:var(--muted);
  font-size:13px;
}
.dashboard-progress-panel>div:first-child strong{
  color:var(--accent2);
  font-size:28px;
}
.dashboard-main-progress,
.dashboard-mini-progress{
  display:block;
  overflow:hidden;
  width:100%;
  border-radius:999px;
  background:rgba(255,255,255,.09);
}
.dashboard-main-progress{
  height:10px;
  margin:10px 0 11px;
}
.dashboard-mini-progress{
  height:6px;
  margin-top:9px;
}
.dashboard-main-progress i,
.dashboard-mini-progress i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
}
.dashboard-progress-panel p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.dashboard-quick-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:190px;
}
.dashboard-quick-actions button{
  width:100%;
  min-height:42px;
}
.dashboard-refresh-button{
  border:0;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-weight:700;
}
.dashboard-refresh-button:hover,
.dashboard-refresh-button:focus-visible{
  color:var(--text);
  outline:none;
}
.dashboard-card{
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(255,255,255,.035);
  box-shadow:0 12px 34px rgba(0,0,0,.12);
}
.dashboard-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px 15px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.dashboard-card-header h2{
  margin:4px 0 0;
  font-size:20px;
  line-height:1.2;
}
.dashboard-card footer{
  display:flex;
  justify-content:flex-end;
  padding:12px 18px 14px;
  border-top:1px solid rgba(255,255,255,.07);
}
.dashboard-text-link{
  border:0;
  padding:0;
  background:transparent;
  color:var(--accent2);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.dashboard-text-link:hover,
.dashboard-text-link:focus-visible{
  color:var(--text);
  outline:none;
}
.dashboard-scope-toggle{
  display:flex;
  padding:3px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:10px;
  background:rgba(0,0,0,.20);
}
.dashboard-scope-toggle button{
  min-height:32px;
  padding:6px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.dashboard-scope-toggle button.is-active{
  background:rgba(216,199,161,.17);
  color:var(--accent2);
}
.dashboard-list,
.dashboard-milestone-list,
.dashboard-activity-list,
.dashboard-warning-list,
.dashboard-compact-list{
  display:flex;
  flex-direction:column;
}
.dashboard-list-row,
.dashboard-milestone-row,
.dashboard-activity-row,
.dashboard-warning-row,
.dashboard-compact-row{
  width:100%;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.065);
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease;
}
.dashboard-list-row:last-child,
.dashboard-milestone-row:last-child,
.dashboard-activity-row:last-child,
.dashboard-warning-row:last-child,
.dashboard-compact-row:last-child{
  border-bottom:0;
}
.dashboard-list-row:hover,
.dashboard-list-row:focus-visible,
.dashboard-milestone-row:hover,
.dashboard-milestone-row:focus-visible,
.dashboard-activity-row:hover,
.dashboard-activity-row:focus-visible,
.dashboard-warning-row:hover,
.dashboard-warning-row:focus-visible,
.dashboard-compact-row:hover,
.dashboard-compact-row:focus-visible{
  outline:none;
  background:rgba(216,199,161,.075);
}
.dashboard-list-row{
  display:grid;
  grid-template-columns:70px minmax(0,1fr) auto;
  gap:13px;
  align-items:center;
  min-height:67px;
  padding:10px 18px;
}
.dashboard-list-code{
  color:var(--accent2);
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
}
.dashboard-list-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.dashboard-list-main strong{
  overflow:hidden;
  color:var(--text);
  font-size:14px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dashboard-list-main small{
  overflow:hidden;
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dashboard-date-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:5px 9px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.dashboard-date-pill.is-critical{
  border-color:rgba(223,103,90,.45);
  background:rgba(223,103,90,.11);
  color:#f4b2a9;
}
.dashboard-date-pill.is-soon{
  border-color:rgba(216,199,161,.42);
  background:rgba(216,199,161,.10);
  color:var(--accent2);
}
.dashboard-date-pill.is-open{
  border-style:dashed;
}
.dashboard-milestone-row{
  display:grid;
  grid-template-columns:70px minmax(0,1fr) 78px;
  gap:13px;
  align-items:center;
  min-height:82px;
  padding:12px 18px;
  border-left:3px solid transparent;
}
.dashboard-milestone-row.is-critical{border-left-color:#df675a;}
.dashboard-milestone-row.is-soon{border-left-color:var(--accent2);}
.dashboard-milestone-row.is-active{border-left-color:var(--accent);}
.dashboard-milestone-row.is-done{border-left-color:#65ad84;}
.dashboard-milestone-main{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.dashboard-milestone-main strong{
  font-size:14px;
  line-height:1.3;
}
.dashboard-milestone-main small{
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
}
.dashboard-milestone-value{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:3px;
}
.dashboard-milestone-value strong{
  color:var(--accent2);
  font-size:19px;
}
.dashboard-milestone-value small{
  color:var(--muted);
  font-size:10px;
  white-space:nowrap;
}
.dashboard-activity-row{
  display:grid;
  grid-template-columns:12px minmax(0,1fr) 150px;
  gap:12px;
  align-items:center;
  min-height:70px;
  padding:10px 18px;
}
.dashboard-activity-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--accent2);
  box-shadow:0 0 0 4px rgba(216,199,161,.08);
}
.dashboard-activity-dot.source-lop{background:#6bb3a9;}
.dashboard-activity-dot.source-milestone{background:#d8c7a1;}
.dashboard-activity-dot.source-note{background:#a98fd0;}
.dashboard-activity-meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  text-align:right;
}
.dashboard-activity-meta strong{
  overflow:hidden;
  width:100%;
  color:var(--text);
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dashboard-activity-meta small,
.dashboard-activity-meta em{
  color:var(--muted);
  font-size:9px;
  font-style:normal;
}
.dashboard-warning-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:57px;
  padding:10px 18px;
}
.dashboard-warning-row span{
  color:var(--text);
  font-size:13px;
}
.dashboard-warning-row strong{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:36px;
  height:30px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(216,199,161,.13);
  color:var(--accent2);
  font-size:14px;
}
.dashboard-warning-row.is-ok strong{
  background:rgba(101,173,132,.12);
  color:#8ed4a9;
}
.dashboard-card-note{
  padding:12px 18px 15px;
  border-top:1px solid rgba(255,255,255,.06);
  color:var(--muted);
  font-size:10px;
}
.dashboard-compact-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:64px;
  padding:10px 18px;
}
.dashboard-compact-row>span{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.dashboard-compact-row strong{
  overflow:hidden;
  max-width:100%;
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dashboard-compact-row small{
  color:var(--muted);
  font-size:10px;
}
.dashboard-compact-row time,
.dashboard-compact-row em{
  flex:0 0 auto;
  color:var(--muted);
  font-size:10px;
  font-style:normal;
  white-space:nowrap;
}
.dashboard-compact-row em{
  color:var(--accent2);
  font-weight:800;
}
.dashboard-summary-strip{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-top:1px solid rgba(255,255,255,.08);
}
.dashboard-summary-strip span{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  padding:12px 8px;
  border-right:1px solid rgba(255,255,255,.07);
  color:var(--muted);
  font-size:9px;
  text-align:center;
}
.dashboard-summary-strip span:last-child{border-right:0;}
.dashboard-summary-strip strong{
  color:var(--text);
  font-size:17px;
}
.dashboard-empty,
.dashboard-loading{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  min-height:150px;
  padding:24px;
  color:var(--muted);
  text-align:center;
}
.dashboard-empty strong,
.dashboard-loading strong{
  color:var(--text);
}
.dashboard-empty span,
.dashboard-loading span{
  font-size:12px;
}
.dashboard-empty-positive{
  background:rgba(101,173,132,.035);
}
.dashboard-loading{
  grid-column:1/-1;
  min-height:320px;
  border:1px dashed rgba(255,255,255,.13);
  border-radius:18px;
}
@media(max-width:1500px){
  .dashboard-view{grid-template-columns:1fr 1fr;}
  .dashboard-project-hero{grid-template-columns:1fr 1fr;}
  .dashboard-quick-actions{grid-column:1/-1;flex-direction:row;min-width:0;}
  .dashboard-quick-actions button{width:auto;}
}
@media(max-width:1120px){
  .dashboard-view{grid-template-columns:1fr;}
  .dashboard-project-hero{grid-template-columns:1fr;}
  .dashboard-quick-actions{grid-column:auto;flex-wrap:wrap;}
  .dashboard-card{grid-column:1;}
}
@media(max-width:760px){
  .portal-content-scroll{padding:14px;}
  .dashboard-project-hero{padding:19px;gap:16px;}
  .dashboard-hero-main h2{font-size:24px;}
  .dashboard-project-facts{flex-direction:column;align-items:stretch;}
  .dashboard-project-facts span{justify-content:space-between;}
  .dashboard-quick-actions{display:grid;grid-template-columns:1fr;}
  .dashboard-quick-actions button{width:100%;min-height:48px;}
  .dashboard-card-header{flex-direction:column;align-items:stretch;}
  .dashboard-scope-toggle{width:100%;}
  .dashboard-scope-toggle button{flex:1;min-height:42px;}
  .dashboard-list-row{grid-template-columns:58px minmax(0,1fr);min-height:82px;}
  .dashboard-date-pill{grid-column:2;justify-self:start;}
  .dashboard-milestone-row{grid-template-columns:58px minmax(0,1fr);}
  .dashboard-milestone-value{grid-column:2;flex-direction:row;align-items:center;justify-content:space-between;}
  .dashboard-activity-row{grid-template-columns:12px minmax(0,1fr);min-height:86px;}
  .dashboard-activity-meta{grid-column:2;align-items:flex-start;text-align:left;}
  .dashboard-summary-strip{grid-template-columns:1fr;}
  .dashboard-summary-strip span{border-right:0;border-bottom:1px solid rgba(255,255,255,.07);}
  .dashboard-summary-strip span:last-child{border-bottom:0;}
}


/* R004.11.0b - Dynamische Seitenleisten-Kurzuebersicht und Direktnavigation */
.sidebar-status-action{
  width:100%;
  margin:0;
  border-left:0;
  border-right:0;
  border-top:0;
  border-radius:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
  transition:background .16s ease,color .16s ease,padding .16s ease;
}
.sidebar-status-action:hover,
.sidebar-status-action:focus-visible{
  background:rgba(78,140,132,.12);
  outline:none;
  padding-left:6px;
  padding-right:6px;
}
.sidebar-status-action:hover span,
.sidebar-status-action:focus-visible span{color:var(--text);}
.sidebar-status-action strong::after{
  content:"›";
  display:inline-block;
  margin-left:7px;
  color:var(--accent2);
  font-size:15px;
  line-height:1;
}
.approvals-view{
  min-height:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-content:start;
  gap:18px;
}
.approvals-hero,
.approvals-card{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.025);
}
.approvals-hero{
  min-height:130px;
  padding:24px 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
}
.approvals-hero h2{margin:4px 0 7px;font-size:27px;}
.approvals-hero p{max-width:780px;margin:0;color:var(--muted);}
.approvals-hero>strong{
  min-width:84px;
  min-height:84px;
  display:grid;
  place-items:center;
  border:1px solid rgba(201,178,109,.34);
  border-radius:50%;
  background:rgba(201,178,109,.08);
  color:var(--accent2);
  font-size:34px;
}
.approvals-card{overflow:hidden;}
.approvals-list{display:flex;flex-direction:column;}
.approvals-row{
  width:100%;
  min-height:78px;
  display:grid;
  grid-template-columns:110px minmax(0,1fr) minmax(180px,260px);
  gap:18px;
  align-items:center;
  padding:15px 20px;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.08);
  border-radius:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}
.approvals-row:hover,
.approvals-row:focus-visible{background:rgba(78,140,132,.1);outline:none;}
.approvals-row-code{font-weight:800;color:var(--accent2);}
.approvals-row-main,
.approvals-row-meta{display:flex;flex-direction:column;gap:5px;min-width:0;}
.approvals-row-main strong{font-size:15px;white-space:normal;}
.approvals-row-main small,
.approvals-row-meta small{color:var(--muted);}
.approvals-row-meta{align-items:flex-end;text-align:right;}
.approvals-row-meta em{font-style:normal;color:var(--accent2);font-weight:800;}
.approvals-footer{padding:16px 20px;display:flex;justify-content:flex-end;}
@media(max-width:900px){
  .approvals-hero{align-items:flex-start;}
  .approvals-row{grid-template-columns:82px minmax(0,1fr);}
  .approvals-row-meta{grid-column:2;align-items:flex-start;text-align:left;}
}
@media(max-width:620px){
  .approvals-hero{padding:20px;}
  .approvals-hero>strong{min-width:64px;min-height:64px;font-size:27px;}
  .approvals-row{grid-template-columns:1fr;padding:16px;gap:8px;}
  .approvals-row-meta{grid-column:1;}
}

/* R004.12.0a - Review- und Freigabebenachrichtigungen per E-Mail */
.settings-view{
  min-height:100%;
  display:flex;
  flex-direction:column;
  gap:18px;
}
.settings-hero,
.settings-card,
.settings-actionbar{
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.025);
}
.settings-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding:25px 27px;
}
.settings-hero h2{margin:4px 0 8px;font-size:28px;}
.settings-hero p{max-width:820px;margin:0;color:var(--muted);line-height:1.55;}
.settings-status-stack{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;}
.settings-status-badge,
.settings-last-test,
.settings-log-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}
.settings-status-badge.is-success,
.settings-last-test.is-success,
.settings-log-status.is-success{border-color:rgba(101,173,132,.35);background:rgba(101,173,132,.1);color:#98dab2;}
.settings-status-badge.is-warning{border-color:rgba(201,178,109,.36);background:rgba(201,178,109,.09);color:var(--accent2);}
.settings-status-badge.is-test{border-color:rgba(98,145,205,.42);background:rgba(98,145,205,.1);color:#9cc4f4;}
.settings-status-badge.is-live{border-color:rgba(213,116,116,.42);background:rgba(213,116,116,.1);color:#efaaaa;}
.settings-status-badge.is-muted,
.settings-log-status.is-muted{opacity:.78;}
.settings-last-test.is-error,
.settings-log-status.is-error{border-color:rgba(213,116,116,.42);background:rgba(213,116,116,.1);color:#efaaaa;}
.settings-notice{
  padding:13px 16px;
  border:1px solid rgba(101,173,132,.33);
  border-radius:12px;
  background:rgba(101,173,132,.08);
  color:#a4dfbc;
  font-size:12px;
  font-weight:700;
}
.settings-notice.is-error{border-color:rgba(213,116,116,.4);background:rgba(213,116,116,.08);color:#efaaaa;}
.settings-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px;
}
.settings-card{padding:22px;min-width:0;}
.settings-card-wide{grid-column:1/-1;}
.settings-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
  padding-bottom:15px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.settings-card-header>div>span{
  color:var(--accent2);
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.settings-card-header h3{margin:4px 0 6px;font-size:20px;}
.settings-card-header p{max-width:760px;margin:0;color:var(--muted);font-size:11px;line-height:1.55;}
.settings-form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
}
.settings-field{display:flex;flex-direction:column;gap:7px;min-width:0;}
.settings-field>span,
.settings-subheading{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.03em;}
.settings-field input,
.settings-field select,
.settings-field textarea{
  width:100%;
  min-height:43px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:9px;
  background:rgba(0,0,0,.18);
  color:var(--text);
  font:inherit;
}
.settings-field textarea{min-height:84px;resize:vertical;line-height:1.5;}
.settings-field input:focus,
.settings-field select:focus,
.settings-field textarea:focus{border-color:rgba(78,140,132,.72);outline:2px solid rgba(78,140,132,.18);}
.settings-field small{color:var(--muted);font-size:9px;line-height:1.45;}
.settings-field-wide{grid-column:1/-1;}
.settings-toggle-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:18px;
}
.settings-switch,
.settings-event-option,
.settings-recipient-option{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:11px;
  background:rgba(255,255,255,.018);
  cursor:pointer;
}
.settings-switch:hover,
.settings-event-option:hover,
.settings-recipient-option:hover{background:rgba(78,140,132,.07);}
.settings-switch input,
.settings-event-option input,
.settings-recipient-option input{width:18px;height:18px;margin:2px 0 0;accent-color:var(--accent);flex:0 0 auto;}
.settings-switch span,
.settings-event-option span,
.settings-recipient-option span{display:flex;flex-direction:column;gap:3px;min-width:0;}
.settings-switch strong,
.settings-event-option strong,
.settings-recipient-option strong{font-size:12px;}
.settings-switch small,
.settings-event-option small,
.settings-recipient-option small{color:var(--muted);font-size:9px;line-height:1.45;}
.settings-switch-test{border-color:rgba(98,145,205,.25);}
.settings-switch-project{margin-bottom:14px;}
.settings-test-row{
  display:grid;
  grid-template-columns:minmax(280px,1fr) auto;
  gap:20px;
  align-items:end;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.08);
}
.settings-test-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:9px;}
.settings-danger-link{
  min-height:38px;
  padding:8px 11px;
  border:1px solid rgba(213,116,116,.28);
  border-radius:8px;
  background:rgba(213,116,116,.06);
  color:#efaaaa;
  cursor:pointer;
}
.settings-danger-link:disabled{opacity:.38;cursor:not-allowed;}
.settings-event-list,
.settings-recipient-list{display:flex;flex-direction:column;gap:9px;}
.settings-recipient-list-scroll{max-height:290px;overflow:auto;padding-right:3px;}
.settings-recipient-option.is-disabled{opacity:.52;cursor:not-allowed;}
.settings-subheading{margin:17px 0 9px;}
.settings-info-note{
  margin:14px 0 0;
  padding:11px 12px;
  border-radius:9px;
  background:rgba(201,178,109,.06);
  color:var(--muted);
  font-size:9px;
  line-height:1.55;
}
.settings-log-table-wrap{overflow:auto;max-height:420px;border:1px solid rgba(255,255,255,.08);border-radius:12px;}
.settings-log-table{width:100%;border-collapse:collapse;min-width:900px;}
.settings-log-table th,
.settings-log-table td{padding:12px 13px;border-bottom:1px solid rgba(255,255,255,.07);text-align:left;vertical-align:top;font-size:10px;}
.settings-log-table th{position:sticky;top:0;z-index:1;background:#17201f;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em;}
.settings-log-table td:nth-child(1){white-space:nowrap;color:var(--muted);}
.settings-log-table td:nth-child(2){min-width:260px;}
.settings-log-table td:nth-child(3){min-width:230px;}
.settings-log-table td strong,
.settings-log-table td small{display:block;}
.settings-log-table td small{margin-top:4px;color:var(--muted);line-height:1.4;}
.settings-empty{
  min-height:150px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:6px;
  color:var(--muted);
  text-align:center;
}
.settings-empty strong{color:var(--text);}
.settings-empty-inline{padding:13px;color:var(--muted);font-size:11px;}
.settings-actionbar{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:18px 21px;
}
.settings-actionbar>div{display:flex;flex-direction:column;gap:4px;max-width:880px;}
.settings-actionbar strong{font-size:12px;}
.settings-actionbar span{color:var(--muted);font-size:9px;line-height:1.5;}
.settings-actionbar .primary{min-width:190px;min-height:44px;}
@media(max-width:1450px){
  .settings-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:1080px){
  .settings-form{grid-template-columns:1fr;}
  .settings-card-wide,.settings-actionbar{grid-column:1;}
  .settings-toggle-row{grid-template-columns:1fr;}
  .settings-test-row{grid-template-columns:1fr;}
  .settings-test-actions{justify-content:flex-start;}
}
@media(max-width:720px){
  .settings-hero{align-items:flex-start;flex-direction:column;padding:20px;}
  .settings-status-stack{justify-content:flex-start;}
  .settings-card{padding:17px;}
  .settings-card-header{flex-direction:column;}
  .settings-form-grid{grid-template-columns:1fr;}
  .settings-field-wide{grid-column:1;}
  .settings-actionbar{align-items:stretch;flex-direction:column;}
  .settings-actionbar .primary{width:100%;}
  .settings-test-actions{display:grid;grid-template-columns:1fr;}
  .settings-test-actions button{width:100%;min-height:46px;}
}

/* R004.12.0a3 - Revisionsfeste E-Mail-Einstellungen und interner Mehrfach-Testversand */
.settings-test-recipient-panel{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.08);
}
.settings-test-recipient-panel>header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:14px;
}
.settings-test-recipient-panel>header span{
  color:#9cc4f4;
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.settings-test-recipient-panel>header h4{margin:4px 0 6px;font-size:16px;}
.settings-test-recipient-panel>header p{max-width:840px;margin:0;color:var(--muted);font-size:10px;line-height:1.55;}
.settings-test-recipient-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
}
.settings-test-recipient-grid .settings-subheading{margin:0 0 9px;}
.settings-resolved-recipients{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-top:14px;
  padding:13px 14px;
  border:1px solid rgba(98,145,205,.26);
  border-radius:11px;
  background:rgba(98,145,205,.06);
}
.settings-resolved-recipients>strong{padding-top:4px;font-size:10px;color:#b8d4f5;white-space:nowrap;}
.settings-resolved-recipients>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;}
.settings-recipient-chip{
  display:inline-flex;
  flex-direction:column;
  gap:2px;
  padding:7px 10px;
  border:1px solid rgba(101,173,132,.3);
  border-radius:9px;
  background:rgba(101,173,132,.08);
}
.settings-recipient-chip strong{font-size:10px;color:#a4dfbc;}
.settings-recipient-chip small{font-size:9px;color:var(--muted);}
.settings-recipient-warning{font-size:10px;color:#efc88a;line-height:1.5;}
.settings-test-recipient-panel .settings-test-actions{
  margin-top:14px;
  justify-content:flex-start;
}
.settings-storage-note{
  margin:14px 0 0;
  padding:11px 13px;
  border:1px solid rgba(101,173,132,.25);
  border-radius:9px;
  background:rgba(101,173,132,.06);
  color:var(--muted);
  font-size:9px;
  line-height:1.55;
  overflow-wrap:anywhere;
}
.settings-storage-note strong{color:#98dab2;}
@media(max-width:1080px){
  .settings-test-recipient-grid{grid-template-columns:1fr;}
  .settings-resolved-recipients{flex-direction:column;}
  .settings-resolved-recipients>div{justify-content:flex-start;}
}
@media(max-width:720px){
  .settings-test-recipient-panel>header{flex-direction:column;}
  .settings-recipient-chip{width:100%;}
}

/* R004.12.0a3 - Doppelter interner Testversand, CC-Kontrollkopie und revisionsfeste Projektdaten */
.settings-log-table{min-width:1180px;}
.settings-log-table td:nth-child(3){min-width:210px;}
.settings-log-table td:nth-child(4){min-width:280px;}
.settings-storage-note br{display:block;content:"";margin-top:5px;}

/* R004.12.0a3a - START_PLAYER und Datenmigration START-FIX */


/* R004.12.0a4 – Medien-Papierkorb und sichere Löschverwaltung */
body.lpms-media-trash-open{overflow:hidden;}
.lpms-media-trash-modal{position:fixed;inset:0;z-index:2400;background:rgba(2,12,15,.78);backdrop-filter:blur(5px);display:grid;place-items:center;padding:24px;}
.lpms-media-trash-dialog{width:min(1180px,96vw);max-height:92vh;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(201,178,109,.34);border-radius:16px;background:#102226;color:#f5f4ed;box-shadow:0 24px 80px rgba(0,0,0,.55);}
.lpms-media-remove-dialog{width:min(720px,94vw);}
.lpms-media-trash-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 28px 20px;border-bottom:1px solid rgba(255,255,255,.1);background:linear-gradient(180deg,rgba(255,255,255,.025),transparent);}
.lpms-media-trash-head h2{margin:4px 0 5px;font-size:26px;line-height:1.15;}
.lpms-media-trash-head p{margin:0;color:#9fb0b2;}
.lpms-media-trash-head .eyebrow{font-size:10px;letter-spacing:.18em;color:#d8c584;font-weight:800;}
.lpms-media-trash-list{overflow:auto;padding:10px 24px 22px;min-height:220px;}
.lpms-media-trash-loading,.lpms-media-trash-empty{padding:56px 20px;text-align:center;color:#a7b5b7;}
.lpms-media-trash-empty strong{display:block;color:#f5f4ed;font-size:18px;margin-bottom:8px;}
.lpms-media-trash-row{display:grid;grid-template-columns:52px minmax(0,1fr) 210px auto;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid rgba(255,255,255,.09);}
.lpms-media-trash-icon{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:rgba(201,178,109,.13);border:1px solid rgba(201,178,109,.32);color:#e8dcae;font-weight:900;font-size:17px;}
.lpms-media-trash-title{display:flex;align-items:baseline;gap:10px;min-width:0;}
.lpms-media-trash-title span{color:#d8c584;font-weight:900;font-size:12px;}
.lpms-media-trash-title strong{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.lpms-media-trash-main small{display:block;color:#8fa4a7;margin-top:4px;}
.lpms-media-trash-main p{margin:8px 0 0;color:#c3cecf;line-height:1.45;}
.lpms-media-trash-meta{display:flex;flex-direction:column;gap:5px;color:#91a5a8;font-size:12px;}
.lpms-media-trash-actions{display:flex;flex-direction:column;gap:8px;min-width:148px;}
.lpms-media-trash-foot{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 28px;border-top:1px solid rgba(255,255,255,.1);background:#0d1d20;color:#91a5a8;font-size:12px;}
.lpms-media-remove-body{padding:24px 28px;display:flex;flex-direction:column;gap:14px;}
.lpms-media-remove-warning{padding:18px;border-radius:12px;background:rgba(201,178,109,.09);border:1px solid rgba(201,178,109,.25);}
.lpms-media-remove-warning strong{display:block;font-size:18px;color:#fff;}
.lpms-media-remove-warning p{margin:8px 0 0;color:#c7d2d3;line-height:1.5;}
.lpms-media-remove-body label{font-weight:800;color:#d7dfdf;}
.lpms-media-remove-body textarea{width:100%;min-height:112px;resize:vertical;border-radius:9px;border:1px solid rgba(255,255,255,.18);background:#071519;color:#fff;padding:13px 14px;font:inherit;}
.lpms-media-remove-notice{font-size:12px;color:#9fb0b2;line-height:1.5;}
.lpms-danger-button{background:#8d2f32!important;border-color:#b84a4e!important;color:#fff!important;}
.lpms-danger-button:hover{background:#a53a3e!important;}
@media(max-width:900px){.lpms-media-trash-row{grid-template-columns:44px minmax(0,1fr);}.lpms-media-trash-meta,.lpms-media-trash-actions{grid-column:2;}.lpms-media-trash-actions{flex-direction:row;flex-wrap:wrap;}.lpms-media-trash-foot{align-items:flex-start;flex-direction:column;}.lpms-media-trash-title{align-items:flex-start;flex-direction:column;gap:3px;}}

/* R004.13.0a1 – Cover- und Linkkonfiguration Speichern FIX */
.online-magazine-view{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:20px;
  padding-bottom:30px;
}
.online-notice{
  padding:14px 18px;
  border:1px solid #b9d8d2;
  border-left:5px solid #2d6d69;
  border-radius:10px;
  background:#eef7f5;
  color:#254d4a;
  font-weight:700;
}
.online-magazine-hero{
  display:flex;
  justify-content:space-between;
  gap:28px;
  align-items:flex-start;
  padding:28px 30px;
  border-radius:16px;
  background:linear-gradient(135deg,#173f42 0%,#285f61 72%,#376f6c 100%);
  color:#fff;
  box-shadow:0 12px 28px rgba(27,62,62,.16);
}
.online-hero-copy{max-width:850px}
.online-hero-copy .participants-intro-eyebrow{color:#d7c78f}
.online-hero-copy h2{margin:7px 0 9px;font-family:"Playfair Display",serif;font-size:30px;line-height:1.18;color:#fff}
.online-hero-copy p{margin:0;color:rgba(255,255,255,.82);font-size:15px;line-height:1.65}
.online-status-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:20px}
.online-status-row>strong{font-size:16px;letter-spacing:.06em}
.online-status-row>small{color:rgba(255,255,255,.7)}
.online-status-pill,.online-review-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  font-weight:800;
  line-height:1.25;
}
.online-status-pill{padding:8px 13px;font-size:13px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.3)}
.online-status-pill.is-draft{background:rgba(255,255,255,.12)}
.online-status-pill.is-ready{background:#d8efe7;color:#245e51;border-color:#d8efe7}
.online-status-pill.is-review{background:#fff0c4;color:#6b5318;border-color:#fff0c4}
.online-status-pill.is-changes{background:#ffe0ad;color:#7c4c13;border-color:#ffe0ad}
.online-status-pill.is-rejected{background:#f3c7c4;color:#7e302f;border-color:#f3c7c4}
.online-status-pill.is-approved,.online-status-pill.is-published{background:#d7efe4;color:#285f4e;border-color:#d7efe4}
.online-hero-actions{min-width:250px;display:flex;flex-direction:column;align-items:stretch;gap:10px}
.online-hero-actions button{min-height:46px}
.online-hero-actions .primary{background:#fff;color:#1c5556;border-color:#fff}
.online-hero-actions .primary:hover{background:#f5f3e9}
.online-action-state{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:1px solid rgba(255,255,255,.35);border-radius:8px;font-weight:800;background:rgba(255,255,255,.11)}
.online-action-state.is-published{background:#d8efe7;color:#245e51;border-color:#d8efe7}
.online-main-grid{display:grid;grid-template-columns:minmax(320px,420px) minmax(0,1fr);gap:20px}
.online-cover-card,.online-config-card,.online-readiness-card,.online-approver-card,.online-decision-card,.online-review-overview,.online-history-card{
  border:1px solid #dce5e2;
  border-radius:14px;
  background:#fff;
  box-shadow:0 7px 19px rgba(28,57,55,.06);
}
.online-cover-card,.online-config-card,.online-readiness-card,.online-approver-card,.online-decision-card{padding:22px}
.online-cover-card>header,.online-config-card>header,.online-readiness-card>header,.online-approver-card>header,.online-decision-card>header,.online-review-overview>header,.online-history-card>header{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:16px;
}
.online-cover-card>header span,.online-config-card>header span,.online-readiness-card>header span,.online-approver-card>header span,.online-decision-card>header span,.online-review-overview>header span,.online-history-card>header span{
  color:#56716e;
  font-size:12px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.online-cover-card>header strong,.online-config-card h3,.online-readiness-card h3,.online-approver-card h3,.online-decision-card h3,.online-review-overview h3,.online-history-card h3{margin:0;color:#1f3533;font-size:20px}
.online-cover-stage{
  min-height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:10px;
  border:1px solid #d5dfdc;
  background:#eef2f1;
}
.online-cover-image{display:block;width:100%;height:100%;max-height:650px;object-fit:contain;background:#e9eeec}
.online-cover-frame{width:100%;height:560px;border:0;background:#e9eeec}
.online-cover-placeholder{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:36px;color:#5d716f}
.online-cover-placeholder span{font-size:18px;font-weight:800;color:#375b58}
.online-cover-placeholder small{max-width:300px;line-height:1.55}
.online-config-card label,.online-decision-card label{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;color:#385452;font-size:13px;font-weight:800}
.online-config-card input,.online-config-card select,.online-decision-card select,.online-decision-card textarea{
  width:100%;
  min-height:46px;
  padding:10px 12px;
  border:1px solid #c7d4d1;
  border-radius:8px;
  background:#fff;
  color:#1d3230;
  font:inherit;
  font-weight:500;
  box-sizing:border-box;
}
.online-decision-card textarea{min-height:105px;resize:vertical;line-height:1.55}
.online-config-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:4px}
.online-change-warning{margin-top:22px;padding:13px 14px;border-radius:8px;background:#f7f4e8;color:#665c39;font-size:13px;line-height:1.55}
.online-config-card dl{display:grid;gap:12px;margin:0}
.online-config-card dl>div{padding:13px 0;border-bottom:1px solid #e4e9e7}
.online-config-card dt{color:#667b78;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.online-config-card dd{margin:5px 0 0;color:#263b39;font-weight:700;overflow-wrap:anywhere}
.online-readiness-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:20px}
.online-check-list{list-style:none;padding:0;margin:0;display:grid;gap:9px}
.online-check-list li{display:grid;grid-template-columns:30px 1fr;align-items:center;gap:10px;padding:11px 12px;border-radius:8px;border:1px solid #dce5e2;background:#f8faf9}
.online-check-list li>span{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;font-weight:900}
.online-check-list li.is-ok>span{background:#dff1e8;color:#34735e}
.online-check-list li.is-open>span{background:#fff0d5;color:#9a651f}
.online-check-list li strong{font-size:14px;color:#2b413f}
.online-readiness-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.online-readiness-counts>div{padding:13px;border-radius:8px;background:#edf4f2;display:flex;flex-direction:column;gap:5px}
.online-readiness-counts span{color:#617774;font-size:12px;font-weight:700}
.online-readiness-counts strong{color:#244643;font-size:15px}
.online-readiness-card details{margin-top:15px;border-top:1px solid #e1e8e6;padding-top:13px}
.online-readiness-card summary{cursor:pointer;color:#2d605c;font-weight:800}
.online-pending-list{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:7px;max-height:250px;overflow:auto}
.online-pending-list li{display:grid;grid-template-columns:100px 1fr;gap:10px;padding:9px 10px;border-radius:7px;background:#fff7e9;color:#5f4b2c}
.online-pending-list li strong{font-size:12px}.online-pending-list li span{font-size:13px}
.online-person-list{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.online-person-chip{display:flex;flex-direction:column;gap:3px;padding:12px 13px;border:1px solid #d6e2df;border-radius:8px;background:#f7faf9}
.online-person-chip strong{color:#284c49}.online-person-chip small{color:#6c7d7b;overflow-wrap:anywhere}
.online-person-chip.is-warning{border-color:#e9c98e;background:#fff7e5}
.online-decision-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.online-final-card{border-color:#c5d5d1;background:linear-gradient(180deg,#fff 0%,#f6faf8 100%)}
.online-decision-card button{width:100%;min-height:46px}
.online-review-overview,.online-history-card{overflow:hidden}
.online-review-overview>header,.online-history-card>header{margin:0;padding:20px 22px;border-bottom:1px solid #dfe7e5;flex-direction:row;align-items:center;justify-content:space-between}
.online-review-overview>header>div,.online-history-card>header>div{display:flex;flex-direction:column;gap:4px}
.online-review-overview>header>strong,.online-history-card>header>strong{font-size:22px;color:#2c605c}
.online-current-list{display:grid;gap:0}
.online-review-current{display:grid;grid-template-columns:190px 1fr;gap:18px;padding:17px 22px;border-bottom:1px solid #e4eae8;align-items:start}
.online-review-current:last-child{border-bottom:0}
.online-review-current>div{display:flex;flex-direction:column;gap:4px}
.online-review-current strong{color:#263d3b}.online-review-current small{color:#70817f}.online-review-current p{margin:8px 0 0;color:#40514f;line-height:1.55}
.online-review-badge{padding:6px 10px;font-size:12px;align-self:start}
.online-review-badge.is-approved{background:#dff1e8;color:#2e6d56}
.online-review-badge.is-changes{background:#fff0d5;color:#8a5c1e}
.online-review-badge.is-rejected{background:#f8dedd;color:#8b3937}
.online-review-badge.is-open{background:#e8efed;color:#506a67}
.online-empty-inline{padding:22px;color:#72827f;text-align:center}
.online-history-list{display:flex;flex-direction:column}
.online-history-row{display:grid;grid-template-columns:170px 1fr;gap:20px;padding:18px 22px;border-bottom:1px solid #e4eae8}
.online-history-row:last-child{border-bottom:0}
.online-history-row.is-current{background:#f4faf7}
.online-history-time{display:flex;flex-direction:column;gap:4px;color:#637875}.online-history-time strong{font-size:13px}.online-history-time span{font-size:12px;font-weight:800;color:#35645f}
.online-history-main{display:flex;flex-direction:column;gap:4px}.online-history-main>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:3px}.online-history-main em{font-style:normal;font-size:11px;color:#71817f;text-transform:uppercase;letter-spacing:.06em}.online-history-main>strong{color:#263d3b}.online-history-main>small{color:#71817f}.online-history-main p{margin:7px 0 0;line-height:1.55;color:#435452}
.online-kpi-status{font-size:16px!important;line-height:1.2}.online-kpi-status.is-approved,.online-kpi-status.is-published{color:#33705b}.online-kpi-status.is-changes,.online-kpi-status.is-rejected{color:#9a4f3b}.online-kpi-status.is-review{color:#986424}
.warning-action{border-color:#d2aa61!important;color:#72531b!important;background:#fff9e9!important}
@media(max-width:1100px){
  .online-main-grid,.online-readiness-grid{grid-template-columns:1fr}
  .online-cover-stage{min-height:360px}
  .online-cover-card{max-width:none}
}
@media(max-width:780px){
  .online-magazine-hero{flex-direction:column;padding:22px}
  .online-hero-actions{width:100%;min-width:0}
  .online-hero-copy h2{font-size:25px}
  .online-decision-grid{grid-template-columns:1fr}
  .online-review-current,.online-history-row{grid-template-columns:1fr;gap:9px}
  .online-readiness-counts{grid-template-columns:1fr}
  .online-cover-stage{min-height:300px}
  .online-cover-frame{height:440px}
}


/* R004.14.0a – Projektpostfach, Nachrichten, Dateianhänge und E-Mail-Benachrichtigungen */
.portal-nav button[data-section="mailbox"]{display:flex;align-items:center;justify-content:space-between;gap:10px}
.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#c9b77d;color:#132525;font-size:12px;font-weight:800}
.mailbox-view{display:block;padding:0 16px 24px;min-width:0}
.mailbox-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 28px;border:1px solid #284240;border-radius:16px;background:linear-gradient(135deg,#17302f,#235f5c);color:#fff}
.mailbox-hero span{display:block;color:#dbc98d;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.mailbox-hero h2{margin:6px 0 4px;font-family:"Playfair Display",serif;font-size:30px}
.mailbox-hero p{margin:0;color:#d8e3e1}
.mailbox-stats{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:10px;margin:14px 0}
.mailbox-stats button{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border:1px solid #2a4240;border-radius:11px;background:#152927;color:#d9e5e3;text-align:left}
.mailbox-stats button.is-active{border-color:#c9b77d;background:#273630;color:#fff}
.mailbox-stats strong{font-size:20px;color:#f0e5bd}
.mailbox-search{margin:0 0 12px}.mailbox-search input{width:100%;min-height:44px}
.mailbox-layout{display:grid;grid-template-columns:minmax(330px,35%) minmax(0,65%);min-height:620px;border:1px solid #29413f;border-radius:14px;overflow:hidden;background:#0f211f}
.mailbox-thread-list{border-right:1px solid #29413f;overflow:auto;max-height:calc(100vh - 300px);min-height:620px}
.mailbox-thread-row{display:block;width:100%;padding:16px 18px;border:0;border-bottom:1px solid #243b39;background:#122522;color:#dce7e5;text-align:left}
.mailbox-thread-row:hover,.mailbox-thread-row.is-active{background:#1d3431}.mailbox-thread-row.is-unread{box-shadow:inset 4px 0 #c9b77d;background:#19302d}
.mailbox-thread-top{display:flex;justify-content:space-between;gap:12px}.mailbox-thread-top strong{font-size:15px;color:#fff}.mailbox-thread-top time{white-space:nowrap;font-size:11px;color:#93a6a3}
.mailbox-thread-meta{display:flex;gap:8px;align-items:center;margin-top:7px;color:#9cb0ad;font-size:11px}.mailbox-thread-meta em{padding:3px 7px;border-radius:999px;background:#304542;color:#eadfb8;font-style:normal}
.mailbox-thread-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:9px;line-height:1.45;color:#c0cfcc;font-size:13px}
.mailbox-empty,.mailbox-detail-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;min-height:300px;padding:28px;color:#91a4a1;text-align:center}
.mailbox-detail{display:flex;flex-direction:column;min-width:0;max-height:calc(100vh - 300px);overflow:auto;background:#132523}
.mailbox-detail-header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid #2a4240;background:#172d2a}
.mailbox-detail-header span{color:#c9b77d;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.mailbox-detail-header h2{margin:4px 0 5px;color:#fff;font-size:23px}.mailbox-detail-header p{margin:0;color:#aabbb8;font-size:13px}.mailbox-detail-actions{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.mailbox-linked{display:flex;gap:8px;flex-wrap:wrap;padding:14px 22px;border-bottom:1px solid #263d3a}.mailbox-link-chip{padding:8px 11px;border:1px solid #3b5753;border-radius:999px;background:#203936;color:#dce8e5}
.mailbox-message-list{padding:20px 22px}.mailbox-message{max-width:86%;margin:0 0 16px;padding:17px 18px;border:1px solid #304744;border-radius:14px;background:#1a302d;color:#e3ecea}.mailbox-message.is-own{margin-left:auto;background:#25423e;border-color:#486d67}
.mailbox-message header{display:flex;justify-content:space-between;gap:12px;margin-bottom:11px}.mailbox-message header div{display:flex;flex-direction:column;gap:2px}.mailbox-message header time,.mailbox-message header>span{color:#91a4a1;font-size:11px}.mailbox-message p{margin:0;line-height:1.65;word-break:break-word}
.mailbox-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.mailbox-attachment{display:flex;align-items:center;gap:10px;padding:9px 11px;border:1px solid #466560;border-radius:9px;background:#10211f;color:#e5eeec;text-decoration:none}.mailbox-attachment span{color:#91a4a1;font-size:11px}.mailbox-delivery{display:block;margin-top:12px;color:#9fb2af}
.mailbox-reply-form{margin-top:auto;padding:18px 22px;border-top:1px solid #2a4240;background:#10211f}.mailbox-reply-form label,.mailbox-compose-grid label{display:flex;flex-direction:column;gap:7px;color:#b9c9c6;font-size:12px}.mailbox-reply-form textarea{width:100%;min-height:110px}.mailbox-reply-form footer{display:flex;justify-content:flex-end;margin-top:12px}
.mailbox-file-field input{padding:10px;border:1px dashed #42615c;border-radius:9px;background:#172c29;color:#dce6e4}.mailbox-file-field small{color:#869b97}
.mailbox-compose-overlay{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(4,15,14,.78)}
.mailbox-compose-dialog{width:min(980px,96vw);max-height:92vh;overflow:auto;border:1px solid #36524e;border-radius:16px;background:#f7faf9;color:#172625;box-shadow:0 24px 80px rgba(0,0,0,.45)}
.mailbox-compose-dialog>header{display:flex;justify-content:space-between;align-items:flex-start;padding:20px 24px;background:#285c59;color:#fff}.mailbox-compose-dialog>header span{color:#eadca9;font-size:11px;text-transform:uppercase;letter-spacing:.1em}.mailbox-compose-dialog h2{margin:4px 0 0;font-family:"Playfair Display",serif;font-size:28px}
.mailbox-compose-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:22px 24px}.mailbox-compose-grid input,.mailbox-compose-grid select,.mailbox-compose-grid textarea{background:#fff;color:#172625;border-color:#c9d5d2}.mailbox-compose-wide,.mailbox-recipient-panel{grid-column:1/-1}.mailbox-recipient-panel>span{display:block;margin-bottom:8px;font-size:12px;font-weight:700}.mailbox-recipient-panel>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;max-height:220px;overflow:auto}
.mailbox-recipient-option{display:flex!important;flex-direction:row!important;align-items:center;gap:10px!important;padding:10px;border:1px solid #d6dfdd;border-radius:9px;background:#fff}.mailbox-recipient-option input{width:18px;height:18px}.mailbox-recipient-option span{display:flex;flex-direction:column}.mailbox-recipient-option small{color:#6d7d7a}
.mailbox-compose-dialog>footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid #dce4e2}.mailbox-compose-dialog .participant-form-message{margin:0 24px}
@media(max-width:1100px){.mailbox-stats{grid-template-columns:repeat(3,1fr)}.mailbox-layout{grid-template-columns:1fr;max-height:none}.mailbox-thread-list{min-height:260px;max-height:340px;border-right:0;border-bottom:1px solid #29413f}.mailbox-detail{max-height:none}.mailbox-compose-grid{grid-template-columns:1fr}.mailbox-recipient-panel>div{grid-template-columns:1fr}}
@media(max-width:700px){.mailbox-view{padding:0 8px 18px}.mailbox-hero{align-items:flex-start;flex-direction:column}.mailbox-stats{grid-template-columns:repeat(2,1fr)}.mailbox-detail-header{flex-direction:column}.mailbox-message{max-width:96%}.mailbox-compose-overlay{padding:8px}.mailbox-compose-grid{padding:16px}.mailbox-thread-top{flex-direction:column}.mailbox-thread-top time{white-space:normal}}

/* R005.0.0b1 – Multi-Projektfähigkeit */
.sidebar-project-switch{margin:10px 0 18px;padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.05)}
.sidebar-project-switch label{display:block;margin:0 0 7px;color:rgba(255,255,255,.65);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.sidebar-project-switch select{width:100%;min-height:38px;padding:7px 9px;border-radius:8px;border:1px solid rgba(255,255,255,.2);background:#fff;color:#183236;font-size:12px;font-weight:700}
.sidebar-project-switch button{width:100%;margin-top:8px;min-height:35px;padding:7px 10px;background:transparent;color:#fff;border-color:rgba(255,255,255,.25)}

.projects-body{min-height:100vh;margin:0;background:#eef3f3;color:#183236;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.projects-shell{width:min(1500px,calc(100% - 48px));margin:0 auto;padding:34px 0 60px}
.projects-header{display:flex;align-items:flex-start;justify-content:space-between;gap:30px;padding:28px 32px;border-radius:18px;background:#fff;box-shadow:0 12px 38px rgba(19,50,55,.08)}
.projects-brand{font-family:"Playfair Display",serif;font-size:32px;color:#244d55;letter-spacing:.08em;margin-bottom:12px}
.projects-header h1{margin:3px 0 7px;font-size:36px;color:#244d55}.projects-header p{margin:0;color:#647b7f}
.projects-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.projects-header-actions button{width:auto;min-height:42px}
.projects-current-user{display:flex;flex-direction:column;min-width:180px;padding:8px 14px;border-left:3px solid #c6a46a}.projects-current-user span,.projects-current-user small{font-size:11px;color:#72878a}.projects-current-user strong{font-size:15px;color:#244d55}
.projects-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:26px 0 18px}
.projects-tabs{display:flex;gap:8px}.projects-tabs button{width:auto;padding:10px 15px;background:#fff;color:#486166;border:1px solid #d9e3e3}.projects-tabs button.active{background:#244d55;color:#fff;border-color:#244d55}.projects-tabs span{display:inline-grid;place-items:center;min-width:24px;height:24px;margin-left:7px;border-radius:999px;background:rgba(198,164,106,.22)}
.projects-search{display:flex;flex-direction:column;gap:6px;min-width:310px;font-size:12px;font-weight:800;color:#486166}.projects-search input{min-height:42px;padding:10px 13px;border:1px solid #cddada;border-radius:10px;background:#fff;font-size:15px}
.projects-notice{min-height:22px;margin:0 0 10px;color:#5d7377}.projects-notice.success{color:#226247}.projects-notice.error{color:#9a2f2f}
.projects-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:20px}
.project-card{display:flex;flex-direction:column;gap:17px;padding:24px;border-radius:16px;background:#fff;border:1px solid #dbe5e5;box-shadow:0 8px 24px rgba(19,50,55,.05)}
.project-card-closed{background:#f8f9f9}.project-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.project-card-head h2{margin:4px 0 0;color:#244d55;font-size:23px;line-height:1.2}.project-card-client{font-size:12px;font-weight:850;letter-spacing:.07em;text-transform:uppercase;color:#9a7a43}
.project-status{display:inline-flex;align-items:center;white-space:nowrap;padding:7px 10px;border-radius:999px;background:#eaf4ef;color:#236146;font-size:12px;font-weight:800}.project-status.status-completed,.project-status.status-archived{background:#e7eaea;color:#5b6b6d}.project-status.status-paused{background:#fff2dc;color:#8b5d12}
.project-card-location{margin:0;color:#657a7e}.project-card-progress>div:first-child{display:flex;justify-content:space-between;margin-bottom:7px;font-size:13px;color:#607579}.project-card-progress .progressbar{height:9px}.project-card-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.project-card-kpis div{padding:12px;border-radius:10px;background:#f2f6f6}.project-card-kpis span{display:block;font-size:11px;color:#718589}.project-card-kpis strong{display:block;margin-top:4px;font-size:22px;color:#244d55}
.project-closed-note{padding:12px 14px;border-radius:10px;background:#fff4e8;border-left:4px solid #d39a44;color:#7e5217;font-size:13px;line-height:1.45}.project-card-actions{display:flex;gap:10px;margin-top:auto}.project-card-actions button{width:auto;flex:1;min-height:42px}
.projects-empty{grid-column:1/-1;display:flex;flex-direction:column;gap:6px;padding:46px;text-align:center;border:1px dashed #bdcccc;border-radius:16px;background:#fff;color:#687d80}.projects-empty strong{font-size:20px;color:#244d55}
.project-dialog{width:min(820px,calc(100vw - 32px))}.project-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.project-form-span-2{grid-column:1/-1}.project-reuse-option{display:flex;align-items:flex-start;gap:12px;margin-top:20px;padding:16px;border-radius:12px;background:#f2f6f6;color:#244d55}.project-reuse-option input{width:20px;height:20px;margin:2px 0 0;accent-color:#244d55}.project-reuse-option span{display:flex;flex-direction:column;gap:4px}.project-reuse-option small{color:#647b7f;line-height:1.45}
.lpms-projects-button{white-space:nowrap}
@media(max-width:900px){.projects-shell{width:min(100% - 24px,1500px);padding-top:16px}.projects-header{flex-direction:column;padding:22px}.projects-header-actions{justify-content:flex-start}.projects-toolbar{align-items:stretch;flex-direction:column}.projects-search{min-width:0}.projects-grid{grid-template-columns:1fr}.project-form-grid{grid-template-columns:1fr}.project-form-span-2{grid-column:auto}}


/* R005.0.0b1 – sichere Projektzugänge */
.participant-beta-option{display:flex;gap:12px;align-items:flex-start;margin:16px 0;padding:14px 16px;border:1px solid rgba(198,164,106,.42);border-radius:12px;background:#fffaf0;color:#27484d}.participant-beta-option input{width:20px;height:20px;margin:2px 0 0;accent-color:#275f62;flex:0 0 auto}.participant-beta-option span{display:grid;gap:3px}.participant-beta-option small{color:#6f7470;line-height:1.45}.participant-beta-badge{display:inline-flex;width:max-content;padding:5px 9px;border-radius:999px;background:#fff3d6;color:#795b13;font-size:11px;font-weight:800}.participant-reset-link-button{border-color:#c89a46!important;color:#7a570e!important}.participant-history-button{opacity:.82}.access-mail-preview-dialog,.access-history-dialog{width:min(760px,calc(100vw - 36px))}.access-mail-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:6px 0 18px}.access-mail-preview-grid>div{display:grid;gap:3px;padding:14px;border:1px solid #dbe5e3;border-radius:10px;background:#f7f9f8}.access-mail-preview-grid span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#71817e;font-weight:800}.access-mail-preview-grid small{color:#73807e}.access-mail-warning,.access-mail-success{display:grid;gap:4px;padding:14px 16px;border-radius:10px;margin-bottom:16px}.access-mail-warning{background:#fff4e4;border:1px solid #e7bd7b;color:#7b4d0c}.access-mail-success{background:#eaf4ef;border:1px solid #b7d6ca;color:#2f6656}.access-history-list{max-height:58vh;overflow:auto;display:grid;gap:8px;padding:4px}.access-history-row{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:start;padding:13px 14px;border:1px solid #dde6e4;border-radius:10px;background:#f8faf9}.access-history-row time{color:#697a77;font-size:12px}.access-history-row div{display:grid;gap:3px}.access-history-row span{color:#667572;font-size:13px}
.access-page-body{min-height:100vh;margin:0;background:linear-gradient(135deg,#17383d,#28545b);display:flex;align-items:center;justify-content:center;padding:24px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183236}.access-page-shell{width:min(610px,100%);background:#fff;border-radius:20px;box-shadow:0 24px 80px rgba(0,0,0,.34);overflow:hidden}.access-page-header{padding:24px 30px;background:#f1f6f5;border-bottom:1px solid #dae4e2;display:flex;justify-content:space-between;align-items:center}.access-brand{font-family:"Playfair Display",serif;font-size:30px;font-weight:700;letter-spacing:.1em;color:#244d55}.access-page-header span{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#6c7e7b;font-weight:800}.access-page-content{padding:30px}.access-page-footer{padding:14px 30px 22px;color:#7a8b88;font-size:12px;text-align:right}.access-state{text-align:center;padding:24px 10px}.access-state h1,.access-form h1{margin:12px 0 8px;color:#214b51;font-size:28px}.access-state p,.access-form>p{color:#637976;line-height:1.55}.access-spinner{width:38px;height:38px;border:4px solid #dce8e5;border-top-color:#2e6568;border-radius:50%;margin:0 auto;animation:accessSpin .8s linear infinite}@keyframes accessSpin{to{transform:rotate(360deg)}}.access-state-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;margin:0 auto;font-size:28px;font-weight:800}.access-state-icon.is-error{background:#fae9e7;color:#9b3e38}.access-state-icon.is-success{background:#e5f2ec;color:#2f715d}.access-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#66817d;font-weight:800}.access-project-card{display:grid;gap:4px;padding:16px 18px;margin:20px 0;background:#f4f8f7;border-left:4px solid #c6a46a;border-radius:10px}.access-project-card span{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#72827f;font-weight:800}.access-project-card strong{font-size:18px;color:#244d55}.access-project-card small{color:#6d7d7a}.access-form label{display:grid;gap:7px;margin:16px 0;color:#244d55;font-weight:750}.access-form input[type=password]{box-sizing:border-box;width:100%;padding:14px;border:1px solid #bfd0cd;border-radius:10px;font-size:20px;letter-spacing:.28em;text-align:center}.access-form label small{color:#788784;font-weight:400;font-size:12px}.access-remember{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:10px!important;font-weight:600!important}.access-remember input{width:19px;height:19px;accent-color:#275f62}.access-primary-button,.access-primary-link{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:100%;padding:14px 18px;border:0;border-radius:10px;background:#275f62;color:#fff;text-decoration:none;font-weight:800;font-size:15px;cursor:pointer}.access-primary-button:disabled{opacity:.58}.access-message{min-height:22px;margin:8px 0;color:#6b5318}.access-message.is-error{color:#9a3434}.access-security-note{display:grid;gap:4px;margin-top:18px;padding:13px 15px;border-radius:10px;background:#fff8e9;border:1px solid #e8cf94;color:#6c561f;font-size:13px;line-height:1.5}.hidden{display:none!important}@media(max-width:650px){.access-page-body{padding:12px}.access-page-content{padding:24px 20px}.access-page-header{padding:20px}.access-page-header span{display:none}.access-mail-preview-grid{grid-template-columns:1fr}.access-history-row{grid-template-columns:1fr}}
