:root {
    --nbsc-bg: #f4f2ed;
    --nbsc-panel: #fffefa;
    --nbsc-ink: #111111;
    --nbsc-muted: #6c6a64;
    --nbsc-line: #d9d5cb;
    --nbsc-soft: #ebe8e0;
    --nbsc-danger: #9b1c1c;
    --nbsc-radius: 8px;
    --nbsc-shadow: none;
    --nbsc-sidebar: 250px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.nbsc-slmr-body { background: var(--nbsc-bg); color: var(--nbsc-ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.nbsc-app { min-height: 100vh; }
.nbsc-auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.nbsc-auth-card { width: min(100%, 480px); background: var(--nbsc-panel); border: 1px solid var(--nbsc-line); border-radius: 8px; padding: 34px; box-shadow: none; }
.nbsc-auth-card h1 { margin: 0 0 10px; font-size: clamp(27px, 5vw, 34px); line-height: 1.12; letter-spacing: -.025em; }
.nbsc-eyebrow { margin: 0 0 4px; color: var(--nbsc-muted); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.nbsc-muted { color: var(--nbsc-muted); }
.nbsc-callout { padding: 14px 16px; border: 1px solid var(--nbsc-line); background: #f8f6f1; border-radius: 6px; margin: 0 0 18px; }
.nbsc-notice { border: 1px solid var(--nbsc-line); border-left-width: 4px; background: var(--nbsc-panel); border-radius: 4px; padding: 12px 14px; margin-bottom: 16px; }
.nbsc-notice--error { border-left-color: var(--nbsc-danger); }
.nbsc-notice--success { border-left-color: #111; }
.nbsc-shell { min-height: 100vh; display: grid; grid-template-columns: var(--nbsc-sidebar) minmax(0,1fr); }
.nbsc-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px 18px; background: #161616; color: #f7f5f0; display: flex; flex-direction: column; z-index: 20; }
.nbsc-sidebar__brand { padding: 2px 8px 22px; border-bottom: 1px solid #303030; margin-bottom: 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.nbsc-sidebar__brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.nbsc-sidebar__close { display:none; appearance:none; border:0; background:transparent; color:#fff; font-size:28px; line-height:1; padding:0 2px; cursor:pointer; }
.nbsc-nav { display: grid; gap: 3px; }
.nbsc-nav__item { text-decoration: none; padding: 10px 12px; border-radius: 5px; color: #bdbdbd; font-size: 14px; font-weight: 650; }
.nbsc-nav__item:hover, .nbsc-nav__item.is-active { background: #2a2a2a; color: #fff; }
.nbsc-sidebar__footer { margin-top: auto; padding: 16px 8px 2px; border-top: 1px solid #303030; }
.nbsc-user { margin-bottom: 9px; }
.nbsc-user strong, .nbsc-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbsc-user span { color: #9f9f9f; font-size: 12px; margin-top: 2px; }
.nbsc-sidebar .nbsc-text-link { color: #d4d4d4; }
.nbsc-main { min-width: 0; }
.nbsc-content { padding: 34px clamp(18px, 3.5vw, 54px) 60px; max-width: 1500px; margin: 0 auto; }
.nbsc-mobilebar { display: none; }
.nbsc-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 22px; }
.nbsc-pagehead .nbsc-eyebrow { margin: 0 0 4px; }
.nbsc-pagehead h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -.045em; }
.nbsc-actions, .nbsc-form-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.nbsc-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid #bdb9b0; border-radius: 6px; background: #fffefa; color: #111; text-decoration: none; cursor: pointer; font-weight: 700; font-size: 13px; }
.nbsc-button:hover { border-color: #111; }
.nbsc-button--primary { background: #111; color: #fff; border-color: #111; }
.nbsc-button--primary:hover { background: #2b2b2b; }
.nbsc-button--danger { color: var(--nbsc-danger); border-color: #dcbaba; }
.nbsc-text-link, .nbsc-rowlink { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.nbsc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.nbsc-kpi { padding: 18px; background: var(--nbsc-panel); border: 1px solid var(--nbsc-line); border-radius: var(--nbsc-radius); box-shadow: var(--nbsc-shadow); }
.nbsc-kpi span, .nbsc-kpi small, .nbsc-kpi strong { display: block; }
.nbsc-kpi span { color: var(--nbsc-muted); font-size: 12px; font-weight: 700; }
.nbsc-kpi strong { margin: 8px 0 5px; font-size: clamp(24px, 2vw, 33px); letter-spacing: -.04em; }
.nbsc-kpi small { color: var(--nbsc-muted); font-size: 11px; }
.nbsc-grid { display: grid; gap: 16px; align-items: start; }
.nbsc-grid--2 { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); }
.nbsc-stack { display: grid; gap: 16px; }
.nbsc-panel { background: var(--nbsc-panel); border: 1px solid var(--nbsc-line); border-radius: var(--nbsc-radius); padding: 20px; box-shadow: none; margin-bottom: 16px; min-width: 0; }
.nbsc-panel h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -.02em; }
.nbsc-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.nbsc-panel__head h2 { margin: 0; }
.nbsc-panel__head p { margin: 3px 0 0; color: var(--nbsc-muted); font-size: 12px; }
.nbsc-panel__head a { font-size: 12px; font-weight: 700; }
.nbsc-panel--danger-zone { border-style: dashed; }
.nbsc-table-wrap { width: 100%; overflow-x: auto; }
.nbsc-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.nbsc-table th { padding: 8px 10px 10px; border-bottom: 1px solid var(--nbsc-line); color: var(--nbsc-muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.nbsc-table td { padding: 12px 10px; border-bottom: 1px solid var(--nbsc-soft); vertical-align: middle; font-size: 13px; }
.nbsc-table tbody tr:last-child td { border-bottom: 0; }
.nbsc-table td strong, .nbsc-table td span:not(.nbsc-status) { display: block; }
.nbsc-table td span:not(.nbsc-status) { color: var(--nbsc-muted); font-size: 11px; margin-top: 2px; }
.nbsc-status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; border: 1px solid #cfcac1; background: #f4f2ed; white-space: nowrap; }
.nbsc-status--completed { background: #e8f6ed; color: #146c37; border-color: #8fc9a4; }
.nbsc-status--assigned { background: #ece8df; border-color: #b8b2a8; }
.nbsc-status--followup { background:#fff4d8; color:#725400; border-color:#ddc477; }
.nbsc-empty { padding: 26px 12px; text-align: center; color: var(--nbsc-muted); }
.nbsc-statlist, .nbsc-detailgrid { margin: 0; }
.nbsc-statlist > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--nbsc-soft); }
.nbsc-statlist > div:last-child { border-bottom: 0; }
.nbsc-statlist dt { color: var(--nbsc-muted); }
.nbsc-statlist dd { margin: 0; font-weight: 800; text-align: right; }
.nbsc-detailgrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--nbsc-soft); border: 1px solid var(--nbsc-soft); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.nbsc-detailgrid > div { background: var(--nbsc-panel); padding: 14px; min-height: 90px; }
.nbsc-detailgrid dt { color: var(--nbsc-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.nbsc-detailgrid dd { margin: 0; font-weight: 650; }
.nbsc-form { display: grid; gap: 18px; }
.nbsc-form--compact { gap: 12px; }
.nbsc-form-section { border-bottom: 1px solid var(--nbsc-soft); padding-bottom: 22px; }
.nbsc-form-section:last-of-type { border-bottom: 0; }
.nbsc-form-section h2 { margin-bottom: 14px; }
.nbsc-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.nbsc-field { display: grid; gap: 6px; min-width: 0; }
.nbsc-field--full { grid-column: 1 / -1; }
.nbsc-address-lookup { display: grid; gap: 14px; }
.nbsc-address-entry { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.nbsc-address-status { grid-column: 1 / -1; }
.nbsc-address-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.nbsc-field > span, .nbsc-filterbar label > span { font-size: 11px; font-weight: 800; color: #44423e; }
.nbsc-field input, .nbsc-field select, .nbsc-field textarea, .nbsc-filterbar input, .nbsc-filterbar select { width: 100%; border: 1px solid #c9c4ba; border-radius: 6px; background: #fff; outline: 0; }
.nbsc-field input, .nbsc-field select, .nbsc-filterbar input, .nbsc-filterbar select { height: 44px; padding: 0 11px; }
.nbsc-field textarea { min-height: 112px; padding: 10px 11px; resize: vertical; }
.nbsc-field input:focus, .nbsc-field select:focus, .nbsc-field textarea:focus, .nbsc-filterbar input:focus, .nbsc-filterbar select:focus { border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.nbsc-field input:disabled { background: #efede7; color: #777; }
.nbsc-field small { color: var(--nbsc-muted); font-size: 10px; }
.nbsc-form-note { margin: 10px 0 0; color: var(--nbsc-muted); font-size: 11px; max-width: 820px; }
.nbsc-form-actions { justify-content: flex-end; }
.nbsc-checkgrid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.nbsc-schedule-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 10px; padding: 12px; border: 1px solid var(--nbsc-soft); border-radius: 6px; background: #faf9f6; }
.nbsc-schedule-details[hidden], .nbsc-schedule-details [hidden] { display: none !important; }
.nbsc-check { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--nbsc-line); border-radius: 6px; background: #fff; cursor: pointer; }
.nbsc-check input { width: 16px; height: 16px; accent-color: #111; }
.nbsc-filterbar { display: grid; grid-template-columns: minmax(220px,1fr) minmax(180px,.4fr) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.nbsc-filterbar label { display: grid; gap: 5px; }
.nbsc-recovery { margin-top: 22px; border-top: 1px solid var(--nbsc-soft); padding-top: 15px; }
.nbsc-recovery summary { cursor: pointer; color: var(--nbsc-muted); font-size: 12px; font-weight: 700; }
.nbsc-recovery[open] summary { margin-bottom: 15px; }
.nbsc-overlay { display: none; }
.nbsc-icon-button { border: 0; background: transparent; font-size: 20px; padding: 8px; cursor: pointer; }
@media (max-width: 1080px) {
    .nbsc-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .nbsc-grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .nbsc-shell { display: block; }
    body.nbsc-menu-open { overflow: hidden; touch-action: none; }
    .nbsc-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(88vw, 320px);
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        padding: max(14px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
        transform: translateX(-102%);
        transition: transform .2s ease;
        box-shadow: 10px 0 30px rgba(0,0,0,.18);
        overflow: hidden;
    }
    .nbsc-sidebar.is-open { transform: translateX(0); }
    .nbsc-sidebar__brand { flex:0 0 auto; min-height:48px; padding:0 8px 12px; margin-bottom:8px; }
    .nbsc-sidebar__brand strong { font-size:18px; }
    .nbsc-sidebar__close { display:block; }
    .nbsc-nav { flex:1 1 auto; min-height:0; display:grid; grid-template-rows:repeat(8,minmax(0,1fr)); gap:2px; }
    .nbsc-nav__item { min-height:0; display:flex; align-items:center; padding:6px 12px; font-size:clamp(14px, 2.25vh, 17px); border-radius:6px; }
    .nbsc-sidebar__footer { flex:0 0 auto; margin-top:8px; padding:10px 8px 0; display:flex; align-items:center; justify-content:space-between; gap:12px; }
    .nbsc-sidebar__footer .nbsc-user { margin:0; min-width:0; font-size:13px; }
    .nbsc-sidebar__footer .nbsc-text-link { flex:0 0 auto; font-size:13px; }
    .nbsc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 15; display:none; }
    .nbsc-overlay.is-open { display: block; }
    .nbsc-mobilebar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 14px; background: rgba(244,242,237,.98); border-bottom: 1px solid var(--nbsc-line); }
    .nbsc-content { padding-top: 22px; }
    .nbsc-pagehead { align-items: flex-start; }
    .nbsc-form-grid { grid-template-columns: 1fr; }
    .nbsc-field--full { grid-column: auto; }
    .nbsc-address-results { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .nbsc-checkgrid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
    .nbsc-auth-layout { padding: 14px; }
    .nbsc-auth-card { padding: 24px 18px; }
    .nbsc-content { padding: 18px 12px 42px; }
    .nbsc-pagehead { display: grid; }
    .nbsc-pagehead .nbsc-actions, .nbsc-pagehead > .nbsc-button { width: 100%; }
    .nbsc-pagehead > .nbsc-button, .nbsc-pagehead .nbsc-actions .nbsc-button { flex: 1; }
    .nbsc-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    .nbsc-kpi { padding: 14px 12px; }
    .nbsc-kpi strong { font-size: 22px; }
    .nbsc-panel { padding: 15px; border-radius: 11px; }
    .nbsc-detailgrid { grid-template-columns: 1fr; }
    .nbsc-checkgrid { grid-template-columns: 1fr; }
    .nbsc-address-entry, .nbsc-address-results { grid-template-columns: 1fr; }
    .nbsc-address-status { grid-column: auto; }
    .nbsc-schedule-details { grid-template-columns: 1fr; }
    .nbsc-filterbar { grid-template-columns: 1fr; }
    .nbsc-filterbar .nbsc-button { width: 100%; }
    .nbsc-invoice-sheet__head { grid-template-columns: 1fr; }
    .nbsc-invoice-sheet__head > div:last-child { text-align: left; }
    .nbsc-invoice-lines { width: 100%; }
}

.nbsc-field input[readonly] { background: #f7f5f0; color: #333; }
[data-nbsc-autofill-status].is-error { color: #8a1515; font-weight: 700; }
.nbsc-invoice-sheet { background:#fff; border:1px solid var(--nbsc-line); border-radius:4px; padding:clamp(22px,4vw,54px); margin-bottom:16px; }
.nbsc-invoice-title { font-size:clamp(34px,5vw,54px); font-weight:850; letter-spacing:-.05em; margin-bottom:36px; }
.nbsc-invoice-top { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr); gap:42px; align-items:start; }
.nbsc-invoice-parties { display:grid; gap:26px; }
.nbsc-invoice-party { display:grid; gap:3px; font-size:13px; }
.nbsc-invoice-party strong { font-size:16px; margin-bottom:3px; }
.nbsc-invoice-party--recipient { padding-top:22px; border-top:1px solid var(--nbsc-soft); }
.nbsc-invoice-meta { width:100%; border-collapse:collapse; font-size:12px; }
.nbsc-invoice-meta th,.nbsc-invoice-meta td { padding:8px 0; border-bottom:1px solid var(--nbsc-soft); text-align:left; vertical-align:top; }
.nbsc-invoice-meta th { color:var(--nbsc-muted); font-weight:700; width:48%; }
.nbsc-invoice-meta td { text-align:right; font-weight:700; }
.nbsc-invoice-job { display:grid; gap:3px; padding:22px 0; margin-top:30px; border-top:2px solid #111; }
.nbsc-invoice-job span { color:var(--nbsc-muted); }
.nbsc-invoice-table-wrap { width:100%; overflow-x:auto; }
.nbsc-invoice-table { width:100%; border-collapse:collapse; min-width:680px; }
.nbsc-invoice-table th { text-align:left; font-size:11px; padding:11px 10px; border-bottom:2px solid #111; }
.nbsc-invoice-table td { padding:16px 10px; border-bottom:1px solid var(--nbsc-line); vertical-align:top; }
.nbsc-invoice-table th:not(:first-child),.nbsc-invoice-table td:not(:first-child) { text-align:right; white-space:nowrap; }
.nbsc-invoice-totals { margin:22px 0 0 auto; width:min(100%,360px); border-collapse:collapse; }
.nbsc-invoice-totals th,.nbsc-invoice-totals td { padding:9px 0; border-bottom:1px solid var(--nbsc-soft); }
.nbsc-invoice-totals th { text-align:left; color:var(--nbsc-muted); }
.nbsc-invoice-totals td { text-align:right; font-weight:750; }
.nbsc-invoice-totals .is-total th,.nbsc-invoice-totals .is-total td { color:#111; font-size:17px; border-bottom:2px solid #111; }
.nbsc-invoice-footer { display:flex; flex-wrap:wrap; gap:10px 24px; margin-top:70px; padding-top:14px; border-top:1px solid var(--nbsc-line); color:var(--nbsc-muted); font-size:11px; }
@media (max-width:720px){
    .nbsc-invoice-top{grid-template-columns:1fr;gap:26px}.nbsc-invoice-meta td{text-align:left}.nbsc-invoice-meta th{width:44%}.nbsc-invoice-footer{margin-top:38px}
}

.nbsc-invoice-total { font-size: 30px; font-weight: 850; letter-spacing: -.035em; margin: 12px 0 5px; }

.nbsc-location-link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nbsc-location-link:hover { text-decoration-thickness: 2px; }

.nbsc-vat-preview{display:grid;grid-template-columns:1fr auto;gap:7px 18px;padding:12px 0;border-top:1px solid var(--nbsc-soft);border-bottom:1px solid var(--nbsc-soft);font-size:14px}.nbsc-vat-preview strong{text-align:right}.nbsc-kpis:has(.nbsc-kpi:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:800px){.nbsc-kpis:has(.nbsc-kpi:nth-child(3):last-child){grid-template-columns:1fr}}

.nbsc-status--available, .nbsc-status--paid { background:#e8f6ed; color:#146c37; border-color:#8fc9a4; }
.nbsc-status--unavailable { background:#fdecec; color:#a61b1b; border-color:#e1a6a6; }
.nbsc-status--sent { background:#fff0df; color:#9a4d00; border-color:#e1ad73; }
.nbsc-button--success { background:#e8f6ed; color:#146c37; border-color:#8fc9a4; }
.nbsc-link-danger, .nbsc-row-action { appearance:none; border:0; background:transparent; padding:0; font:inherit; font-weight:750; text-decoration:underline; cursor:pointer; }
.nbsc-link-danger { color:#9b1c1c; }
.nbsc-row-action { color:#146c37; }
.nbsc-actions form { margin:0; }
[data-nbsc-vat-box][hidden] { display:none !important; }

@media (max-width:820px) and (max-height:620px) {
    .nbsc-sidebar { padding-top:8px; padding-bottom:8px; }
    .nbsc-sidebar__brand { min-height:38px; padding-bottom:7px; margin-bottom:5px; }
    .nbsc-sidebar__brand strong { font-size:15px; }
    .nbsc-nav__item { padding:3px 10px; font-size:13px; }
    .nbsc-sidebar__footer { padding-top:6px; margin-top:5px; }
}

.nbsc-contractor-picker { display:grid; grid-template-columns:minmax(220px,.7fr) minmax(300px,1.3fr); gap:14px; align-items:start; }
.nbsc-contractor-picker small { min-height:16px; }
.nbsc-field > span, .nbsc-filterbar label > span { white-space:nowrap; }
.nbsc-invoice-meta th, .nbsc-invoice-meta td { white-space:nowrap; }
@media (max-width:820px) {
    .nbsc-contractor-picker { grid-template-columns:1fr; }
}
@media (max-width:560px) {
    .nbsc-field > span, .nbsc-filterbar label > span { white-space:normal; }
    .nbsc-invoice-meta th, .nbsc-invoice-meta td { white-space:normal; }
}
