.module-modal { z-index: 60; align-items: center; padding: 20px; background: #17261f73; backdrop-filter: blur(6px); }
.module-modal > .module-modal-panel { position: relative; display: block; width: min(100%, 1024px); max-height: 94vh; overflow-y: auto; padding: 0; border: 1px solid #dfe8e1; border-radius: 32px; background: #fbfcfa; box-shadow: 0 32px 90px #102c1f42; }
.module-modal-pv > .module-modal-panel { width: min(100%, 768px); }
.module-modal-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 28px; border-bottom: 1px solid #dfe8e1; background: #fbfcfaf2; backdrop-filter: blur(12px); }
.module-modal-heading .eyebrow { margin: 0; color: #527661; }
.module-modal-heading h2 { margin: 8px 0 0; color: #18271f; font: 600 27px/1.15 "Fraunces", Georgia, serif; }
.module-project-name { margin: 5px 0 0; color: #708073; font-size: 14px; line-height: 1.4; }
.module-close { position: static; display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 12px; color: #496353; font-size: 26px; line-height: 1; transition: background .16s cubic-bezier(.23,1,.32,1), transform .16s cubic-bezier(.23,1,.32,1); }
.module-close:hover { background: #eaf1eb; }
.module-close:active { transform: scale(.96); }
.module-modal-body { padding: 24px 28px 28px; }
.module-split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.module-card { padding: 20px; border: 1px solid #dfe8e1; border-radius: 22px; background: #fff; }
.module-section-heading { display: flex; align-items: flex-start; gap: 10px; }
.module-section-heading h3 { margin: 0; color: #1d3425; font: 600 20px/1.2 "Fraunces", Georgia, serif; }
.module-section-heading p { margin: 4px 0 0; color: #748278; font-size: 12px; line-height: 1.5; }
.module-modal .module-form, .module-modal .module-inline-action { position: static; width: 100%; max-width: none; max-height: none; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.module-modal .module-form { display: grid; gap: 12px; margin-top: 20px; }
.module-form-row, .pv-main-grid, .pv-form-grid, .pv-compact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module-modal label { gap: 7px; color: #58705e; font-size: 12px; font-weight: 700; letter-spacing: .035em; }
.module-modal input, .module-modal select, .module-modal textarea { min-height: 42px; border: 1px solid #dbe5dd; border-radius: 12px; background: #fff; color: #20352a; font-size: 14px; }
.module-modal textarea { min-height: 82px; }
.module-submit { width: 100%; min-height: 42px; border-radius: 12px; }
.module-list { display: grid; gap: 8px; margin-top: 20px; }
.module-list-item { display: flex; align-items: flex-start; gap: 11px; min-height: 58px; padding: 12px; border: 1px solid #e4ebe5; border-radius: 13px; background: #fff; }
.module-list-item > span:first-child { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 9px; background: #eaf3ec; color: #28634d; }
.module-list-item > div { min-width: 0; flex: 1; }
.module-list-item b, .module-list-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: normal; }
.module-list-item b { color: #2a4031; font-size: 13px; }
.module-list-item small { margin-top: 3px; color: #728176; font-size: 11px; line-height: 1.45; }
.module-list-item a { color: #28634d; }
.module-list-item .module-inline-action { width: auto; margin-left: auto; }
.module-list-item .text-button { min-height: 32px; color: #a54a32; font-size: 11px; }
.module-empty { margin: 0; padding: 18px; border-radius: 12px; background: #f5f8f5; color: #76867a; text-align: center; }
.pv-intro-card { display: flex; gap: 13px; padding: 20px; border-radius: 22px; background: #183a2c; color: #fff; }
.pv-intro-card > span { color: #b9d7bd; font-size: 25px; line-height: 1; }
.pv-intro-card h3 { margin: 0; color: #fff; font: 600 20px/1.2 "Fraunces", Georgia, serif; }
.pv-intro-card p { margin: 6px 0 0; color: #d5e6d8; font-size: 14px; line-height: 1.6; }
.pv-plan-form { gap: 18px !important; margin-top: 24px !important; }
.pv-main-grid { gap: 16px; }
.pv-power-card { display: flex; min-height: 86px; flex-direction: column; justify-content: center; padding: 13px 16px; border: 1px solid #dbe5dd; border-radius: 13px; background: #f6f9f6; }
.pv-power-card span { color: #65806b; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pv-power-card strong { margin-top: 5px; color: #245236; font: 600 25px/1.1 "Fraunces", Georgia, serif; }
.module-field-full { grid-column: 1 / -1; }
.pv-details-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid #e2e9e3; }
.pv-details-heading > p { margin: 0; color: #66806d; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pv-details-heading h3 { margin: 5px 0 0; color: #1d3425; font: 600 21px/1.2 "Fraunces", Georgia, serif; }
.pv-details-heading > span { display: block; margin-top: 6px; color: #708073; font-size: 13px; line-height: 1.5; }
.pv-form-grid { gap: 18px; margin-top: 20px; }
.module-modal .pv-form-card { align-content: start; margin-top: 0; padding: 16px; border: 1px solid #dfe8e1; border-radius: 17px; background: #fff; }
.pv-form-card h4 { margin: 0; color: #284330; font-size: 14px; }
.pv-compact-grid { gap: 10px; }
.pv-area-list { margin-top: 18px; }
.electrical-grid, .items-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.plan-grid { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
.module-modal-plans > .module-modal-panel { width: min(100%, 1152px); }
.electrical-form, .item-create-form, .plan-upload-form { gap: 12px !important; }
.module-list-item[data-circuit-status="installed"] > span:first-child { background: #fff1e6; color: #9a4916; }
.module-list-item[data-circuit-status="tested"] > span:first-child { background: #e5f3eb; color: #1f6441; }
.item-filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; margin: 16px 0 0; align-items: end; }
.item-filter-bar label { min-width: 0; }
.item-filter-bar select { width: 100%; }
.item-filter-submit { min-height: 42px; padding: 0 14px; border: 1px solid #dbe5dd; border-radius: 12px; background: #fff; }
.module-count { margin-left: auto; padding: 5px 10px; border-radius: 999px; background: #eaf3ec; color: #28634d; font-size: 10px; font-weight: 800; white-space: nowrap; }
.item-form-fields { display: grid; gap: 12px; }
.item-list .module-list-item { align-items: center; }
.item-list .module-list-item.is-done { border-color: #d9e8dc; background: #f4faf5; }
.item-list .module-list-item.is-done b { color: #75897a; text-decoration: line-through; }
.module-item-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; margin-left: auto; }
.module-item-actions select { min-height: 34px; padding: 5px 28px 5px 9px; font-size: 12px; }
.module-item-actions .text-button { display: grid; width: 34px; min-height: 34px; padding: 0; place-items: center; border-radius: 9px; background: #fbece7; }
.module-plan-list { display: grid; gap: 12px; margin-top: 20px; }
.module-plan-card { padding: 14px; border: 1px solid #e3ebe4; border-radius: 17px; background: #fbfdfb; }
.module-plan-current { display: flex; align-items: center; gap: 11px; }
.module-plan-current > div { min-width: 0; flex: 1; }
.module-plan-current b, .module-plan-current small, .module-plan-current em { display: block; }
.module-plan-current b { color: #2a4031; font-size: 14px; }
.module-plan-current small { margin-top: 3px; color: #75867b; font-size: 11px; }
.module-plan-current em { width: max-content; margin-top: 5px; padding: 3px 8px; border-radius: 999px; background: #eaf3ec; color: #28634d; font-size: 10px; font-style: normal; font-weight: 800; }
.module-plan-current .plan-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: #fce9e2; color: #c05d36; }
.module-plan-current .button-outline, .module-plan-current .download { display: grid; min-width: 34px; min-height: 34px; padding: 0 10px; place-items: center; border-radius: 9px; }
.module-plan-history, .module-plan-new-version { margin-top: 11px; border: 1px solid #e3ebe4; border-radius: 12px; background: #fff; }
.module-plan-history > summary, .module-plan-new-version > summary { padding: 10px 12px; color: #52665a; font-size: 12px; font-weight: 700; cursor: pointer; }
.module-plan-history > div { padding: 4px 9px 9px; border-top: 1px solid #e7ede8; }
.module-plan-history .plan-version { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid #eef2ef; }
.module-plan-history .plan-version:last-child { border-bottom: 0; }
.module-plan-history .plan-version > span { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 8px; background: #edf3ee; color: #28634d; font-size: 11px; font-weight: 800; }
.module-plan-history .plan-version > div { min-width: 0; flex: 1; }
.module-plan-history .plan-version b, .module-plan-history .plan-version small { display: block; overflow: hidden; text-overflow: ellipsis; }
.module-plan-history .plan-version b { color: #344b3b; font-size: 11px; }
.module-plan-history .plan-version small { margin-top: 2px; color: #7c897f; font-size: 10px; }
.module-plan-history .plan-version a { color: #28634d; font-size: 11px; }
.module-plan-new-version .module-form { margin: 0 !important; padding: 12px !important; border-top: 1px solid #e7ede8 !important; }
.module-plan-preview { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; padding: 18px; background: #10251bf2; backdrop-filter: blur(14px); }
.module-plan-preview[hidden] { display: none; }
.module-plan-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; color: #fff; }
.module-plan-preview-header p { margin: 0; color: #bad0c0; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.module-plan-preview-header h2 { margin: 4px 0 0; color: #fff; font: 600 21px/1.2 "Fraunces", Georgia, serif; }
.module-plan-preview-header button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 12px; background: #ffffff1f; color: #fff; font-size: 26px; cursor: pointer; }
.module-plan-preview iframe { min-height: 0; flex: 1; width: 100%; border: 0; border-radius: 14px; background: #fff; }
@media (max-width: 900px) { .electrical-grid, .items-grid, .plan-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .module-split-grid, .pv-form-grid { grid-template-columns: 1fr; } .item-filter-bar { grid-template-columns: 1fr 1fr; } .item-filter-submit { width: 100%; } }
@media (max-width: 520px) { .module-modal { align-items: flex-end; padding: 0; } .module-modal > .module-modal-panel { max-height: 96vh; border-width: 1px 0 0; border-radius: 28px 28px 0 0; } .module-modal-header { padding: 18px 18px 16px; } .module-modal-heading h2 { font-size: 24px; } .module-modal-body { padding: 18px; } .module-card { padding: 16px; border-radius: 18px; } .module-form-row, .pv-main-grid, .pv-compact-grid, .item-filter-bar { grid-template-columns: 1fr; } .pv-intro-card { padding: 17px; border-radius: 18px; } .module-section-heading { flex-wrap: wrap; } .module-count { margin-left: 0; } .module-list-item { flex-wrap: wrap; } .module-item-actions { width: 100%; margin: 2px 0 0 43px; } .module-item-actions form:first-child { flex: 1; } .module-item-actions select { width: 100%; } .module-plan-current { align-items: flex-start; flex-wrap: wrap; } .module-plan-current > div { min-width: calc(100% - 48px); } .module-plan-current .button-outline { margin-left: 45px; } .module-plan-preview { padding: 10px; } }
@media (prefers-reduced-motion: reduce) { .module-close { transition: none; } }

/* Release 1.9.1: individual caption controls stay compact on mobile uploads. */
.attachment-caption-list { display: grid; gap: 10px; margin: 12px 0; }
.attachment-caption-field { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #dbe8de; border-radius: 12px; background: #fbfdfb; }
.attachment-caption-field > span { overflow: hidden; color: #304238; font: 700 13px/1.35 Arial, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.attachment-caption-field > small { color: #718176; font-size: 12px; }
.attachment-caption-field > input { margin-top: 4px; }

/* Release 1.9.2: bounded regeneration status for existing WebP views. */
.web-regeneration-card { margin-top: 16px; padding: 17px; border: 1px solid #dbe8de; border-radius: 17px; background: #fff; }
.web-regeneration-heading { display: flex; gap: 11px; align-items: flex-start; }
.web-regeneration-heading > span { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; background: #eaf3ec; color: #28634d; font-size: 21px; }
.web-regeneration-heading .eyebrow { margin: 0; font-size: 10px; }
.web-regeneration-heading h3 { margin: 3px 0 0; color: #1d3425; font: 600 19px/1.2 "Fraunces", Georgia, serif; }
.web-regeneration-heading p:last-child { margin: 5px 0 0; color: #6a7b70; font-size: 12px; line-height: 1.55; }
.web-regeneration-card form { display: grid; gap: 10px; margin-top: 14px; }
.web-regeneration-progress { padding: 11px; border: 1px solid #dbe8de; border-radius: 12px; background: #f5f9f6; }
.web-regeneration-progress > div { display: flex; justify-content: space-between; gap: 12px; color: #45604e; font-size: 11px; font-weight: 800; }
.web-regeneration-progress > i { display: block; height: 7px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #dce8df; }
.web-regeneration-progress > i > em { display: block; width: 0; height: 100%; border-radius: inherit; background: #28634d; transition: width .2s cubic-bezier(.23,1,.32,1); }
.web-regeneration-progress small { display: block; margin-top: 7px; color: #617367; font-size: 11px; line-height: 1.4; }
.web-regeneration-submit { width: 100%; min-height: 42px; border-radius: 12px; color: #245236; }
.web-regeneration-submit:disabled { cursor: not-allowed; opacity: .6; }

/* Release 1.9.3: local preview and protected public image-name editing. */
.attachment-caption-field { grid-template-columns: 64px minmax(0, 1fr); column-gap: 11px; align-items: center; }
.attachment-caption-field > .attachment-upload-preview { grid-row: span 3; width: 64px; height: 64px; border: 1px solid #d5e4d8; border-radius: 10px; background: #edf3ee; object-fit: cover; }
.attachment-caption-field > input { grid-column: 2; }
.attachment-with-edit { flex-wrap: wrap; }
.attachment-with-edit > a:first-child { min-width: 0; flex: 1; }
.attachment-name-edit, .gallery-name-edit { width: 100%; margin-top: 7px; border-top: 1px solid #e6eee8; }
.attachment-name-edit > summary, .gallery-name-edit > summary { padding: 8px 2px 2px; color: #356544; font-size: 11px; font-weight: 800; cursor: pointer; list-style: none; }
.attachment-name-edit > summary::-webkit-details-marker, .gallery-name-edit > summary::-webkit-details-marker { display: none; }
.attachment-name-edit > form, .gallery-name-edit { display: block; }
.attachment-name-edit label, .gallery-name-edit label { display: grid; gap: 5px; margin-top: 8px; color: #5d7163; font-size: 11px; font-weight: 700; }
.attachment-name-edit input, .gallery-name-edit input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #d7e3d9; border-radius: 10px; background: #fff; color: #263a2d; font-size: 13px; }
.attachment-name-edit small, .gallery-name-edit small { display: block; margin-top: 6px; color: #718176; font-size: 10px; line-height: 1.45; }
.attachment-name-edit .text-button, .gallery-name-edit .text-button { min-height: 30px; margin-top: 7px; padding: 0; color: #28634d; font-size: 11px; }
.gallery-name-edit { margin-top: 8px; }
.gallery-name-edit > summary { padding-top: 8px; }
.gallery-rename-post { display: none; }
@media (max-width: 520px) { .attachment-caption-field { grid-template-columns: 54px minmax(0, 1fr); } .attachment-caption-field > .attachment-upload-preview { width: 54px; height: 54px; } }

/* Release 1.9.4: direct name and caption editing inside gallery cards. */
.gallery-metadata-edit { width: 100%; margin-top: 8px; border-top: 1px solid #e6eee8; }
.gallery-metadata-edit > summary { padding: 8px 2px 2px; color: #356544; font-size: 11px; font-weight: 800; cursor: pointer; list-style: none; }
.gallery-metadata-edit > summary::-webkit-details-marker { display: none; }
.gallery-metadata-edit label { display: grid; gap: 5px; margin-top: 8px; color: #5d7163; font-size: 11px; font-weight: 700; }
.gallery-metadata-edit label small { margin: 0; color: #7a897e; font-size: 10px; font-weight: 500; }
.gallery-metadata-edit input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #d7e3d9; border-radius: 10px; background: #fff; color: #263a2d; font-size: 13px; }
.gallery-metadata-edit > small { display: block; margin-top: 7px; color: #718176; font-size: 10px; line-height: 1.45; }
.gallery-metadata-edit .text-button { min-height: 30px; margin-top: 7px; padding: 0; color: #28634d; font-size: 11px; }
.gallery-metadata-post { display: none; }

/* Release 1.10.1: editable AI Bauphasenvorschläge during image upload. */
.attachment-caption-field > .attachment-phase-label { grid-column: 2; overflow: visible; color: #58705e; font: 700 11px/1.35 Arial, sans-serif; letter-spacing: .02em; text-overflow: clip; white-space: normal; }
.attachment-caption-field > .attachment-phase-label > select { width: 100%; min-height: 37px; margin-top: 4px; border: 1px solid #d5e4d8; border-radius: 9px; background: #fff; color: #304238; font: 400 13px/1.35 Arial, sans-serif; }
.attachment-caption-field > .ai-caption-status { grid-column: 2; }
@media (max-width: 520px) { .attachment-caption-field > .attachment-phase-label, .attachment-caption-field > .ai-caption-status { grid-column: 1 / -1; } }

/* Release 1.11.0: conservative visual self-assessment for editable KI suggestions. */
.ai-caption-confidence { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-top:6px; color:#718176; font:700 10px/1.3 Arial,sans-serif; }
.ai-caption-confidence b { padding:3px 6px; border-radius:999px; font:700 9px/1 Arial,sans-serif; }
.ai-caption-confidence .ai-confidence-high { background:#e6f3ea; color:#286143; }
.ai-caption-confidence .ai-confidence-medium { background:#fff3de; color:#895a18; }
.ai-caption-confidence .ai-confidence-low { background:#f8e9e5; color:#914836; }
