.pro-dashboard,.pro-project-setup{display:none}
.professional.pro-dashboard-open #worksheetWorkspace>:not(#proDashboard):not(#docMode){display:none!important}
.professional.pro-dashboard-open .pro-dashboard{display:block}
.professional.pro-setup-open #worksheetWorkspace>:not(#proProjectSetup):not(#pinDialog):not(#docMode){display:none!important}
.professional.pro-setup-open .pro-project-setup{display:block}
.pro-dashboard-head,.setup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.pro-dashboard-head h1,.setup-head h1{font-size:clamp(1.8rem,4vw,2.5rem)}
.pro-dashboard-actions{display:flex;gap:9px;flex-wrap:wrap}
.pro-dashboard-tools{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:12px;align-items:end;margin-bottom:18px}
.pro-status-filters{display:flex;gap:7px;flex-wrap:wrap}
.pro-filter{border:1px solid #b9bdcd;background:#fff;color:#293548;border-radius:18px;padding:7px 12px;font-weight:700}
.pro-filter.active{background:#293d72;color:#fff;border-color:#293d72}
.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.project-tile{display:flex;flex-direction:column;min-height:275px;border:1px solid #cfd3df;border-top:4px solid #b52a35;border-radius:10px;background:#fff;padding:17px;box-shadow:0 3px 13px #12172a14}
.project-tile.archived{opacity:.72;border-top-color:#7b8190}
.tile-status-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.project-tile h2{font-size:1.12rem;line-height:1.3;margin:10px 0 3px}
.project-facility{color:#5b6475;min-height:24px}
.project-meta{display:grid;gap:5px;margin:9px 0 13px;flex:1;font-size:.9rem}
.project-meta span{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #e0e2e8;padding-top:5px}
.project-meta b{text-align:right}
.project-status,.project-needs{border-radius:16px;padding:4px 9px;font-size:.76rem;font-weight:800}
.project-status{background:#e8edf8;color:#263a77}
.project-status.status-ready-to-submit{background:#e8f0ff;color:#174b86}
.project-status.status-submitted{background:#eee8ff;color:#49318b}
.project-status.status-revisions-requested{background:#fff0d5;color:#704a00}
.project-status.status-approved{background:#dff3e7;color:#175e39}
.project-status.status-completed{background:#dceeea;color:#155c53}
.project-needs.needs-info{background:#fff0d5;color:#704a00}
.project-needs.complete{background:#dff3e7;color:#175e39}
.project-progress{height:7px;border-radius:5px;overflow:hidden;background:#e1e4eb;margin-top:8px}
.project-progress span{display:block;height:100%;background:#b52a35}
.project-progress-label{margin:5px 0 0;color:#5b6475}
.project-card-actions{display:flex;gap:7px;align-items:center}
.project-card-actions .btn{flex:1}
.project-menu{position:relative}
.project-menu summary{list-style:none;width:40px;height:40px;display:grid;place-items:center;border:1px solid #aeb4c3;border-radius:6px;font-size:1.25rem;cursor:pointer}
.project-menu summary::-webkit-details-marker{display:none}
.project-menu-menu{position:absolute;right:0;bottom:45px;width:175px;background:#fff;border:1px solid #cbd0dc;border-radius:8px;padding:6px;box-shadow:0 10px 30px #0003;z-index:20}
.project-menu-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:9px;border-radius:5px;color:#20222a}
.project-menu-menu button:hover{background:#eef1f7}
.project-empty{grid-column:1/-1;text-align:center;padding:42px 20px;border:1px dashed #9ca5b8;border-radius:10px}
.project-editor-bar{display:none;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;padding:12px 14px;border:1px solid #59627a;border-left:4px solid #c8333e;border-radius:8px;background:#1d2434}
.professional:not(.pro-dashboard-open):not(.pro-setup-open) .project-editor-bar{display:flex}
.project-editor-address{font-weight:750}
.editor-project-actions{display:flex;align-items:center;gap:9px}
.status-control{border:1px solid #8491af;background:#293758;color:#fff;border-radius:18px;padding:8px 13px;font-weight:800;cursor:pointer}
.status-dialog{width:min(590px,calc(100vw - 24px))}
.status-guidance{display:grid;gap:3px;margin:10px 0 16px;padding:12px;border-left:4px solid #b52a35;background:#f3f5f9;border-radius:6px}
.status-history{max-height:230px;overflow:auto;margin:16px 0;border-top:1px solid #d9dce5;padding-top:10px}
.status-history h3{font-size:1rem;margin-bottom:8px}
.status-history-row{display:grid;grid-template-columns:1fr auto;gap:3px 12px;padding:8px 0;border-bottom:1px solid #e2e4ea}
.status-history-row small{grid-column:1/-1;color:#5b6475}
.setup-address-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(150px,1fr) 90px 120px;gap:11px}
.setup-lookup-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:13px 0 10px}
.setup-ahj-result{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #cdd2df;border-radius:8px;background:#f3f5f9}
.setup-ahj-result.match{border-left:4px solid #b52a35}
.pro-project-setup .card{max-width:900px}
.profile-dialog{width:min(650px,calc(100vw - 24px));max-height:88vh;overflow:auto;border:1px solid #b9bdcd;border-radius:12px;padding:22px;background:#fff;color:#20222a}
.profile-dialog::backdrop{background:#05070bbd}
.profile-dialog-head{display:flex;justify-content:space-between;gap:12px}
.profile-dialog-head button{border:0;background:transparent;color:inherit;font-size:1.8rem}
.profile-dialog .actions{justify-content:flex-end}
.professional .records-table-card{display:none!important}
#saveProjectProgress{display:block;width:100%;margin:0 0 9px}
#projectSaveState{display:block;margin-bottom:6px}
html[data-theme="dark"] .project-tile{background:#1b1d25;border-color:#3c4251;box-shadow:0 3px 13px #0005}
html[data-theme="dark"] .project-facility,html[data-theme="dark"] .project-progress-label{color:#bac0ce}
html[data-theme="dark"] .project-meta span{border-color:#393d4b}
html[data-theme="dark"] .project-status{background:#293758;color:#eaf0ff}
html[data-theme="dark"] .status-guidance{background:#242833}
html[data-theme="dark"] .status-history,html[data-theme="dark"] .status-history-row{border-color:#434958}
html[data-theme="dark"] .status-history-row small{color:#bac0ce}
html[data-theme="dark"] .project-needs.needs-info{background:#4b3718;color:#ffd78c}
html[data-theme="dark"] .project-needs.complete{background:#163e2a;color:#9be2b9}
html[data-theme="dark"] .project-progress{background:#343946}
html[data-theme="dark"] .setup-ahj-result{background:#242833;border-color:#535a6b}
html[data-theme="dark"] .pro-filter{background:#242833;border-color:#535a6b;color:#fff}
html[data-theme="dark"] .pro-filter.active{background:#435f9e;border-color:#6f8ed0}
html[data-theme="dark"] .project-menu summary{border-color:#646b7c}
html[data-theme="dark"] .project-menu-menu{background:#242833;border-color:#555d70}
html[data-theme="dark"] .project-menu-menu button{color:#fff}
html[data-theme="dark"] .project-menu-menu button:hover{background:#303746}
html[data-theme="dark"] .profile-dialog{background:#1b1d25;border-color:#53596b;color:#fff}
@media(max-width:850px){.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-address-grid{grid-template-columns:2fr 1fr 90px}.setup-street{grid-column:1/-1}}
@media(max-width:620px){.pro-dashboard-head,.setup-head,.project-editor-bar{align-items:stretch;flex-direction:column}.pro-dashboard-actions .btn{flex:1}.pro-dashboard-tools{grid-template-columns:1fr}.project-grid{grid-template-columns:1fr}.project-tile{min-height:250px}.project-editor-bar .btn{width:100%}.editor-project-actions{align-items:stretch;flex-direction:column}.status-control{width:100%}.setup-address-grid{grid-template-columns:1fr 80px 100px}.setup-street{grid-column:1/-1}.setup-address-grid .field:nth-child(2){grid-column:1/-1}.setup-lookup-actions,.setup-ahj-result{align-items:stretch;flex-direction:column}.setup-lookup-actions .btn,.setup-ahj-result .btn{width:100%}.tile-status-row{align-items:flex-start;flex-direction:column}}
