@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&family=Montserrat:wght@500;600&display=swap");
:root{
  font-family:"Manrope","Avenir Next",Avenir,Arial,Helvetica,sans-serif;
  color-scheme:light;
  --bg:#f3f5f8;--surface:#fff;--surface-soft:#f8fafc;--surface-subtle:#fafbfc;
  --text:#172033;--muted:#667386;--border:#dfe4ea;--border-soft:#e6e9ee;
  --primary:#1559b6;--link:#1957a6;--secondary:#687587;--danger:#b42318;
  --ok-bg:#e9f7ee;--ok-text:#176b37;--error-bg:#fdecec;--error-text:#9b1c1c;
  --shadow:0 8px 28px rgba(27,41,65,.06);--progress-bg:#e7e9ed;--progress-fill:#1f5f9f;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0f141c;--surface:#171e28;--surface-soft:#202936;--surface-subtle:#1b2430;
  --text:#edf2f7;--muted:#aeb9c7;--border:#344050;--border-soft:#2b3543;
  --primary:#347bd4;--link:#7fb5ff;--secondary:#596879;--danger:#c53b31;
  --ok-bg:#173727;--ok-text:#8ed7aa;--error-bg:#422124;--error-text:#ffaaaa;
  --shadow:0 8px 28px rgba(0,0,0,.28);--progress-bg:#303b49;--progress-fill:#63a8ff;
}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);transition:background-color .18s ease,color .18s ease}
header{display:flex;justify-content:space-between;align-items:center;padding:14px 28px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}
.header-brand,.brand{display:flex;align-items:center;gap:14px}.logo{max-height:42px;max-width:240px}.brand-text{font-family:"Montserrat","Manrope",Arial,sans-serif;font-size:26px;font-weight:600;letter-spacing:.035em}
nav{display:flex;gap:16px;flex-wrap:wrap;align-items:center}a{color:var(--link);text-decoration:none}a:hover{text-decoration:underline}
.nav-group{position:relative}.nav-group summary{list-style:none;color:var(--link);cursor:pointer;font-family:"Montserrat","Manrope",Arial,sans-serif;font-weight:600}.nav-group summary::-webkit-details-marker{display:none}.nav-group summary:after{content:"▾";display:inline-block;margin-left:6px;font-size:.72em;transition:transform .15s ease}.nav-group[open] summary:after{transform:rotate(180deg)}.nav-group.active>summary{text-decoration:underline;text-underline-offset:5px}.nav-dropdown{position:absolute;right:0;top:calc(100% + 12px);display:grid;min-width:210px;padding:8px;background:var(--surface);border:1px solid var(--border);border-radius:9px;box-shadow:var(--shadow);z-index:30}.nav-dropdown a{display:block;padding:9px 11px;border-radius:6px;white-space:nowrap}.nav-dropdown a:hover{background:var(--surface-soft);text-decoration:none}.nav-dropdown a.active{background:var(--surface-soft)}
.theme-toggle{background:transparent;color:var(--link);border:1px solid var(--border);padding:7px 11px;font-family:"Manrope",Arial,sans-serif;font-weight:600}.theme-toggle:hover{background:var(--surface-soft)}
main{margin:34px auto;padding:0 20px}.narrow{max-width:720px}.wide{max-width:1500px}
.card,.auth-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:28px;box-shadow:var(--shadow)}
.auth-page{display:grid;place-items:center;min-height:100vh;padding:20px}.auth-card{width:min(460px,100%)}.auth-card .brand{justify-content:center;margin-bottom:18px}
h1,h2,h3,.header-brand strong,.brand strong,nav a{font-family:"Montserrat","Manrope",Arial,sans-serif}h1{margin-top:0;font-weight:600}h2{margin-top:0;font-size:1.15rem;font-weight:600}h3{font-weight:500}label{display:block;font-weight:600;margin:14px 0}
input,select,textarea{display:block;width:100%;margin-top:7px;padding:11px 12px;border:1px solid var(--border);border-radius:7px;font:inherit;color:var(--text);background:var(--surface)}
button{background:var(--primary);color:#fff;border:0;border-radius:7px;padding:12px 18px;font:inherit;font-weight:600;cursor:pointer}.muted{color:var(--muted)}
.alert{padding:12px 14px;border-radius:7px;margin:14px 0}.alert.ok{background:var(--ok-bg);color:var(--ok-text)}.alert.error{background:var(--error-bg);color:var(--error-text)}
.auth-link{text-align:center;margin-bottom:0}.table-wrap{overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:10px;margin-top:22px}
table{border-collapse:collapse;width:100%}th,td{padding:11px 12px;border-bottom:1px solid var(--border-soft);text-align:left;vertical-align:top}th{background:var(--surface-soft)}
.num{text-align:right;font-variant-numeric:tabular-nums}.grid-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:0 16px}.button-cell{display:flex;align-items:end;padding-bottom:14px}.title-row{display:flex;justify-content:space-between;align-items:flex-start}
.secondary{background:var(--secondary)}.danger{background:var(--danger)}.action-group{display:flex;gap:8px;flex-wrap:wrap}.button-link{display:inline-block;background:var(--primary);color:#fff;border-radius:7px;padding:10px 14px;font-weight:600;text-decoration:none}.button-link:hover{text-decoration:none;filter:brightness(1.06)}.button-link.small{padding:7px 11px;font-size:.9rem}.secondary-link,.button-link.secondary{background:var(--secondary)}.form-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:18px}
.project-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;margin:1rem 0 2rem}.progress{height:10px;background:var(--progress-bg);border-radius:999px;overflow:hidden}.progress span{display:block;height:100%;background:var(--progress-fill)}.check{display:inline-flex;gap:.35rem;align-items:center;margin-right:.8rem}
.logo-preview{min-height:120px;border:1px dashed var(--border);border-radius:10px;display:flex;align-items:center;justify-content:center;padding:22px;margin:16px 0;background:var(--surface-subtle)}.company-logo{max-height:36px;max-width:120px;object-fit:contain}.company-logo-large{max-height:110px;max-width:320px;object-fit:contain}hr{border:0;border-top:1px solid var(--border);margin:28px 0}
.status-badge{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border-radius:999px;font-size:.88rem;font-weight:700}.status-badge:before{content:"";width:9px;height:9px;border-radius:50%;background:currentColor}.status-green{background:#e9f7ee;color:#176b37}.status-yellow{background:#fff4d6;color:#8a5a00}.status-red{background:#fdecec;color:#9b1c1c}.status-grey{background:#eef1f4;color:#667386}
:root[data-theme="dark"] .status-green{background:#173727;color:#8ed7aa}:root[data-theme="dark"] .status-yellow{background:#463914;color:#ffd873}:root[data-theme="dark"] .status-red{background:#422124;color:#ffaaaa}:root[data-theme="dark"] .status-grey{background:#2a3441;color:#b3bfcd}
@media(max-width:700px){header{align-items:flex-start;gap:12px;padding:12px 16px;flex-direction:column}.logo{max-width:180px}nav{width:100%;gap:12px}.nav-group{position:static}.nav-dropdown{position:absolute;left:12px;right:12px;top:auto;margin-top:9px;min-width:0}main{margin-top:20px;padding:0 12px}.card,.auth-card{padding:20px}}
.site-footer{max-width:1300px;margin:28px auto 18px;padding:0 20px;display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap;color:var(--muted);font-size:.88rem}.site-footer a{color:var(--muted)}.legal h2{margin-top:28px}.legal p{line-height:1.65}

/* BWPM logo contrast in dark mode; company logos remain unchanged. */
:root[data-theme="dark"] .header-brand .logo,
:root[data-theme="dark"] .brand .logo{filter:brightness(0) invert(1)}
.logo{transition:filter .18s ease}

/* BauPulse v12 */
nav a.active{font-weight:600;text-decoration:underline;text-underline-offset:5px}
.webcam-card{margin:1rem 0 1.5rem}.webcam-image{display:block;width:100%;max-height:680px;object-fit:cover;border-radius:10px;background:var(--surface-soft)}.webcam-error-message{display:none}.webcam-error .webcam-image{display:none}.webcam-error .webcam-error-message{display:block}
.metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.metric-grid>div{padding:10px;border-radius:8px;background:var(--surface-soft)}.metric-grid strong{display:block;margin-top:3px}.metric-label{display:block;font-size:.78rem;color:var(--muted)}
.chart-bars{display:grid;gap:8px;margin:16px 0}.chart-bars>div{display:grid;grid-template-columns:42px 1fr 58px;gap:8px;align-items:center;font-size:.82rem}.chart-bars i{height:9px;border-radius:99px;background:var(--progress-bg);overflow:hidden}.chart-bars b{display:block;height:100%;background:#8c98a8}.chart-bars b.actual{background:var(--progress-fill)}.chart-bars em{font-style:normal;text-align:right;font-variant-numeric:tabular-nums}
code{background:var(--surface-soft);padding:.12em .35em;border-radius:4px;overflow-wrap:anywhere}
@media(max-width:600px){.metric-grid{grid-template-columns:1fr}.title-row{gap:12px;flex-direction:column}.webcam-card .button-link{align-self:flex-start}}

/* BauPulse v13 */
.full-span{grid-column:1/-1}.attachment-section{margin-top:18px}.attachment-list,.audit-list{list-style:none;padding:0;margin:16px 0}.attachment-list li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-soft)}.attachment-list form{margin:0}.small-button{padding:6px 10px}.webcam-credit{font-size:.78rem;color:var(--muted);margin-bottom:0}.audit-list li{padding:9px 0;border-bottom:1px solid var(--border-soft)}
@media(max-width:700px){.attachment-list li{grid-template-columns:1fr}.full-span{grid-column:auto}}

/* BauPulse v14 */
.card-gap{margin-top:22px}.check-row{display:flex;align-items:center;gap:10px;margin-top:34px}.check-row input{width:auto;margin:0}.status-pill{display:inline-block;padding:4px 9px;border-radius:999px;font-size:.82rem;font-weight:600}.status-pill.active{background:var(--ok-bg);color:var(--ok-text)}.status-pill.inactive{background:var(--error-bg);color:var(--error-text)}

/* BauPulse 0.15.0 */
.release-card{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:24px;background:linear-gradient(135deg,var(--surface),var(--surface-soft))}.release-card h2{font-size:1.45rem;margin:.25rem 0}.release-card p{margin:.25rem 0 0}.eyebrow{font-family:"Montserrat","Manrope",Arial,sans-serif;text-transform:uppercase;letter-spacing:.11em;font-size:.72rem;color:var(--muted);font-weight:600}.changelog-entry ul{line-height:1.65}.status-pill.pending{background:#fff4d6;color:#8a5a00}.compact-form label{margin:0 0 8px}.compact-form textarea{min-width:220px}.filter-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap;background:var(--surface);border:1px solid var(--border);padding:14px;border-radius:10px}.filter-row label{margin:0;min-width:260px}.action-stack{display:grid;gap:10px}.action-stack .button-link{text-align:center}
@media(max-width:700px){.release-card{align-items:flex-start;flex-direction:column}.compact-form textarea{min-width:0}}

.release-card-lower{margin-top:2rem}


/* BauPulse 0.18.2 */
.project-list{display:grid;gap:12px;margin:18px 0}.project-row{display:flex;justify-content:space-between;align-items:center;gap:20px}.project-child{margin-left:34px;border-left:4px solid var(--primary)}.project-breadcrumb{font-size:.88rem;color:var(--muted);margin-bottom:8px}.child-projects-card{margin-bottom:18px}.child-project-links{display:flex;gap:10px;flex-wrap:wrap}.child-project-links a{display:grid;gap:2px;padding:10px 13px;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft)}.child-project-links span{font-size:.82rem;color:var(--muted)}.webcam-compact{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:22px;align-items:center;margin-bottom:18px}.webcam-thumbnail{display:block;width:280px;height:158px;object-fit:cover;border-radius:9px;background:var(--surface-soft)}.webcam-placeholder{min-height:120px;display:grid;place-items:center;border:1px dashed var(--border);border-radius:9px;color:var(--muted);background:var(--surface-soft)}
@media(max-width:700px){.project-row{align-items:flex-start;flex-direction:column}.project-child{margin-left:14px}.webcam-compact{grid-template-columns:1fr}.webcam-thumbnail{width:100%;height:auto}}

/* BauPulse 0.18.4 */
.project-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:18px;margin:1rem 0 2rem}.project-standalone-card{display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:start}.project-overview-copy h2{margin:.25rem 0 .65rem}.project-overview-copy p{margin:.25rem 0 1rem}.project-family-card{grid-column:1/-1;padding:0;overflow:hidden}.project-family-head{display:grid;grid-template-columns:132px minmax(0,1fr);gap:20px;align-items:center;padding:24px 28px;background:linear-gradient(135deg,var(--surface),var(--surface-soft));border-bottom:1px solid var(--border)}.project-children{padding:22px 28px 28px}.project-children>h3{margin:0 0 14px;color:var(--muted);font-size:.92rem;text-transform:uppercase;letter-spacing:.08em}.project-child-tile{position:relative;display:grid;grid-template-columns:104px minmax(0,1fr);gap:16px;align-items:center;margin-left:24px;padding:14px 16px 14px 30px;border-left:3px solid var(--primary);border-bottom:1px solid var(--border-soft);background:var(--surface-subtle)}.project-child-tile:before{content:"";position:absolute;left:-3px;top:50%;width:22px;border-top:3px solid var(--primary)}.project-child-tile:first-of-type{border-radius:9px 9px 0 0}.project-child-tile:last-child{border-bottom:0;border-radius:0 0 9px 9px}.project-child-copy h3{margin:.2rem 0 .75rem;font-size:1.05rem}.project-overview-webcam,.project-family-webcam,.project-child-webcam{display:grid;gap:4px;color:var(--muted);font-size:.68rem;line-height:1.25;text-decoration:none;align-self:start}.project-overview-webcam{width:112px}.project-family-webcam{width:132px}.project-child-webcam{width:104px}.project-overview-webcam img,.project-family-webcam img,.project-child-webcam img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:7px;background:var(--surface-soft);border:1px solid var(--border)}.project-overview-webcam:hover,.project-family-webcam:hover,.project-child-webcam:hover{text-decoration:none}.project-overview-webcam:hover img,.project-family-webcam:hover img,.project-child-webcam:hover img{filter:brightness(1.06)}
.project-standalone-card.without-webcam,.project-family-head.without-webcam,.project-child-tile.without-webcam{grid-template-columns:minmax(0,1fr)}.project-standalone-card.without-webcam .project-overview-copy,.project-family-head.without-webcam .project-overview-copy,.project-child-tile.without-webcam .project-child-copy{min-width:0;width:100%}.project-child-tile.without-webcam{align-items:start}
@media(max-width:760px){.project-overview{grid-template-columns:1fr}.project-standalone-card{grid-template-columns:96px minmax(0,1fr)}.project-family-head{grid-template-columns:112px minmax(0,1fr);padding:20px}.project-children{padding:18px}.project-child-tile{grid-template-columns:88px minmax(0,1fr);margin-left:10px;padding:14px 14px 16px 24px}.project-overview-webcam{width:96px}.project-family-webcam{width:112px}.project-child-webcam{width:88px}}

