/* Nixons Studio – look and feel. Lato, charcoal, the Nixons green; calm surfaces and soft depth. */

@font-face { font-family: Lato; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/lato-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Lato; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/lato-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: Lato; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/lato-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Lato; font-weight: 900; font-style: normal; font-display: swap; src: url(fonts/lato-latin-900-normal.woff2) format("woff2"); }

:root {
    /* Official Nixons colours (from Assets/Nixons_Primary_RGB): green #38AE2B, charcoal #413E3E.
       The brand green is too light for white or small text (2.9:1), so it is used for bars, borders and
       accents; --nx-green-strong (5.3:1 on white) carries buttons, chips and green text. */
    --nx-green: #38ae2b;
    --nx-green-strong: #277b1e;
    --nx-green-dark: #216619;
    --nx-green-soft: #eef6ec;
    --nx-charcoal: #272525;   /* deep shade of the official charcoal, for the drawer and sign-in panel */
    --nx-ink: #413e3e;        /* official charcoal */
    --nx-ink-2: #5f6661;
    --nx-ink-3: #8b918c;
    --nx-bg: #f5f6f3;
    --nx-surface: #ffffff;
    --nx-line: #e6e8e3;
    --nx-line-2: #eff1ec;
    --nx-radius: 14px;
    --nx-shadow: 0 1px 2px rgba(28, 33, 30, .04), 0 4px 16px rgba(28, 33, 30, .05);
    --nx-shadow-lift: 0 2px 4px rgba(28, 33, 30, .06), 0 12px 28px rgba(28, 33, 30, .10);
    --nx-late: #c2413b;
    --nx-today: #d98c1f;

    --st-enquiry: #5d74b0;
    --st-design: #8766be;
    --st-quoted: #cf8f24;
    --st-revising: #d0673a;
    --st-onhold: #8f9690;
    --st-won: #3f8f3a;
    --st-lost: #c2413b;
}

html, body { font-family: Lato, "Segoe UI", Helvetica, Arial, sans-serif; background: var(--nx-bg); color: var(--nx-ink); -webkit-font-smoothing: antialiased; }
a { color: var(--nx-green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .86em; }
code { background: #f0f2ee; border: 1px solid var(--nx-line); border-radius: 4px; padding: 0 4px; }
.small { font-size: 12.5px; }
.flex-spacer { flex: 1; }

/* ---------- Shell ---------- */
.nx-appbar.mud-appbar { backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--nx-line); }
.nx-appbar .mud-toolbar { gap: 12px; padding: 0 28px; }
.nx-menu-btn { display: none; }
@media (max-width: 1279px) { .nx-menu-btn { display: inline-flex; } }

.nx-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--nx-line); border-radius: 999px; padding: 0 16px; height: 40px; width: min(460px, 45vw); color: var(--nx-ink-3); transition: border-color .15s, box-shadow .15s; }
.nx-search:focus-within { border-color: var(--nx-green); box-shadow: 0 0 0 4px rgba(56, 174, 43, .12); }
.nx-search input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 14px; color: var(--nx-ink); background: transparent; }
.nx-new-btn { border-radius: 999px !important; text-transform: none !important; font-weight: 700 !important; padding: 6px 18px !important; }

.nx-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; }
.nx-user:hover { background: rgba(0, 0, 0, .04); }
.nx-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--nx-charcoal); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 13px; letter-spacing: .5px; }
.nx-user-text { line-height: 1.15; }
.nx-user-name { font-weight: 700; font-size: 14px; }
.nx-user-role { font-size: 12px; color: var(--nx-ink-2); }
@media (max-width: 800px) { .nx-user-text, .nx-new-btn { display: none !important; } }
.nx-logout { margin: 0; }
.nx-logout button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--nx-ink); cursor: pointer; text-align: left; }
.nx-logout button:hover { background: rgba(0, 0, 0, .04); }

