:root{color-scheme:light;--ink:#172329;--muted:#5c6b71;--bg:#f2f4f3;--paper:#fff;--line:#dce2df;--sidebar:#18242b;--side-text:#acbac1;--accent:#f0c46b;--accent-hover:#e7b650;--green:#2f6757;--radius:14px;--shadow:0 4px 15px #16252b08;font-family:"Segoe UI",system-ui,-apple-system,sans-serif;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.5}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{touch-action:manipulation}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.6}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid #a06c13;outline-offset:3px}
[hidden]{display:none!important}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(28px,4vw,42px);letter-spacing:-.045em;line-height:1.08;font-weight:730}
h2{font-size:20px;letter-spacing:-.024em;line-height:1.2}
h3{font-size:16px;line-height:1.3}
.muted{color:var(--muted)}
.eyebrow{display:block;color:#5b6d65;font-size:11px;font-weight:770;letter-spacing:.14em}
.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{position:fixed;z-index:30;top:10px;left:10px;padding:10px;background:white}
.boot{min-height:100dvh;display:grid;align-content:center;justify-items:center;gap:15px;color:var(--muted)}
.boot img{width:50px}
.app-shell{display:grid;grid-template-columns:242px minmax(0,1fr);min-height:100dvh}
.sidebar{height:100dvh;position:sticky;top:0;display:flex;flex-direction:column;overflow:auto;background:var(--sidebar);color:white;padding:24px 15px 12px}
.brand-link{display:block;padding:0 8px;margin-bottom:29px}
.brand{display:inline-flex;align-items:center;gap:11px}
.brand img{width:41px;height:41px;flex:none}
.brand strong{display:block;font-size:17px;font-weight:720;line-height:1.18;letter-spacing:-.025em;white-space:nowrap}
.brand small{display:block;margin-top:4px;font-size:9px;font-weight:700;letter-spacing:.16em;color:#b6c4cb}
.sidebar nav{display:grid;gap:18px}
.nav-group{display:grid;gap:3px}
.nav-group>span{padding:0 10px 3px;color:#95a8b0;font-size:9.5px;font-weight:730;letter-spacing:.14em}
.nav-group>a{min-height:39px;display:flex;align-items:center;gap:11px;padding:7px 10px;border-radius:8px;color:#c0cdd2;font-size:13px;font-weight:590}
.nav-group>a svg{flex:none;opacity:.85}
.nav-group>a:hover{background:#ffffff0e;color:#fff}
.nav-group>a[aria-current]{color:#ffe0a4;background:#f0c46b1c;box-shadow:inset 2px 0 var(--accent)}
.sidebar-foot{margin-top:auto;padding:14px 4px 3px;display:flex;align-items:center;gap:9px;min-height:58px}
.user-avatar{background:#31434c;color:#e0edf0;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;font-size:12px;font-weight:700;flex:none}
.sidebar-foot>span:nth-child(2){flex:1;min-width:0}
.sidebar-foot strong,.sidebar-foot small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-foot strong{font-size:12px}
.sidebar-foot small{color:#a9bac0;font-size:10px}
.sidebar-foot button,.icon-button{display:grid;place-items:center;border:0;background:transparent;color:inherit;border-radius:8px;padding:7px}
.sidebar-foot button:hover{background:#ffffff14}
.icon-button:hover{background:#eaf0ed}
.nav-scrim,.mobile-menu{display:none}
.workspace{min-width:0}
.topbar{height:63px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 clamp(16px,3vw,40px);background:#fbfcfb;border-bottom:1px solid var(--line)}
.breadcrumb,.top-actions{display:flex;align-items:center;gap:9px;min-width:0}
.breadcrumb span{color:var(--muted)}
.breadcrumb b{color:#87948f;font-weight:400}
.breadcrumb strong{font-weight:680}
.workspace-content{max-width:1550px;margin:auto;padding:27px clamp(16px,3vw,40px) 44px}
.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:15px;margin:1px 0 22px}
.page-heading h1{margin:5px 0 7px}
.page-heading .muted{max-width:65ch}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:6px;min-height:37px;padding:7px 13px;border:1px solid #cfd9d4;border-radius:8px;background:#fff;color:var(--ink);font-size:13px;font-weight:680;line-height:1.2;text-decoration:none;white-space:nowrap}
.btn:hover{background:#f3f6f4;border-color:#a8bab2}
.btn.primary,.btn-primary{background:var(--accent);border-color:#dcb15c;color:#272315}
.btn.primary:hover,.btn-primary:hover{background:var(--accent-hover);border-color:#c8973d}
.btn.danger{border-color:#e5bdba;color:#902e2c;background:#fff5f3}
.btn.small,.btn-sm{min-height:31px;padding:5px 9px;font-size:12px}
.text-link{display:inline-flex;align-items:center;gap:6px;color:#306552;font-size:12px;font-weight:730;white-space:nowrap}
.text-link:hover{text-decoration:underline}
.panel{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);box-shadow:var(--shadow);min-width:0;margin-bottom:16px;overflow:hidden}
.panel-head{padding:16px 18px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.panel-head .eyebrow{margin-bottom:5px}
.panel-head h2 .badge{vertical-align:middle}
.panel-head p{margin-top:3px}
.panel-body{padding:0 18px 17px}
.panel>h2{margin:16px 18px 10px}
.panel>p:not(.empty){margin:8px 18px 12px}
.panel>.stat-grid{grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr));margin:0 18px 13px;gap:8px}
.panel>.stat-grid .stat{background:#f7faf8;box-shadow:none;padding:9px 10px}
.panel>.stat-grid .stat strong{font-size:clamp(17px,2vw,23px)}
.toolbar,.actions,.row-actions,.filters,.tab-bar,.tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.toolbar{margin-bottom:13px}
.panel>.toolbar,.panel>.filters,.panel>.tabs,.panel>.tab-bar{padding:0 18px 12px;margin:0}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:17px}
.stat{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px 15px;box-shadow:var(--shadow)}
.stat-icon{display:grid;place-items:center;width:32px;height:32px;color:#376653;background:#e9f1ec;border-radius:8px;margin-bottom:4px}
.stat:nth-child(2) .stat-icon{color:#76581f;background:#f8eed5}
.stat-label{color:#475951;font-weight:650;font-size:12px}
.stat strong{font-size:clamp(19px,2.2vw,29px);letter-spacing:-.04em;font-weight:740;line-height:1.22;font-variant-numeric:tabular-nums}
.stat small{font-size:11px;color:var(--muted);line-height:1.3}
.badge{display:inline-flex;align-items:center;width:max-content;max-width:100%;min-height:23px;padding:2px 7px;border-radius:999px;background:#eaf0ef;color:#445751;font-size:11px;font-weight:690;line-height:1.4}
.badge.good{background:#e5f2e9;color:#285b47}
.badge.warn{background:#fff1ce;color:#73551d}
.badge.bad{background:#fae6e3;color:#923532}
.table-wrap{overflow:auto;width:100%}
table{width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}
th{background:#f5f7f6;font-size:11px;font-weight:730;color:#52635a;white-space:nowrap}
th,td{padding:10px 13px;border-top:1px solid #e9eeeb;vertical-align:middle}
th:first-child,td:first-child{padding-left:18px}
th:last-child,td:last-child{padding-right:18px}
tbody tr:hover{background:#fbfcfb}
td strong{font-weight:680}
.table-sub{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.num,.numeric{text-align:right;white-space:nowrap}
.expense-breakdown-head{padding:5px 18px 12px}
.expense-breakdown-head p{margin-top:3px}
.expense-breakdown-table{min-width:410px}
.expense-breakdown-main>:first-child{background:inherit;color:var(--ink);font-size:14px;font-weight:680}
.expense-breakdown-toggle{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:6px;background:transparent;color:#255a4c;padding:6px 8px;margin:-6px -8px;text-align:left;font-weight:680}
.expense-breakdown-toggle:hover,.expense-breakdown-toggle[aria-expanded=true]{background:#edf5f0}
.expense-breakdown-chevron{display:inline-block;width:12px;flex:none;text-align:center}
.expense-breakdown-child>*{background:#f7faf8;font-size:13px}
.expense-breakdown-child>:first-child{padding-left:39px;color:#475951;font-weight:550}
.expense-breakdown-total>*{background:#eaf3ee;color:#203b32;font-size:14px;font-weight:740}
.empty{min-height:107px;padding:18px;display:grid;align-content:center;justify-items:center;text-align:center;gap:3px;color:var(--muted);font-size:13px}
.empty strong{color:#344941;font-weight:690}
.empty-icon{display:grid;place-items:center;background:#edf3ef;border-radius:11px;color:#587167;width:44px;height:44px;margin-bottom:3px}
.notice{padding:10px 13px;border:1px solid #e6d3a4;border-radius:8px;background:#fff5dd;color:#604916;margin:8px 0;font-size:13px}
.notice.error,.form-error{padding:9px 11px;border:1px solid #e6bdb8;border-radius:7px;background:#fff3f1;color:#962c28;font-size:13px}
.field{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px;font-weight:680;color:#364a42;margin:0}
input:not([type=checkbox]):not([type=radio]),select,textarea{min-width:0;max-width:100%;min-height:37px;padding:7px 9px;border:1px solid #cbd6d1;border-radius:7px;background:#fff;color:var(--ink)}
input:not([type=checkbox]):not([type=radio]),textarea{width:100%}
input[type=checkbox],input[type=radio]{accent-color:#306552}
textarea{resize:vertical}
input::placeholder,textarea::placeholder{color:#72827b}
.field small{font-weight:400;color:var(--muted)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.form-grid>.wide,.form-grid>.full{grid-column:1/-1}
.sale-payment-fields{border:0;margin:0;min-width:0;padding:0}
.search input{width:min(100%,240px)!important}
.sheet{width:min(760px,calc(100% - 30px));max-width:none;max-height:calc(100dvh - 30px);padding:0;border:1px solid var(--line);border-radius:15px;background:#fff;color:var(--ink);box-shadow:0 25px 80px #14242b38;overflow:auto}
.sheet::backdrop{background:#101f29a6}
.sheet-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 19px;border-bottom:1px solid var(--line);background:#fff}
.sheet-content{display:grid;gap:12px;padding:17px 19px}
.sheet-form>.form-error{margin:0 19px 10px}
.sheet-footer{position:sticky;bottom:0;background:#fff;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line);padding:11px 19px}
.sheet .panel{margin:0}
.sheet .table-wrap{border:1px solid var(--line);border-radius:8px}
.sheet th:first-child,.sheet td:first-child{padding-left:10px}
.sheet th:last-child,.sheet td:last-child{padding-right:10px}
.sheet input[type=file]{padding:6px}
.sheet img{max-width:100%;max-height:260px;object-fit:contain}
.quote-sheet{width:min(900px,calc(100% - 30px))}
.quote-builder-lines:not(:empty){display:grid;gap:9px;padding:12px;border:1px solid var(--line);border-radius:8px;background:#f7faf8}
.quote-builder-lines .toolbar{margin-bottom:0}
.quote-line-editor{display:grid;grid-template-columns:minmax(0,2fr) minmax(85px,1fr) minmax(85px,1fr) auto;align-items:end;gap:8px}
.quote-form-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.quote-preview:not(:empty){display:grid;gap:9px}
.quote-preview .stat-grid{margin-bottom:0;grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr))}
.job-production-line{display:grid;gap:8px;padding:12px}
.job-production-line>p:not(.empty){margin:0}
.job-request-scope{white-space:pre-wrap;overflow-wrap:anywhere}
.job-panel-notice{margin:0 18px 12px}
@media(max-width:590px){
  .quote-line-editor{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quote-line-editor>.field:first-child{grid-column:1/-1}
  .quote-line-editor>button{justify-self:start}
}
.overview-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:16px;padding:22px 24px;background:#20343a;color:#fff;border-radius:15px;background-image:repeating-linear-gradient(129deg,transparent 0 29px,#ffffff06 29px 30px),linear-gradient(110deg,#202f35,#294841);min-height:137px}
.overview-hero p{color:#d3dedc;margin-top:7px;max-width:45ch}
.hero-date{display:flex;align-items:center;gap:6px;color:#f0d293;font-size:12px;font-weight:650;margin-bottom:7px}
.hero-actions{display:flex;gap:7px;flex-wrap:wrap}
.hero-actions .btn:not(.primary){background:#ffffff10;border-color:#ffffff43;color:#fff}
.hero-actions .btn:not(.primary):hover{background:#ffffff25}
.reminder-panel .panel-head{padding-bottom:12px}
.reminder-panel .reminder-empty{min-height:88px;border-top:1px solid #eef1ef}
.reminder-list{display:grid;gap:8px;margin:0;padding:0 18px 15px;list-style:none}
.reminder-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px 15px;padding:10px 12px;border:1px solid var(--line);border-inline-start-width:3px;border-radius:9px;background:#fbfcfb}
.reminder-row.is-overdue{border-color:#e8c0bd;border-inline-start-color:#ad2925;background:#fff7f6}
.reminder-content{color:#161616;overflow-wrap:anywhere}
.reminder-content p,.reminder-history p{margin-top:4px;white-space:pre-wrap;overflow-wrap:anywhere}
.reminder-row.is-overdue .reminder-content{color:#99231f;font-weight:710}
.reminder-star{margin-inline-end:.3em}
.reminder-meta{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;margin-top:6px;font-size:12px}
.reminder-meta time,.reminder-history time{color:var(--muted)}
.reminder-countdown{color:#161616;font-weight:680;font-variant-numeric:tabular-nums}
.reminder-actions{justify-content:flex-end}
.reminder-history{border-top:1px solid var(--line);padding:10px 18px 12px}
.reminder-history summary{width:fit-content;cursor:pointer;color:#425750;font-weight:700}
.reminder-history ul{display:grid;gap:0;list-style:none;margin:8px 0 0;padding:0}
.reminder-history li{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid #eef1ef;overflow-wrap:anywhere}
.reminder-history time{flex:none;font-size:12px}
@media(max-width:590px){
  .reminder-list{padding-inline:12px}
  .reminder-row{grid-template-columns:minmax(0,1fr)}
  .reminder-actions{justify-content:flex-start}
  .reminder-history{padding-inline:12px}
  .reminder-history li{flex-direction:column;gap:3px}
}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:15px}
.stages{display:grid;gap:12px;padding:0 18px 17px}
.stage{display:grid;grid-template-columns:33px 1fr;align-items:center;gap:9px}
.stage-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#eef3f0;color:#38614f}
.stage-label{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;margin-bottom:4px}
.stage-label span{color:#4d665c;font-variant-numeric:tabular-nums;font-weight:710}
.stage-track{height:6px;overflow:hidden;background:#ecf0ed;border-radius:999px}
.stage-track i{display:block;height:100%;background:#5a8a72;border-radius:999px}
.stage:nth-child(2) .stage-track i{background:#c19443}
.stage:nth-child(3) .stage-track i{background:#63909b}
.attention-list a{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:8px 17px;border-top:1px solid #ecf0ee}
.attention-list a:hover{background:#f3f7f4}
.attention-list strong,.attention-list small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attention-list small,.attention-list time{color:var(--muted);font-size:11px}
.attention-list svg{color:#55806c}
.overview-jobs .panel-head{padding-bottom:13px}
.quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.quick-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:0;padding:17px 18px;text-align:left;color:var(--ink)}
.quick-card:hover{border-color:#8aac9a;background:#fbfdfb}
.quick-card strong{font-size:17px;letter-spacing:-.02em}
.quick-card span:not(.stat-icon){color:var(--muted);font-size:13px;max-width:24ch}
.quick-card i{position:absolute;top:19px;right:16px;color:#517260}
.partner-meta{display:grid;gap:3px;color:var(--muted)}
.mini-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin:0}
.mini-stats .stat{padding:10px}
.mini-stats .stat strong{font-size:18px}
.plain-list{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.plain-list li{display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}
.alerts{position:fixed;z-index:20;right:18px;bottom:17px;display:grid;gap:7px;max-width:calc(100% - 36px);pointer-events:none}
.toast{background:#244f41;color:white;border-radius:8px;padding:10px 15px;box-shadow:0 6px 15px #14242b35;font-weight:650}
.toast.is-error{background:#8a362f}
.auth-layout{min-height:100dvh;display:grid;grid-template-columns:minmax(320px,1fr) minmax(360px,1fr)}
.auth-brand{min-height:100%;background:#1d3037;background-image:repeating-linear-gradient(129deg,transparent 0 38px,#ffffff08 38px 39px),linear-gradient(150deg,#18242b,#2b4c43);color:#fff;padding:clamp(24px,5vw,64px);display:grid;align-content:space-between;gap:45px}
.auth-copy h1{font-size:clamp(52px,7vw,104px);line-height:.91;margin:9px 0 19px;font-weight:760}
.auth-copy .eyebrow{color:#e9c784}
.auth-copy p{color:#d3dfdd;font-size:clamp(15px,2vw,19px);max-width:29ch}
.auth-index{display:flex;gap:14px;color:#c3d1cf;font-size:11px;font-weight:650;flex-wrap:wrap}
.auth-form-area{display:grid;place-items:center;padding:30px 24px;background:#fafcfb}
.auth-form{width:min(100%,365px);display:grid;gap:13px}
.auth-form h2{font-size:clamp(25px,4vw,34px)}
.auth-form .field input{min-height:43px}
.auth-submit{margin-top:5px;justify-content:space-between;min-height:44px}
@media(max-width:1080px){
  .app-shell{grid-template-columns:205px minmax(0,1fr)}
  .sidebar{padding-inline:11px}
}
@media(max-width:950px){
  .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mini-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .app-shell{display:block}
  .sidebar{position:fixed;z-index:12;inset:0 auto 0 0;width:min(260px,82vw);height:100dvh;transform:translateX(-100%);visibility:hidden;transition:transform .16s,visibility .16s}
  .nav-open .sidebar{transform:translateX(0);visibility:visible}
  .nav-open .nav-scrim{display:block;position:fixed;inset:0;z-index:11;border:0;background:#12222a80}
  .mobile-menu{display:grid;margin-left:-5px}
  .workspace-content{padding-top:17px}
  .topbar{height:55px}
  .dashboard-grid{grid-template-columns:1fr;gap:0}
  .overview-hero{padding:16px;align-items:flex-start}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:480px){
  .breadcrumb>span,.breadcrumb>b,.top-actions .btn span{display:none}
  .top-actions .btn{padding-inline:7px}
  .workspace-content{padding-inline:10px}
  .page-heading{align-items:flex-start;flex-direction:column;gap:8px}
  .overview-hero{flex-direction:column;gap:12px}
  .overview-hero h1{font-size:31px}
  .stat-grid{gap:7px}
  .stat{padding:10px 8px}
  .stat strong{font-size:18px}
  .panel-head{padding:12px}
  .panel>.stat-grid{margin:0 11px 10px}
  .mini-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quick-card{padding:12px}
  .quick-card strong{font-size:15px}
  .form-grid{grid-template-columns:1fr;gap:9px}
  .sheet{width:calc(100% - 16px)}
  .sheet-content,.sheet-heading,.sheet-footer{padding-inline:12px}
  .auth-layout{display:block}
  .auth-brand{padding:17px 20px;gap:18px}
  .auth-copy h1{font-size:41px}
  .auth-copy br,.auth-index{display:none}
  .auth-copy p{font-size:13px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