/* BauPulse 0.19.0 */
.overall-progress{display:grid;gap:9px;margin:14px 0 18px;min-width:220px}.overall-progress-head{display:flex;justify-content:space-between;align-items:center;gap:14px}.overall-progress-head strong{display:block;font-size:1.35rem;font-family:"Montserrat","Manrope",Arial,sans-serif}.overall-progress-bar{height:12px}.overall-progress-meta{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:.8rem;font-variant-numeric:tabular-nums}.overall-progress small{color:var(--muted);line-height:1.4}.dashboard-progress{max-width:520px}.dashboard-progress.compact{margin:10px 0 14px}.dashboard-progress.compact .overall-progress-head strong{font-size:1.05rem}.dashboard-progress.compact .status-badge{font-size:.75rem;padding:4px 7px}.overall-project-card{display:grid;grid-template-columns:minmax(240px,1fr) minmax(300px,1.2fr);gap:28px;align-items:center;margin-bottom:18px}.overall-project-card .overall-progress{margin:0}.delegation-notice{background:#e8f2ff;color:#174f91;border:1px solid #b9d5f5}.compact-list{margin:0;padding-left:18px}.compact-list li+li{margin-top:5px}.section-heading{margin-top:30px}
:root[data-theme="dark"] .delegation-notice{background:#172f4b;color:#a8d1ff;border-color:#31577e}
@media(max-width:760px){.overall-project-card{grid-template-columns:1fr}.overall-progress-meta{flex-direction:column;gap:3px}.overall-progress-head{align-items:flex-start;flex-direction:column}.project-standalone-card .overall-progress-head,.project-child-tile .overall-progress-head{gap:8px}}

/* BauPulse 0.19.2: ausgewogene Flächen und robuste Dropdown-Navigation */
header{overflow:visible}
header nav{gap:22px;line-height:1.35}
.nav-group summary{padding:7px 3px;white-space:nowrap}
.nav-group:not([open])>.nav-dropdown{display:none!important}
.nav-group[open]>.nav-dropdown{display:grid!important;grid-template-columns:1fr;gap:2px}
.nav-dropdown{top:calc(100% + 8px);line-height:1.4}
.nav-dropdown a{padding:10px 12px}
.project-overview{display:flex;flex-wrap:wrap;align-items:stretch;gap:18px}
.project-standalone-card{flex:1 1 420px;max-width:none}
.project-family-card{flex:1 0 100%}
.project-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.project-children>h3{grid-column:1/-1;margin-bottom:0}
.project-child-tile,.project-child-tile:first-of-type,.project-child-tile:last-child{margin-left:0;border:1px solid var(--border-soft);border-left:3px solid var(--primary);border-radius:9px;padding:18px 20px;align-content:start}
.project-child-tile:before{display:none}
.overall-progress{gap:12px}
.overall-progress-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:18px}
.overall-progress-head>.status-badge{justify-self:end;align-self:end;margin:0 0 2px;white-space:nowrap}
.overall-progress-bar{margin-top:2px}
.overall-progress-meta{display:grid;grid-template-columns:1fr auto;gap:18px;line-height:1.45}
.overall-progress-meta span:last-child{text-align:right}
@media(max-width:760px){header nav{gap:14px}.project-overview{display:grid;grid-template-columns:1fr}.project-children{grid-template-columns:1fr}.overall-progress-head{grid-template-columns:1fr}.overall-progress-head>.status-badge{justify-self:start}.overall-progress-meta{grid-template-columns:1fr;gap:3px}.overall-progress-meta span:last-child{text-align:left}}

/* BauPulse 0.21.0: kompakte Terminprognose */
.forecast-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 12px;margin:14px 0 16px;padding:12px 14px;border:1px solid var(--border);border-radius:9px;background:var(--surface-soft)}
.forecast-summary>div{display:grid;gap:2px}.forecast-summary strong{font-size:.95rem}.forecast-summary small{grid-column:1/-1;color:var(--muted);line-height:1.45}.forecast-summary.compact{padding:10px 11px;margin:11px 0 13px}.forecast-detail{margin:12px 0 14px;padding-top:11px;border-top:1px solid var(--border)}
@media(max-width:620px){.forecast-summary{grid-template-columns:1fr}.forecast-summary small{grid-column:1}.forecast-summary .status-badge{justify-self:start}}

/* BWPM TRACK 0.23.1: breite Verwaltungstabellen und vollständig sichtbare Aktionen. */
.table-wrap table{width:max-content;min-width:100%}
.table-wrap .action-group{display:grid;grid-template-columns:minmax(118px,1fr);min-width:118px;gap:8px}
.table-wrap .action-group>form{width:100%;margin:0}
.table-wrap .action-group>.button-link,
.table-wrap .action-group button{display:block;width:100%;max-width:100%;padding-left:8px;padding-right:8px;text-align:center;white-space:normal;overflow-wrap:anywhere;line-height:1.25}