.nx-drawer.mud-drawer { background: var(--nx-charcoal); background-image: radial-gradient(120% 60% at 0% 0%, rgba(56, 174, 43, .20), transparent 60%); border-right: 0; }
.nx-drawer .mud-drawer-content { display: flex; flex-direction: column; padding: 0 12px 16px; }
.nx-brand { display: flex; align-items: center; gap: 12px; padding: 22px 10px 26px; color: #fff; text-decoration: none !important; }
.nx-brand-nk { font-size: 26px; letter-spacing: -1px; font-weight: 400; }
.nx-brand-bar { width: 2px; height: 34px; background: var(--nx-green); }
.nx-brand-text { display: flex; flex-direction: column; line-height: 1; }
.nx-brand-name { font-size: 15px; letter-spacing: 3.5px; }
.nx-brand-sub { font-size: 9.5px; letter-spacing: 3px; color: rgba(255, 255, 255, .55); margin-top: 5px; }
.nx-nav-label { color: rgba(255, 255, 255, .38); font-size: 10.5px; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; padding: 18px 12px 6px; }
.nx-nav .mud-nav-link { border-radius: 10px; margin: 2px 0; padding: 9px 12px; color: rgba(255, 255, 255, .78); font-size: 14.5px; transition: background .15s, color .15s; }
.nx-nav .mud-nav-link:hover:not(.mud-nav-link-disabled) { background: rgba(255, 255, 255, .06); color: #fff; }
.nx-nav .mud-nav-link.active:not(.mud-nav-link-disabled) { background: rgba(56, 174, 43, .22); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--nx-green); }
.nx-nav .mud-nav-link.active .mud-nav-link-icon { color: #9fd486; }
.nx-nav-soon .mud-nav-link { opacity: .45; }
.nx-drawer-foot { margin-top: auto; padding: 16px 12px 0; font-size: 11.5px; color: rgba(255, 255, 255, .35); line-height: 1.5; }

.nx-main { background: var(--nx-bg); min-height: 100vh; }
.nx-page { max-width: 1440px; margin: 0 auto; padding: 28px 32px 64px; }
@media (max-width: 700px) { .nx-page { padding: 20px 16px 48px; } .nx-appbar .mud-toolbar { padding: 0 12px; } }

/* ---------- Headers ---------- */
.nx-header, .profile { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 24px; flex-wrap: wrap; }
.nx-kicker { color: var(--nx-green-strong); font-weight: 900; font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 4px; }
.nx-h1 { font-size: 30px; font-weight: 900; letter-spacing: -.4px; margin: 0; line-height: 1.15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nx-sub { color: var(--nx-ink-2); margin-top: 6px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nx-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nx-header-actions .mud-button-root, .nx-form-actions .mud-button-root, .nx-card .mud-button-root { text-transform: none; font-weight: 700; border-radius: 10px; }
.nx-crumbs { font-size: 13px; color: var(--nx-ink-3); margin-bottom: 10px; }
.nx-crumbs span { margin: 0 6px; }
.nx-crumbs a { color: var(--nx-ink-2); }
.nx-link { font-size: 13px; font-weight: 700; }
.nx-link-strong { font-weight: 700; color: var(--nx-ink); }

.profile { align-items: center; justify-content: flex-start; }
.profile .nx-av { width: 64px; height: 64px; font-size: 22px; }
.profile-main { flex: 1; min-width: 260px; }
.profile-meta { display: flex; gap: 16px; color: var(--nx-ink-2); font-size: 14px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.profile-meta .mud-icon-root { vertical-align: -4px; font-size: 16px; }

/* ---------- Cards and grids ---------- */
.nx-card { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-radius); box-shadow: var(--nx-shadow); padding: 22px 24px; margin-bottom: 20px; }
.nx-card.flush { padding: 0; overflow: hidden; }
.nx-card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.nx-card-head h2, .nx-card h2 { font-size: 16.5px; font-weight: 900; margin: 0; letter-spacing: -.1px; }
.nx-section { font-size: 13px !important; text-transform: uppercase; letter-spacing: 1.2px; color: var(--nx-ink-2); margin: 0 0 14px !important; font-weight: 900 !important; }
.nx-section:not(:first-child) { margin-top: 22px !important; }
.nx-muted { color: var(--nx-ink-3); }
.pad { padding: 14px 0; }
.nx-card.flush .pad { padding: 18px 24px; }

.nx-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nx-grid-side { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.nx-grid-main { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.nx-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .nx-grid-2, .nx-grid-side, .nx-grid-main, .nx-form-grid { grid-template-columns: 1fr; } }

.nx-banner { display: flex; align-items: center; gap: 8px; background: #fff8ea; border: 1px solid #f2dfb5; color: #7a5410; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }

/* ---------- KPIs ---------- */
.nx-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1100px) { .nx-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .nx-kpis { grid-template-columns: 1fr; } }
.nx-kpi { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-radius); box-shadow: var(--nx-shadow); padding: 18px 20px; }
.nx-kpi-top { display: flex; align-items: center; justify-content: space-between; }
.nx-kpi-label { font-size: 13px; color: var(--nx-ink-2); font-weight: 700; }
.nx-kpi-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--nx-green-soft); color: var(--nx-green-dark); }
.nx-kpi-value { font-size: 32px; font-weight: 900; letter-spacing: -.8px; margin-top: 8px; line-height: 1.1; }
.nx-kpi-note { font-size: 13px; color: var(--nx-ink-3); margin-top: 4px; }
.nx-kpi-accent { background: linear-gradient(135deg, #24402a 0%, var(--nx-charcoal) 70%); border-color: transparent; color: #fff; }
.nx-kpi-accent .nx-kpi-label, .nx-kpi-accent .nx-kpi-note { color: rgba(255, 255, 255, .7); }
.nx-kpi-accent .nx-kpi-icon { background: rgba(255, 255, 255, .1); color: #9fd486; }

/* ---------- Stages, badges, avatars ---------- */
.stage-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; flex: none; }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 85%, black); }
.stage-enquiry { --c: var(--st-enquiry); } .stage-design { --c: var(--st-design); } .stage-quoted { --c: var(--st-quoted); }
.stage-revising { --c: var(--st-revising); } .stage-onhold { --c: var(--st-onhold); } .stage-won { --c: var(--st-won); } .stage-lost { --c: var(--st-lost); }
.stage-dot.stage-enquiry, .stage-dot.stage-design, .stage-dot.stage-quoted, .stage-dot.stage-revising, .stage-dot.stage-onhold, .stage-dot.stage-won, .stage-dot.stage-lost { background: var(--c); }
.stage-pill .stage-dot { background: var(--c); }
[class*="stage-bg-"] { background: var(--c); }
.stage-bg-enquiry { --c: var(--st-enquiry); } .stage-bg-design { --c: var(--st-design); } .stage-bg-quoted { --c: var(--st-quoted); }
.stage-bg-revising { --c: var(--st-revising); } .stage-bg-onhold { --c: var(--st-onhold); } .stage-bg-won { --c: var(--st-won); }

.type-badge { display: inline-block; font-size: 10.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; border-radius: 5px; padding: 2px 6px; vertical-align: middle; }
.type-vip { background: #f6eedf; color: #8a6420; }
.type-staff { background: #e7eef7; color: #2f5687; }
.type-npe { background: #efe9f7; color: #5d3f8f; }
.type-test { background: #fff3dc; color: #8a5a00; }

.nx-av { --h: 140; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 900; font-size: 13px; letter-spacing: .3px; color: hsl(var(--h) 35% 28%); background: hsl(var(--h) 40% 90%); }
.nx-av-sm { width: 30px; height: 30px; font-size: 11px; }

/* ---------- Lists and feeds ---------- */
.nx-list { list-style: none; margin: 0 -10px; padding: 0; }
.nx-list-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: inherit; text-decoration: none !important; }
.nx-list-row:hover { background: #f7f8f5; }
.nx-list-main { flex: 1; min-width: 0; }
.nx-list-title { font-weight: 700; font-size: 14.5px; }
.nx-list-sub { font-size: 13px; color: var(--nx-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.due { font-size: 12.5px; color: var(--nx-ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.due .mud-icon-root { font-size: 15px; }
.due-late { color: var(--nx-late); font-weight: 700; }
.due-today { color: var(--nx-today); font-weight: 700; }
.text-late { color: var(--nx-late); }

.nx-bars { display: flex; flex-direction: column; gap: 4px; }
.nx-bar-row { display: grid; grid-template-columns: 110px 1fr 70px 28px; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 8px; color: inherit; text-decoration: none !important; }
.nx-bar-row:hover { background: #f7f8f5; }
.nx-bar-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.nx-bar-track { height: 10px; background: #f0f2ee; border-radius: 999px; overflow: hidden; }
.nx-bar-fill { display: block; height: 100%; border-radius: 999px; min-width: 4px; }
.nx-bar-value { font-weight: 900; text-align: right; font-size: 14px; }
.nx-bar-count { font-size: 12px; color: var(--nx-ink-3); text-align: right; }

.nx-feed { list-style: none; margin: 0; padding: 0; }
.nx-feed li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--nx-line-2); }
.nx-feed li:first-child { border-top: 0; }
.nx-feed-icon { width: 32px; height: 32px; border-radius: 10px; background: #f2f4f0; color: var(--nx-ink-2); display: grid; place-items: center; flex: none; }
.nx-feed-body { flex: 1; min-width: 0; }
.nx-feed-head { font-size: 13.5px; display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.nx-feed-head a { font-weight: 700; color: var(--nx-ink); }
.nx-feed-when { margin-left: auto; font-size: 12px; color: var(--nx-ink-3); white-space: nowrap; }
.nx-feed-text { font-size: 14px; color: #3a403c; margin-top: 2px; white-space: pre-line; }
.feed-system .nx-feed-text { color: var(--nx-ink-2); font-style: italic; }
.feed-system .nx-feed-icon { background: var(--nx-green-soft); color: var(--nx-green-dark); }

/* ---------- Segmented control, chips, toolbar ---------- */
.nx-seg { display: inline-flex; background: #eceee9; border-radius: 10px; padding: 3px; }
.nx-seg button { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--nx-ink-2); padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.nx-seg button.on { background: #fff; color: var(--nx-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.nx-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.nx-search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--nx-line); border-radius: 10px; padding: 0 12px; height: 42px; min-width: min(380px, 100%); color: var(--nx-ink-3); }
.nx-search-box:focus-within { border-color: var(--nx-green); box-shadow: 0 0 0 4px rgba(56, 174, 43, .12); }
.nx-search-box input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 14.5px; background: transparent; color: var(--nx-ink); }
.nx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.nx-chip { border: 1px solid var(--nx-line); background: #fff; font: inherit; font-size: 13px; font-weight: 700; color: var(--nx-ink-2); padding: 6px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nx-chip .mud-icon-root { font-size: 16px; }
.nx-chip:hover { border-color: #cfd4cc; }
.nx-chip.on { background: var(--nx-charcoal); border-color: var(--nx-charcoal); color: #fff; }

/* ---------- Tables ---------- */
.nx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nx-table th { text-align: left; font-size: 11.5px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--nx-ink-3); padding: 12px 16px; background: #fafbf8; border-bottom: 1px solid var(--nx-line); white-space: nowrap; }
.nx-table td { padding: 12px 16px; border-bottom: 1px solid var(--nx-line-2); vertical-align: middle; }
.nx-table tbody tr:last-child td { border-bottom: 0; }
.nx-table tr.click { cursor: pointer; }
.nx-table tbody tr:hover td { background: #fafbf8; }
.nx-table .num { text-align: right; }
.nx-table .actions { text-align: right; white-space: nowrap; }
.nx-table.dense td { padding: 8px 16px; font-size: 13.5px; }
.nx-table th:first-child, .nx-table td:first-child { padding-left: 24px; }
.nx-table th:last-child, .nx-table td:last-child { padding-right: 24px; }
.row-off td { opacity: .55; }
.cell-person { display: flex; align-items: center; gap: 12px; }
.cell-strong { font-weight: 700; color: var(--nx-ink); }
.cell-sub { font-size: 12.5px; color: var(--nx-ink-3); }
.tiers { display: flex; flex-wrap: wrap; gap: 4px; }
.tier { font-size: 12px; background: #f3f5f1; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.tier b { color: var(--nx-ink-2); margin-right: 2px; }
@media (max-width: 900px) { .nx-card.flush { overflow-x: auto; } }

/* ---------- Pipeline board ---------- */
.board-summary { display: flex; gap: 24px; font-size: 14px; color: var(--nx-ink-2); margin: -8px 0 16px; }
.board-summary b { color: var(--nx-ink); font-size: 16px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-col { background: #eceee9; border-radius: var(--nx-radius); padding: 10px; min-height: 360px; display: flex; flex-direction: column; }
.board-col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.board-col-title { font-weight: 900; font-size: 14px; }
.board-col-count { font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, .06); color: var(--nx-ink-2); border-radius: 999px; padding: 1px 8px; }
.board-col-total { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--nx-ink-2); }
.board-zone { flex: 1; min-height: 120px; display: flex; flex-direction: column; gap: 10px; border-radius: 10px; transition: background .15s; }
.board-zone.mud-drop-zone-drag-block, .board-zone.mud-drop-item-preview-start { background: rgba(56, 174, 43, .08); }
.deal { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(28, 33, 30, .06), 0 2px 8px rgba(28, 33, 30, .04); cursor: grab; border: 1px solid transparent; transition: box-shadow .15s, transform .15s, border-color .15s; }
.deal:hover { box-shadow: var(--nx-shadow-lift); transform: translateY(-1px); border-color: #dfe3dc; }
.deal-late { box-shadow: inset 3px 0 0 var(--nx-late), 0 1px 2px rgba(28, 33, 30, .06); }
.deal-stale { box-shadow: inset 3px 0 0 var(--nx-today), 0 1px 2px rgba(28, 33, 30, .06); }
.deal-late:hover { box-shadow: inset 3px 0 0 var(--nx-late), var(--nx-shadow-lift); }
.deal-stale:hover { box-shadow: inset 3px 0 0 var(--nx-today), var(--nx-shadow-lift); }
.deal-right { display: inline-flex; align-items: baseline; gap: 6px; }
.deal-quiet { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.deal-quiet.quiet-amber { color: #8a5a12; background: #fbf1e1; }
.deal-quiet.quiet-red { color: var(--nx-late); background: #fdf0ef; }
.deal-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.deal-name { font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-title { font-size: 13px; color: var(--nx-ink-2); margin-top: 2px; }
.deal-meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; }
.deal-value { font-size: 17px; font-weight: 900; letter-spacing: -.3px; }
.deal-chance { font-size: 12px; font-weight: 700; color: var(--nx-ink-2); background: #f2f4f0; border-radius: 6px; padding: 1px 6px; }
.deal-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--nx-line-2); }

/* ---------- Forms ---------- */
.nx-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.nx-fields.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .nx-fields.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .nx-fields, .nx-fields.four { grid-template-columns: 1fr; } }
.nx-fields .span-2 { grid-column: span 2; }
@media (max-width: 600px) { .nx-fields .span-2 { grid-column: span 1; } }
.nx-fields .mud-input-control { margin: 0 !important; }
.nx-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 4px 0 20px; }
.nx-warn, .nx-ok { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.nx-warn { background: #fff6e8; border: 1px solid #f1dcb0; color: #6d4b0e; }
.nx-ok { background: var(--nx-green-soft); border: 1px solid #d3e8c7; color: #25541a; }
.nx-warn-title { font-weight: 900; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.nx-warn-row { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid #f1dcb0; border-radius: 8px; padding: 8px 10px; margin-top: 6px; font: inherit; font-size: 13.5px; color: var(--nx-ink); cursor: pointer; }
.nx-warn-row:hover { border-color: var(--nx-today); text-decoration: none; }
.nx-warn-why { float: right; font-size: 12px; color: var(--nx-today); font-weight: 600; margin-left: 8px; }
.nx-select { font: inherit; font-size: 13.5px; border: 1px solid var(--nx-line); border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--nx-ink); }
.nx-input-num { width: 70px; font: inherit; font-size: 13.5px; border: 1px solid var(--nx-line); border-radius: 8px; padding: 5px 8px; text-align: right; }

.picked { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--nx-line); border-radius: 12px; background: #fafbf8; }
.picked-main { flex: 1; min-width: 0; }
.pick-list { display: flex; flex-direction: column; margin-top: 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; font: inherit; padding: 8px; border-radius: 8px; cursor: pointer; }
.pick-row:hover { background: #f4f6f2; }
.pick-row .cell-sub { margin-left: auto; }

/* ---------- Detail pages ---------- */
.nx-dl { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; margin: 0; font-size: 14px; }
.nx-dl dt { color: var(--nx-ink-3); font-size: 13px; }
.nx-dl dd { margin: 0; }
.nx-note { background: #fbfaf5; border: 1px solid #efeadb; border-radius: 10px; padding: 12px 14px; font-size: 14px; white-space: pre-line; margin-top: 16px; }

.proj-list { display: flex; flex-direction: column; margin: 0 -10px; }
.proj-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 10px; border-radius: 10px; color: inherit; text-decoration: none !important; }
.proj-row:hover { background: #f7f8f5; }
.proj-title { font-weight: 700; }
.proj-sub { font-size: 13px; color: var(--nx-ink-3); }
.proj-value { font-weight: 900; }

.composer { border: 1px solid var(--nx-line); border-radius: 12px; padding: 12px; margin-bottom: 8px; background: #fcfcfb; }
.composer:focus-within { border-color: #cfd8c9; box-shadow: 0 0 0 4px rgba(56, 174, 43, .08); }
.composer-types { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.composer-text { width: 100%; border: 0; outline: 0; resize: vertical; font: inherit; font-size: 14.5px; background: transparent; color: var(--nx-ink); min-height: 48px; }
.composer-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-follow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--nx-ink-2); }
.composer-follow input { font: inherit; font-size: 13px; border: 1px solid var(--nx-line); border-radius: 8px; padding: 4px 8px; }

.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; align-items: center; }
.step { border: 1px solid var(--nx-line); background: #fff; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--nx-ink-2); padding: 8px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; }
.step:hover { border-color: #cfd4cc; color: var(--nx-ink); }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: #d3d7d0; }
.step.done { color: var(--nx-ink); }
.step.done .step-dot { background: var(--c); }
.step.current { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 35%, transparent); }
.step.current .step-dot { background: #fff; }
.step .mud-icon-root { font-size: 17px; }
.step-won { --c: var(--st-won); } .step-lost { --c: var(--st-lost); }
.step-won:hover { border-color: var(--st-won); color: var(--st-won); }
.step-lost:hover { border-color: var(--st-lost); color: var(--st-lost); }

.panel-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.panel-row .mud-input-control { max-width: 260px; margin: 0; }
.panel-won { border-color: #cfe5c6; background: linear-gradient(0deg, #fff, #f6fbf3); }
.panel-lost { border-color: #efd0cd; background: linear-gradient(0deg, #fff, #fdf5f4); }

.nx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-radius); box-shadow: var(--nx-shadow); margin-bottom: 20px; overflow: hidden; }
.stat { padding: 16px 20px; border-right: 1px solid var(--nx-line-2); }
.stat:last-child { border-right: 0; }
.stat-wide { grid-column: span 2; }
.stat-label { font-size: 12px; color: var(--nx-ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.stat-value { font-size: 22px; font-weight: 900; margin-top: 4px; letter-spacing: -.3px; }
.stat-value.small { font-size: 15px; }
.quick { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--nx-line); background: #fff; font: inherit; font-size: 12px; font-weight: 700; color: var(--nx-ink-2); padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.quick button:hover { border-color: var(--nx-green); color: var(--nx-green-dark); }

.quote-teaser { background: linear-gradient(160deg, #22382a, var(--nx-charcoal)); color: #fff; border: 0; }
.quote-teaser h2 { color: #fff; margin: 10px 0 6px !important; }
.quote-teaser p { color: rgba(255, 255, 255, .72); font-size: 14px; margin: 0; }
.quote-teaser-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; color: #9fd486; }
.danger-zone { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--nx-line-2); }

/* ---------- Follow-ups ---------- */
.fu-group { margin-bottom: 16px; }
.fu-head { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-bottom: 1px solid var(--nx-line-2); background: #fafbf8; }
.fu-head h2 { font-size: 15px !important; }
.fu-late .fu-head { background: #fdf4f3; } .fu-late .fu-head h2 { color: var(--nx-late); }
.fu-today .fu-head { background: #fff8ec; } .fu-today .fu-head h2 { color: #a4650c; }
.fu-row { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-bottom: 1px solid var(--nx-line-2); flex-wrap: wrap; }
.fu-row:last-child { border-bottom: 0; }
.fu-main { flex: 1; min-width: 240px; color: inherit; text-decoration: none !important; }
.fu-call { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--nx-green-soft); color: var(--nx-green-dark); }
.fu-row .quick { margin-top: 0; }

/* ---------- Catalogue and users ---------- */
.import-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.file-drop { position: relative; display: flex; align-items: center; gap: 10px; border: 1.5px dashed #cdd3c9; border-radius: 12px; padding: 0 18px; height: 48px; min-width: 320px; cursor: pointer; color: var(--nx-ink-2); font-size: 14px; background: #fafbf8; }
.file-drop:hover { border-color: var(--nx-green); color: var(--nx-green-dark); }
.file-drop.has-file { border-style: solid; border-color: var(--nx-green); background: var(--nx-green-soft); color: var(--nx-green-dark); font-weight: 700; }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.temp-pw { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--nx-charcoal); color: #fff; border-radius: var(--nx-radius); padding: 18px 22px; margin-bottom: 20px; }
.temp-pw-title { font-size: 13px; color: rgba(255, 255, 255, .7); }
.temp-pw-value { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 26px; letter-spacing: 2px; margin: 4px 0; color: #9fd486; }
.temp-pw .nx-muted { color: rgba(255, 255, 255, .55); }
.temp-pw .mud-button-root { color: #fff; }

/* ---------- Empty states ---------- */
.nx-empty { text-align: center; padding: 56px 24px; background: var(--nx-surface); border: 1px dashed #d6dbd2; border-radius: var(--nx-radius); }
.nx-empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--nx-green-soft); color: var(--nx-green-dark); display: grid; place-items: center; margin: 0 auto 14px; }
.nx-empty-title { font-size: 18px; font-weight: 900; }
.nx-empty-text { color: var(--nx-ink-2); margin: 6px auto 0; max-width: 460px; }
.nx-empty-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* ---------- Sign-in ---------- */
.acc-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
@media (max-width: 900px) { .acc-shell { grid-template-columns: 1fr; } .acc-hero { display: none; } }
.acc-hero { position: relative; background: var(--nx-charcoal); color: #fff; overflow: hidden; }
.acc-hero::before { content: ""; position: absolute; inset: 0; background:
    radial-gradient(80% 60% at 10% 10%, rgba(56, 174, 43, .35), transparent 60%),
    radial-gradient(60% 50% at 90% 90%, rgba(176, 141, 87, .22), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 72px); }
.acc-hero-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; }
.acc-brand { display: block; }
.acc-logo { display: block; width: 220px; max-width: 60%; height: auto; }
.acc-nk { font-size: 34px; letter-spacing: -1px; }
.acc-bar { width: 2px; height: 44px; background: var(--nx-green); display: inline-block; }
.acc-name { display: block; font-size: 18px; letter-spacing: 4px; }
.acc-sub { display: block; font-size: 9.5px; letter-spacing: 3px; color: rgba(255, 255, 255, .6); margin-top: 6px; }
.acc-kicker { color: #9fd486; font-weight: 900; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.acc-hero-copy h2 { font-size: 42px; line-height: 1.1; font-weight: 900; letter-spacing: -1px; margin: 0 0 14px; max-width: 520px; }
.acc-hero-copy p { font-size: 17px; color: rgba(255, 255, 255, .7); margin: 0; max-width: 440px; }
.acc-hero-foot { font-size: 13px; color: rgba(255, 255, 255, .45); }
.acc-main { display: grid; place-items: center; padding: 32px; }
.acc-card { width: 100%; max-width: 400px; }
.acc-title { font-size: 30px; font-weight: 900; letter-spacing: -.5px; margin: 0 0 6px; }
.acc-lead { color: var(--nx-ink-2); margin: 0 0 26px; }
.acc-form { display: flex; flex-direction: column; gap: 16px; }
.acc-field { display: flex; flex-direction: column; gap: 6px; }
.acc-field span { font-size: 13px; font-weight: 700; color: var(--nx-ink-2); }
.acc-field input { font: inherit; font-size: 15.5px; padding: 12px 14px; border: 1px solid #d9ddd6; border-radius: 10px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.acc-field input:focus { border-color: var(--nx-green); box-shadow: 0 0 0 4px rgba(56, 174, 43, .14); }
.acc-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--nx-ink-2); }
.acc-check input { width: 16px; height: 16px; accent-color: var(--nx-green-strong); }
.acc-btn { margin-top: 6px; font: inherit; font-size: 15.5px; font-weight: 900; color: #fff; background: var(--nx-charcoal); border: 0; border-radius: 10px; padding: 13px; cursor: pointer; transition: background .15s, transform .1s; }
.acc-btn:hover { background: #2a322d; }
.acc-btn:active { transform: translateY(1px); }
.acc-alert { background: #fdf2f1; border: 1px solid #f1cfcb; color: #8e2b25; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.acc-note { background: var(--nx-green-soft); border: 1px solid #d3e8c7; color: #25541a; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.acc-help { font-size: 13.5px; color: var(--nx-ink-3); margin-top: 22px; }

/* ---------- Blazor reconnect / error ---------- */
#blazor-error-ui { background: #fff4e5; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- Customer details: consent ---------- */
.consent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; border: 1px solid var(--nx-line); border-radius: 10px; padding: 10px 14px; }
.consent-title { width: 100%; font-size: 13px; font-weight: 700; color: var(--nx-ink-2); }
.consent .mud-input-control { margin: 0 !important; }

/* ---------- Appointments ---------- */
.nx-input { font: inherit; font-size: 13.5px; border: 1px solid var(--nx-line); border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--nx-ink); }
.nx-input.grow { flex: 1 1 100%; }
.appt-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--nx-line); border-radius: 12px; background: #fcfcfb; }
.appt-form-actions { display: flex; justify-content: flex-end; gap: 6px; width: 100%; }
.appt-list { list-style: none; margin: 0; padding: 0; }
.appt-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--nx-line-2); flex-wrap: wrap; }
.appt-list li:first-child { border-top: 0; }
.appt-main { flex: 1; min-width: 180px; }
.appt-list .quick { margin-top: 0; }
.appt-done, .appt-cancelled, .appt-past { opacity: .6; }

/* ---------- Sales milestones (traffic lights) ---------- */
.ms-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 1200px) { .ms-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .ms-row { grid-template-columns: 1fr 1fr; } }
.ms { border: 1px solid var(--nx-line); border-radius: 12px; padding: 10px 12px; background: #fff; border-top: 3px solid var(--ms); }
.ms-top { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 13.5px; }
.ms-light { width: 10px; height: 10px; border-radius: 50%; background: var(--ms); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms) 20%, transparent); flex: none; }
.ms-date { font-size: 12.5px; color: var(--nx-ink-2); margin-top: 4px; }
.ms .quick { margin-top: 8px; align-items: center; }
.ms-input { font: inherit; font-size: 11.5px; border: 1px solid var(--nx-line); border-radius: 999px; padding: 2px 6px; width: 118px; color: var(--nx-ink-2); }
.ms-todo { --ms: #c2413b; } .ms-booked { --ms: #d98c1f; } .ms-done { --ms: #3f8f3a; }
.ms-key { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ms); margin: 0 4px 0 10px; }
.deal-ms { display: flex; gap: 4px; margin-top: 10px; }
.ms-dot { flex: 1; height: 4px; border-radius: 999px; background: var(--ms); opacity: .85; }
.ms-dot.ms-todo { background: #e6e8e3; }

/* ---------- Polish ---------- */
/* Blazor focuses the page heading after navigation (for screen readers); don't draw a box round it. */
h1:focus, h1:focus-visible { outline: none; }
/* "Coming next" menu items: readable but clearly not clickable yet. */
.nx-nav-soon .mud-nav-link, .nx-nav-soon .mud-nav-link.mud-nav-link-disabled { opacity: 1; color: rgba(255, 255, 255, .38) !important; }
.nx-nav-soon .mud-nav-link .mud-nav-link-icon { color: rgba(255, 255, 255, .3) !important; }

/* ---------------------------------------------------------------------------------------------
   Quotes
   --------------------------------------------------------------------------------------------- */
.nx-table tr.clickable { cursor: pointer; }

/* Live indicator */
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--nx-ink-2); background: #fff; border: 1px solid var(--nx-line); border-radius: 999px; padding: 6px 12px; transition: background .3s, border-color .3s, color .3s; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nx-green); box-shadow: 0 0 0 3px rgba(56, 174, 43, .18); }
.live-flash { background: var(--nx-green-soft); border-color: var(--nx-green); color: var(--nx-green-dark); }
.live-flash .live-dot { animation: live-pulse .5s ease-in-out 3; }
@keyframes live-pulse { 50% { transform: scale(1.8); box-shadow: 0 0 0 6px rgba(56, 174, 43, .12); } }

/* Band cards */
.tier-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tier-name { font-size: 12px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--nx-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-main { font-size: 11px; font-weight: 900; color: var(--nx-green-dark); background: var(--nx-green-soft); border-radius: 999px; padding: 1px 8px; }
.tier-make-main { font: inherit; font-size: 11px; font-weight: 700; color: var(--nx-green-dark); background: transparent; border: 1px solid var(--nx-line); border-radius: 999px; padding: 1px 8px; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s, border-color .15s; }
.tier-card:hover .tier-make-main, .tier-card:focus-within .tier-make-main, .tier-card.on .tier-make-main { opacity: 1; }
.tier-make-main:hover { background: var(--nx-green-soft); border-color: var(--nx-green); }
.tier-make-main:disabled { cursor: default; opacity: .5; }
@media (hover: none) { .tier-make-main { opacity: 1; } }
.tier-gross { font-size: 26px; font-weight: 900; letter-spacing: -.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tier-sub { font-size: 12.5px; color: var(--nx-ink-3); font-variant-numeric: tabular-nums; }
.tier-delta { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.tier-delta.up { background: #fff1e6; color: #a2531a; }
.tier-delta.down { background: var(--nx-green-soft); color: var(--nx-green-dark); }
.tier-block { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--nx-late); }
.tier-block .mud-icon-root { font-size: 16px; }

/* Blocking issues and changes */
.issue-block { background: #fdf0ef; border: 1px solid #f0cfcc; color: #7a2622; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.issue-block-title { display: flex; align-items: center; gap: 6px; font-weight: 900; margin-bottom: 4px; }
.issue-block ul, .changes ul { margin: 0; padding-left: 20px; }
.issue-block li { margin: 2px 0; }
.changes { background: var(--nx-surface); border: 1px solid var(--nx-line); border-left: 4px solid var(--st-quoted); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; box-shadow: var(--nx-shadow); }
.changes-title { display: flex; align-items: center; gap: 10px; font-weight: 900; margin-bottom: 6px; }
.changes-total { font-size: 12.5px; border-radius: 6px; padding: 2px 8px; }
.changes-total.up { background: #fff1e6; color: #a2531a; }
.changes-total.down { background: var(--nx-green-soft); color: var(--nx-green-dark); }
.changes ul { list-style: none; padding: 0; }
.changes li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--nx-line-2); }
.changes li:last-child { border-bottom: 0; }
.chg { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; border-radius: 5px; padding: 1px 6px; min-width: 62px; text-align: center; }
.chg-added { background: var(--nx-green-soft); color: var(--nx-green-dark); }
.chg-removed { background: #fdf0ef; color: var(--nx-late); }
.chg-changed { background: #fff6e8; color: #8a5a12; }
.chg-delta { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Sections and lines */
.quote-section { margin-bottom: 14px; }
.qs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--nx-line); }
.qs-head h2 { margin: 0; font-size: 15px; font-weight: 900; }
.qs-head.plain { padding: 0; border: 0; margin-bottom: 8px; }
.qs-head.plain .nx-section { margin: 0; }
.qs-total { font-weight: 900; font-variant-numeric: tabular-nums; }
.quote-lines td { vertical-align: top; }
.quote-lines .qty { width: 60px; color: var(--nx-ink-3); white-space: nowrap; }
.quote-lines .net { width: 110px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quote-lines .actions { width: 90px; }
.row-unpriced td { background: #fffaf2; }
.row-unpriced .net { color: var(--nx-late); }
.row-option td { color: var(--nx-ink-3); }
.row-option .net { font-weight: 400; }
.row-hidden td { opacity: .6; }
.row-child td:first-child { padding-left: 40px; }
.expl { color: var(--nx-ink-3); font-style: italic; }
.bespoke-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; font-weight: 700; color: #8a5a12; }
.nx-input-num.wide { width: 110px; }
.opt-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--nx-ink-2); cursor: pointer; margin-right: 6px; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--nx-ink-3); font-size: 13px; width: 26px; height: 26px; border-radius: 6px; }
.icon-btn:hover { background: #fdf0ef; color: var(--nx-late); }

.quote-totals { margin-bottom: 20px; margin-left: auto; max-width: 380px; }
.qt-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.qt-grand { margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--nx-charcoal); font-size: 19px; font-weight: 900; }

.disc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nx-input.full { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.composer-text.boxed { border: 1px solid var(--nx-line); border-radius: 10px; padding: 10px 12px; box-sizing: border-box; min-height: 90px; margin-bottom: 8px; }

.rev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rev-list li, .rev-list > a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--nx-line); border-radius: 10px; color: inherit; text-decoration: none; }
.rev-list > a:hover, .rev-list > a.on { border-color: var(--nx-green); background: var(--nx-green-soft); }
.rev-label { font-weight: 900; font-size: 13px; color: var(--nx-green-dark); background: var(--nx-green-soft); border-radius: 8px; padding: 4px 9px; white-space: nowrap; }
.rev-main { flex: 1; min-width: 0; font-size: 13px; }
.rev-list li.rev-accepted { border-color: var(--nx-green); background: var(--nx-green-soft); }
.rev-accepted-note { color: var(--nx-green-dark); font-weight: 700; }
.rev-accepted-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: #fff; background: var(--nx-green-strong); border-radius: 999px; padding: 3px 10px 3px 7px; white-space: nowrap; }
.rev-list li.rev-accept-form { flex-direction: column; align-items: stretch; gap: 8px; border-color: var(--nx-green); border-style: dashed; }
.rev-accept-title { font-weight: 800; font-size: 13.5px; }
.rev-accept-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.rev-accept-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--nx-ink-3); }
.accepted-bar { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--nx-green); background: var(--nx-green-soft); border-radius: 12px; font-size: 13.5px; color: var(--nx-green-dark); }
.accepted-bar .nx-muted { display: block; margin-top: 2px; font-size: 12.5px; }

/* Quote summary on the enquiry */
.quote-card-total { font-size: 28px; font-weight: 900; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.quote-card-total span { font-size: 12.5px; font-weight: 700; letter-spacing: 0; color: var(--nx-ink-3); margin-left: 8px; }

/* Unlinked design inbox */
.inbox { margin-bottom: 20px; border-left: 4px solid var(--st-quoted); }
.inbox-row { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-top: 1px solid var(--nx-line-2); }
.inbox-icon { width: 34px; height: 34px; border-radius: 10px; background: #fff6e8; color: #8a5a12; display: grid; place-items: center; flex: none; }
.inbox-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.inbox-main:hover .cell-strong { text-decoration: underline; }
.inbox-link { display: flex; align-items: center; gap: 8px; width: 440px; max-width: 50%; }
.inbox-link .mud-input-control { margin: 0 !important; }
@media (max-width: 800px) { .inbox-row { flex-wrap: wrap; } .inbox-link { width: 100%; max-width: none; } }

/* Fusion keys */
.key-new { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.key-new .mud-input-control { margin: 0 !important; }
.key-once { background: var(--nx-green-soft); border: 1px solid #cfe5c4; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.key-once pre { margin: 8px 0 0; padding: 10px 12px; background: #fff; border-radius: 8px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; user-select: all; }
.key-table { margin-top: 8px; }
.key-table th:first-child, .key-table td:first-child { padding-left: 0; }
.key-table th:last-child, .key-table td:last-child { padding-right: 0; }

/* Price bands editor */
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-top: 10px; }
@media (max-width: 1000px) { .band-grid { grid-template-columns: 1fr; } }
.band-row { display: grid; grid-template-columns: 30px 1fr 1.6fr; gap: 8px; align-items: center; }
.band-no { font-weight: 900; color: var(--nx-ink-3); text-align: right; font-variant-numeric: tabular-nums; }

/* Band bar + band cards (v2) */
.band-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: 12px; padding: 10px 16px; margin-bottom: 14px; box-shadow: var(--nx-shadow); }
.band-bar-label { font-size: 12px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--nx-ink-3); white-space: nowrap; }
.band-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.band-chip { width: 30px; height: 28px; border: 1px solid var(--nx-line); background: #fff; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--nx-ink-2); cursor: pointer; font-variant-numeric: tabular-nums; padding: 0; }
.band-chip:hover { border-color: #c7ccc3; background: #fafbf8; }
.band-chip.on { background: var(--nx-charcoal); border-color: var(--nx-charcoal); color: #fff; }
.band-chip.main { background: var(--nx-green-strong); border-color: var(--nx-green-strong); color: #fff; }
.band-bar-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--nx-ink-3); white-space: nowrap; }
.band-key { width: 10px; height: 10px; border-radius: 3px; background: var(--nx-green); }
.tier-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tier-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-radius); padding: 14px 18px 16px; box-shadow: var(--nx-shadow); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; outline: none; }
.tier-card:hover { box-shadow: var(--nx-shadow-lift); transform: translateY(-1px); }
.tier-card.on { border-color: var(--nx-green); box-shadow: 0 0 0 2px rgba(56, 174, 43, .18), var(--nx-shadow); }
.tier-card .tier-top { width: 100%; }

/* Lines */
.quote-lines .code { width: 1%; color: var(--nx-ink-2); white-space: nowrap; }
.quote-lines td.code:empty { padding-right: 0; }

/* Add to the quote (v2) */
.add-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.add-head .nx-section { margin: 0 !important; }
.add-kinds { flex-wrap: wrap; }
.add-help { font-size: 13px; color: var(--nx-ink-3); margin: 0 0 22px; }
.add-fields { row-gap: 22px !important; align-items: center; }
.add-vat .mud-input-control, .add-vat .mud-switch { margin: 0 !important; }
.add-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--nx-line-2); font-size: 14px; color: var(--nx-ink-2); }


/* ---- Quote page: words on the customer's quote (28/09) ---- */
.nx-link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--nx-green-dark); cursor: pointer; }
.nx-link-btn:hover { text-decoration: underline; }
.nx-link-btn.small { font-size: 12px; }
.qs-spec { padding: 10px 18px 12px; border-bottom: 1px solid var(--nx-line); background: var(--nx-green-soft); }
.qs-spec-text { font-size: 14px; line-height: 1.5; }
.qs-spec-italic { font-style: italic; color: var(--nx-ink-3); }
.qs-spec-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.qs-spec-tag { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--nx-green-strong); }
.qs-spec-tag.edited { color: var(--nx-ink-3); }
.line-note { font-style: italic; font-size: 12.5px; color: var(--nx-ink-3); cursor: pointer; margin-top: 2px; }
.line-note-edit { margin-top: 6px; }
.line-note-edit .composer-text.boxed { min-height: 56px; }
.row-info td { color: #1f7fa8; }
.row-note td { color: var(--nx-ink-3); font-style: italic; }
.row-extra .code { font-size: 10.5px; letter-spacing: .6px; }
.clause-heading { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--nx-ink-3); margin: 10px 0 4px; }
.clause { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.clause input[type=checkbox] { margin-top: 4px; accent-color: var(--nx-green-strong); }
.clause-body { flex: 1; }
.clause-text { font-size: 13px; line-height: 1.45; cursor: pointer; }
.clause.off .clause-text { color: var(--nx-ink-3); text-decoration: line-through; }
.wording-table textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; border: 1px solid var(--nx-line); border-radius: 8px; padding: 6px 8px; resize: vertical; }
.wording-table input.nx-input { width: 100%; box-sizing: border-box; }

/* ---- Quote item library (28/09) ---- */
.lib-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.lib-row .lib-pick { flex: 1 1 340px; min-width: 280px; }
.need-price { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #b3261e; background: #fdecea; border-radius: 999px; padding: 1px 8px; }
.price-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; padding: 8px 10px; background: var(--nx-green-soft); border-radius: 8px; font-size: 13px; }
.price-edit label { display: inline-flex; gap: 4px; align-items: center; }

/* ---- Add to the quote: in the left column under the totals (14/10) ----
   Sized by the card's own width (container queries), not the window, because it now shares the row with the side panel. */
.add-card { margin-top: 0; container-type: inline-size; }
.add-card .add-fields { grid-template-columns: minmax(0, 2.6fr) repeat(6, minmax(0, 1fr)); }
.add-card .add-fields .span-2 { grid-column: span 1; }
.add-card .add-fields .span-all { grid-column: 1 / -1; }
@container (max-width: 1250px) { .add-card .add-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } .add-card .add-fields .span-2 { grid-column: span 2; } }
@container (max-width: 640px) { .add-card .add-fields { grid-template-columns: 1fr 1fr; } }
@container (max-width: 420px) { .add-card .add-fields { grid-template-columns: 1fr; } .add-card .add-fields .span-2 { grid-column: span 1; } }

/* ---- Collapsible quote sections (28/09) ---- */
.qs-toolbar { display: flex; align-items: center; gap: 16px; margin: 0 4px 10px; }
.qs-toggle { cursor: pointer; user-select: none; }
.qs-toggle:hover { background: var(--nx-green-soft); }
.qs-chevron { display: inline-block; width: 14px; color: var(--nx-ink-3); }
.qs-meta { display: inline-flex; align-items: center; gap: 14px; }
.qs-meta .need-price { margin-top: 0; }
.quote-section.collapsed .qs-head { border-bottom: 0; }
.quote-section.collapsed .qs-spec, .quote-section.collapsed table { display: none; }

/* Drawings from Fusion (Nixons Quote button) – design card, issue prompt, price-group hint */
.dr-card { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--nx-line); }
.dr-status { font-size: 13.5px; font-weight: 800; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.dr-status.ok { color: var(--nx-green-strong); }
.dr-status.old { color: #8a5a00; }
.dr-status .cell-sub { font-weight: 400; }
.dr-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.dr-item { min-width: 0; }
.dr-thumb { display: block; width: 100%; padding: 0; border: 1px solid var(--nx-line); border-radius: 6px; overflow: hidden; background: #fff; aspect-ratio: 1600 / 1131; cursor: zoom-in; transition: border-color .15s, box-shadow .15s; }
.dr-thumb:hover, .dr-thumb:focus-visible { border-color: var(--nx-green); box-shadow: 0 0 0 2px var(--nx-green-soft); outline: none; }
.dr-strip img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dr-strip.stale img { opacity: .45; }
.dr-pack { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; color: var(--nx-ink-2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-pack input { margin: 0; flex: none; accent-color: var(--nx-green-strong); }
.dr-pack.ro { cursor: default; }
.dr-item.out .dr-thumb img { opacity: .35; filter: grayscale(1); }
.dr-item.out .dr-pack { color: var(--nx-ink-3); text-decoration: line-through; }
.dr-prompt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff6e8; border: 1px solid #f1dcb0; color: #6d4b0e; border-radius: 10px; padding: 8px 12px; margin-bottom: 16px; font-size: 14px; }
.dr-prompt-text { flex: 1; min-width: 240px; }
.pg-hint { border: 1px dashed var(--nx-green-strong); background: var(--nx-green-soft); color: var(--nx-green-dark); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pg-hint:hover { background: #e2f0de; }

/* ---- AI images (Fusion's AI Image button) ---------------------------------------------------------------- */
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ai-card { background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-radius); box-shadow: var(--nx-shadow); overflow: hidden; display: flex; flex-direction: column; }
.ai-thumb, .ai-big, .ai-mini-thumb { position: relative; display: block; background: #f3f4f1; }
.ai-thumb { aspect-ratio: 16 / 9; }
.ai-thumb img, .ai-mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-thumb img.pending, .ai-big img.pending, .ai-mini-thumb img.pending { filter: grayscale(.6) brightness(1.05); opacity: .55; }
.ai-meta { padding: 12px 16px 4px; }
.ai-actions { padding: 6px 16px 14px; display: flex; gap: 8px; align-items: center; margin-top: auto; }
.ai-actions .mud-input-control { flex: 1; margin: 0; }
.ai-badge { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(39, 37, 37, .82); color: #fff; }
.ai-badge.working .mud-progress-circular { width: 14px !important; height: 14px !important; color: #fff; }
.ai-badge.failed { background: #b3261e; }
.ai-badge.pack { background: var(--nx-green-strong); }
.ai-error { margin-top: 6px; font-size: 12.5px; color: #b3261e; }
.ai-error.big { font-size: 14px; margin: 10px 0 0; }
.ai-view .ai-tabs { margin-bottom: 14px; }
.ai-view .ai-tabs button[disabled] { opacity: .45; cursor: default; }
.ai-big img { width: 100%; display: block; border-radius: 6px; border: 1px solid var(--nx-line); }
.ai-both { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-both figure { margin: 0; }
.ai-both figcaption { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--nx-ink-3); margin-bottom: 6px; }
.ai-both img { width: 100%; display: block; border-radius: 6px; border: 1px solid var(--nx-line); }
.ai-caption { margin: 12px 0 0; }
.ai-link { display: flex; gap: 8px; align-items: center; }
.ai-link .mud-input-control { flex: 1; margin: 0; }
.ai-prompt { margin-top: 14px; font-size: 13px; }
.ai-prompt summary { cursor: pointer; font-weight: 700; color: var(--nx-green-dark); }
.ai-prompt pre { white-space: pre-wrap; font-size: 11.5px; line-height: 1.45; background: #f6f7f4; border: 1px solid var(--nx-line); border-radius: 6px; padding: 10px; max-height: 420px; overflow: auto; }
.ai-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-mini-thumb { aspect-ratio: 16 / 9; border: 1px solid var(--nx-line); border-radius: 6px; overflow: hidden; }
button.ai-mini-thumb { width: 100%; padding: 0; cursor: zoom-in; font: inherit; }
button.ai-mini-thumb:hover, button.ai-mini-thumb:focus-visible { border-color: var(--nx-green); outline: none; }
.ai-mini-thumb .ai-badge { left: 6px; bottom: 6px; font-size: 10.5px; padding: 2px 7px; }
.ai-mini-pack { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--nx-ink-2); margin-top: 3px; cursor: pointer; }
@media (max-width: 700px) { .ai-both { grid-template-columns: 1fr; } }

/* ---- Appliance slots: the model picker on the quote page ---- */
.appl-design { color: var(--nx-ink-2); }
.appl-choose { display: inline-block; margin: 4px 10px 0 0; font-weight: 700; }
.icon-btn.ghost { display: inline-grid; place-items: center; cursor: help; }
.icon-btn.ghost:hover { background: none; color: var(--nx-ink-2); }
.appl-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.appl-chooser { margin-top: 10px; padding: 12px; border: 1px solid var(--nx-line); border-radius: 10px; background: #fafbf9; display: flex; flex-direction: column; gap: 8px; }
.appl-search { width: 100%; box-sizing: border-box; font-size: 14px; padding: 8px 10px; }
.appl-search:focus { outline: 0; border-color: var(--nx-green); box-shadow: 0 0 0 3px rgba(56, 174, 43, .12); }
.appl-results { max-height: 320px; overflow-y: auto; border: 1px solid var(--nx-line); border-radius: 8px; background: #fff; }
.appl-row { display: grid; grid-template-columns: 130px 1fr auto auto; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--nx-line-2); background: none; padding: 7px 10px; font: inherit; font-size: 13px; color: var(--nx-ink); cursor: pointer; }
.appl-row:last-child { border-bottom: 0; }
.appl-row:hover { background: var(--nx-green-soft); }
.appl-row.chosen { background: var(--nx-green-soft); box-shadow: inset 3px 0 0 var(--nx-green); }
.appl-row:disabled { opacity: .6; cursor: wait; }
.appl-code { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appl-desc { color: var(--nx-ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.appl-tag { font-size: 11px; color: var(--nx-ink-3); border: 1px solid var(--nx-line); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.appl-price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.appl-empty { font-size: 13px; color: var(--nx-ink-2); padding: 4px 2px; }
.appl-off { display: grid; grid-template-columns: 160px 1fr 140px auto; gap: 8px; align-items: center; }
.appl-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
@media (max-width: 900px) { .appl-row { grid-template-columns: 1fr auto; } .appl-desc, .appl-tag { grid-column: 1 / -1; } .appl-off { grid-template-columns: 1fr; } }

/* ---- Image viewer (drawings and AI images): one picture at a time, arrows, thumbnails, quote pack tick ---- */
.iv { position: fixed; inset: 0; z-index: 1600; display: flex; align-items: center; justify-content: center; outline: none; }
.iv-backdrop { position: absolute; inset: 0; background: rgba(20, 19, 19, .82); }
.iv-panel { position: relative; display: flex; flex-direction: column; width: min(1400px, calc(100vw - 32px)); height: calc(100vh - 32px); background: var(--nx-charcoal); border-radius: var(--nx-radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); overflow: hidden; color: #fff; }
.iv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); flex-wrap: wrap; }
.iv-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.iv-name { font-size: 16px; font-weight: 800; }
.iv-sub { font-size: 13px; color: rgba(255, 255, 255, .62); }
.iv-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.iv-count { font-size: 13px; color: rgba(255, 255, 255, .62); font-variant-numeric: tabular-nums; }
.iv-pack { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; background: rgba(255, 255, 255, .1); color: #fff; user-select: none; }
.iv-pack.on { background: var(--nx-green-strong); }
.iv-pack input { margin: 0; width: 16px; height: 16px; accent-color: var(--nx-green); }
.iv-pack-ro { font-size: 13px; color: rgba(255, 255, 255, .75); }
.iv-link { color: #fff; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.iv-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 16px; cursor: pointer; }
.iv-close:hover { background: rgba(255, 255, 255, .2); }
.iv-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px 72px; }
.iv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 4px; box-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
.iv-stage.paper img { background: #fff; }
.iv-stage img.out { opacity: .5; }
.iv-out-tag { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px; background: rgba(0, 0, 0, .7); font-size: 13px; font-weight: 700; }
.iv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding-bottom: 4px; }
.iv-nav:hover { background: rgba(255, 255, 255, .24); }
.iv-nav.prev { left: 14px; }
.iv-nav.next { right: 14px; }
.iv-strip { display: flex; gap: 8px; padding: 10px 14px 14px; overflow-x: auto; border-top: 1px solid rgba(255, 255, 255, .08); }
.iv-thumb { flex: none; width: 116px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; color: rgba(255, 255, 255, .7); cursor: pointer; font: inherit; text-align: left; }
.iv-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
.iv-thumb.paper img { object-fit: contain; background: #fff; }
.iv-thumb span { display: block; font-size: 11.5px; padding: 3px 2px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-thumb.on { border-color: var(--nx-green); color: #fff; }
.iv-thumb.out img { opacity: .35; filter: grayscale(1); }
.iv-thumb.out span { text-decoration: line-through; }
@media (max-width: 700px) {
    .iv-panel { width: 100vw; height: 100vh; border-radius: 0; }
    .iv-stage { padding: 10px; }
    .iv-nav { width: 40px; height: 40px; background: rgba(0, 0, 0, .5); }
    .iv-nav.prev { left: 6px; } .iv-nav.next { right: 6px; }
}

/* Presenting (14/10): toggle on the quote page header */
.present-toggle { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 700; color: var(--nx-ink-2); background: #fff; border: 1px solid var(--nx-line); border-radius: 999px; padding: 6px 8px 6px 12px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.present-toggle:hover { border-color: var(--nx-green); }
.present-switch { position: relative; width: 30px; height: 16px; border-radius: 999px; background: var(--nx-line); transition: background .2s; }
.present-knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .2s; }
.present-toggle.on { background: var(--nx-green-soft); border-color: var(--nx-green); color: var(--nx-green-dark); }
.present-toggle.on .present-switch { background: var(--nx-green); }
.present-toggle.on .present-knob { left: 16px; }
.quote-section.total-only .qs-head { border-bottom: 0; }

/* ---- Appliance details (quote pack appliance pages, 26/10/26) ---- */
.ad-status { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.ad-status.ok { color: var(--nx-green-dark); background: var(--nx-green-soft); }
.ad-status.pending { color: #8a5a10; background: #fdf3e2; }
.ad-status.none { color: var(--nx-ink-2); background: #eceee9; }
.ad-status.off { color: var(--nx-ink-3); background: #f3f4f1; }
.ad-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ad-pack { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--nx-ink-2); cursor: pointer; }
.ad-pack.out { color: var(--nx-ink-3); text-decoration: line-through; }
.ad-add { display: flex; gap: 8px; align-items: center; }
.ad-add .nx-input { width: 170px; }
.ad-lib-row { cursor: pointer; }
.ad-lib-row:hover td { background: #fafbf8; }
.ad-thumb { width: 52px; }
.ad-thumb img { width: 44px; height: 44px; object-fit: contain; display: block; }

.ad { position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ad-backdrop { position: absolute; inset: 0; background: rgba(28, 26, 26, .55); }
.ad-panel { position: relative; width: min(1120px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: var(--nx-radius); box-shadow: var(--nx-shadow-lift); }
.ad-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--nx-line); }
.ad-head > div:first-child { flex: 1; min-width: 0; }
.ad-title { font-size: 18px; font-weight: 900; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ad-sub { font-size: 13px; font-weight: 400; color: var(--nx-ink-3); }
.ad-close { position: static; border: 0; background: #f1f2ef; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--nx-ink-2); }
.ad-body { display: grid; grid-template-columns: 300px 1fr; gap: 26px; padding: 18px 22px; overflow: auto; }
.ad-left, .ad-right { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ad-image { height: 240px; border: 1px solid var(--nx-line); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.ad-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ad .file-drop.small { height: 40px; min-width: 0; font-size: 13.5px; }
.ad-fetch { display: flex; gap: 6px; align-items: center; }
.ad-label { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--nx-ink-2); margin-top: 10px; }
.ad-label .cell-sub { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ad-links { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; }
.ad-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ad-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--nx-ink-2); }
.ad-fields .span-2 { grid-column: span 2; }
.ad-specs { width: 100%; border-collapse: collapse; }
.ad-specs td { padding: 2px 4px 2px 0; }
.ad-specs td:first-child { width: 38%; }
.ad-specs td:last-child { width: 30px; }
.ad-specs .nx-input { width: 100%; box-sizing: border-box; }
.ad-checks { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px 14px; background: var(--nx-bg); border-radius: 10px; font-size: 13.5px; }
.ad-checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ad-foot { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--nx-line); }
.ad-foot .mud-button-root { text-transform: none; font-weight: 700; border-radius: 10px; }
@media (max-width: 860px) {
    .ad { padding: 0; }
    .ad-panel { max-height: 100vh; height: 100%; border-radius: 0; }
    .ad-body { grid-template-columns: 1fr; }
    .ad-fields { grid-template-columns: 1fr; }
    .ad-fields .span-2 { grid-column: span 1; }
}
.ad-fetch .nx-input { flex: 1 1 auto; min-width: 0; }
.ad-left .nx-link-btn { align-self: flex-start; }
.ad-lookup { display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: var(--nx-green-soft); color: var(--nx-green-dark); font-size: 13.5px; border-bottom: 1px solid var(--nx-line); }
.ad-lookup.busy { background: #fdf3e2; color: #8a5a10; }
.ad-lookup .mud-button-root { text-transform: none; font-weight: 700; border-radius: 10px; white-space: nowrap; }
.ad-status.busy { color: #1f5fa8; background: #e8f0fb; }
.ad-whole { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; margin-bottom: 10px; }
.ad-whole label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--nx-ink-2); }
.ad-whole label.ad-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--nx-ink); }
.ad-plan { font-size: 13.5px; margin: 6px 0 0; }
.ad-batches { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; margin-bottom: 4px; }
.ad-batch { margin-bottom: 0; padding: 16px 20px; }
.ad-batch .nx-card-head { margin-bottom: 8px; }
.ad-batch .nx-card-head a { font-size: 13px; }
.ad-batch-bar { height: 6px; background: var(--nx-line); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.ad-batch-bar div { height: 100%; background: var(--nx-green); transition: width .4s; }
.ad-batch-stats { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--nx-ink-2); }
.ad-paste-hint { text-align: center; padding: 0 16px; line-height: 1.6; }

/* ---------- Sales performance page ---------- */
.sales-custom { display: flex; gap: 16px; flex-wrap: wrap; margin: -6px 0 18px; font-size: 13.5px; font-weight: 700; color: var(--nx-ink-2); }
.sales-custom label { display: inline-flex; align-items: center; gap: 8px; }
.nx-card.flush .pad-head { padding: 18px 24px 0; margin-bottom: 12px; }
.nx-card.flush .pad { padding: 0 24px 18px; }
.sales-total td { font-weight: 900; background: #fafbf8; border-top: 1px solid var(--nx-line); }
.nx-bar-row.on { background: var(--nx-green-soft); }
.nx-bar-row.sales-wide { grid-template-columns: 140px 1fr 70px 28px; }
.sales-trend { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; align-items: end; height: 200px; }
.sales-trend-col { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; min-width: 0; }
.sales-trend-val { font-size: 11.5px; font-weight: 900; color: var(--nx-ink-2); white-space: nowrap; min-height: 14px; }
.sales-trend-bar { flex: 1; width: 100%; max-width: 44px; display: flex; align-items: flex-end; background: #f0f2ee; border-radius: 8px; overflow: hidden; }
.sales-trend-bar span { display: block; width: 100%; background: var(--nx-green); border-radius: 8px 8px 0 0; min-height: 0; }
.sales-trend-month { font-size: 12px; font-weight: 700; color: var(--nx-ink-3); }
@media (max-width: 700px) { .sales-trend { gap: 4px; } .sales-trend-val { display: none; } }


/* ---------- Survey and site media (ArtiCad list item 7) ---------- */
.sm-add { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.sm-add-to { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sm-add-label { font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--nx-ink-3); }
.sm-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--nx-line); background: #fff; color: var(--nx-ink); font-size: 14px; font-weight: 700; padding: 9px 14px; border-radius: 10px; cursor: pointer; user-select: none; }
.sm-btn:hover { border-color: #cfd4cc; }
.sm-btn.primary { background: var(--nx-green-strong); border-color: var(--nx-green-strong); color: #fff; }
.sm-btn.primary:hover { background: var(--nx-green-dark); }
.sm-btn:focus-within { outline: 2px solid var(--nx-green); outline-offset: 2px; }
.sm-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

.sm-queue:empty { display: none; }
.sm-queue { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sm-q-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 8px 10px; border: 1px solid var(--nx-line); border-radius: 10px; background: #fafbf8; font-size: 13px; }
.sm-q-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-q-state { color: var(--nx-ink-2); white-space: nowrap; }
.sm-q-bar { grid-column: 1 / -1; height: 4px; background: #eceee9; border-radius: 999px; overflow: hidden; }
.sm-q-bar span { display: block; height: 100%; width: 0; background: var(--nx-green); transition: width .2s; }
.sm-q-row.done .sm-q-state { color: var(--nx-green-strong); font-weight: 700; }
.sm-q-row.failed { border-color: #f0c9c6; background: #fff6f5; cursor: pointer; }
.sm-q-row.failed .sm-q-state { color: var(--nx-late); font-weight: 700; white-space: normal; }

.sm-empty { padding: 6px 0 2px; font-size: 13.5px; }
.sm-filter { margin: 2px 0 14px; }
.sm-group { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--nx-ink-2); margin: 18px 0 10px; }
.sm-group span { color: var(--nx-ink-3); margin-left: 6px; }
.sm-all { display: inline-block; margin-top: 10px; font-weight: 700; }

.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sm-compact .sm-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.sm-tile { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sm-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; width: 100%; padding: 0; border: 1px solid var(--nx-line); border-radius: 10px; overflow: hidden; background: #f0f2ee; cursor: pointer; color: var(--nx-ink-2); text-decoration: none !important; }
.sm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-thumb:hover { border-color: #cfd4cc; }
.sm-video { background: #2b2929; }
.sm-play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; }
.sm-doc { flex-direction: column; gap: 4px; background: #fafbf8; }
.sm-doc .mud-icon-root { font-size: 34px; color: var(--nx-ink-3); }
.sm-ext { font-size: 11.5px; font-weight: 900; letter-spacing: 1px; color: var(--nx-ink-2); }
.sm-cap { display: flex; align-items: flex-start; gap: 4px; }
.sm-cap-main { flex: 1; min-width: 0; }
.sm-cap-title { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-cap-sub { font-size: 11.5px; color: var(--nx-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-more { flex: none; border: 0; background: none; padding: 2px; margin: -2px -4px 0 0; border-radius: 6px; color: var(--nx-ink-3); cursor: pointer; }
.sm-more:hover { background: #f0f2ee; color: var(--nx-ink); }

.sm-sheet-backdrop { position: fixed; inset: 0; background: rgba(20, 20, 20, .35); z-index: 1400; }
.sm-sheet { position: fixed; z-index: 1401; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); background: #fff; border-radius: 14px; box-shadow: var(--nx-shadow-lift); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.sm-sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sm-sheet-head .cell-strong { word-break: break-all; }
.sm-x { position: static; color: var(--nx-ink-2); background: none; }
.sm-note { width: 100%; resize: vertical; font-size: 15px; }
.sm-sheet-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-sheet-actions .mud-button-root { text-transform: none; font-weight: 700; border-radius: 10px; }
.sm-site { margin-top: 4px; font-size: 13.5px; }

/* Phones: big thumb-friendly buttons, two-up grid, edit panel as a bottom sheet. */
@media (max-width: 700px) {
    .sm-buttons { display: grid; grid-template-columns: 1fr 1fr; }
    .sm-btn { justify-content: center; padding: 14px 12px; font-size: 15px; }
    .sm-btn.primary { grid-column: 1 / -1; padding: 16px 12px; font-size: 16px; }
    .sm-add-to .nx-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .sm-add-to .nx-chip, .sm-filter .nx-chip { padding: 8px 14px; white-space: nowrap; }
    .sm-grid, .sm-compact .sm-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sm-more { padding: 6px; }
    .sm-sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
    .sm-header .nx-header-actions { display: none; }
}

/* ---------- Live jobs (03/11/26) ---------- */
.nowrap { white-space: nowrap; }
.jb-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.jb-search { width: 260px; }
.jb-key { font-size: 12px; color: var(--nx-ink-3); display: inline-flex; align-items: center; gap: 4px; }
.jb-key .jb-light { margin-left: 8px; }
.jb-light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
.light-green { background: var(--st-won); }
.light-started { background: #a9d8a3; }
.light-amber { background: var(--nx-today); }
.light-red { background: var(--nx-late); }
.light-none { background: #dfe2dc; }
.jb-table th.jb-group { white-space: normal; min-width: 64px; max-width: 90px; line-height: 1.2; font-size: 10.5px; letter-spacing: .4px; text-align: center; }
.jb-table td.jb-cell { text-align: center; padding-left: 4px; padding-right: 4px; }
.jb-pill { display: inline-block; min-width: 40px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.jb-pill.light-none { color: var(--nx-ink-3); }
.jb-pill.light-started { color: #1f4f1a; }
.jb-bucket td { background: #f3f5f0 !important; font-size: 11.5px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--nx-ink-2); padding-top: 7px !important; padding-bottom: 7px !important; }
.jb-flag { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 6px; background: #fbe9e7; color: var(--nx-late); white-space: nowrap; }
.jb-flag-amber { background: #fff3df; color: #8a5a08; }
.jb-flag-done { background: var(--nx-green-soft); color: var(--nx-green-dark); font-size: 13px; padding: 6px 10px; }
.jb-kind { font-size: 10.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; background: #eef0f6; color: #4a5a8a; padding: 1px 6px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }

.jd-group { margin-bottom: 18px; }
.jd-group:last-child { margin-bottom: 0; }
.jd-group-head { font-size: 12.5px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--nx-ink-2); padding-bottom: 6px; border-bottom: 1px solid var(--nx-line); margin-bottom: 4px; }
.jd-step { display: grid; grid-template-columns: minmax(170px, 1.2fr) auto 140px minmax(140px, 1.3fr) 80px; gap: 10px; align-items: center; padding: 6px 6px 6px 10px; border-left: 3px solid transparent; border-bottom: 1px solid var(--nx-line-2); }
.jd-step.st-yes { border-left-color: var(--st-won); }
.jd-step.st-tbc { border-left-color: var(--nx-today); background: #fffaf0; }
.jd-step.st-no { border-left-color: var(--nx-late); background: #fdf3f2; }
.jd-step.st-na { border-left-color: #cfd3cc; }
.jd-step.st-na .jd-name { color: var(--nx-ink-3); }
.jd-name { font-size: 14px; font-weight: 700; }
.jd-ssop { display: inline-block; font-size: 9.5px; font-weight: 900; letter-spacing: .6px; background: #eef0f6; color: #4a5a8a; padding: 1px 5px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }
.jd-status { display: inline-flex; background: #eceee9; border-radius: 8px; padding: 2px; }
.jd-status button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--nx-ink-2); padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.jd-status button:disabled { cursor: default; }
.jd-status button.on { color: #fff; }
.jd-status button.on.st-yes { background: var(--st-won); }
.jd-status button.on.st-tbc { background: var(--nx-today); }
.jd-status button.on.st-no { background: var(--nx-late); }
.jd-status button.on.st-na { background: #8f9690; }
.jd-status button.on.st-blank { background: #fff; color: var(--nx-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.jd-date, .jd-note { width: 100%; font-size: 13px !important; padding: 5px 8px !important; }
.jd-who { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jd-changes, .jd-feed { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.jd-changes li, .jd-feed li { padding: 7px 0; border-bottom: 1px solid var(--nx-line-2); }
.jd-changes li:last-child, .jd-feed li:last-child { border-bottom: 0; }
.jd-feed-ssop { color: var(--nx-ink-2); }
.jd-add { display: flex; gap: 8px; margin-bottom: 8px; }
.jd-add .nx-input { flex: 1; }
.jc-group-head { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.jc-group-name { font-weight: 900; font-size: 15px !important; flex: 1; max-width: 360px; }
@media (max-width: 900px) {
    .jd-step { grid-template-columns: 1fr; }
    .jd-who { text-align: left; }
    .nx-card.flush .jb-table { min-width: 1100px; }
}
