/* ConstructNav v0.9.2.87.1 — workflow, admin visibility, logo contrast, and buyout division polish */
:root{
  --cn-v86-navy:#071b31;
  --cn-v86-navy-2:#123b63;
  --cn-v86-gold:#d9a441;
  --cn-v86-gold-light:#f3d58c;
  --cn-v86-surface:#ffffff;
  --cn-v86-line:#d7e2ec;
  --cn-v86-shadow:0 10px 28px rgba(7,27,49,.08);
}

[hidden]{display:none!important}

/* Updated brand treatment — light plate added so the navy wordmark stays readable. */
.brand-box{
  position:relative;
  min-height:96px;
  height:96px;
  padding:10px 12px;
  background:
    radial-gradient(circle at 18% 0%,rgba(243,213,140,.46),transparent 38%),
    linear-gradient(180deg,#f9fbfd,#eef4f8 72%,#e5edf4);
  border-bottom:3px solid rgba(217,164,65,.88);
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.9),0 8px 18px rgba(7,27,49,.16);
}
.brand-box:after{
  content:"";
  position:absolute;
  right:17px;
  bottom:7px;
  left:17px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(217,164,65,.9),rgba(217,164,65,.12));
}
.brand-box img{
  position:relative;
  z-index:1;
  width:100%;
  max-width:250px;
  height:78px;
  object-fit:contain;
  filter:drop-shadow(0 4px 9px rgba(7,27,49,.16));
}
.cn-auth-brand{
  background:
    radial-gradient(circle at 16% 0%,rgba(243,213,140,.42),transparent 38%),
    linear-gradient(180deg,#ffffff,#eef5fa);
  color:var(--cn-v86-navy);
  border-bottom:4px solid var(--cn-v86-gold);
}
.cn-auth-brand img{
  filter:drop-shadow(0 4px 9px rgba(7,27,49,.16));
}
.cn-auth-brand strong{color:var(--cn-v86-navy-2)}
.card{
  border-color:var(--cn-v86-line);
  border-radius:11px;
  box-shadow:var(--cn-v86-shadow);
}
.btn{
  border-radius:8px;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn.primary{box-shadow:0 5px 12px rgba(18,59,99,.18)}

/* Admin company-wide view */
.cn-admin-company-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin:0 0 16px;
  padding:17px 19px;
  border:1px solid rgba(217,164,65,.52);
  border-radius:12px;
  background:
    linear-gradient(112deg,rgba(7,27,49,.98),rgba(18,59,99,.96) 68%,rgba(29,73,113,.95));
  color:#fff;
  box-shadow:0 14px 30px rgba(7,27,49,.18);
}
.cn-admin-company-banner>div{min-width:0}
.cn-admin-company-banner strong{display:block;font-size:20px;line-height:1.2;color:#fff;margin:3px 0}
.cn-admin-company-banner p{margin:3px 0 0;color:#d8e6f2;line-height:1.45;font-size:13px}
.cn-admin-company-kicker{
  display:inline-block;
  color:var(--cn-v86-gold-light);
  font-size:10px;
  font-weight:900;
  letter-spacing:.16em;
}
.cn-admin-company-banner .btn{
  flex:0 0 auto;
  background:#fff;
  border-color:#fff;
  color:var(--cn-v86-navy);
  box-shadow:0 5px 14px rgba(0,0,0,.16);
}
.cn-task-head-actions{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.cn-company-scope-control{
  display:grid;
  gap:4px;
  min-width:190px;
  margin:0;
  color:#435b70;
  font-size:10px;
  font-weight:850;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.cn-company-scope-control select{
  width:100%;
  min-height:38px;
  padding:7px 30px 7px 10px;
  border:1px solid #b9c9d7;
  border-radius:8px;
  background:#fff;
  color:var(--cn-v86-navy);
  font-size:12px;
  font-weight:750;
  text-transform:none;
  letter-spacing:0;
}
.cn-calendar-scope{margin-left:auto;min-width:205px}
body.cn-admin-company-view #dashboard .stat{border-top:3px solid rgba(217,164,65,.72)}

/* Consolidated ConstructNav Estimator */
.cn-single-estimator-tabs{
  border:1px solid var(--cn-v86-line);
  border-bottom:0;
  border-radius:12px 12px 0 0;
  background:#fff;
  padding:10px;
  margin-bottom:0!important;
}
.cn-single-estimator-tabs #cnEstimateModeBtn{
  background:var(--cn-v86-navy-2);
  border-color:var(--cn-v86-navy-2);
  color:#fff;
}
.cn-estimator-hero{
  position:relative;
  overflow:hidden;
  margin-top:0;
  margin-bottom:14px;
  border-radius:0 0 13px 13px;
  border-color:#0d3356;
  padding:22px 24px;
  background:
    radial-gradient(circle at 92% 18%,rgba(217,164,65,.32),transparent 29%),
    linear-gradient(118deg,#06182b,#0c3255 62%,#174b76);
  box-shadow:0 14px 32px rgba(7,27,49,.2);
}
.cn-estimator-hero:after{
  content:"";
  position:absolute;
  width:170px;
  height:170px;
  right:-64px;
  bottom:-92px;
  border:1px solid rgba(243,213,140,.32);
  border-radius:50%;
  box-shadow:0 0 0 22px rgba(243,213,140,.06),0 0 0 44px rgba(243,213,140,.035);
  pointer-events:none;
}
.cn-estimator-hero>div{position:relative;z-index:1}
.cn-estimator-hero h2{margin:4px 0 6px;color:#fff;font-size:25px;letter-spacing:-.02em}
.cn-estimator-hero p.muted{margin:0;color:#d5e4f0;line-height:1.55}
.cn-estimator-kicker{
  display:inline-block;
  color:var(--cn-v86-gold-light);
  font-size:10px;
  font-weight:900;
  letter-spacing:.16em;
}
.cn-estimator-hero .btn{background:#fff;border-color:#fff;color:var(--cn-v86-navy)}
.cn-estimator-hero .btn.primary{background:var(--cn-v86-gold);border-color:var(--cn-v86-gold);color:#071b31}
.cn-estimator-hero .btn.green{background:#fff;border-color:#fff;color:#12553c}
#estimating .excel-step-card,#estimating .excel-input-card,#estimating .excel-summary-card{border-top:3px solid rgba(18,59,99,.18)}

/* Pass-through PM handling */
.cn-inline-owner-btn{
  margin-top:8px;
  padding:7px 10px;
  border:1px solid #b5c7d7;
  border-radius:7px;
  background:#f4f8fb;
  color:var(--cn-v86-navy-2);
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.cn-inline-owner-btn:hover{background:#e8f0f6;border-color:#7595af}
.cn-pass-through-project-form [data-project-pm-field]{
  padding:11px;
  border:1px dashed #c8a04a;
  border-radius:9px;
  background:#fffaf0;
}

/* Estimate-to-buyout source status */
.cn-buyout-source-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 9px;
  padding:9px 11px;
  border:1px solid #bad4c6;
  border-radius:8px;
  background:#f0f8f3;
  color:#174f37;
  font-size:11px;
}
.cn-buyout-source-notice strong{font-size:11px;white-space:nowrap}
.cn-buyout-source-notice span{min-width:0;text-align:right;overflow-wrap:anywhere}
.cn-buyout-source-notice.is-ready{border-color:#b7cde0;background:#f2f7fb;color:#173f64}
.cn-buyout-source-notice.needs-refresh{border-color:#e5bd74;background:#fff8e8;color:#774d0b}

/* Account action remains visibly separate from destructive data controls. */
.cn-logout-button{
  background:#edf3f7!important;
  border-color:#a9bdcd!important;
  color:#102f49!important;
  box-shadow:none!important;
}
.cn-logout-button:hover{background:#dfeaf1!important;border-color:#173a58!important}

@media(max-width:980px){
  .cn-admin-company-banner{align-items:flex-start;flex-direction:column}
  .cn-admin-company-banner .btn{width:100%}
  .cn-calendar-scope{margin-left:0;min-width:180px}
}
@media(max-width:760px){
  .brand-box{height:82px;min-height:82px}
  .brand-box img{height:64px;max-width:225px}
  .cn-estimator-hero{padding:18px;align-items:flex-start}
  .cn-estimator-hero .actions{width:100%}
  .cn-estimator-hero .actions .btn{flex:1 1 180px;text-align:center}
  .cn-task-head-actions{width:100%;justify-content:stretch}
  .cn-company-scope-control{width:100%;min-width:0}
  .cn-task-head-actions>.btn{width:100%}
  .cn-buyout-source-notice{align-items:flex-start;flex-direction:column}
  .cn-buyout-source-notice span{text-align:left}
}

/* v0.9.2.87.1 — exported buyouts and the on-screen workbook must show estimate budget by division, not only a total. */
.cn-buyout-division[data-cn-buyout-estimate-division="true"] td{
  background:#f7fbff;
  border-top:2px solid rgba(217,164,65,.55);
}
.cn-buyout-division[data-cn-buyout-estimate-division="true"] .cn-buyout-freeze-2 strong:after{
  content:"  EST";
  display:inline-block;
  margin-left:7px;
  padding:2px 5px;
  border-radius:999px;
  background:#e8f0f7;
  color:#173a58;
  font-size:9px;
  letter-spacing:.08em;
}
@media(max-width:760px){
  .brand-box img{max-width:225px}
}

/* v0.9.2.87.1 — sidebar logo contrast hotfix. The sidebar cleanup stylesheet uses a more specific selector, so this rule intentionally matches and overrides it. */
html:not(.cn-mobile-mode) .brand-box,
html:not(.cn-mobile-mode) aside .brand-box{
  background:
    radial-gradient(circle at 18% 0%,rgba(243,213,140,.44),transparent 38%),
    linear-gradient(180deg,#fbfdff,#eef5fa 72%,#e5edf4) !important;
  border-bottom:3px solid rgba(217,164,65,.9) !important;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.92),0 8px 18px rgba(7,27,49,.18) !important;
}
html:not(.cn-mobile-mode) .brand-box img,
html:not(.cn-mobile-mode) aside .brand-box img{
  width:205px !important;
  max-width:calc(100% - 24px) !important;
  height:72px !important;
  object-fit:contain !important;
  object-position:left center !important;
  filter:drop-shadow(0 4px 9px rgba(7,27,49,.14)) !important;
}
body.cn-sidebar-collapsed html:not(.cn-mobile-mode) .brand-box img,
body.cn-sidebar-collapsed .brand-box img{
  width:50px !important;
  max-width:50px !important;
  height:50px !important;
  object-fit:contain !important;
}
