:root{font-family:"Inter","Segoe UI",system-ui,sans-serif;color:#1b2c43;background:#f4f7fa;font-size:16px;--nav:#142942;--muted:#536681;--line:#dce5ee;--primary:#2459ce;--light:#fff;--radius:12px}
*{box-sizing:border-box}body{margin:0}h1,h2,h3,p{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #82a1f5;outline-offset:2px}svg{width:20px;height:20px;flex:none;vertical-align:middle}small{font-size:.8125rem;color:var(--muted)}label{display:grid;gap:7px;font-weight:650;font-size:.875rem;min-width:0}
input,select,textarea{width:100%;min-width:0;min-height:42px;padding:9px 12px;border:1px solid #cad6e3;border-radius:8px;background:white;color:#1b2c43}input[readonly]{background:#eff4f8;color:var(--muted)}select{appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23536681' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");background-position:right 10px center;background-repeat:no-repeat}textarea{min-height:94px;resize:vertical}.muted{color:var(--muted)}.loading{padding:40px;text-align:center}
.shell{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100dvh}.sidebar{height:100dvh;position:sticky;top:0;background:var(--nav);color:white;display:flex;flex-direction:column;padding:24px 15px 16px}.wordmark{display:flex;gap:11px;align-items:center;font-weight:780;font-size:1.27rem;letter-spacing:-.04em}.sidebar .wordmark{margin:0 10px 41px}.nav{display:grid;gap:5px}.nav button,.account button{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border:0;background:transparent;color:#dae5f6;text-align:left;border-radius:8px;font-size:.9rem;font-weight:600}.nav button[aria-current]{background:#294766;color:white;box-shadow:inset 3px 0 #83a6ff}.nav button:hover,.account button:hover{background:#294766}.account{margin-top:auto;border-top:1px solid #37506b;padding-top:13px}.account .who{padding:8px 12px;font-weight:700;overflow-wrap:anywhere}.account small{display:block;color:#b9c9df;margin-top:3px}.account button{font-size:.8125rem;padding-block:8px}
.bar{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,3.1vw,45px);gap:12px;background:#fff;border-bottom:1px solid var(--line);font-size:.875rem;color:var(--muted)}.bar strong{color:#243853}.bar svg{width:16px;height:16px}.content{padding:32px clamp(16px,3.1vw,45px);max-width:1560px;margin:auto}.heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:25px}.heading h1{font-size:clamp(1.8rem,3.3vw,2.3rem);letter-spacing:-.045em;margin-bottom:7px}.heading p{line-height:1.5;color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:8px 12px;border:1px solid #cfdbe7;border-radius:8px;background:#fff;color:#243853;white-space:nowrap;font-weight:680;font-size:.875rem}.btn:hover{background:#edf3fb}.btn.primary{background:var(--primary);color:white;border-color:var(--primary)}.btn.primary:hover{background:#1b49ac}.btn.danger{background:#b32a39;color:white;border-color:#b32a39}.btn.icon{width:36px;min-height:36px;border-color:transparent;background:transparent;padding:4px}.btn.icon:hover{background:#eaf0fa}.btn.icon svg{width:17px;height:17px}.btn.chosen{background:#eaf0ff;color:#1848ae;border-color:#c6d6ff}.delete{margin-right:auto;color:#a32133}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:23px}.metric{display:flex;align-items:center;gap:12px;min-height:91px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:13px;color:#182e49}.metric:hover,.metric[aria-pressed="true"]{border-color:#7e9ee8}.metric-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:9px;flex:none}.metric small{display:block;font-weight:660;margin-bottom:3px}.metric strong{font-size:1.55rem;letter-spacing:-.04em}
.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.panel h2{font-size:1.125rem;padding:18px 18px 13px}.toolbar{display:flex;gap:8px;flex-wrap:wrap;padding:0 18px 15px}.toolbar select{width:auto;max-width:190px;font-size:.875rem}.search{position:relative;display:block;width:min(280px,100%);margin-right:auto}.search input{padding-left:34px;font-size:.875rem}.search svg{position:absolute;top:12px;left:10px;width:17px;height:17px;color:var(--muted)}.tabs{display:flex;gap:7px;padding:0 18px 12px}
.overflow{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:.875rem}td,th{padding:11px 14px;white-space:nowrap}td:first-child,th:first-child{padding-left:18px}td:last-child,th:last-child{padding-right:18px}th{background:#eef3f8;font-weight:720;color:#415773;font-size:.8125rem}td{border-top:1px solid #edf1f6;height:61px}tr:hover td{background:#fafcff}.record{display:block;border:0;background:none;padding:0;text-align:left;font-weight:720;color:#19324d;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record:hover{color:var(--primary);text-decoration:underline}td small{display:block;margin-top:3px;max-width:240px;overflow:hidden;text-overflow:ellipsis}.actions{text-align:right}.pill,.flag{display:inline-block;padding:4px 8px;border-radius:6px;font-weight:740;font-size:.75rem}.pill{border-radius:99px}.pill:before{content:"";width:6px;height:6px;background:currentColor;border-radius:50%;display:inline-block;margin-right:5px;vertical-align:1px}.pending,.sent{background:#e7efff;color:#1b4ba7}.approved{background:#ede7ff;color:#5935a4}.completed,.paid{background:#e2f5eb;color:#176747}.lost,.void{background:#fce9eb;color:#a12c41}.draft{background:#edf1f5;color:#465b74}.flag,.yes{background-color:#fff0d0;color:#804700;font-weight:800;border-color:#d6a851}.flag+.flag{margin-left:4px}option[value="yes"]{font-weight:800;color:#804700;background:#fff0d0}
.foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 18px;border-top:1px solid var(--line);font-size:.875rem;color:var(--muted)}.empty{text-align:center;padding:45px 16px;color:var(--muted)}.empty strong{display:block;margin-bottom:5px;color:#213853}.empty svg{display:block;margin:0 auto 12px;color:#6686b7}
dialog{width:min(730px,calc(100% - 24px));max-height:92dvh;border:1px solid var(--line);border-radius:14px;padding:0;color:inherit;box-shadow:0 22px 70px #071c3d55}dialog::backdrop{background:#142942a8}dialog.narrow,#confirmation{width:min(480px,calc(100% - 24px))}.dialog-head,.dialog-foot{display:flex;align-items:center;gap:8px;background:#fff;padding:13px 19px;position:sticky;z-index:1}.dialog-head{top:0;border-bottom:1px solid var(--line);justify-content:space-between}.dialog-head h2{font-size:1.2rem}.dialog-foot{bottom:0;border-top:1px solid var(--line);justify-content:flex-end}.dialog-body{display:grid;gap:16px;padding:18px 19px}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wide{grid-column:1/-1}.group{display:grid;gap:11px}.group+.group{border-top:1px solid var(--line);padding-top:14px}.group h3,.location h3{font-size:1rem}.group-header{display:flex;justify-content:space-between;align-items:center;gap:8px}.repeat{display:grid;gap:9px}.row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.8fr) auto;gap:8px;align-items:end}.location{display:grid;gap:10px;background:#f6f9fd;padding:12px;border:1px solid var(--line);border-radius:8px}.title-input,.time{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.time{grid-template-columns:1fr 1fr}.error{background:#ffecef;color:#922237;padding:9px 11px;border-radius:7px;font-size:.875rem}.error:empty{display:none}
#notice{position:fixed;right:20px;bottom:20px;z-index:2;max-width:calc(100vw - 40px);background:var(--nav);color:white;padding:11px 15px;border-radius:8px}#notice:empty{display:none}.login{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;background:#fff}.login-side{display:flex;flex-direction:column;justify-content:center;background:var(--nav);color:white;padding:clamp(24px,7vw,100px)}.login-side h1{font-size:clamp(2.25rem,4.5vw,4.2rem);line-height:1.06;letter-spacing:-.055em;margin:30px 0 12px}.login-side p{color:#cfdef1;line-height:1.55}.login-main{display:grid;align-items:center;padding:28px}.login form{display:grid;gap:15px;width:min(100%,390px);margin:auto}.login h2{font-size:1.65rem;letter-spacing:-.035em}.print{display:none}
@media(max-width:1050px){.shell{grid-template-columns:180px minmax(0,1fr)}.metrics{gap:8px}.metric{gap:8px;padding:9px}.metric-icon{width:34px;height:34px}}
@media(max-width:770px){.shell{display:block}.sidebar{height:auto;position:relative;display:grid;grid-template-columns:1fr auto;gap:9px;padding:11px}.sidebar .wordmark{margin:0}.nav{grid-column:1/-1;grid-row:2;display:flex;overflow:auto}.nav button{width:auto;white-space:nowrap;padding:8px}.nav button[aria-current]{box-shadow:inset 0 -2px #83a6ff}.nav svg{width:16px;height:16px}.account{border:0;padding:0;display:flex;align-items:center}.account .who{display:none}.account button{width:auto;white-space:nowrap;padding:6px}.bar{height:45px}.content{padding-top:19px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{min-height:66px}.login{grid-template-columns:1fr}.login-side h1{margin-top:14px}.login-side,.login-main{padding:24px}}
@media(max-width:490px){.heading{align-items:flex-start}.heading p{font-size:.875rem}.heading .btn{padding-inline:8px}.search{width:100%}.toolbar select{max-width:155px}.fields{grid-template-columns:1fr}.title-input{grid-template-columns:1fr}.dialog-head,.dialog-foot,.dialog-body{padding-inline:11px}.day{display:none}}
@media print{body{background:white}#app,dialog,#notice{display:none}.print{display:block;padding:25px}.print h1,.print p{margin-bottom:12px}.print table{margin-block:20px}.print td{height:auto}}
.tabs{flex-wrap:wrap}.history{padding-inline-start:20px;margin:0;display:grid;gap:12px}.history>li{border-bottom:1px solid var(--line);padding-bottom:10px}.history ul{padding-inline-start:19px;margin-block:5px 0}.history li span{overflow-wrap:anywhere}.actions .btn:not(.icon){min-height:34px;margin-right:5px}
input[data-quote-override="manual"]{border-color:var(--primary)}
.contact-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}

input[data-number-format]{font-variant-numeric:tabular-nums}
dialog.project-layout{width:min(820px,calc(100vw - 24px));background:#f2f6fb}
.project-layout .dialog-head{background:#142b43;color:#fff;padding:17px 24px;border:0}
.project-layout .dialog-head h2{font-size:1.28rem}
.project-layout .dialog-head .btn{color:#fff;background:#233f5c;border-color:#38536f}
.project-layout .dialog-head .btn:hover{background:#315171}
.project-layout .dialog-body{padding:19px 24px;gap:13px}
.project-layout .dialog-foot{padding:13px 24px;box-shadow:0 -3px 14px #142b430d}
.project-layout .group[data-tone]{
  --section-bg:#e9f0fb;--section-accent:#4675ac;--section-text:#233e60;
  background:#fff;border:1px solid #d9e2ed;border-radius:10px;overflow:hidden;
  gap:12px;padding:0 16px 16px;
}
.project-layout .group[data-tone]>.group-header{
  background:var(--section-bg);color:var(--section-text);margin:0 -16px;padding:10px 13px;
  border-left:4px solid var(--section-accent);min-height:43px;
}
.project-layout .group h3{font-size:.95rem;font-weight:750;letter-spacing:.01em}
.project-layout .group[data-tone="client"]{--section-bg:#e8f4f5;--section-accent:#2c8086;--section-text:#235058}
.project-layout .group[data-tone="schedule"]{--section-bg:#fef3e0;--section-accent:#a36322;--section-text:#684519}
.project-layout .group[data-tone="quote"],
.project-layout .group[data-tone="total"]{--section-bg:#e6f4ed;--section-accent:#30805c;--section-text:#265641}
.project-layout .group[data-tone="bp"]{--section-bg:#eeeafb;--section-accent:#6b59ac;--section-text:#483975}
.project-layout .group[data-tone="third-party"]{--section-bg:#f8eaf1;--section-accent:#9d5277;--section-text:#6b3653}
.project-layout .group[data-tone="changes"]{--section-bg:#e9eff9;--section-accent:#566c9b;--section-text:#354a70}
.project-layout .group[data-tone="total"] input{font-weight:750;background:#f6fbf8}
.project-layout .group[data-tone="changes"] .location{background:#f7f9fd}
@media(max-width:560px){
  .project-layout .dialog-head,.project-layout .dialog-body,.project-layout .dialog-foot{padding-inline:12px}
  .project-layout .group[data-tone]{padding-inline:11px}
  .project-layout .group[data-tone]>.group-header{margin-inline:-11px}
}

.heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
a.btn{text-decoration:none}
.requirement{display:inline-flex;border-radius:6px;padding:6px 8px;margin:2px 5px 2px 0;font-size:.82rem;font-weight:850;border:1px solid currentColor}
.requirement-coi{color:#fff;background:#a51e37;border-color:#a51e37}
.requirement-permit{color:#582705;background:#ffcf78;border-color:#b35717}
.dialog-body details>summary{cursor:pointer;font-weight:700;margin-bottom:10px}

.invoice-parties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-block:12px}
.invoice-parties .group{border:1px solid #d9e2ed;border-radius:8px;overflow:hidden;align-content:start;padding:0 12px 12px}
.invoice-parties .group-header{padding:9px 11px;margin-inline:-12px;border-left:4px solid}
.invoice-parties [data-tone="invoice-sender"] .group-header{background:#e7f0fb;color:#244d78;border-color:#3e73a7}
.invoice-parties [data-tone="invoice-recipient"] .group-header{background:#e3f4ed;color:#245a49;border-color:#36866c}
@media(max-width:560px){.invoice-parties{grid-template-columns:1fr}}

.action-queues{display:grid;gap:18px}
.action-queue>header{padding:14px 16px 13px;border-left:4px solid #3e73a7;background:#e7f0fb}
.action-queue[data-queue="overdue"]>header{border-color:#a51e37;background:#fbeaf0}
.action-queue[data-queue="requirements"]>header{border-color:#a36322;background:#fef3e0}
.action-queue>header h2{padding:0;margin-bottom:4px}
.action-queue>header p{color:var(--muted);font-size:.9rem}
.requirement-progress{display:flex;align-items:center;gap:8px}
.requirement-progress>input{width:18px;min-height:0;height:18px;flex:none;accent-color:var(--primary)}
.requirement-progress:has(input:disabled){color:var(--muted)}

.aging-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px;padding:0 15px 14px}
.aging-summary>div{display:flex;flex-direction:column;gap:5px;background:#f0f5fc;border:1px solid var(--line);border-radius:7px;padding:9px}
.aging-summary strong{font-variant-numeric:tabular-nums}
.followup-history{display:grid;gap:10px;padding-left:21px}
.followup-history li>small{display:block;color:var(--muted)}
.followup-history p{white-space:pre-wrap;overflow-wrap:anywhere}

.bp-mark{display:block;width:27px;height:27px;border-radius:5px;flex:none}
.bp-login-brand{display:flex;align-items:center;background:#fff;border-radius:10px;width:min(100%,285px);padding:14px 17px}
.bp-login-brand img{display:block;width:100%;height:auto}

.project-detail{display:grid;gap:14px;max-width:1170px;margin-inline:auto}
.detail-back{justify-self:start;background:none;border:0;padding:4px 0;color:#285181;font-size:.88rem;font-weight:700;cursor:pointer}
.detail-back:hover{text-decoration:underline}
.detail-hero{background:#eaf2fc;border:1px solid #d8e5f4;border-left:4px solid #3a71ad;border-radius:11px;
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:20px}
.detail-hero h1{font-size:clamp(1.45rem,3vw,2.15rem);line-height:1.13;margin:7px 0;overflow-wrap:anywhere}
.detail-hero p{color:var(--muted)}
.detail-id{display:flex;align-items:center;gap:10px;color:#374f72;font-size:.85rem;font-weight:700;letter-spacing:.03em}
.detail-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.detail-stats>div{display:grid;gap:7px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:13px}
.detail-stats strong{font-size:clamp(1rem,2vw,1.28rem);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.project-tabs{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:8px;border-bottom:1px solid var(--line)}
#project-detail-content{display:grid;gap:12px}
.detail-overview{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:12px;align-items:start}
.detail-card>header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 15px;border-bottom:1px solid var(--line)}
.detail-card>header h2{margin:0;padding:0}
.detail-description,.detail-history{padding:14px 15px;white-space:pre-wrap;overflow-wrap:anywhere}
.detail-history .history{white-space:normal}
.detail-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:0;padding:14px 15px}
.detail-facts dt{font-size:.81rem;color:var(--muted);font-weight:650}
.detail-facts dd{margin:3px 0 0;font-weight:550;overflow-wrap:anywhere;white-space:pre-wrap}
.detail-amount{display:block;text-align:right;font-variant-numeric:tabular-nums}
.project-layout .group[data-tone]{scroll-margin-top:68px}
@media(max-width:700px){
  .detail-overview{grid-template-columns:1fr}
  .detail-hero{align-items:flex-start;flex-direction:column}
  .detail-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.detail-overview .detail-card>header{background:#f4f8fd}
.detail-contact-rows{padding:2px 15px 4px}
.detail-contact-row{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);padding:12px 0}
.detail-contact-row+.detail-contact-row{border-top:1px solid #e5edf5}
.detail-status{display:inline-block;font-size:.81rem;font-weight:750;padding:4px 7px;border-radius:5px}
.detail-status.requirement-needed{background:#ffebc7;color:#713a0a}
.detail-status.requirement-done{background:#e2f3e9;color:#245b3e}

.scan-table .table-money-heading,
.scan-table td:has(.table-money) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.scan-table td:first-child .record,
.table-invoice-record small {
  max-inline-size: 22rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.table-record-number {
  display: block;
  color: #315780;
  font-size: .75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-block-end: .2rem;
}
.quote-details-toggle[aria-expanded="true"] {
  background: #e8f0ff;
  color: #1742a1;
}
.quote-details-row td {
  background: #f4f8fc;
  white-space: normal;
}
.quote-table-facts {
  grid-template-columns: repeat(auto-fit,minmax(9rem,1fr));
  max-inline-size: 55rem;
}
@media (min-width: 900px) {
  .scan-table th:first-child,
  .scan-table tr:not(.quote-details-row) td:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    box-shadow: 1px 0 #dce5ef;
  }
  .scan-table tr:not(.quote-details-row) td:first-child {
    background: #fff;
  }
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr));
  gap: 14px;
  margin-block-end: 18px;
}
.dashboard-summary-card {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border-inline-start: 4px solid #3e73a7;
  color: var(--ink, #142943);
  text-decoration: none;
}
.dashboard-summary-card[data-summary="overdue"] { border-inline-start-color: #a51e37; }
.dashboard-summary-card[data-summary="requirements"] { border-inline-start-color: #a36322; }
.dashboard-summary-card:hover { background: #f3f7fc; }
.dashboard-summary-card:focus-visible { outline: 2px solid #2259bd; outline-offset: 2px; }
.dashboard-summary-card strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.dashboard-summary-card small { color: var(--muted); }
.action-queue h2 { scroll-margin-block-start: 1rem; }
.dashboard-table .table-money-heading,
.dashboard-table td:has(.table-money) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dashboard-table .record {
  max-inline-size: 22rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

[data-attachments] td:first-child {
  min-inline-size: 11rem;
  max-inline-size: 24rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.dashboard-summary-card[data-summary="prospects"] { border-inline-start-color: #6a489a; }
.action-queue[data-queue="prospects"] > header { border-color: #6a489a; background: #f2ecfa; }

.clients-table .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.clients-table .actions .btn {
  flex: none;
  min-height: 36px;
  margin: 0;
}

.row.client-contact-row {
  grid-template-columns: minmax(0,1fr) minmax(0,.8fr) minmax(0,1fr) auto;
}
.ready-table {
  table-layout: fixed;
}
.ready-table th,
.ready-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.ready-table th:first-child {
  width: 42%;
}
.ready-table th:last-child {
  width: 22%;
  text-align: right;
}
.ready-table .actions .btn {
  margin: 0;
  white-space: normal;
}
.ready-table .actions svg {
  display: none;
}
@media (max-width: 600px) {
  .row.client-contact-row {
    grid-template-columns: 1fr auto;
  }
  .client-contact-row label {
    grid-column: 1;
  }
  .client-contact-row .btn {
    grid-column: 2;
    grid-row: 1;
  }
  .ready-table th,
  .ready-table td {
    padding-inline: 6px;
    font-size: .78rem;
  }
  .ready-table th:first-child { width: 32%; }
  .ready-table th:last-child { width: 24%; }
}

.quote-table .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.quote-table .actions .btn {
  flex: none;
  min-height: 36px;
  margin: 0;
}
.activity-changes {
  min-inline-size: 12rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
