dialog:has(#estimate-file){width:1040px;max-height:90vh;overflow:auto}
dialog:has(#manual-sections){width:1280px;max-width:96vw;max-height:94vh;overflow:auto}
.manual-section>summary{display:flex;gap:14px;flex-wrap:wrap;background:#eff5f1}
.manual-section>summary input{flex:1;min-width:150px;max-width:100%;font-size:16px;font-weight:600;margin:0}
.manual-section-footer{display:flex;gap:16px;justify-content:space-between;align-items:center;padding:14px;flex-wrap:wrap}
.manual-section input[type=checkbox]{width:auto;display:inline;min-width:0}
.manual-section .manual-editor td:first-child{min-width:200px}
.manual-section .manual-editor td:nth-child(2){min-width:75px}
.project-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0;background:none}
.project-tabs button{width:auto;margin:0;border:1px solid #dbe5df;color:#286249;background:#fff;padding:10px 15px}
.estimate-section .table-wrap{overflow-x:auto}
.project-chat{margin-top:24px;scroll-margin-top:15px}
.chat-shell{display:grid;grid-template-columns:220px minmax(0,1fr);border:1px solid #dce6df;border-radius:9px;overflow:hidden}
.chat-room-list{padding:12px;background:#f3f7f4;border-right:1px solid #dce6df;max-height:620px;overflow-y:auto}
.chat-room-list button{width:100%;text-align:left;margin:5px 0;overflow-wrap:anywhere}
.chat-room-list button.active{background:#dceee3;border-color:#96c1a4}
#chat-thread{min-width:0;padding:16px}
.chat-thread-title{font-weight:600;margin-bottom:12px}
.chat-messages{height:390px;height:min(50dvh,450px);min-height:220px;overflow:auto;overscroll-behavior:contain;padding:8px;scrollbar-gutter:stable}
.chat-message{border-radius:10px;background:#f0f4f2;margin:10px 0;padding:12px;max-width:90%;overflow-wrap:anywhere}
.chat-message.own{background:#e1f1e7;margin-left:auto}
.chat-message p{white-space:pre-wrap;margin:8px 0}
.chat-author,.chat-message time{font-size:11px;color:#5e796b}
.chat-photo,.chat-video{max-width:100%;max-height:300px;border-radius:6px;display:block;margin:8px 0}
.chat-file{display:block;font-size:12px;margin:7px 0;overflow-wrap:anywhere}
.chat-composer{margin-top:16px;border-top:1px solid #dce6df;padding-top:14px}
.chat-text-label{display:block;color:#62766a;font-size:12px}
.chat-composer textarea{width:100%;resize:vertical;min-height:80px;max-height:220px;margin-top:6px;font:inherit;padding:10px;border:1px solid #cddbd2;border-radius:7px}
.chat-compose-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.chat-upload-label{font-size:12px;flex:1;min-width:150px}
.chat-upload-label input{width:100%;display:block;margin-top:5px;font-size:12px}
#chat-selected-files{font-size:12px;color:#476658;overflow-wrap:anywhere;margin-top:8px}
#chat-error{color:#a23122;white-space:pre-wrap}
#chat-error:empty{display:none}
.unread-count{display:inline-block;background:#27684d;color:#fff;padding:3px 7px;border-radius:10px;font-size:11px;margin:5px}
.unread-count[hidden]{display:none}
@media(max-width:700px){
  html,body{max-width:100%;overflow-x:hidden}
  button,input,textarea,select{font-size:16px}
  .project-cards{grid-template-columns:1fr}
  .project-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px}
  .project-tabs button{white-space:nowrap;min-height:44px;flex-shrink:0}
  .chat-shell{grid-template-columns:1fr}
  .chat-room-list{display:flex;overflow-x:auto;border-right:0;border-bottom:1px solid #dce6df;gap:8px;padding:8px}
  .chat-room-list button{width:auto;min-width:165px;min-height:44px;margin:0}
  .project-chat{padding:12px}
  #chat-thread{padding:10px}
  .chat-message{max-width:96%;font-size:15px}
  .chat-compose-actions button{min-height:44px}
  .chat-composer{padding-bottom:env(safe-area-inset-bottom,0px)}
  .manual-editor table,.manual-editor tbody,.manual-editor tr{display:block;min-width:0;width:100%}
  .manual-editor thead{display:none}
  .manual-editor tr{padding:12px;border-bottom:2px solid #dce6df}
  .manual-editor td{display:grid;grid-template-columns:115px minmax(0,1fr);gap:8px;align-items:center;padding:7px 0;border:0;min-width:0!important}
  .manual-editor td[data-label]::before{content:attr(data-label);font-size:12px;color:#57725e}
  .manual-editor td:last-child{display:flex;justify-content:flex-end}
  .manual-editor input{width:100%;min-width:0;font-size:16px}
  .manual-editor td label{grid-column:2}
  .manual-section button,.project-card button{min-height:44px}
  .manual-section>summary{padding:10px;gap:8px}
}
.manual-editor{overflow-x:auto}
.manual-editor table{min-width:1050px}
.manual-editor input{min-width:70px;margin:0}
.manual-editor td:nth-child(2){min-width:210px}
.manual-editor td:first-child{min-width:160px}
.manual-editor label{margin:6px 0}
.manual-editor input[type=checkbox],input[data-select-work],input[data-select-section],#team-options input,#planning-refs input{display:inline;width:auto;margin-right:8px;min-width:0}
.project-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px}
.project-card button{display:block;margin-top:20px}
.project-team,.project-planning{margin:20px 0}
.team-chip{display:inline-block;background:#edf3ef;padding:8px 12px;border-radius:7px;margin:4px}
.estimate-tools{margin:15px 0;flex-wrap:wrap}
.estimate-tools>div{display:flex;gap:8px;flex-wrap:wrap}
.price-warnings:empty{display:none}
.price-warnings:not(:empty){background:#fff1db;border:2px solid #d49a46;border-radius:8px;padding:12px 16px;margin:16px 0;color:#704614;font-weight:600}
.price-warnings p{margin:8px 0}
.price-auto{display:block;background:#fff0bf;color:#785615;border-radius:4px;padding:4px;margin-top:5px;font-size:11px}
.zero-price{background:#fff0e5;color:#9d3f20}
.review-highlight{outline:2px solid #c7852c;outline-offset:-2px}
.inline.text-button{display:inline;margin-left:5px}
.overdue{border-left:4px solid #c65d35;padding-left:12px}
#team-options,#planning-refs{max-height:340px;overflow:auto}
#role-preview[hidden]{display:none}
#role-preview{margin-left:auto;background:#fff;border:1px solid #d7e3dc;border-radius:10px;padding:10px 14px;max-width:100%}
.preview-label{display:block;color:#697e74;font-size:11px;margin-bottom:8px}
.preview-controls{display:flex;gap:12px;flex-wrap:wrap}
.preview-controls label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#63766c;flex:1;min-width:140px}
.preview-controls select{width:100%;min-width:0;max-width:260px;font-size:13px;padding:8px}
.role-project{margin-bottom:18px}
.rework-badge{background:#fbe9df;color:#994b2e;margin:5px 0}
.work-state{display:table;margin:5px 0;background:#edf1f2;color:#576b63}
.rework-warning p{white-space:pre-wrap;overflow-wrap:anywhere}
.work-actions{min-width:160px}
.work-actions button{display:block;margin:5px 0}
.work-history{font-size:12px;margin-top:12px;min-width:210px}
.work-history>summary{cursor:pointer;color:#48745d}
.work-event{padding:12px 0;border-bottom:1px solid #e2e8ea;white-space:normal}
.work-event small{display:block;color:#718078;margin:5px 0}
.work-event p{white-space:pre-wrap;overflow-wrap:anywhere}
.rework-photo{display:block;margin:5px 0;overflow-wrap:anywhere}
.role-estimate{margin-top:16px;border-top:1px solid #e2e8ea;padding-top:14px}
.role-estimate .table-wrap{overflow-x:auto;margin-top:16px}
.role-estimate>summary{cursor:pointer;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
#development-setup{max-width:420px}
#development-setup label{display:block;margin:16px 0;color:#64757c;font-size:12px}
#development-setup input{display:block;width:100%;margin-top:7px}
@media(max-width:900px){header{flex-wrap:wrap}#role-preview{margin-left:0;flex-basis:100%}.preview-controls select{max-width:none}}
#estimate-preview{margin-top:22px}
#estimate-preview input[type=checkbox]{display:inline;width:auto}
#error:empty,#form-error:empty{display:none}
#error,#form-error{color:#a23122;margin:16px 0}
.project-hero .badge{align-self:flex-start}
input[type=file]{max-width:100%}
.estimate-section{border:1px solid #dde6e1;border-radius:8px;margin:14px 0;overflow:hidden}
.estimate-section summary{display:flex;align-items:center;gap:18px;cursor:pointer;background:#eff5f1;padding:17px}
.estimate-section summary span:first-child{flex:1;font-weight:600}
.estimate-section progress{width:100px;accent-color:#23805e}
.subtotal{background:#f5f8f6;font-weight:600}
.estimate-total{display:flex;justify-content:space-between;font-size:21px;padding:25px 12px;border-top:2px solid #c6dbce}
.approval-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.export-menu{padding:15px;border:1px solid #dce5df;border-radius:8px;margin:20px 0}
.export-menu summary{cursor:pointer;font-weight:600}
a{color:#17674d}
.estimate-card{background:white;border:1px solid #dfe5ec;border-radius:10px;margin:18px 0;overflow:visible}
.estimate-card>summary{display:flex;align-items:center;gap:15px;padding:17px 20px;cursor:pointer;border-radius:10px}
.estimate-card>summary>span:nth-child(3){flex:1}
.estimate-card[open]>summary{border-bottom:1px solid #e4e9ee;border-radius:10px 10px 0 0}
.estimate-body{padding:4px 20px 22px}
.estimates-heading{margin-top:26px}
.estimate-section summary,.estimate-card>summary{position:relative;isolation:isolate;background:#fff}
.estimate-section summary>*:not(.progress-tint),.estimate-card>summary>*:not(.progress-tint){position:relative;z-index:1}
.estimate-section summary>span:nth-child(2){flex:1;font-weight:600}
.progress-tint,.estimate-section .progress-tint{position:absolute;inset:0;width:100%;height:100%;border:0;appearance:none;-webkit-appearance:none;z-index:0;pointer-events:none;border-radius:inherit;overflow:hidden;background:transparent;color:#fff4dc}
.progress-tint::-webkit-progress-bar{background:transparent}
.progress-tint::-webkit-progress-value{background:#fff4dc}
.progress-tint::-moz-progress-bar{background:#fff4dc}
.progress-tint.complete::-webkit-progress-value{background:#e0f6ef}
.progress-tint.complete::-moz-progress-bar{background:#e0f6ef}
.done-check{color:#10aa89;font-weight:700}
.work-complete{background:#e6f7f0}
.work-partial{background:#fff8e9}
.expand-arrow{color:#6e72c9}
details[open]>summary>.expand-arrow{transform:rotate(180deg)}
.estimate-group-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 24px;padding:25px 4px;font-size:12px;line-height:1.6}
.estimate-group-summary span{color:#687e9a}
.text-button{border:0;background:transparent;padding:1px 0;color:#7275c8;font-size:12px;display:block}
.estimate-group-summary .text-button{margin-top:4px}
.estimate-bottom{padding:2px 4px}
.estimate-bottom p{margin:8px 0}
.estimate-bottom p .text-button{display:inline;margin-left:12px}
.estimate-bottom .estimate-total{border:0;justify-content:flex-start;gap:15px;padding:15px 0}
.estimate-footer-actions{display:flex;justify-content:flex-end;align-items:flex-start;gap:12px;margin-top:18px;flex-wrap:wrap}
.export-menu{margin:0;padding:0;position:relative;border:1px solid #dce5df;background:white;z-index:4}
.export-menu>summary{padding:10px 15px}
.export-options{padding:15px;min-width:280px;max-width:90vw;display:grid;gap:18px}
.export-options a{display:block;background:#f2f4f7;border-radius:6px;padding:10px 12px;margin:7px 0;font-size:12px;text-decoration:none;color:#52677c}
.export-options a:hover{background:#e5f3ed;color:#18674d}
.analytics-lines>div{display:flex;gap:20px;justify-content:space-between;border-bottom:1px solid #e4e9e7;padding:13px 0;font-size:13px}
.analytics-lines strong{white-space:nowrap}
@media(max-width:1100px){.estimate-group-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.estimate-card>summary{flex-wrap:wrap}.estimate-card>summary>span:nth-child(3){flex-basis:60%}.estimate-body{padding:4px 10px 15px}.estimate-group-summary{grid-template-columns:1fr}.estimate-footer-actions{justify-content:flex-start}}
@media(max-width:700px){.estimate-section summary{flex-wrap:wrap}.estimate-section summary span:first-child{flex-basis:100%}.estimate-total{font-size:17px}}
@media(max-width:700px){
  .preview-controls select,dialog input:not([type=checkbox]),dialog select,dialog textarea,.chat-upload-label input,.chat-composer textarea{font-size:16px}
  .estimate-section td button{min-height:44px;padding:9px 12px}
  .project-chat .toolbar{align-items:flex-start;flex-wrap:wrap}
  .manual-section>summary .manual-section-total{font-size:14px}
}
.document-card{border:1px solid #dce5df;border-radius:12px;padding:16px;margin:12px 0}.document-card h3{margin-top:0}.document-card .approval-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.manual-room{border-left:3px solid #d4e5db;padding:12px;margin:12px 0}.manual-room>label{display:block;max-width:420px;margin-bottom:12px}.manual-room>button{margin:4px 0 14px}.agreement-edit-row{border:1px solid #dce5df;border-radius:10px;margin:12px 0;padding:14px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.chat-compose-actions>button{min-width:44px;min-height:44px}.chat-attachments audio,#chat-selected-files audio{display:block;width:min(100%,310px);margin:8px 0}.chat-upload-label[hidden],.chat-composer input[hidden],.chat-composer button[hidden]{display:none!important}.document-card small,#documents-content td small{display:block}.chat-compose-actions{flex-wrap:wrap}
@media(max-width:640px){.agreement-edit-row{grid-template-columns:1fr}.document-card{padding:12px}.document-card .approval-actions button{flex:1 1 140px}.manual-room{padding:8px}.chat-compose-actions{gap:6px}.chat-compose-actions #chat-send{margin-left:auto}.chat-text-label textarea{min-height:70px;font-size:16px}#documents-content input{max-width:100%;min-width:75px}}
.chat-composer{position:relative}.chat-attachment-menu{position:absolute;bottom:100%;left:0;right:0;z-index:5;background:#fff;border:1px solid #d3dfd9;box-shadow:0 -4px 24px #16372b22;border-radius:18px;padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.chat-attachment-menu[hidden]{display:none}.chat-attachment-menu strong{grid-column:1/-1}.chat-attachment-menu button{padding:16px 10px;text-align:left;min-height:48px}.finance-entry{border-bottom:1px solid #dce5df;padding:12px 0}.finance-balances{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.finance-balances .document-card{margin:0 0 12px}#project-documents [hidden]{display:none!important}
#content [hidden]{display:none!important}.project-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;border-bottom:1px solid #d8e2dd;padding:6px 0;margin:12px 0 20px;scrollbar-width:thin}.project-tabs button{flex:none;border:0;border-radius:0;background:transparent;padding:12px 14px;border-bottom:3px solid transparent;white-space:nowrap}.project-tabs button.active{border-bottom-color:#408263;color:#206244;background:#eef7f0}.document-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.document-tabs .active{background:#e5f2e9;border-color:#609074}.customer-totals,.overview-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:16px 0}.customer-totals>div,.overview-metrics>div{padding:14px;border-radius:10px;background:#f0f6f2}.customer-totals strong,.overview-metrics strong{display:block;font-size:21px;margin-top:8px}.file-card{display:flex;align-items:center;gap:12px;border-bottom:1px solid #dce5df;padding:14px 0}.file-card>div{flex:1;overflow-wrap:anywhere}.action-error{flex-basis:100%;max-width:100%;margin:10px 0}#document-viewer{width:min(1100px,96vw);max-width:96vw;height:92vh;max-height:94vh;padding:16px;border:1px solid #cfded4;border-radius:14px}#document-viewer::backdrop{background:#11281dbb}.viewer-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.viewer-toolbar strong{flex:1;min-width:150px}.viewer-toolbar button{min-height:42px;min-width:42px}#viewer-pages{height:calc(100% - 112px);overflow:auto;background:#e6ebe8;padding:12px;text-align:center}#viewer-canvas{display:block;margin:0 auto;max-width:none;background:white}.viewer-image{max-width:100%;height:auto}.viewer-image.zoom-125{max-width:none;width:125%}.viewer-image.zoom-150{max-width:none;width:150%}.viewer-image.zoom-175{max-width:none;width:175%}.viewer-image.zoom-200{max-width:none;width:200%}.viewer-image.zoom-75{width:75%}.viewer-image.zoom-50{width:50%}
@media(max-width:640px){.project-tabs{gap:0}.project-tabs button{padding:12px 11px}.file-card{flex-wrap:wrap}.file-card>div{flex-basis:100%}#document-viewer{padding:10px;height:94vh}.viewer-toolbar strong{flex-basis:100%}.customer-totals{grid-template-columns:1fr 1fr}}

.qr-scanner{position:fixed;inset:5%;background:white;z-index:9999;padding:20px;overflow:auto;border:2px solid #173e32;border-radius:12px}.qr-scanner video{width:100%;max-height:65vh;object-fit:contain}input[type=checkbox]{width:auto;display:inline-block}.document-card a{display:inline-block;margin:8px}.document-card{overflow-wrap:anywhere}

.purchase-group-heading{padding:16px;background:#eaf2ed;border-radius:12px;margin-top:24px}.purchase-total{font-size:20px;font-weight:700}.discard-dialog{max-width:420px;border:1px solid #bfd0c4;border-radius:14px}.discard-dialog::backdrop{background:#10271ccc}

.financial-workspace{padding:24px}.financial-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}.financial-tabs{display:flex;flex-wrap:wrap;gap:4px}.financial-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;min-height:44px;padding:10px 14px}.financial-tabs button.active{border-color:#347456;color:#1f6045;background:#eef5f0}.financial-actions{display:flex;gap:8px;flex-wrap:wrap}.financial-period,.financial-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:20px 0}.financial-period label,.financial-filters label{margin:0;flex:1;min-width:140px;max-width:240px;font-size:12px;color:#576b60}.financial-period input,.financial-period select,.financial-filters input,.financial-filters select{min-height:42px;margin-top:6px}.financial-filters .financial-search{flex:2;max-width:none;min-width:220px}.financial-operation-menu{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;background:#f1f6f2;border:1px solid #dbe5df;padding:12px;margin-top:12px;border-radius:12px}.financial-operation-menu button{text-align:left;min-height:44px}.financial-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:18px 0}.financial-metric{padding:16px 18px;background:#f3f6f4;border:1px solid #e4ebe6;border-radius:10px}.financial-metric span{display:block;color:#57685f;font-size:13px}.financial-metric strong{display:block;font-size:23px;margin-top:8px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.financial-metric.emphasis{background:#e9f3ed;border-color:#bdd3c5}.financial-date{font-size:15px;margin:26px 0 10px}.financial-line{display:grid;grid-template-columns:32px minmax(0,1fr) auto;width:100%;gap:14px;align-items:center;padding:15px 16px;min-height:74px;background:#f5f7f5;border:0;border-radius:8px;text-align:left;margin:4px 0;color:#183e2c}.financial-line:nth-of-type(even){background:#fff}.financial-line:hover,.financial-debt-card:is(button):hover{background:#eaf2ed}.financial-line:focus-visible,.financial-debt-card:focus-visible{outline:2px solid #377354;outline-offset:2px}.financial-dot{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e7eee9;font-size:17px}.financial-line-main{min-width:0;display:grid;gap:4px}.financial-line-main strong{font-size:14px;font-weight:600;overflow-wrap:anywhere}.financial-line-main small{font-size:12px;color:#5d7064;overflow-wrap:anywhere}.financial-amount{font-weight:600;font-size:16px;white-space:nowrap;font-variant-numeric:tabular-nums}.positive{color:#168254}.negative{color:#924738}.financial-debt-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:14px 0 28px}.financial-debt-card{display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid #dbe5dd;border-radius:10px;background:white;text-align:left;min-width:0;overflow-wrap:anywhere;color:#1e4330}.financial-debt-card>strong{font-size:15px}.financial-debt-card small{font-size:12px;color:#63766a}.financial-debt-card span{font-size:14px}.financial-shortcuts{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.financial-empty{padding:40px 10px;text-align:center;color:#607568}.accrual-line{grid-template-columns:minmax(0,1fr) auto}.financial-accrual-history{margin-top:24px}.financial-workspace .muted{line-height:1.6}#financial-loading{color:#62776a;font-size:13px;min-height:18px}.financial-workspace input,.financial-workspace select{font-size:14px}
@media(max-width:640px){.financial-workspace{padding:14px}.financial-heading{display:block}.financial-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px}.financial-tabs button{flex:none;padding:10px}.financial-actions{margin:12px 0}.financial-actions button{min-height:44px;flex:1}.financial-summary{grid-template-columns:1fr 1fr;gap:8px}.financial-metric{padding:12px}.financial-metric strong{font-size:18px}.financial-period,.financial-filters{gap:8px}.financial-period label,.financial-filters label{min-width:calc(50% - 8px);max-width:none}.financial-filters .financial-search{min-width:100%}.financial-period>button,.financial-filters>button{min-height:44px}.financial-line{padding:12px 8px;gap:8px;grid-template-columns:26px minmax(0,1fr) auto}.financial-amount{font-size:14px}.financial-line-main strong{font-size:13px}.financial-debt-grid{grid-template-columns:1fr}.accrual-line{grid-template-columns:minmax(0,1fr) auto}.financial-accrual-history summary{min-height:44px}.result-summary{grid-template-columns:1fr}}

.financial-breakdown{border-top:1px solid #dfe8e1;margin:12px 0;padding:12px 0}.financial-breakdown>summary{min-height:32px;font-size:14px;color:#315d43;cursor:pointer}

/* Object documents and closure use the same mobile card layout. */
.file-group{border:1px solid var(--line,#e2e8f0);border-radius:12px;margin:12px 0;padding:14px}.file-group summary{cursor:pointer;font-weight:600}.signed-file{margin-left:16px;border-left:3px solid #b9e5de;padding-left:12px}.closure-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px;margin:16px 0}.closure-check{padding:14px;border:1px solid #e3d3a1;background:#fffbef;border-radius:10px;overflow-wrap:anywhere}.closure-check.check-ok{background:#f0faf7;border-color:#cce9df}.closure-check p{font-size:13px}.closure-check button{margin-top:8px}@media(max-width:600px){.closure-checks{grid-template-columns:1fr}.signed-file{margin-left:8px}.file-group{padding:10px}}

.hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hub-grid>.panel{margin:0}.hub-line{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #e5ebe8}.hub-line:last-child{border-bottom:0}.hub-line small,.task-card small,.company-choice span,small{display:block;color:#728078;font-size:12px;margin-top:5px}.hub-search{flex:1;min-width:180px}.week-strip{display:flex;gap:8px;overflow-x:auto;padding:10px 0 20px}.week-strip button{flex:1;min-width:128px;min-height:76px;text-align:left;background:#fff;border:1px solid #dce6df;border-radius:12px;padding:12px}.week-strip span{display:block;font-size:12px;margin-top:8px;color:#67766d}.kanban-board{display:flex;gap:14px;overflow-x:auto;align-items:flex-start;padding-bottom:18px;max-width:100%}.task-column{min-width:270px;width:280px;flex-shrink:0;background:#f2f6f3;border:1px solid #e1e9e3;border-radius:14px;padding:12px}.task-column h3{font-size:14px}.task-card{background:white;border:1px solid #dfe7e1;border-radius:12px;padding:14px;margin:10px 0;box-shadow:0 2px 5px #183e2410}.task-card>button:first-child{border:0;padding:0;text-align:left;background:transparent}.task-card p{font-size:13px}.task-card.overdue{border-left:4px solid #cf6556}.task-list .task-column{width:100%;min-width:0;background:transparent;border:0;padding:0}.task-list .task-card{margin:8px 0}.auth-card{max-width:600px;margin:30px auto}.auth-card form{display:grid;gap:16px}.auth-links{display:flex;flex-wrap:wrap;gap:8px}.company-choice{display:flex;flex-direction:column;width:100%;text-align:left;margin:12px 0;padding:20px}.funnel-row{margin:18px 0}.funnel-row progress{display:block;width:100%;height:9px;margin-top:8px;accent-color:#527e60}.more-menu>summary{cursor:pointer;padding:12px 16px}.more-menu>button{width:100%;text-align:left}.project-tabs{overflow-x:auto;flex-wrap:nowrap!important;white-space:nowrap;max-width:100%;scrollbar-width:thin}.project-tabs button{flex-shrink:0}.check-label{display:flex;align-items:center;gap:8px}.check-label input{width:auto}.metric span{display:block;color:#748078;font-size:13px}.metric strong{display:block;font-size:22px;margin-top:6px}#hub-overview:empty{display:none}
@media(max-width:800px){.hub-grid{grid-template-columns:1fr}.hub-line{flex-wrap:wrap}.week-strip button{flex:none}.kanban-board .task-column{min-width:80vw;width:80vw}.auth-card{margin:12px auto}.toolbar{flex-wrap:wrap}.metric strong{font-size:19px}}

.profile-menu{position:relative;min-width:130px}.profile-menu summary{cursor:pointer;padding:10px 14px;border:1px solid #dce5df;border-radius:8px;background:white}.profile-menu[open]{z-index:30}.profile-menu[open]>button{display:block;width:100%;text-align:left;margin-top:3px}.profile-menu[open]{background:white;padding:4px;border-radius:10px;box-shadow:0 8px 25px #18372618}header{flex-wrap:wrap}.more-menu button{white-space:normal}

/* Document switches must not inherit pale sidebar text. */
main .document-tabs button{color:#315744;background:#fff;border:1px solid #cadbd0}
main .document-tabs button.active{color:#174c31;background:#e5f2e9;border-color:#609074}
.hub-grid>section,.hub-line>span{min-width:0}.hub-line{overflow-wrap:anywhere}
@media(max-width:700px){main input,main select,main textarea,dialog input,dialog select,dialog textarea{font-size:16px!important;max-width:100%}main button,dialog button{min-height:44px}.hub-grid summary{min-height:44px;padding:12px 0;cursor:pointer}}
/* Consistent fields on pages and in dialogs; table cells retain their layout. */
:where(main,dialog) label:has(> :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea)){display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;color:#52656d;font-size:13px;line-height:1.45}
:where(main,dialog) label > :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){display:block;width:100%;min-width:0;max-width:100%;margin:0;min-height:44px}
:where(main,dialog) label:has(> :is(input[type=checkbox],input[type=radio])){display:flex;flex-direction:row;align-items:flex-start;gap:10px;line-height:1.5}
:where(main,dialog) label > :is(input[type=checkbox],input[type=radio]){flex:0 0 auto;width:18px;height:18px;min-width:18px;margin:2px 0 0;padding:0;accent-color:#197659}
:where(main,dialog) :is(input,select,textarea):focus-visible{outline:2px solid #197659;outline-offset:2px}

.auth-card{width:100%;max-width:600px;padding:28px;margin:24px auto}
.auth-card h2{margin-bottom:20px}.auth-card form{gap:20px}.auth-card form>p{margin:0;line-height:1.6}
.auth-card form>label{margin:0}.auth-card form>.primary{width:100%;min-height:44px;margin-top:4px}
.auth-card #account-error:empty,#form-error:empty{display:none}
.auth-card .primary:is(a){display:block;text-align:center;padding:12px 16px;border-radius:7px;background:#197659;color:white;text-decoration:none}
#development-setup{display:grid;gap:20px;max-width:600px}
#fields>label{margin:18px 0}#dialog-form>.primary{min-height:44px}
.manual-editor label:has(> input[type=checkbox]){font-size:12px;gap:6px}
@media(max-width:700px){.auth-card{padding:20px;margin:12px auto}.auth-card form{gap:18px}.auth-card label:has(> input[type=checkbox]){font-size:14px}}
/* Navigation, workspaces and calendar share a stable layout. */
.profile-menu{position:relative;padding:0!important;box-shadow:none!important;flex:none}
.profile-menu[open]{z-index:50}
.profile-menu>button{position:absolute;right:0;width:220px!important;min-height:44px;margin:0!important;border-radius:0;box-shadow:0 8px 18px #18372618;z-index:51}
.profile-menu>button:nth-of-type(1){top:44px;border-radius:10px 10px 0 0}.profile-menu>button:nth-of-type(2){top:88px}.profile-menu>button:nth-of-type(3){top:132px}.profile-menu>button:nth-of-type(4){top:176px;border-radius:0 0 10px 10px}
aside{overflow-y:auto;scrollbar-width:thin}.aside-bottom{margin-top:auto;border-top:1px solid #42615b;padding:18px 10px 0}.aside-bottom strong{font-size:14px;letter-spacing:.5px}.aside-bottom small{line-height:1.5;color:#a4bcb5}
[data-chat-total-badge]{margin-left:8px;background:#d4f3df;color:#174c31;border-radius:14px;padding:2px 7px;font-size:12px}
.page-tools,.button-group,.segmented{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.page-tools{justify-content:space-between;margin:0 0 20px}.page-tools .primary{min-height:44px}.segmented{gap:0;border:1px solid #dce5df;border-radius:9px;overflow:hidden;width:fit-content;background:white}.segmented button{border:0;border-radius:0;min-height:42px}.segmented .active{background:#dceee3;color:#174c31;font-weight:600}.task-filters{margin:16px 0}.task-search{flex:1;max-width:420px;min-width:180px}.task-list{display:grid;gap:18px}.task-list .task-card{display:grid;grid-template-columns:minmax(180px,2fr) minmax(130px,1fr) auto auto;align-items:center;gap:14px}.task-list .task-card p{margin:0}.task-list .task-card small{margin:0}.task-list .task-column:has(.task-card[hidden]):not(:has(.task-card:not([hidden]))){display:none}.task-column h3{padding:10px 4px;color:#466655}.empty-state{padding:36px 20px;text-align:center;color:#667d73;background:#fff;border:1px dashed #cbdad1;border-radius:12px}.empty-state h3{color:#264d3b}.empty-state p{margin-bottom:0}
.icon-button{display:grid;place-items:center;width:42px;height:42px;padding:9px}.icon-button svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}.calendar-panel h2{text-transform:capitalize;margin:0}.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid #dce5df;border-left:1px solid #dce5df}.weekday{text-align:center;padding:12px;background:#f1f6f3;font-weight:600}.month-day,.calendar-spacer{min-height:115px;border:0;border-right:1px solid #dce5df;border-bottom:1px solid #dce5df;border-radius:0;text-align:left;padding:10px;overflow:hidden;background:white}.month-day{display:flex;flex-direction:column;gap:5px}.month-day.today{box-shadow:inset 0 0 0 2px #197659;background:#f1f9f4}.calendar-event{display:block;background:#e9f3ed;padding:3px 5px;border-radius:4px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.calendar-event.measurement{background:#fff1d6}.calendar-count{display:none}.day-agenda{display:grid;gap:10px;margin-bottom:16px}.day-agenda button{text-align:left;padding:14px}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px}.inventory-photo,.inventory-photo-placeholder{width:100%;height:160px;object-fit:contain;border-radius:8px;background:#f3f6f4;margin-bottom:14px}.inventory-photo-placeholder{display:grid;place-items:center;color:#84968c}.inventory-card button{margin:4px}.inventory-card details{margin-top:14px}.billing-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:20px}.billing-big{font-size:26px;font-weight:650;color:#174c31;margin:18px 0}.billing-seats{margin:20px 0}.price-lines{border-top:1px solid #e1e9e4;margin-top:20px}.price-lines p{display:flex;justify-content:space-between}.inbox-row{display:flex;width:100%;justify-content:space-between;gap:20px;text-align:left;border:0;border-bottom:1px solid #dce5df;border-radius:0;padding:18px 8px}.inbox-row>span{min-width:0}.inbox-row strong,.inbox-row small,.inbox-row span>span{display:block}.inbox-row span>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65vw;font-size:13px;margin-top:8px;color:#63796d}.integration-groups{display:grid;gap:24px}.integration-card{display:flex;align-items:center;gap:16px;padding:18px;border:1px solid #dce5df;border-radius:12px}.integration-card>div{flex:1;min-width:0}.service-logo{width:48px;height:48px;flex:none;object-fit:contain}.source-table th,.source-table td{white-space:nowrap}.source-table td:first-child{white-space:normal;min-width:160px}
@media(max-width:800px){.task-list .task-card{grid-template-columns:1fr 1fr}.billing-grid{grid-template-columns:1fr}.month-day,.calendar-spacer{min-height:70px;padding:7px}.calendar-event{display:none}.calendar-count{display:block}.month-day:has(.calendar-event)::after{content:'●';color:#197659;font-size:10px}.calendar-panel{padding:12px}.weekday{font-size:12px;padding:8px 0}.integration-card{flex-wrap:wrap}.task-search{max-width:none;flex-basis:100%}.task-filters .segmented{width:100%;overflow-x:auto;flex-wrap:nowrap}.task-filters button{flex:none}.page-tools{align-items:flex-start}.billing-big{font-size:22px}}
.table-wrap{max-width:100%;overflow-x:auto}.hub-grid>*,.billing-grid>*{min-width:0}.profile-form{display:grid;gap:18px}.profile-avatar{width:90px;height:90px;border-radius:50%;object-fit:cover}.profile-form fieldset{border:1px solid #dce5df;border-radius:9px;padding:16px}.profile-form fieldset label{margin:10px 0}
.service-monogram{display:grid;place-items:center;width:48px;height:48px;flex:none;background:#e6f2eb;border-radius:12px;color:#197659;font-size:24px;font-weight:700}.icon-button svg{pointer-events:none}
.profile-menu summary{height:44px;line-height:22px;white-space:nowrap;box-sizing:border-box}
.page-tools:has(.task-search){justify-content:flex-start}.page-tools .task-search{margin-left:auto}.task-list .task-card{grid-template-columns:minmax(200px,2fr) minmax(160px,1fr) auto auto auto}
@media(max-width:800px){.task-list .task-card{grid-template-columns:1fr 1fr}.page-tools .task-search{margin-left:0}}
.more-menu-items>button{display:block;width:100%;text-align:left;white-space:normal}
@media(max-width:700px){
 aside{overflow:visible}#navigation{display:flex;align-items:center;height:56px;min-height:56px;max-height:56px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap}
 #navigation>button{flex:none;align-self:center;min-height:44px;height:44px}#navigation>.more-menu{flex:none;height:44px;min-height:44px}
 #navigation .more-menu>summary{height:44px;box-sizing:border-box;padding:11px 14px;white-space:nowrap}
 #navigation .more-menu[open]>.more-menu-items{position:fixed;right:12px;top:130px;width:min(270px,calc(100vw - 24px));max-height:65dvh;overflow-y:auto;background:#173b36;color:#d5e3e0;border:1px solid #486b61;border-radius:12px;box-shadow:0 12px 36px #102a2a44;padding:8px;z-index:100}
 #navigation .more-menu-items>button{min-height:44px;padding:11px 12px;font-size:14px}
}
@media(max-width:700px){
 aside{position:relative}aside:has(.more-menu[open]){padding-bottom:70px}
 #navigation .more-menu[open]>.more-menu-items{position:absolute;top:auto;bottom:12px;left:15px;right:15px;width:auto;height:48px;max-height:48px;display:flex;align-items:center;overflow-x:auto;overflow-y:hidden;gap:4px;padding:3px 5px;box-shadow:none;z-index:2}
 #navigation .more-menu-items>button{flex:none;width:auto;white-space:nowrap;min-height:40px;padding:8px 12px}
}
