.editor-more{position:relative;margin-left:auto}
.editor-more>summary,.editor-filter-panel>summary{cursor:pointer;border:1px solid var(--line);border-radius:6px;background:white;padding:9px 13px;font-size:12px;list-style:none}
.editor-more>summary::after,.editor-filter-panel>summary::after{content:' ▾'}
.editor-more[open]>summary::after,.editor-filter-panel[open]>summary::after{content:' ▴'}
.editor-more-actions{position:absolute;right:0;top:calc(100% + 6px);z-index:8;width:240px;max-height:min(65dvh,440px);overflow-y:auto;overscroll-behavior:contain;background:white;box-shadow:0 8px 30px #173b3029;border:1px solid var(--line);border-radius:8px;padding:8px;display:grid;gap:6px}
.editor-more-actions>button{width:100%;text-align:left;white-space:normal}
.editor-more-actions>.project-select{width:100%;max-width:100%;min-width:0}
.editor-more-actions>.editor-view-item{display:none}
.editor-more-actions>.approval-strip{margin:0;padding:8px;flex-direction:column;align-items:stretch}
.editor-review-message{font-size:12px;line-height:1.4;margin:0 0 8px;padding:8px 10px;border:1px solid #dfcc94;border-radius:6px;background:#fff6df}
.editor-review-message[hidden]{display:none}
.page-head>.actions:empty{display:none}
.editor-filter-panel{margin:0 0 10px}
.editor-filter-panel>summary{display:inline-block}
.editor-filter-panel .estimate-navigation{margin:8px 0 0}
.editor-expand{margin-left:auto}
.editor-total{font-size:12px;white-space:nowrap;margin-left:auto}
.editor-total b{font-size:16px;color:var(--green);margin-left:6px}
.editor-name-row{display:flex;gap:8px;align-items:center}
.estimate-table .editor-name-row .row-type{margin:0;flex:0 0 60px;font-size:9px}
.estimate-table .editor-name-row input.line-name{flex:1;width:0;min-width:150px}
.estimate-table td:has(.editor-insert){white-space:nowrap}
.estimate-table .editor-insert{color:var(--green);width:30px;min-width:30px;margin-right:2px}
.estimate-table input:focus-visible{outline:2px solid #27815a;outline-offset:1px}
.estimate-table input:user-invalid{border-color:#b33c36;background:#fff3f0}
body.estimate-workspace #sidebar{transform:translateX(-100%)}
body.estimate-workspace.menu-open #sidebar{transform:translateX(0)}
body.estimate-workspace .workspace{margin-left:0}
body.estimate-workspace .mobile-menu{display:inline-grid}
body.estimate-workspace .topbar{height:44px;padding:0 16px}
body.estimate-workspace main{padding:14px 16px}
body.estimate-workspace .page-head{margin-bottom:10px;align-items:center}
body.estimate-workspace .page-head h1{font-size:22px;margin:0}
body.estimate-workspace .page-head .eyebrow,body.estimate-workspace .page-head .sub,body.estimate-workspace main>.stats{display:none}
body.estimate-workspace .page-head .eyebrow{display:block;font-size:10px;margin-bottom:3px}
body.estimate-workspace .approval-strip{padding:8px 12px;margin-bottom:10px}
body.estimate-workspace .toolbar{padding:8px 10px;margin-bottom:10px;gap:8px}
body.estimate-workspace .toolbar>.actions{gap:6px}
body.estimate-workspace .estimate-table-wrap{max-height:72dvh;overscroll-behavior:contain}
body.estimate-workspace .estimate-table{min-width:780px}
body.estimate-workspace .estimate-table th{padding:8px;z-index:2}
body.estimate-workspace .estimate-table td{padding:4px 7px}
body.estimate-workspace .estimate-table .group td{padding:8px 12px}
body.estimate-workspace .estimate-bottom{margin-top:10px}
@media(max-width:760px),(max-height:500px) and (max-width:1000px){
  .editor-more>summary,.editor-filter-panel>summary{min-height:40px;display:flex;align-items:center}
  .editor-filter-panel>summary{display:inline-flex}
  .editor-more-actions{width:min(260px,calc(100vw - 32px))}
  .editor-more-actions>button{min-height:42px}
  body.estimate-workspace main{padding:10px}
  body.estimate-workspace .topbar{padding:0 10px;gap:6px}
  body.estimate-workspace .topbar .crumb{display:none}
  body.estimate-workspace .page-head{gap:8px}
  body.estimate-workspace .page-head h1{font-size:19px}
  body.estimate-workspace .page-head>.actions{width:auto}
  body.estimate-workspace .toolbar>.actions{width:auto;flex:1;flex-wrap:wrap}
  body.estimate-workspace .toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center}
  body.estimate-workspace .toolbar>.actions:first-child{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,.65fr)}
  body.estimate-workspace .toolbar>.actions:nth-child(2){flex-wrap:nowrap}
  body.estimate-workspace .toolbar>.actions:nth-child(2) button{padding:9px 8px;font-size:11px;white-space:nowrap}
  body.estimate-workspace .toolbar>.editor-expand{display:none}
  body.estimate-workspace .editor-more-actions>.editor-view-item{display:block}
  body.estimate-workspace .editor-total{font-size:10px;text-align:right;white-space:normal}
  body.estimate-workspace .editor-total b{display:block;font-size:13px;margin-left:0;white-space:nowrap}
  body.estimate-workspace .editor-more{margin-left:0}
  body.estimate-workspace .approval-strip{flex-direction:row;align-items:center;gap:8px}
  body.estimate-workspace .approval-strip b{font-size:10px}
  body.estimate-workspace .approval-strip p{display:none}
  body.estimate-workspace .approval-strip>.actions{width:auto;flex-wrap:nowrap;gap:5px;flex-shrink:0}
  body.estimate-workspace .approval-strip button{font-size:10px;padding:8px;min-height:36px;white-space:nowrap}
  body.estimate-workspace .toolbar select{max-width:100%;min-width:0}
  body.estimate-workspace .estimate-table input{font-size:16px;min-height:36px}
  body.estimate-workspace .estimate-table input.line-name{font-size:16px}
  body.estimate-workspace .estimate-table .name-cell{position:sticky;left:0;z-index:1;background:#fff;width:240px;min-width:240px}
  body.estimate-workspace .editor-insert,body.estimate-workspace .row-action{min-width:44px;min-height:44px}
  body.estimate-workspace .estimate-table-wrap{max-height:68dvh}
}
@media(max-height:500px) and (max-width:1000px){
  body.estimate-workspace .topbar{height:36px}
  body.estimate-workspace .page-head{margin-bottom:6px}
  body.estimate-workspace .page-head h1{font-size:18px}
  body.estimate-workspace .page-head .eyebrow{display:none}
  body.estimate-workspace .toolbar{display:flex;flex-wrap:nowrap;margin-bottom:6px;padding:5px 8px}
  body.estimate-workspace .toolbar>.actions:first-child{display:flex;flex:initial}
  body.estimate-workspace .toolbar>.actions:nth-child(2){flex:initial}
  body.estimate-workspace .editor-total{white-space:nowrap;margin-left:auto}
  body.estimate-workspace .editor-total b{display:inline;margin-left:5px}
  body.estimate-workspace .estimate-table-wrap{max-height:70dvh}
}
@media(max-width:360px){
  body.estimate-workspace .toolbar>.actions:nth-child(2) [data-action="add-line"]{font-size:0;min-width:40px;min-height:40px;padding:0}
  body.estimate-workspace .toolbar [data-action="add-line"]::after{content:'＋';font-size:20px}
  body.estimate-workspace .editor-more>summary{padding:9px 8px}
  body.estimate-workspace .editor-total{min-width:86px}
  body.estimate-workspace .editor-total b{font-size:12px;white-space:normal;overflow-wrap:anywhere}
  body.estimate-workspace .estimate-table .name-cell{width:185px;min-width:185px}
  body.estimate-workspace .editor-name-row{display:block}
  body.estimate-workspace .estimate-table .editor-name-row input.line-name{width:100%;min-width:150px}
}
@media print{
  body.estimate-workspace #sidebar,.editor-expand,.editor-more,.editor-filter-panel,.editor-insert{display:none!important}
  body.estimate-workspace .estimate-table-wrap{max-height:none!important;overflow:visible}
  body.estimate-workspace .workspace{margin:0}
  body.estimate-workspace main{padding:0}
}
