/* Platform shell on top of the Pricing Studio styles. */
.boot-note { padding: 3rem; text-align: center; color: var(--muted); }
#toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: grid; gap: .5rem; max-width: min(420px, 92vw); }
.toast { padding: .75rem 1rem; border-radius: 16px; background: var(--fervo-graphite); color: #fff; font-size: .88rem; box-shadow: var(--shadow); }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--fervo-deep); }

.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(420px, 100%); padding: 1.6rem; border-radius: var(--radius-xl); background: rgba(255,255,255,.9); box-shadow: var(--shadow); display: grid; gap: .9rem; }
.login-card h1 { margin: 0; font-size: 1.5rem; color: var(--fervo-graphite); }
.brand-mark { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 16px; background: var(--fervo-deep); color: var(--fervo-lime); font-weight: 900; font-size: 1.5rem; }
.brand-card.plain { grid-template-columns: auto 1fr; align-items: center; gap: .75rem; }
.brand-card.plain h1 { font-size: 1.05rem; }
.side-panel .main-nav { overflow-y: auto; }
.side-panel .nav-item { width: 100%; }
.nav-group-label { margin: .7rem .4rem .2rem; color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.user-card { margin-top: auto; padding: .8rem; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.7); font-size: .82rem; display: grid; gap: .35rem; }
.user-card strong { color: var(--fervo-graphite); }
.user-card .muted { color: var(--muted); font-size: .76rem; }
.user-card .row { display: flex; gap: .4rem; flex-wrap: wrap; }
.offline-badge { display: none; padding: .3rem .6rem; border-radius: 999px; background: var(--warning); color: #7a5b00; font-size: .74rem; font-weight: 800; }
body.is-offline .offline-badge { display: inline-block; }
.mobile-bar, .menu-overlay { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .3rem .2rem 1rem; }
.page-head h2 { margin: .1rem 0 0; color: var(--fervo-graphite); font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.page-head p { margin: .3rem 0 0; color: var(--muted); max-width: 62ch; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.panel + .panel { margin-top: 1rem; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }

.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.grid th { text-align: left; padding: .55rem .6rem; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
table.grid td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tr:hover td { background: rgba(5,154,163,.04); }
table.grid td.actions { white-space: nowrap; text-align: right; }
table.grid td.actions .btn { margin-left: .25rem; }
table.grid .sub { display: block; color: var(--muted); font-size: .78rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: .16rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--teal-soft); color: var(--fervo-deep); white-space: nowrap; }
.badge.new { background: var(--warning); color: #7a5b00; }
.badge.refused, .badge.inactive, .badge.failed { background: rgba(186,47,47,.12); color: var(--danger); }
.badge.assigned { background: var(--lime-soft); color: #5c6600; }
.badge.accepted, .badge.in_progress { background: var(--teal-soft); color: #04727a; }
.badge.surveyed, .badge.quoted, .badge.active { background: var(--success-soft); color: #2f6b1f; }
.role-tag { display: inline-block; margin: 0 .25rem .2rem 0; padding: .1rem .5rem; border-radius: 8px; background: rgba(16,24,40,.08); font-size: .72rem; font-weight: 700; }

.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section { grid-column: 1 / -1; margin: .6rem 0 -.2rem; color: var(--fervo-deep); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.checks { display: flex; flex-wrap: wrap; gap: .45rem; }
.check { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.75); font-size: .85rem; cursor: pointer; }
.check input { accent-color: var(--fervo-deep); }
.check:has(input:checked) { border-color: rgba(15,15,15,.5); background: var(--success-soft); }
.modal-card.wide { width: min(980px, 96vw); }
.modal-card { max-height: min(90vh, 900px); }
.form-error { margin: .6rem 0 0; padding: .55rem .75rem; border-radius: 12px; background: rgba(186,47,47,.1); color: var(--danger); font-size: .86rem; white-space: pre-line; }
.hint { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.note-box { padding: .7rem .9rem; border-radius: 16px; background: var(--warning); color: var(--fervo-graphite); font-size: .86rem; line-height: 1.4; }
.note-box.info { background: var(--teal-soft); }
pre.creds { padding: .8rem; border-radius: 14px; background: #f1f5f3; font-size: .9rem; white-space: pre-wrap; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding: .3rem; color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; text-align: center; }
.cal-day { min-height: 92px; padding: .3rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.7); font-size: .74rem; }
.cal-day.other { opacity: .45; }
.cal-day.today { border-color: var(--fervo-deep); box-shadow: inset 0 0 0 1px var(--fervo-deep); }
.cal-day .d { font-weight: 800; color: var(--fervo-graphite); }
.cal-job { display: block; width: 100%; margin-top: 3px; padding: .2rem .35rem; border: 0; border-radius: 8px; background: var(--teal-soft); color: #04616a; text-align: left; font: inherit; font-size: .7rem; line-height: 1.25; cursor: pointer; overflow: hidden; }
.cal-job.assigned { background: var(--lime-soft); color: #4e5700; }
.cal-job.surveyed, .cal-job.quoted { background: var(--success-soft); color: #2f6b1f; }
.cal-job b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* job cards (surveyor) */
.job-list { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.job-card { padding: 1rem; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.88); display: grid; gap: .5rem; }
.job-card h4 { margin: 0; color: var(--fervo-graphite); font-size: 1.02rem; }
.job-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; font-size: .85rem; }
.job-card dt { color: var(--muted); }
.job-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.job-card .row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }

/* survey form */
.survey-bar { position: sticky; top: .5rem; z-index: 20; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem .9rem; margin-bottom: 1rem; border-radius: 20px; background: rgba(255,255,255,.95); box-shadow: 0 10px 30px rgba(44,64,53,.14); }
.survey-bar .grow { flex: 1; min-width: 140px; font-size: .84rem; color: var(--muted); }
.survey-bar .grow strong { display: block; color: var(--fervo-graphite); font-size: .98rem; }
.btn.start { background: var(--fervo-deep); color: #fff; border-color: transparent; font-size: 1rem; padding: .7rem 1.4rem; }
.btn.stop { background: var(--danger); color: #fff; border-color: transparent; font-size: 1rem; padding: .7rem 1.4rem; }
.sv-block { margin-bottom: 1rem; }
.sv-block > .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.sv-block h3 { margin: 0; }
.sv-group { grid-column: 1 / -1; margin-top: .5rem; padding-top: .6rem; border-top: 1px dashed var(--line-strong); color: var(--fervo-deep); font-size: .74rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.sv-remind { margin-top: .8rem; padding: .65rem .85rem; border-radius: 14px; background: var(--teal-soft); font-size: .82rem; line-height: 1.45; }
.sv-remind ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.seg label { padding: .42rem .8rem; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: .85rem; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--fervo-deep); border-color: var(--fervo-deep); color: #fff; }
.photo-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.photo-card { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; display: grid; }
.photo-card img { width: 100%; height: 170px; object-fit: cover; background: #e8eeeb; cursor: zoom-in; }
.photo-card .body { padding: .6rem; display: grid; gap: .4rem; }
.photo-card .meta { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .72rem; color: var(--muted); }
.need-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.need { padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 800; background: rgba(186,47,47,.1); color: var(--danger); }
.need.done { background: var(--success-soft); color: #2f6b1f; }
.lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(10,15,13,.9); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 94vh; }

/* audit */
.diff { width: 100%; border-collapse: collapse; font-size: .8rem; }
.diff th, .diff td { padding: .35rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.diff td.old { background: rgba(186,47,47,.07); }
.diff td.new { background: rgba(116,184,89,.12); }

/* products admin */
.prod-thumb { width: 54px; height: 54px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.prod-thumb.empty { display: inline-grid; place-items: center; color: var(--muted); font-size: .6rem; }
.line-nano-preview img, .nano-product-media img { object-fit: contain; background: #fff; }
.price-warn { color: var(--danger); font-size: .76rem; font-weight: 700; }

@media (max-width: 1260px) {
  .side-panel .main-nav { grid-template-columns: 1fr !important; }
  .side-panel .nav-item { justify-content: flex-start !important; }
}
@media (max-width: 900px) {
  .app-shell { display: block !important; padding: .6rem !important; }
  .mobile-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; margin: -.6rem -.6rem .7rem; background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(44,64,53,.1); }
  .mobile-bar strong { flex: 1; color: var(--fervo-graphite); }
  .menu-btn { width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.2rem; }
  .side-panel { position: fixed !important; inset: 0 auto 0 0; z-index: 80; width: min(300px, 86vw); height: 100vh !important; border-radius: 0 24px 24px 0 !important; transform: translateX(-105%); transition: transform .2s ease; display: flex !important; background: #fff !important; overflow-y: auto; }
  body.menu-open .side-panel { transform: none; }
  body.menu-open .menu-overlay { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(23,33,30,.4); }
  .form-grid.two { grid-template-columns: 1fr; }
  .cal-day { min-height: 64px; }
  .survey-bar { top: 3.6rem; }
  .survey-bar .grow { flex-basis: 100%; }
  .survey-bar > .btn { flex: 1; padding-left: .6rem; padding-right: .6rem; }
}
@media print {
  .mobile-bar, #toasts, .page-head .actions, .survey-bar { display: none !important; }
}

/* costing */
.internal-only { display: none !important; }
body.show-internal .internal-only { display: revert !important; }
body.show-internal span.internal-only { display: contents !important; }
.ro-value { padding: .5rem 0; font-weight: 600; }
.excel-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.page-head .actions .select { min-height: 2.6rem; }
.economic-group-card, .economic-lines { align-content: start; }

/* keep short pages at the top instead of stretching to the full height */
.content-area { align-content: start; }

/* ---- left menu: compact so it fits without a scrollbar; any overflow scrolls invisibly */
.side-panel { gap: .7rem !important; }
.side-panel .main-nav { gap: .15rem; margin-top: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; min-height: 0; align-content: start; }
.side-panel .main-nav::-webkit-scrollbar { display: none; }
.side-panel .nav-item { padding: .42rem .6rem; gap: .6rem; border-radius: 14px; font-size: .92rem; min-width: 0; }
.side-panel .nav-item span:last-child { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.side-panel .nav-icon { width: 1.75rem; height: 1.75rem; border-radius: 10px; font-size: .7rem; flex: 0 0 auto; }
.side-panel .nav-item:hover { transform: none; }
.side-panel .user-card { flex: 0 0 auto; }
.brand-logo-img { width: 3rem; height: 3rem; object-fit: contain; border-radius: 12px; background: #fff; }
.logo-preview { display: flex; align-items: center; gap: 1rem; margin-top: .8rem; }
.logo-preview img { max-width: 220px; max-height: 90px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: .4rem; }

/* ---- list view: every column fits the available width, long text wraps */
.sheet-wrap { max-height: none; overflow-x: hidden; }
.excel-table.compact { width: 100%; min-width: 0; table-layout: fixed; font-size: .72rem; }
.excel-table.compact th, .excel-table.compact td { height: auto; min-height: 1.5rem; padding: .16rem .22rem; white-space: normal; overflow-wrap: break-word; line-height: 1.2; vertical-align: top; }
/* internal columns are only sent to costing staff and admins, so the list view always shows them */
.excel-table.compact .internal-col { display: table-cell !important; }
.excel-table.compact thead th { position: static; font-size: .66rem; }
.excel-table.compact tbody th { font-size: .62rem; color: var(--muted); background: #F2F4F7; text-align: right; }
@media (max-width: 1100px) { .sheet-wrap { overflow-x: auto; } .excel-table.compact { min-width: 980px; } }

/* ---- printable offer (A4) */
#printDoc { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm 12mm 12mm 12mm; }
  body.printing { background: #fff !important; }
  body.printing > *:not(#printDoc) { display: none !important; }
  body.printing #printDoc { display: block; font-family: var(--font); color: #0F0F0F; font-size: 8.5pt; }
  #printDoc .pd-frame { width: 100%; border-collapse: collapse; }
  #printDoc .pd-frame > tbody > tr > td, #printDoc .pd-frame > tfoot > tr > td { padding: 0; border: 0; }
  #printDoc .pd-foot-space { height: 16mm; }
  #printDoc .pd-footer { position: fixed; left: 0; right: 0; bottom: 0; max-height: 14mm; overflow: hidden; padding-top: 2mm; border-top: .3mm solid #9aa5a0; font-size: 7pt; line-height: 1.3; color: #475467; text-align: center; }
  #printDoc .pd-footer:empty { display: none; }
  #printDoc .pd-letterhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; padding-bottom: 3mm; border-bottom: .6mm solid #00866A; }
  #printDoc .pd-letterhead img { max-height: 22mm; max-width: 60mm; object-fit: contain; }
  #printDoc .pd-company { margin-left: auto; text-align: right; display: grid; gap: .6mm; font-size: 8pt; color: #475467; }
  #printDoc .pd-company strong { font-size: 12pt; color: #0F0F0F; }
  #printDoc .pd-header-text { margin: 2.5mm 0 0; font-size: 8.5pt; color: #475467; }
  #printDoc .pd-title { margin: 5mm 0 3mm; font-size: 15pt; color: #0F0F0F; letter-spacing: .02em; }
  #printDoc .pd-info { display: grid; grid-template-columns: 1.6fr 1fr; gap: 6mm; margin-bottom: 4mm; }
  #printDoc .pd-info div div { display: grid; grid-template-columns: 26mm 1fr; gap: 2mm; padding: .7mm 0; }
  #printDoc .pd-info span { color: #475467; }
  #printDoc .pd-narrative { margin-bottom: 4mm; }
  #printDoc .pd-narrative h2 { margin: 0 0 1mm; font-size: 9pt; color: #0F0F0F; text-transform: uppercase; letter-spacing: .06em; }
  #printDoc .pd-narrative p { margin: 0; line-height: 1.4; }
  #printDoc .pd-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  #printDoc .pd-table td { border: .2mm solid #cfd6d2; padding: 1mm 1.2mm; vertical-align: top; overflow-wrap: break-word; line-height: 1.25; }
  #printDoc .pd-table tr { break-inside: avoid; }
  #printDoc .pd-vat { display: block; margin-top: .6mm; font-size: 7.5pt; font-weight: 700; font-style: italic; color: #b03a2e; text-transform: none; letter-spacing: 0; }
  #printDoc .pd-table tr.gap td { border: 0; height: 2.5mm; padding: 0; }
  #printDoc .pd-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  #printDoc .pd-table td.subheader-cell { background: #E6F4EC !important; font-weight: 700; }
  #printDoc .pd-table td.section-cell { background: #00866A !important; color: #fff; font-weight: 700; }
  #printDoc .pd-table td.subtotal-cell { background: #eef6f7 !important; font-weight: 700; }
  #printDoc .pd-table td.header-cell { background: #515551 !important; color: #fff; font-weight: 700; }
  #printDoc .pd-table td.total-cell { background: #eef3c4 !important; font-weight: 800; }
  #printDoc .pd-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-top: 8mm; break-inside: avoid; }
  #printDoc .pd-sign h3 { margin: 0 0 1mm; font-size: 8.5pt; }
  #printDoc .pd-sign p { margin: 0; min-height: 4mm; color: #475467; }
  #printDoc .pd-sign .pd-line { margin-top: 12mm; padding-top: 1mm; border-top: .3mm solid #0F0F0F; font-size: 7.5pt; }
  #printDoc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- search box on list pages */
.search-box { position: relative; display: inline-flex; align-items: center; }
.search-box > span { position: absolute; left: .75rem; color: var(--muted); font-size: 1.05rem; pointer-events: none; }
.search-box input { width: min(260px, 60vw); min-height: 2.6rem; padding-left: 2rem; border-radius: 999px; }
.search-box .search-count { position: absolute; right: .9rem; color: var(--muted); font-size: .72rem; pointer-events: none; }
.search-hide { display: none !important; }
@media print { .search-box { display: none !important; } }
.survey-ref summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.survey-ref ul { margin: .6rem 0 0; padding-left: 1.2rem; font-size: .88rem; line-height: 1.6; }
.page-head .actions .badge { align-self: center; }

/* costing: add-row bar, "+ Add CTs", freshly added row */
.add-row-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.add-row-bar .add-row-btn { margin-top: 0; }
.line-grid.other-acc { margin-top: .9rem; }
.line-card.just-added { outline: 2px solid var(--accent, #2f7d5b); outline-offset: 2px; }
.economic-note-line { opacity: .75; font-style: italic; }
@media print { #printDoc .pd-subtitle { margin: 5mm 0 2mm; font-size: 10pt; color: #0F0F0F; text-transform: uppercase; letter-spacing: .06em; } }

/* ===================== EnerView theme: green = sustainability, dark blue = engineering and trust ===================== */
body {
  background:
    radial-gradient(circle at 6% 0%, rgba(75, 163, 40, .16) 0, transparent 30rem),
    radial-gradient(circle at 100% 0%, rgba(4, 154, 163, .12) 0, transparent 28rem),
    linear-gradient(160deg, #f8fafb 0%, var(--bg) 55%, #eef4f1 100%);
}
h1, h2, h3, h4, h5 { color: var(--ev-navy); }
.eyebrow, .form-section, .sv-group { color: var(--ev-green) !important; }
.btn.primary, .btn.start { background: linear-gradient(135deg, var(--ev-green), #3a9f3c); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(0, 134, 106, .22); }
.btn.primary:hover, .btn.start:hover { background: linear-gradient(135deg, #278a3a, var(--ev-green)); }
.btn.primary:disabled { opacity: .55; box-shadow: none; }
.btn.ghost { color: var(--ev-navy); border-color: rgba(15, 15, 15, .16); }
.btn.ghost:hover { border-color: var(--ev-blue); }
.nav-item { color: var(--ev-navy); }
.nav-item.active { background: linear-gradient(135deg, var(--ev-navy), var(--ev-navy-2)); border-color: transparent; box-shadow: 0 12px 26px rgba(15, 15, 15, .24), inset 4px 0 0 var(--ev-green-2); }
.nav-item.active .nav-icon { color: var(--ev-navy); }
.nav-icon { color: var(--ev-navy); background: rgba(15, 15, 15, .06); }
.tab-btn.active { background: var(--ev-navy); }
.toast.ok { background: var(--ev-green); }
.toast { background: var(--ev-navy); }
.badge { color: var(--ev-navy); }
.seg label:has(input:checked) { background: var(--ev-green); border-color: var(--ev-green); }
.check input, .switch-row input { accent-color: var(--ev-green); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ev-blue); box-shadow: 0 0 0 3px rgba(4, 154, 163, .14); outline: none; }
.role-tag { background: rgba(0, 134, 106, .12); color: #23753a; }
.excel-table td.header-cell { background: var(--ev-navy); }
.excel-table td.section-cell { background: var(--ev-green); }
.excel-table td.subheader-cell { background: rgba(15, 15, 15, .07); color: var(--ev-navy); }
.cal-day.today { border-color: var(--ev-green); box-shadow: inset 0 0 0 1px var(--ev-green); }
.line-card.just-added { outline-color: var(--ev-green); }

/* sidebar brand */
.brand-card.ev-brand { display: grid; grid-template-columns: 1fr; gap: .55rem; padding: .9rem .9rem .8rem; background: #fff; }
.ev-logo { display: block; width: 100%; max-width: 220px; height: auto; }
.ev-tenant { display: flex; align-items: center; gap: .55rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.ev-tenant h1 { margin: 0; font-size: .98rem; color: var(--ev-navy); }
.ev-tenant .brand-logo-img { width: 2.2rem; height: 2.2rem; border-radius: 9px; border: 1px solid var(--line); }
.mobile-logo { height: 1.9rem; width: auto; flex: 1; object-fit: contain; object-position: left center; }

/* login */
.login-wrap { min-height: 100vh; padding: 1.25rem; background:
  radial-gradient(circle at 12% 10%, rgba(75, 163, 40, .28) 0, transparent 26rem),
  radial-gradient(circle at 88% 92%, rgba(4, 154, 163, .45) 0, transparent 30rem),
  linear-gradient(145deg, #0f2a42 0%, var(--ev-navy) 45%, #17405f 100%); }
.login-split { width: min(1040px, 100%); display: grid; grid-template-columns: 1.15fr 1fr; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(5, 18, 30, .45); }
.login-brand { display: flex; flex-direction: column; justify-content: center; gap: 1.6rem; padding: 3rem 2.6rem; background: linear-gradient(160deg, #ffffff 0%, #f3f8f4 100%); border-right: 1px solid rgba(15, 15, 15, .08); }
.login-logo { width: 100%; max-width: 430px; height: auto; }
.login-lead { margin: 0; max-width: 30rem; color: #344054; font-size: .98rem; line-height: 1.55; }
.login-steps { width: 100%; max-width: 440px; height: auto; opacity: .95; }
.login-card { width: 100%; padding: 3rem 2.6rem; border-radius: 0; background: #fff; box-shadow: none; display: grid; align-content: center; gap: 1rem; }
.login-card h1 { margin: 0; font-size: 1.6rem; color: var(--ev-navy); letter-spacing: -.01em; }
.login-card .eyebrow { margin-bottom: .25rem; }
.login-btn { min-height: 3rem; font-size: 1rem; margin-top: .2rem; }
.login-foot { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; }
.login-logo-mobile { display: none; width: 210px; height: auto; margin-bottom: .2rem; }
@media (max-width: 820px) {
  .login-split { grid-template-columns: 1fr; max-width: 440px; }
  .login-brand { display: none; }
  .login-card { padding: 2rem 1.5rem; }
  .login-logo-mobile { display: block; }
}
.mail-test-out { margin: .8rem 0 0; padding: .8rem 1rem; border-radius: 14px; background: #f1f5f8; color: var(--ev-navy); font-size: .82rem; white-space: pre-wrap; word-break: break-word; }
.mail-test-out.ok { background: rgba(0, 134, 106, .12); color: #00664F; }
.mail-test-out.bad { background: rgba(186, 47, 47, .08); color: #8a2323; }
/* workflow settings and approval banner */
.flow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.flow-steps div { padding: .75rem .9rem; border-radius: 16px; background: rgba(15, 15, 15, .05); display: grid; gap: .25rem; font-size: .82rem; color: #344054; }
.flow-steps strong { color: var(--ev-navy); font-size: .88rem; }
.flow-lists { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.flow-list { padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; display: grid; gap: .3rem; align-content: start; }
.flow-list h4 { margin: 0; font-size: .92rem; }
.flow-list .check { display: flex; gap: .45rem; align-items: baseline; font-size: .86rem; }
.flow-list .check .sub { display: inline; color: var(--muted); font-size: .74rem; }
@media (max-width: 900px) { .flow-steps, .flow-lists { grid-template-columns: 1fr; } }
.badge.pending { background: rgba(232, 160, 0, .16); color: #8a5a00; }
.badge.returned { background: rgba(186, 47, 47, .12); color: var(--danger); }
.badge.approved { background: rgba(0, 134, 106, .14); color: #00664F; }
.approval-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1rem; padding: .85rem 1.1rem; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.approval-bar.pending { border-color: rgba(232, 160, 0, .45); background: #fffaf0; }
.approval-bar.returned { border-color: rgba(186, 47, 47, .35); background: #fff6f6; }
.approval-bar.approved { border-color: rgba(0, 134, 106, .35); background: #f4fbf5; }
.approval-bar .grow { flex: 1; min-width: 14rem; font-size: .88rem; color: #344054; }
.approval-bar .grow strong { color: var(--ev-navy); }
.btn.locked { opacity: .5; }
.ref-tag { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 6px; background: rgba(15, 15, 15, .08); color: var(--ev-navy); font-size: .72rem; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }

/* ---- phones: nothing wider than the screen; tables become stacked cards ---- */
#main, .content-area, .panel, .page-head, .page-head > div { min-width: 0; max-width: 100%; }
@media (max-width: 820px) {
  .app-shell { grid-template-columns: minmax(0, 1fr) !important; padding-left: .7rem !important; padding-right: .7rem !important; }
  .page-head { align-items: stretch; flex-direction: column; gap: .7rem; }
  .page-head .actions { width: 100%; }
  .page-head .actions .search-box { flex: 1 1 100%; }
  .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .panel { padding: .9rem; border-radius: 20px; }
}
@media (max-width: 700px) {
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid tr { padding: .7rem .2rem; border-bottom: 1px solid var(--line-strong); }
  table.grid td { border: 0; padding: .25rem 0; overflow-wrap: anywhere; }
  table.grid td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
  table.grid td[data-label=""]::before, table.grid td.actions::before, table.grid td:first-child::before { content: none; }
  table.grid td:first-child { font-size: 1rem; }
  table.grid td.actions { white-space: normal; text-align: left; display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .5rem; }
  table.grid td.actions .btn { margin: 0; }
  table.grid tr:hover td { background: none; }
}
/* surveyor calendar (phone app) */
.svc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.svc-dow { text-align: center; font-size: .68rem; font-weight: 850; color: var(--muted); padding: .2rem 0; }
.svc-day { position: relative; aspect-ratio: 1 / 1; min-height: 2.6rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; color: var(--ev-navy); cursor: pointer; padding: 0; }
.svc-day.other { opacity: .4; }
.svc-day.today { border-color: var(--ev-green); }
.svc-day.sel { background: var(--ev-navy); color: #fff; border-color: var(--ev-navy); }
.svc-day i { position: absolute; top: 3px; right: 3px; min-width: 1.05rem; height: 1.05rem; padding: 0 .2rem; border-radius: 999px; background: var(--ev-blue); color: #fff; font-style: normal; font-size: .62rem; line-height: 1.05rem; text-align: center; }
.svc-day i.new { background: #e8a000; }
.svc-day i.done { background: var(--ev-green); }
.svc-list { display: grid; gap: .5rem; }
.svc-job { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.svc-job b { color: var(--ev-navy); font-size: .95rem; }
.svc-job strong { display: block; color: var(--ev-navy); }
.svc-job small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) { .page-head .actions .search-box { width: 100%; } }
/* installed phone app: bottom tab bar instead of the side menu */
.is-app .menu-btn, .is-app .side-panel, .is-app .menu-overlay { display: none !important; }
.is-app .app-shell { grid-template-columns: minmax(0, 1fr) !important; display: block !important; }
.is-app .mobile-bar { display: flex !important; }
.is-app #main { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
.app-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around; gap: .3rem; padding: .45rem .6rem calc(.45rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15, 15, 15, .08); }
.tab-item { flex: 1; display: grid; justify-items: center; gap: .1rem; padding: .35rem .2rem; border: 0; border-radius: 14px; background: none; color: var(--muted); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.tab-item .tab-ico { font-size: 1.15rem; line-height: 1; }
.tab-item.active { color: #fff; background: var(--ev-navy); }
.note-box.warn-cost { background: #fff6e0; border: 1px solid rgba(232, 160, 0, .5); color: #5a3f00; }
.note-box.warn-cost ul { margin: .4rem 0 .3rem 1.1rem; padding: 0; }
.obox-remark { margin: .7rem 0 0; color: #c62828; font-weight: 800; font-size: .9rem; }
/* Costing header: panels side by side start at the same top; fields line up from the top whatever the hint length below them */
.top-grid { align-items: start; }
.top-grid > .panel + .panel { margin-top: 0; }
.form-grid { align-items: start; }
.form-grid .field { align-content: start; }
/* Section header chips in the internal view: equipment sale · cost · GM on one row, license sale · cost · GM on the next */
body.show-internal .section-totals.with-license { display: grid; grid-template-columns: repeat(3, minmax(8.8rem, auto)); justify-content: end; }
@media (max-width: 760px) { .solution-head { flex-wrap: wrap; } .solution-head .section-totals { width: 100%; justify-content: stretch; } body.show-internal .section-totals.with-license { grid-template-columns: repeat(3, minmax(0, 1fr)); } body.show-internal .section-totals .total-chip { min-width: 0; padding: .5rem .55rem; } body.show-internal .section-totals .total-chip span { font-size: .6rem; } body.show-internal .section-totals .total-chip strong { font-size: .82rem; } }
/* Line cards in the internal view: equipment row and license row, total sell on the far right across both rows */
body.show-internal .metrics-row.lic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.show-internal .metrics-row.lic-grid .metric.total { grid-column: 4; grid-row: 1 / span 2; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 1100px) { body.show-internal .metrics-row.lic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } body.show-internal .metrics-row.lic-grid .metric.total { grid-column: 1 / -1; grid-row: auto; } }
@media (max-width: 900px) { body.show-internal .metrics-row.lic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } body.show-internal .metrics-row.lic-grid .metric { min-width: 0; padding: .5rem; } body.show-internal .metrics-row.lic-grid .metric strong { font-size: .82rem; } }
/* Products & cost table: compact product cards */
.pcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: .8rem; }
.pcard { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.85); align-items: start; }
.pc-media { width: 132px; height: 132px; border-radius: 14px; overflow: hidden; background: #f1f5f8; display: grid; place-items: center; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; }
.pc-noimg { color: var(--muted); font-size: .75rem; }
.pc-body { display: grid; gap: .45rem; min-width: 0; }
.pc-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pc-title h5 { margin: 0; font-size: 1.02rem; color: var(--fervo-graphite, #0F0F0F); }
.pc-type { padding: .15rem .5rem; border-radius: 999px; background: rgba(0,134,106,.14); color: #1f6e30; font-size: .66rem; font-weight: 850; letter-spacing: .05em; }
.pc-desc, .pc-note { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.pc-note strong { color: var(--ink); }
.pc-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.pc-num { padding: .45rem .6rem; border-radius: 12px; background: #f5f8fa; border: 1px solid var(--line); }
.pc-num span { display: block; color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.pc-num strong { font-size: .95rem; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.pc-actions { display: flex; gap: .4rem; margin-left: auto; }
@media (max-width: 520px) { .pcard { grid-template-columns: 84px minmax(0, 1fr); gap: .7rem; } .pc-media { width: 84px; height: 84px; } }
.pc-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Admin views: the admin's own items (opened, team-led, surveyed or costed by them) are highlighted and listed first */
.mine-block { border: 2px solid #4BA328; border-radius: 16px; padding: .6rem; background: rgba(75,163,40,.06); margin-bottom: 1rem; }
.mine-head, .others-head { display: flex; align-items: center; gap: .5rem; margin: .1rem .2rem .6rem; color: var(--ink); }
.others-head { margin-top: .4rem; color: var(--muted); }
.mine-tag { padding: .15rem .55rem; border-radius: 999px; background: #00866A; color: #fff; font-size: .7rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
tr.mine-row > td { background: rgba(75,163,40,.08); }
tr.mine-row > td:first-child { box-shadow: inset 4px 0 0 #00866A; }
.cal-job.mine { outline: 2px solid #00866A; outline-offset: -2px; }
.cal-job.mine::before { content: "★ "; color: #00866A; }
#delReason.invalid { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.job-card.mine { border: 2px solid #00866A; background: rgba(75,163,40,.06); }
.svc-job.mine { box-shadow: inset 4px 0 0 #00866A; background: rgba(75,163,40,.08); }
/* Survey: OBox picker */
.sv-obox .obox-row { display: grid; grid-template-columns: minmax(0, 1fr) 5rem auto; gap: .45rem; align-items: center; margin-bottom: .45rem; }
@media (max-width: 520px) { .sv-obox .obox-row { grid-template-columns: minmax(0, 1fr) 4rem; } .sv-obox .obox-row .btn { grid-column: 1 / -1; justify-self: start; } }

/* Move line cards up/down within a section */
.row-actions { display: flex; align-items: flex-start; gap: .3rem; flex: 0 0 auto; align-self: start; }
.row-move-btn { width: 2rem; height: 1.9rem; border: 1px solid rgba(15,15,15,.18); border-radius: 999px; background: rgba(255,255,255,.86); color: var(--ev-navy, #0F0F0F); cursor: pointer; font-size: .68rem; line-height: 1; padding: 0; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.row-move-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(4,154,163,.45); background: rgba(4,154,163,.08); }
.row-move-btn:disabled { opacity: .3; cursor: default; }
.line-card.just-moved { outline: 2px solid var(--ev-green, #00866A); outline-offset: 2px; }
@media (max-width: 720px) { .row-actions { margin-left: auto; } .row-actions .row-delete-btn { margin-left: 0; } }

/* Draft costings (Save ≠ Submit for approval) */
.badge.draft { background: rgba(4, 154, 163, .12); color: #344054; }
.approval-bar.draft { border-color: rgba(4, 154, 163, .35); background: #F6FEF9; }
#submitQuote:disabled { opacity: .45; cursor: default; }

/* Technical: installation references, connections and addresses */
.tech-meta { margin: -.4rem 0 1rem; color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tech-ok { padding: .75rem 1rem; border-radius: 14px; background: #f4fbf5; border: 1px solid rgba(0,134,106,.35); color: #00664F; font-weight: 600; font-size: .9rem; }
.tech-warn { padding: .75rem 1rem; border-radius: 14px; background: #fff8f0; border: 1px solid rgba(224,123,57,.45); font-size: .88rem; }
.tech-warn summary { cursor: pointer; }
.tech-warn ul { margin: .5rem 0 0; padding-left: 1.2rem; line-height: 1.55; }
.tech-warn li.err { color: #9b2c2c; }
.tech-warn li.warn { color: #8a5a00; }
.tech-change { margin-bottom: .8rem; padding: .75rem 1rem; border-radius: 14px; background: #F6FEF9; border: 1px solid rgba(4,154,163,.35); font-size: .88rem; line-height: 1.5; }
.link-btn { border: 0; background: none; color: var(--ev-blue, #049AA3); font-weight: 700; cursor: pointer; padding: 0 .2rem; text-decoration: underline; font-size: .85rem; }
.tech-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-bottom: .8rem; }
.tech-bar .grow { flex: 1; }
.tech-bulk { padding: .55rem .8rem; border-radius: 12px; background: #eef5f0; border: 1px solid #d6e6db; }
.tech-bulk.idle { opacity: .6; }
.tech-in { min-height: 2.1rem !important; padding: .3rem .55rem !important; font-size: .84rem !important; width: auto; }
.tech-table td .tech-in { width: 100%; min-width: 7rem; }
.tech-table td .tech-addr { min-width: 4rem; max-width: 5rem; text-align: right; }
.tech-table td.c { text-align: center; }
.tech-table tr.tech-grp td { background: #f2f6f8; font-size: .8rem; color: var(--muted); padding-top: .55rem; }
.tech-table tr.tech-open td { background: #fff7ef; }
.tech-table .sub.bad { color: #9b2c2c; font-weight: 700; }
.tech-sw { display: inline-flex; gap: .3rem; align-items: center; font-size: .8rem; white-space: nowrap; }
.tech-canvas { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tech-canvas svg { display: block; width: 100%; height: auto; min-width: 960px; }
.tech-help ul { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .86rem; line-height: 1.6; color: #344054; }
@media (max-width: 760px) { .tech-table td .tech-in { min-width: 5.5rem; } }

/* Alternate offers */
.alt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: 1rem; padding: .6rem .9rem; border-radius: 16px; background: #F6FEF9; border: 1px solid rgba(4,154,163,.3); }
.alt-label { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #344054; margin-right: .3rem; }
.alt-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid rgba(15,15,15,.2); border-radius: 999px; background: #fff; padding: .3rem .7rem; font-size: .82rem; cursor: pointer; color: var(--ev-navy, #0F0F0F); }
.alt-chip:hover:not(:disabled) { border-color: rgba(4,154,163,.55); }
.alt-chip.current { background: #0F0F0F; color: #fff; border-color: #0F0F0F; cursor: default; }
.alt-chip .badge { font-size: .64rem; }
.alt-row { padding-left: .9rem; border-left: 3px solid rgba(4,154,163,.35); }

/* Costing list: approved costings block */
.panel.approved-block { border-top: 3px solid #00866A; }

/* ================================================================ CRM (dashboard, site window) */
.nav-item { position: relative; }
.nav-badge { margin-left: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 .38rem; border-radius: 999px; background: #ba2f2f; color: #fff; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.link-btn { border: 0; background: none; padding: 0 .2rem; color: var(--ev-blue); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
a.site-link { color: inherit; text-decoration: none; }
a.site-link strong { color: var(--ev-navy); border-bottom: 1px dashed rgba(4, 154, 163, .55); }
a.site-link:hover strong { color: var(--ev-blue); }

.crm-chip { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 800; color: #fff; white-space: nowrap; background: #98A2B3; }
.crm-chip.s0, .crm-pct.s0, .crm-stage-tile.s0 { --sc: #98A2B3; } .crm-chip.s10, .crm-pct.s10, .crm-stage-tile.s10 { --sc: #049AA3; }
.crm-chip.s30, .crm-pct.s30, .crm-stage-tile.s30 { --sc: #037F87; } .crm-chip.s50, .crm-pct.s50, .crm-stage-tile.s50 { --sc: #00866A; }
.crm-chip.s90, .crm-pct.s90, .crm-stage-tile.s90 { --sc: #344054; } .crm-chip.s100, .crm-pct.s100, .crm-stage-tile.s100 { --sc: #00866A; }
.crm-chip[class*=" s"] { background: var(--sc); }
.crm-chip.closed { background: #e4e8ec; color: #55626e; }

.crm-head { display: flex; gap: 1rem 1.4rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.crm-head .crm-chip { font-size: .86rem; padding: .35rem .9rem; }
.crm-facts { display: flex; gap: .6rem 1.6rem; flex-wrap: wrap; flex: 1; }
.crm-facts > span { display: grid; gap: .05rem; min-width: 8rem; }
.crm-facts small { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crm-facts strong { color: var(--ev-navy); font-size: .95rem; }
.crm-facts > span:first-child { flex: 1 1 18rem; }

.crm-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; counter-reset: crm; }
.crm-card { position: relative; display: flex; flex-direction: column; gap: .35rem; min-height: 9.6rem; padding: .8rem .85rem .85rem; border-radius: 18px; border: 2px solid transparent; background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.crm-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15, 15, 15, .12); }
.crm-card:not(:last-child)::after { content: '›'; position: absolute; right: -.78rem; top: 50%; transform: translateY(-50%); color: #9aa8b6; font-size: 1.3rem; font-weight: 800; pointer-events: none; }
.crm-card-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.crm-pct { padding: .12rem .55rem; border-radius: 999px; background: var(--sc); color: #fff; font-weight: 900; font-size: .9rem; }
.crm-tag { font-size: .66rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: right; }
.crm-title { font-weight: 800; color: var(--ev-navy); font-size: .92rem; line-height: 1.2; }
.crm-info { display: grid; gap: .1rem; font-size: .78rem; color: var(--muted); line-height: 1.3; }
.crm-info strong { color: var(--ink); font-size: .82rem; }
.crm-card .crm-bell { margin-top: auto; align-self: flex-start; }
/* card colours: empty / done / in progress / reminder set / due soon / overdue / locked */
.crm-card.s-empty { border: 2px dashed #b4c0cb; background: #fff; }
.crm-card.s-empty .crm-tag { color: #6a7886; }
.crm-card.s-done { border-color: rgba(0, 134, 106, .55); background: linear-gradient(180deg, rgba(0, 134, 106, .13), rgba(0, 134, 106, .05)); }
.crm-card.s-done .crm-tag { color: #00664F; }
.crm-card.s-progress { border-color: rgba(26, 151, 182, .55); background: linear-gradient(180deg, rgba(26, 151, 182, .14), rgba(26, 151, 182, .04)); }
.crm-card.s-progress .crm-tag { color: #0e6a80; }
.crm-card.f-later { border-color: rgba(122, 79, 163, .55); background: linear-gradient(180deg, rgba(122, 79, 163, .13), rgba(122, 79, 163, .04)); }
.crm-card.f-later .crm-tag { color: #5b3a7c; }
.crm-card.f-soon, .crm-card.f-today { border-color: #E8A000; background: linear-gradient(180deg, #fff1c9, #fff8e6); }
.crm-card.f-soon .crm-tag, .crm-card.f-today .crm-tag { color: #8a5a00; }
.crm-card.f-overdue { border-color: #ba2f2f; background: linear-gradient(180deg, rgba(186, 47, 47, .14), rgba(186, 47, 47, .04)); }
.crm-card.f-overdue .crm-tag { color: #ba2f2f; }
.crm-card.s-locked { border: 2px solid #e3e7eb; background: repeating-linear-gradient(135deg, #f5f7f9 0 10px, #F2F4F7 10px 20px); cursor: not-allowed; }
.crm-card.s-locked .crm-pct { filter: grayscale(.7); opacity: .6; }
.crm-card.s-locked .crm-title, .crm-card.s-locked .crm-info { color: #8a96a2; }
.crm-card.is-closed { filter: grayscale(.55); }

.crm-bell { display: inline-block; padding: .14rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; background: rgba(122, 79, 163, .14); color: #5b3a7c; }
.crm-bell.b-soon, .crm-bell.b-today { background: #ffe7a3; color: #6e4700; }
.crm-bell.b-overdue { background: #ba2f2f; color: #fff; }
.crm-bell.b-done { background: rgba(0, 134, 106, .14); color: #00664F; }
table.grid td .crm-bell { display: table; margin-top: .3rem; }

.crm-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .9rem; font-size: .74rem; color: var(--muted); }
.crm-legend .lg::before { content: ''; display: inline-block; width: .9rem; height: .9rem; margin-right: .35rem; vertical-align: -2px; border-radius: 5px; border: 2px solid; }
.crm-legend .s-empty::before { border: 2px dashed #b4c0cb; background: #fff; }
.crm-legend .s-done::before { border-color: rgba(0, 134, 106, .6); background: rgba(0, 134, 106, .14); }
.crm-legend .s-progress::before { border-color: rgba(26, 151, 182, .6); background: rgba(26, 151, 182, .14); }
.crm-legend .f-later::before { border-color: rgba(122, 79, 163, .6); background: rgba(122, 79, 163, .14); }
.crm-legend .f-soon::before { border-color: #E8A000; background: #fff1c9; }
.crm-legend .f-overdue::before { border-color: #ba2f2f; background: rgba(186, 47, 47, .14); }
.crm-legend .s-locked::before { border-color: #e3e7eb; background: #F2F4F7; }
.crm-closed-box { margin-bottom: 1rem; background: #F2F4F7; }
.crm-closed-box .sub { display: block; color: var(--muted); font-size: .8rem; margin-top: .2rem; }

.crm-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
.crm-cols .panel + .panel { margin-top: 0; }
.crm-kv td:first-child { width: 32%; color: var(--muted); }
.crm-kv .sub { display: block; }
.crm-fu-list, .crm-docs, .crm-activity, .crm-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.crm-fu-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; padding: .6rem .75rem; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: .86rem; }
.crm-fu-list li .sub { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.crm-fu-list li .btn { margin-left: auto; }
.crm-fu-list li.b-overdue { border-color: rgba(186, 47, 47, .45); background: rgba(186, 47, 47, .05); }
.crm-fu-list li.b-today, .crm-fu-list li.b-soon { border-color: #E8A000; background: #fffaf0; }
.crm-fu-panel .crm-fu-list li { cursor: pointer; }
.crm-docs li .sub, .crm-activity .sub { display: block; color: var(--muted); font-size: .76rem; }
.crm-file { font-weight: 700; color: var(--ev-blue); text-decoration: none; word-break: break-all; }
.crm-activity li { display: grid; grid-template-columns: 11.5rem 1fr; gap: .1rem .8rem; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.crm-activity li .when { color: var(--muted); font-size: .78rem; grid-row: span 2; }
.crm-entries { margin-bottom: 1rem; max-height: 42vh; overflow-y: auto; }
.crm-entry { padding: .7rem .85rem; border-radius: 14px; border: 1px solid var(--line); background: #fbfcfd; font-size: .86rem; }
.crm-entry p { margin: .35rem 0; }
.crm-entry small { color: var(--muted); font-weight: 800; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.crm-entry .sub { display: block; color: var(--muted); font-size: .76rem; }
.crm-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; }
.crm-entry-head .sub { display: inline; }
.crm-entry-actions { margin-left: auto; display: flex; gap: .3rem; }
.crm-fu-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.crm-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.crm-stage-tile { display: grid; gap: .1rem; justify-items: center; padding: .75rem .4rem; border: 0; border-radius: 16px; background: var(--sc); color: #fff; font: inherit; cursor: pointer; text-align: center; box-shadow: 0 8px 18px rgba(15, 15, 15, .12); transition: transform .12s; }
.crm-stage-tile:hover { transform: translateY(-2px); }
.crm-stage-tile b { font-size: 1.15rem; font-weight: 900; }
.crm-stage-tile span { font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: .92; line-height: 1.2; }
.crm-stage-tile strong { font-size: 1.6rem; line-height: 1.1; margin-top: .25rem; }
.crm-stage-tile small { font-size: .72rem; opacity: .9; }
.crm-stage-tile.sel { outline: 3px solid var(--ev-navy); outline-offset: 3px; }
.crm-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; margin-top: .9rem; }
.crm-kpis > div { display: grid; gap: .1rem; padding: .7rem .85rem; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.crm-kpis small { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.crm-kpis strong { color: var(--ev-navy); font-size: 1.2rem; }
.crm-kpis span { color: var(--muted); font-size: .76rem; }
.crm-kpis .alert { border-color: rgba(186, 47, 47, .45); background: rgba(186, 47, 47, .05); }
.crm-kpis .alert strong { color: #ba2f2f; }
.crm-table-head { display: flex; justify-content: space-between; align-items: flex-end; gap: .6rem; }
.crm-table tr.crm-group td { background: rgba(15, 15, 15, .06); border-bottom: 0; padding: .45rem .6rem; }
.crm-table tr.crm-group td strong { color: var(--ev-navy); margin-right: .6rem; }
.crm-table tr.crm-group td span { color: var(--muted); font-size: .78rem; }
.crm-table tr.crm-row { cursor: pointer; }
.crm-table tr.crm-row td:first-child { padding-left: 1.1rem; }
.crm-dots { display: flex; gap: 3px; margin-top: .35rem; }
.crm-dots i { width: 14px; height: 6px; border-radius: 3px; background: #dfe5ea; }
.crm-dots i.d-done { background: #00866A; } .crm-dots i.d-progress { background: #037F87; } .crm-dots i.d-empty { background: #fff; box-shadow: inset 0 0 0 1px #b4c0cb; }
.crm-dots i.due-later { background: #7A4FA3; } .crm-dots i.due-soon, .crm-dots i.due-today { background: #E8A000; } .crm-dots i.due-overdue { background: #ba2f2f; }
details#dClosed summary { cursor: pointer; list-style: none; }
details#dClosed summary .sub { color: var(--muted); font-size: .8rem; margin-left: .4rem; }
details#dClosed[open] summary { margin-bottom: .8rem; }

@media (max-width: 1180px) {
  .crm-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crm-card:nth-child(3)::after { display: none; }
  .crm-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .crm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .crm-card::after { display: none; }
  .crm-card { min-height: 8rem; }
  .crm-cols { grid-template-columns: 1fr; }
  .crm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-activity li { grid-template-columns: 1fr; }
}

.crm-na { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .55rem; }
.crm-na em { color: var(--muted); font-size: .76rem; }
.crm-na .link-btn { font-size: .78rem; }
.sub-inline { color: var(--muted); font-size: .76rem; font-style: normal; font-weight: 700; }
#dOwner { width: auto; min-width: 11rem; }
#actMore { margin-top: .7rem; }
.page-head + .panel table.grid td:first-child { min-width: 13rem; }

.crm-view { margin-top: .25rem; align-self: flex-start; padding: .12rem .5rem; border-radius: 999px; background: #fff; border: 1px solid rgba(20, 105, 154, .35); color: #00866A; font-weight: 800; font-size: .74rem; cursor: pointer; }
.crm-view:hover { background: #00866A; color: #fff; }
.crm-file-row { display: inline-flex; align-items: center; gap: .3rem; }
.crm-file-row a.link-btn { text-decoration: none; }
button.crm-file { padding: 0; text-align: left; }
.crm-facts em.sub { color: var(--muted); font-size: .74rem; }
.doc-viewer { position: fixed; inset: 0; z-index: 1500; display: flex; flex-direction: column; background: rgba(15, 30, 45, .82); padding: 1rem; gap: .6rem; }
.doc-viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .6rem .9rem; border-radius: 14px; background: #fff; }
.doc-viewer-bar strong { color: var(--ev-navy); word-break: break-all; }
.doc-viewer iframe { flex: 1; width: 100%; border: 0; border-radius: 14px; background: #fff; }
.doc-viewer-img { flex: 1; overflow: auto; display: grid; place-items: center; }
.doc-viewer-img img { max-width: 100%; border-radius: 10px; }

/* ---- menu groups: Settings ▸ Users, Audit log (submenu opens under its parent) */
.nav-group { display: grid; gap: .15rem; min-width: 0; }
.nav-caret { margin-left: auto; padding: .1rem .35rem; border-radius: 8px; font-size: .8rem; line-height: 1; opacity: .65; transition: transform .18s ease; transform: rotate(-90deg); }
.nav-caret:hover { opacity: 1; background: rgba(15, 15, 15, .08); }
.nav-group.open > .nav-item .nav-caret { transform: none; }
.nav-sub { display: none; gap: .1rem; margin: 0 0 .2rem 1.45rem; padding-left: .55rem; border-left: 2px solid rgba(15, 15, 15, .12); }
.nav-group.open > .nav-sub { display: grid; }
.side-panel .nav-item.nav-subitem { padding: .32rem .6rem; font-size: .86rem; border-radius: 12px; }
.nav-dot { width: .45rem; height: .45rem; border-radius: 50%; background: rgba(15, 15, 15, .25); flex: 0 0 auto; }
.nav-subitem.active { box-shadow: 0 8px 18px rgba(15, 15, 15, .2), inset 3px 0 0 var(--ev-green-2); }
.nav-subitem.active .nav-dot { background: var(--ev-green-2); }
.nav-group.child-active > .nav-item { background: rgba(15, 15, 15, .06); font-weight: 750; }
.nav-group.child-active > .nav-item .nav-icon { background: rgba(15, 15, 15, .12); }
.side-panel .nav-item .nav-label { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }

/* ---- Energy Profile and Savings */
.ep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.ep-grid > .panel { margin: 0 !important; }
.ep-grid { grid-auto-flow: row dense; }
.ep-grid > .ep-costs-panel { grid-column: 1 / -1; }   /* CAPEX / OPEX with the costing scope: full width, under the other inputs */
.ep-costs-panel > .form-grid { max-width: 60rem; }
.ep-grid > #epMonthsPanel { grid-row: span 3; }
.ep-with-unit { display: flex; gap: .4rem; align-items: center; }
.ep-with-unit > .input, .ep-with-unit > .select { flex: 1 1 auto; min-width: 0; background: #fffbe0; }
.ep-unit { flex: 0 0 auto; min-width: 2.6rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.ep-in, .ep-m { background: #fffbe0; }
.ep-calc-val { padding: .55rem .2rem; font-weight: 800; color: var(--ev-navy); }
.ep-calc label { color: var(--muted); }
.ep-costing { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; margin: -.2rem 0 .8rem; padding: .65rem .75rem; border: 1px dashed rgba(4, 154, 163, .35); border-radius: 14px; background: rgba(4, 154, 163, .04); font-size: .85rem; }
.ep-costing .field { margin: 0; }
.ep-warn { margin: 0; color: #8a5a00; }
.ep-scope { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.ep-scope-pct .ep-with-unit { max-width: 12rem; }
.ep-chip.empty { opacity: .55; border-style: dashed; }
.ep-scope-pct .input:disabled { background: #F2F4F7; color: var(--muted); }
.ep-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.ep-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .65rem; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; color: var(--ev-navy); text-transform: none; letter-spacing: 0; font-size: .82rem; }
.ep-chip input { margin: 0; accent-color: #00866A; }
.ep-chip small { color: var(--muted); font-weight: 600; font-size: .72rem; }
.ep-chip.on { border-color: #00866A; background: rgba(0, 134, 106, .09); }
.ep-scope-table th, .ep-scope-table td, .ep-alloc-table th, .ep-alloc-table td { padding: .32rem .45rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.ep-scope-table tr.out td { color: #a9b1b8; }
.ep-scope-table tfoot th { color: var(--ev-navy); background: #DCE6F1; }
.ep-scope-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ep-alloc-table tr.out td { color: #a9b1b8; }
.ep-alloc-table .select { padding: .25rem .3rem; font-size: .76rem; min-width: 6.8rem; }
.ep-scope-table td:first-child { min-width: 7.5rem; }
.ep-scope-table th, .ep-alloc-table th { white-space: normal; }
.ep-alloc-table .select.moved { border-color: #7A4FA3; background: rgba(122, 79, 163, .07); }
.ep-scope-line { margin-top: .15rem; }
@media (max-width: 700px) {
  .ep-scope-table td:not(:first-child), .ep-alloc-table td:not(:first-child) { display: flex; justify-content: space-between; align-items: center; gap: .6rem; text-align: right; }
  .ep-scope-table td::before, .ep-alloc-table td::before { display: inline; }
  .ep-scope-table tfoot tr { display: flex; justify-content: space-between; flex-wrap: wrap; }
  .ep-alloc-table .select { min-width: 9rem; }
}
.ep-costing:empty { display: none; }
.ep-months td, .ep-months th { padding: .3rem .45rem; }
.ep-months .input { min-width: 8rem; padding: .4rem .55rem; }
.ep-months tfoot th { color: var(--ev-navy); }
.ep-rate { color: var(--muted); font-variant-numeric: tabular-nums; }
.input.invalid, .select.invalid { border-color: #ba2f2f !important; box-shadow: 0 0 0 3px rgba(186, 47, 47, .12) !important; }
.ep-bar { position: sticky; bottom: .6rem; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; padding: .7rem .9rem; border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 10px 30px rgba(15, 15, 15, .14); border: 1px solid var(--line); }
.ep-bar-btns { display: flex; gap: .5rem; }
#epErr { margin-top: .8rem; } #epErr ul { margin: .3rem 0 0 1.1rem; padding: 0; }
#epReport { margin-top: 1.4rem; display: grid; gap: 1rem; }
#epReport:empty { display: none; }
#epReport > .panel { margin: 0 !important; }
.ep-report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; padding-top: 1rem; border-top: 2px solid var(--ev-navy); }
.ep-report-head h2 { margin: .1rem 0; }
.ep-report-head .actions { display: flex; gap: .6rem; align-items: center; }
.ep-stale-note { display: none; color: #8a5a00; font-weight: 700; font-size: .85rem; }
#epReport.ep-stale .ep-stale-note { display: inline; }
#epReport.ep-stale > :not(.ep-report-head) { opacity: .45; filter: grayscale(.6); }
.ep-kpis { margin-top: 0 !important; }
.ep-table td, .ep-cf td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ep-table thead th, .ep-cf thead th { white-space: normal; vertical-align: bottom; min-width: 5.5rem; line-height: 1.25; }
.ep-table tbody td:first-child, .ep-table tfoot th:first-child { white-space: nowrap; }
.ep-cf tbody th { white-space: normal; min-width: 11rem; }
.ep-table th, .ep-table td, .ep-cf th, .ep-cf td { padding: .38rem .5rem; font-size: .84rem; }
.ep-months td:first-child { white-space: nowrap; }
.ep-two-wide { grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); }
.ep-table thead th, .ep-cf thead th { background: #1F3A5F; color: #fff; }
.ep-table tfoot th, .ep-cf .ep-strong th, .ep-cf .ep-strong td { background: #DCE6F1; font-weight: 800; color: var(--ev-navy); }
td.num, th.num { text-align: right; }
.ep-cf td.out, .ep-cf th.out { color: #a9b1b8 !important; background: #f4f5f6; }
.ep-pos { color: #00664F !important; } .ep-neg { color: #b42318 !important; }
.ep-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.2rem; margin-top: 1rem; align-items: start; }
.ep-h4 { margin: .9rem 0 .4rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #1F3A5F; }
.ep-two > div > .ep-h4:first-child { margin-top: 0; }
.ep-kv { width: 100%; }
.ep-kv th { font-weight: 600; text-align: left; background: #EEF2F7; width: 62%; }
.ep-kv td, .ep-kv th { padding: .32rem .55rem; font-size: .85rem; }
.ep-kv .ep-u { color: var(--muted); width: 3.5rem; }
.ep-kv td.strong { font-weight: 800; }
.ep-notes { margin-top: .8rem; }
.ep-chart { border: 1px solid var(--line); border-radius: 16px; padding: .7rem .8rem .4rem; background: #fff; }
.ep-chart-title { font-weight: 800; color: var(--ev-navy); font-size: .92rem; }
.ep-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin: .3rem 0 .2rem; font-size: .78rem; color: var(--muted); }
.ep-legend i, .ep-tip i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.ep-chart-box { position: relative; }
.ep-chart svg { width: 100%; height: auto; display: block; }
.ep-gridl { stroke: #e6eaee; stroke-width: 1; } .ep-zero { stroke: #9aa5ae; stroke-width: 1; }
.ep-ax { fill: #6b7680; font-size: 11px; } .ep-ax.out { fill: #c3c9ce; }
.ep-tip { position: absolute; pointer-events: none; z-index: 5; display: grid; gap: .15rem; padding: .45rem .6rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(15, 15, 15, .16); font-size: .78rem; color: var(--ev-navy); white-space: nowrap; }
.ep-tip-total { font-weight: 800; border-top: 1px solid var(--line); padding-top: .15rem; }
@media (max-width: 1100px) { .ep-grid, .ep-two { grid-template-columns: 1fr; } .ep-grid > #epMonthsPanel { grid-row: auto; } }
.ep-table tfoot th.num, .ep-months tfoot th.num, table.grid th.num { text-align: right; }
/* Energy profile: fields side by side share label / input / hint rows, so inputs line up whatever the label or hint length */
@supports (grid-template-rows: subgrid) {
  .ep-grid .form-grid.two > .field { grid-row: span 3; grid-template-rows: subgrid; row-gap: .38rem; align-content: start; }
  .ep-grid .form-grid.two > .field > label { align-self: end; }
}

/* Prices set by hand (update 51): amber marks every line whose price was typed by an admin / BD */
.row-price-btn { border: 1px solid rgba(200,105,28,.35); border-radius: 999px; background: rgba(255,255,255,.9); color: #8a4a12; cursor: pointer; font-size: .72rem; font-weight: 800; padding: .42rem .62rem; white-space: nowrap; transition: transform .16s ease, background .16s ease; }
.row-price-btn:hover { transform: translateY(-1px); background: rgba(200,105,28,.08); }
.line-card.manual-price { box-shadow: inset 4px 0 0 #C8691C; }
.ovr-strip { margin: .2rem 0 .5rem; padding: .55rem .75rem; border: 1px solid rgba(200,105,28,.4); border-radius: 12px; background: #fff7ee; font-size: .82rem; color: #4a3420; }
.ovr-head { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.ovr-tag { background: #C8691C; color: #fff; border-radius: 999px; padding: .12rem .55rem; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.ovr-calc { color: #7b6a5b; }
.ovr-note { margin: .3rem 0 0; font-style: italic; }
.ovr-meta { margin: .15rem 0 0; font-size: .74rem; color: #7b6a5b; }
.manual-panel { margin-bottom: 1rem; border: 1px solid rgba(200,105,28,.45); background: #fffaf4; }
.manual-panel > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: baseline; color: #8a4a12; }
.manual-panel .table-wrap { margin-top: .7rem; }
.manual-panel td .sub { display: block; font-size: .74rem; color: #7b6a5b; }
.excel-table td.override-cell { background: #ffe9d2 !important; color: #8a4a12; font-weight: 700; }
