/* ============================================================
   CRM theme
   ============================================================ */
:root {
    --brand: #119c9b;
    --brand-600: #0d7c7b;
    --brand-100: #d3f4f3;
    --brand-50: #ecfafa;
    --ink: #0f172a;
    --ink-2: #475569;
    --ink-3: #94a3b8;
    --line: #e6e9f2;
    --page: #f4f6fb;
    --card: #ffffff;
    --good: #16a34a;
    --good-bg: #dcfce7;
    --warn: #d97706;
    --warn-bg: #fef3c7;
    --bad: #dc2626;
    --bad-bg: #fee2e2;
    --info: #0284c7;
    --info-bg: #e0f2fe;
    --violet: #7c3aed;
    --violet-bg: #ede9fe;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .04);
    --bs-primary: var(--brand);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-600);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--page);
    --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html, body { font-family: var(--bs-font-sans-serif); background: var(--page); color: var(--ink); }
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
h1.h3 { font-size: 1.5rem; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
h1:focus { outline: none; }

/* ---------- Buttons & forms ---------- */
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-outline-primary { color: var(--brand); border-color: #d6c8f7; background: #fff; }
.btn-outline-primary:hover { background: var(--brand-50); border-color: var(--brand); color: var(--brand-600); }
.btn-outline-secondary { border-color: var(--line); color: var(--ink-2); background: #fff; }
.btn-outline-secondary:hover { background: #f8fafc; color: var(--ink); border-color: #cbd5e1; }
.btn-outline-success { color: var(--good); border-color: #bbf7d0; background: #fff; }
.btn-outline-success:hover { background: var(--good-bg); color: #15803d; border-color: var(--good); }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(91, 47, 214, .18);
    border-color: #b9a4f0;
}
.form-control, .form-select { border-radius: 10px; border-color: var(--line); }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-label { color: var(--ink-2); font-weight: 500; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.card-header {
    background: transparent; border-bottom: 1px solid var(--line);
    font-weight: 600; color: var(--ink); padding: .8rem 1.1rem;
}
.card-body { padding: 1.1rem; }
.card.border-primary { border-color: #c7d2fe; }
.card.border-warning { border-color: #fde68a; }
.card.border-warning .card-header { background: #fffbeb; color: #92400e; }

/* ---------- Tables ---------- */
.table { --bs-table-hover-bg: #f8faff; color: var(--ink); }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line); }
.table td, .table th { border-color: var(--line); vertical-align: middle; }
.table-sm > :not(caption) > * > * { padding: .5rem .5rem; }
.card > .table-responsive > .table { margin-bottom: 0; }
.card > .table-responsive > .table thead th { padding-left: 1.1rem; }
.table-warning { --bs-table-bg: #fffbeb; }
.table-danger { --bs-table-bg: #fef2f2; }

/* ---------- Alerts ---------- */
.alert { border-radius: 12px; border: 0; }
.alert-success { background: var(--good-bg); color: #166534; }
.alert-danger { background: var(--bad-bg); color: #991b1b; }
.alert-warning { background: var(--warn-bg); color: #92400e; }
.alert-light { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.alert-secondary { background: #f1f5f9; color: var(--ink-2); }

/* ---------- Status pills ---------- */
.pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill-new { background: #f1f5f9; color: #475569; }
.pill-assigned { background: var(--brand-100); color: #3730a3; }
.pill-voicemail { background: var(--warn-bg); color: #92400e; }
.pill-callback { background: var(--info-bg); color: #075985; }
.pill-quote { background: var(--violet-bg); color: #5b21b6; }
.pill-closed { background: var(--good-bg); color: #166534; }
.pill-dead { background: #e2e8f0; color: #334155; }
.pill-tier { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.pill-tier::before { display: none; }

.badge.text-bg-light { background: #fff !important; color: var(--ink-2) !important; border: 1px solid var(--line); font-weight: 500; }

/* ---------- Nav tabs ---------- */
.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs .nav-link { cursor: pointer; color: var(--ink-2); border: 0; border-bottom: 2px solid transparent; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }


/* ---------- Login ---------- */
.login-page {
    position: relative; overflow: hidden; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
    background: linear-gradient(120deg, #f4effd, #eef2ff, #fdf2f8, #f4effd); background-size: 300% 300%;
    animation: login-sky 18s ease-in-out infinite;
}
@keyframes login-sky { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
/* Soft colour clouds that drift on their own and lean towards the mouse (--mx / --my come from login.js). */
.login-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; translate: var(--mx, 0) var(--my, 0); animation: login-drift 14s ease-in-out infinite alternate; }
.login-orb.one { width: 520px; height: 520px; left: -140px; top: -160px; background: #a78bfa; }
.login-orb.two { width: 460px; height: 460px; right: -120px; bottom: -160px; background: #f9a8d4; animation-duration: 17s; animation-delay: -5s; }
.login-orb.three { width: 320px; height: 320px; left: 42%; top: 58%; background: #93c5fd; opacity: .4; animation-duration: 20s; animation-delay: -9s; }
@keyframes login-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, -40px) scale(1.15); } }

.login-stage { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: clamp(2rem, 7vw, 6rem); width: 100%; max-width: 1040px; perspective: 1200px; }
.login-hero { flex: 1 1 0; min-width: 0; text-align: center; animation: login-rise .7s ease-out both; }
.login-float { position: relative; width: 240px; height: 220px; margin: 0 auto 1.2rem; display: grid; place-items: center; translate: var(--mx, 0) var(--my, 0); }
.login-logo { position: relative; z-index: 2; width: 190px; height: auto; mix-blend-mode: multiply; filter: drop-shadow(0 18px 22px rgba(91, 47, 214, .35)); animation: login-bob 4.5s ease-in-out infinite; transition: scale .25s; }
.login-float:hover .login-logo { scale: 1.08; }
@keyframes login-bob { 0%, 100% { transform: translateY(8px) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
.login-shadow { position: absolute; bottom: 2px; left: 50%; width: 130px; height: 16px; margin-left: -65px; border-radius: 50%; background: rgba(76, 29, 149, .28); filter: blur(8px); animation: login-shadow 4.5s ease-in-out infinite; }
@keyframes login-shadow { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.65); opacity: .45; } }
.login-ring { position: absolute; inset: 14px 24px; border-radius: 50%; border: 2px solid rgba(124, 77, 255, .35); animation: login-ring 3.6s ease-out infinite; }
.login-ring.two { animation-delay: 1.8s; }
@keyframes login-ring { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.login-title { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.login-title span { background: linear-gradient(90deg, #5b2fd6, #c026d3, #5b2fd6); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: login-shine 4s linear infinite; }
@keyframes login-shine { to { background-position: 200% 0; } }
.login-tag { color: var(--ink-2); font-size: 1.05rem; max-width: 380px; margin: .6rem auto 1.4rem; }
.login-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.login-chip { background: rgba(255, 255, 255, .75); backdrop-filter: blur(8px); border: 1px solid #fff; border-radius: 999px; padding: .4rem 1rem; font-weight: 600; font-size: .85rem; color: var(--brand-600); box-shadow: 0 6px 18px rgba(91, 47, 214, .12); translate: var(--mx, 0) var(--my, 0); animation: login-chip 5s ease-in-out infinite; cursor: default; transition: background .15s, color .15s; }
.login-chip:nth-child(2) { animation-delay: -1.2s; } .login-chip:nth-child(3) { animation-delay: -2.4s; } .login-chip:nth-child(4) { animation-delay: -3.6s; }
.login-chip:hover { background: var(--brand); color: #fff; }
@keyframes login-chip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.login-card { flex: 0 0 auto; width: 100%; max-width: 420px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .78); backdrop-filter: blur(18px); box-shadow: 0 30px 70px rgba(76, 29, 149, .22), 0 2px 6px rgba(15, 23, 42, .05); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); animation: login-rise .7s .12s ease-out both; }
.login-card .card-body { padding: 2.2rem; }
@keyframes login-rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
.login-hello { font-size: 1.6rem; font-weight: 800; margin-bottom: .2rem; }
.login-form .form-control { background: rgba(255, 255, 255, .9); transition: border-color .15s, box-shadow .15s, transform .15s; }
.login-form .form-control:focus { transform: translateY(-1px); }
.login-pass { position: relative; }
.login-pass .form-control { padding-right: 4.2rem; }
.login-eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: var(--brand-50); color: var(--brand-600); font-weight: 600; font-size: .78rem; border-radius: 8px; padding: .3rem .6rem; }
.login-eye:hover { background: var(--brand-100); }
.login-caps { color: var(--warn); font-size: .82rem; font-weight: 600; margin-top: .35rem; }
.login-go { position: relative; overflow: hidden; border: 0; font-weight: 700; margin-top: .4rem; background: linear-gradient(90deg, #1bb9b8, #119c9b, #1bb9b8); background-size: 200% 100%; box-shadow: 0 12px 26px rgba(17, 156, 155, .35); transition: background-position .5s, transform .15s, box-shadow .15s; }
.login-go:hover, .login-go:focus { background: linear-gradient(90deg, #1bb9b8, #119c9b, #1bb9b8); background-size: 200% 100%; background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(17, 156, 155, .45); }
.login-go:active { transform: translateY(0) scale(.98); }
.login-go::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: login-glint 3.5s ease-in-out infinite; }
@keyframes login-glint { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.login-go.busy { pointer-events: none; opacity: .85; }
.login-go.busy span::after { content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .6rem; vertical-align: -.15em; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: login-spin .7s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-shake { animation: login-shake .45s ease-in-out; }
@keyframes login-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@media (max-width: 860px) {
    .login-stage { flex-direction: column; gap: 1.2rem; }
    .login-float { width: 170px; height: 150px; margin-bottom: .4rem; }
    .login-logo { width: 130px; }
    .login-tag, .login-chips { display: none; }
    .login-card .card-body { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .login-page, .login-orb, .login-logo, .login-shadow, .login-ring, .login-title span, .login-chip, .login-go::after, .login-hero, .login-card { animation: none; }
}

/* ---------- Dashboard ---------- */
.stat-card { display: block; text-decoration: none !important; color: inherit; height: 100%; position: relative; overflow: hidden; }
a.stat-card:hover { border-color: #d6c8f7; transform: translateY(-1px); transition: all .15s; }
.stat-card .card-body { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 40px; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.indigo { background: var(--brand-100); color: #3730a3; }
.stat-icon.sky { background: var(--info-bg); color: #075985; }
.stat-icon.amber { background: var(--warn-bg); color: #92400e; }
.stat-icon.violet { background: var(--violet-bg); color: #5b21b6; }
.stat-icon.green { background: var(--good-bg); color: #166534; }
.stat-icon.rose { background: #ffe4e6; color: #9f1239; }
.stat-card .stat-label { font-size: .76rem; color: var(--ink-2); font-weight: 500; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1.15; color: var(--ink); }
.stat-card .stat-sub { font-size: .76rem; color: var(--ink-3); margin-top: 2px; }
.stat-card.stat-alert { border-color: #fecaca; }
.delta-up { color: var(--good); font-weight: 600; }
.delta-down { color: var(--bad); font-weight: 600; }
.tabular td, .tabular th { font-variant-numeric: tabular-nums; }

.barlist-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.barlist-label { flex: 0 0 42%; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.barlist-label a { color: var(--ink); }
.barlist-track { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.barlist-bar { height: 10px; background: linear-gradient(90deg, #7c4dff, #5b2fd6); border-radius: 0 6px 6px 0; min-width: 2px; transition: width .3s; }
.barlist-bar.muted { background: #cbd5e1; }
.barlist-value { font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Scales evenly (no sideways stretch), so the bars and text stay sharp; the height follows the width. */
/* Drawn at 1000x260 and scaled evenly with the card, but no wider than 1400px and no taller than 340px: on a wide
   monitor (Bilal's is 3440px) it sits centred at a sensible size instead of stretching "like crazy" (20 Oct 2026). */
.colchart { width: 100%; max-width: 1400px; max-height: 340px; height: auto; display: block; margin: 0 auto; font-family: var(--bs-font-sans-serif); text-rendering: geometricPrecision; }
/* Wide monitors (2200px and up): the chart takes the left part and the dashboard's right column (Waiting to be
   assigned, Call backs due, Recent calls...) moves up beside it; the Pipeline, Finished and Team cards sit under the
   chart. Below 1800px nothing changes: chart full width, the two columns under it. */
@media (min-width: 2200px) {
    .dash-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); grid-template-rows: auto 1fr; grid-template-areas: "chart side" "main side"; column-gap: 1rem; align-items: start; }
    .dash-grid > .row { display: contents; }
    .dash-grid .dash-chart { grid-area: chart; }
    .dash-grid > .row > .col-xl-8 { grid-area: main; width: auto; max-width: none; flex: none; padding: 0; }
    .dash-grid > .row > .col-xl-4 { grid-area: side; width: auto; max-width: none; flex: none; padding: 0; }
    .dash-grid .colchart { max-width: none; }
}
.colchart .grid { stroke: #e6e9f2; stroke-width: 1; vector-effect: non-scaling-stroke; shape-rendering: crispEdges; }
.colchart .axis { stroke: #c7cddd; stroke-width: 1; vector-effect: non-scaling-stroke; shape-rendering: crispEdges; }
.colchart .tick { fill: var(--ink-2); font-size: 12px; font-weight: 500; }
.colchart .value { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.colchart .value-max { fill: var(--ink); font-size: 13px; font-weight: 700; }
.colchart .bar-one, .colchart .bar-vic { fill: #5b2fd6; }
.colchart .bar-nsw { fill: #0e9f9c; }
.colchart .bar-other { fill: #b7bccb; }
.colchart .band { fill: #f3f2fa; }
.colchart .avg { fill: none; stroke: #f59e0b; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.colchart .hit { fill: transparent; }
.colchart .col:hover .bar-one, .colchart .col:hover .bar-vic { fill: #3b1a99; }
.colchart .col:hover .bar-nsw { fill: #0b6f6d; }
.colchart .col:hover .hit { fill: rgba(79, 70, 229, .06); }
.colchart .col.today .hit { fill: rgba(91, 47, 214, .05); }
/* The 30-day funnel beside the column chart: a track per step, filled to its share of the leads received. */
.funnel { width: 100%; max-width: 720px; max-height: 300px; height: auto; display: block; margin: 0 auto; font-family: var(--bs-font-sans-serif); text-rendering: geometricPrecision; }
.funnel .track { fill: #f3f2fa; }
.funnel .fill { fill: #5b2fd6; }
.funnel .step-0 .fill { fill: #c9bdf4; }
.funnel .step-1 .fill { fill: #a690ea; }
.funnel .step-2 .fill { fill: #8264e0; }
.funnel .step-3 .fill { fill: #6a43d9; }
.funnel .step-4 .fill { fill: #16a34a; }
.funnel .name { fill: var(--ink); font-size: 14px; font-weight: 600; }
.funnel .count { fill: var(--ink); font-size: 16px; font-weight: 700; }
.funnel .share { fill: var(--ink-2); font-size: 11.5px; }
.funnel .step:hover .fill { opacity: .85; }
.funnel-notes { display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .74rem; color: var(--ink-3); margin-top: .35rem; }
.funnel-notes strong { color: var(--ink-2); font-weight: 600; }
.colchart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .78rem; color: var(--ink-2); margin: 0 0 .35rem 2.4rem; }
.colchart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.colchart-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.colchart-legend .sw-vic { background: #5b2fd6; }
.colchart-legend .sw-nsw { background: #0e9f9c; }
.colchart-legend .sw-other { background: #b7bccb; }
.colchart-legend .sw-avg { height: 0; border-top: 2px solid #f59e0b; border-radius: 0; }
.colchart-legend .sw-wknd { background: #f3f2fa; border: 1px solid #e4e2f0; }

/* ---------- Lead page ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #7c4dff, #5b2fd6); flex: 0 0 44px; }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; flex-basis: 28px; }
dl.row dt { color: var(--ink-3); font-weight: 500; font-size: .82rem; }
dl.row dd { margin-bottom: .45rem; }
.timeline .list-group-item { border-color: var(--line); }

.text-muted { color: var(--ink-3) !important; }

/* ---------- Blazor bits ---------- */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; font-size: .85rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; border-radius: 12px; }
.blazor-error-boundary::after { content: "An error has occurred."; }
.darker-border-checkbox.form-check-input { border-color: #929292; }

.badge { border-radius: 999px; font-weight: 600; padding: .35em .7em; }

/* ---------- Click to call ---------- */
.btn-call { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; font-weight: 600; box-shadow: 0 6px 16px rgba(91, 47, 214, .3); }
.btn-call svg { width: 18px; height: 18px; }
.btn-dial { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-100); color: var(--brand-600); margin-right: .45rem; vertical-align: middle; text-decoration: none !important; transition: background .12s, transform .12s; }
.btn-dial svg { width: 14px; height: 14px; }
.btn-dial:hover { background: var(--brand); color: #fff; transform: scale(1.06); }

/* ---------- Embedded Zoom dialer ---------- */
.zp-dock { position: fixed; right: 20px; bottom: 0; width: 360px; z-index: 1050; border-radius: 14px 14px 0 0; background: #fff; border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -4px 24px rgba(15, 23, 42, .18); overflow: hidden; }
.zp-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; background: linear-gradient(90deg, #0b5cff, #2d8cff); color: #fff; cursor: pointer; user-select: none; font-weight: 600; }
.zp-head svg { width: 16px; height: 16px; }
.zp-title { display: flex; align-items: center; gap: .4rem; }
.zp-status { flex: 1; font-size: .74rem; font-weight: 500; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.zp-toggle { font-size: .8rem; opacity: .9; }
/* Zoom requires at least 350 x 580 for the embedded phone; shorter and the bottom of its keypad is cut off. */
.zp-body { height: min(600px, calc(100vh - 56px)); }
.zp-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.zp-dock.closed .zp-body { height: 0; }
.zp-dock.closed { width: 240px; }
button.btn-dial { border: 0; }
@media (max-width: 640px) { .zp-dock { right: 0; width: 100%; border-radius: 0; } }
.pill-deposit { background: #ccfbf1; color: #115e59; }
.pill-inspected { background: #fce7f3; color: #9d174d; }
.pill-inspreq { background: #ffedd5; color: #9a3412; }
.chip-date { display: inline-block; background: #eef2ff; color: #3730a3; border-radius: 8px; padding: .2rem .6rem; margin: .1rem .35rem .1rem 0; font-size: .85rem; font-weight: 600; }
.pill-scheduled { background: #dbeafe; color: #1e40af; }
.pill-high { background: #fee2e2; color: #991b1b; }
.pill-cancelled { background: #fee2e2; color: #991b1b; }
.cancel-note { background: #fff5f5; font-size: .9rem; }
.pill-installed { background: #0f766e; color: #fff; }
.pill-finalpending { background: #ffedd5; color: #9a3412; }
.pill-finalpaid { background: var(--good); color: #fff; }
.pill-installed::before, .pill-finalpaid::before { background: #fff; }
/* Installations lists: one line per job, comfortable rows, only the long text wraps. */
.jobs-table th { white-space: nowrap; }
.jobs-table td, .jobs-table th { padding: .6rem .55rem; }
.jobs-table td:first-child, .jobs-table th:first-child { padding-left: 1.1rem; }
.jobs-table td:last-child, .jobs-table th:last-child { padding-right: 1.1rem; }
.jobs-table .jobs-wrap { white-space: normal; min-width: 170px; }
.jobs-table td:first-child { white-space: nowrap; }
.jobs-table .status-pick { width: 108px; margin-left: auto; font-size: .78rem; padding-top: .2rem; padding-bottom: .2rem; }
.complete-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .55rem; }
.complete-bar .btn { font-weight: 600; }
.file-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .82rem; margin: 0 .4rem .4rem 0; }
.file-chip svg { width: 14px; height: 14px; color: var(--brand); }
.file-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Notifications ---------- */
.bell-wrap { position: relative; margin-right: .5rem; }
.bell { position: relative; border: 0; background: transparent; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.bell:hover { background: var(--brand-50); color: var(--brand); }
.bell svg { width: 20px; height: 20px; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.bell-menu { position: absolute; right: 0; top: 44px; width: 380px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); z-index: 1100; }
.bell-menu-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.bell-item { padding: .7rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.bell-item:hover { background: #f8faff; }
.bell-item.unread { background: var(--brand-50); border-left: 3px solid var(--brand); }
.notify-stack { position: absolute; right: -8px; top: 46px; width: 360px; max-width: calc(100vw - 40px); display: flex; flex-direction: column; gap: .5rem; z-index: 1200; }
.notify-more { align-self: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; font-size: .8rem; text-decoration: none; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.notify-pop { background: linear-gradient(135deg, #5b2fd6, #7c4dff); color: #fff; border-radius: 14px; padding: .9rem 1rem; box-shadow: 0 12px 32px rgba(91, 47, 214, .4); z-index: 1200; cursor: pointer; animation: notify-in .25s ease-out; }
@keyframes notify-in { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { .bell-menu { position: fixed; left: 10px; right: 10px; width: auto; top: 60px; } }
.pill-state::before { display: none; }
.pill-vic { background: #dbeafe; color: #1e40af; }
.pill-nsw { background: #ffedd5; color: #9a3412; }
.state-tabs .nav-link { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem 1rem; }
.state-tabs .tab-count { background: #eef0f6; color: var(--ink-2); border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; font-weight: 600; }
.state-tabs .nav-link.active .tab-count { background: var(--brand-100); color: var(--brand-600); }
.price-switch { display: flex; gap: 4px; margin-top: 3px; }
.price-switch button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: .68rem; padding: 1px 4px; color: var(--ink-2); white-space: nowrap; }
.price-switch button.on { background: var(--brand-100); border-color: var(--brand); color: var(--brand-600); font-weight: 600; }
.quote-lines optgroup { font-weight: 600; color: var(--ink-2); }
/* The product picker on a quote line: search box, type chips, and the shortlist (suggestions, a type, or search hits). */
.ql-chosen { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.ql-picker { display: flex; flex-direction: column; gap: .35rem; min-width: 260px; }
.ql-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.ql-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .1rem .55rem; font-size: .74rem; color: var(--ink-2); line-height: 1.4; }
.ql-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ql-results { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ql-head { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: .4rem .6rem .1rem; }
.ql-hit { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid #f1f1f6; background: transparent; padding: .4rem .6rem; }
.ql-hit:first-child { border-top: 0; }
.ql-hit:hover, .ql-hit:focus { background: var(--brand-100); outline: 0; }
.ql-name { font-size: .86rem; font-weight: 600; color: var(--ink); }
.ql-price { font-size: .78rem; color: var(--ink-2); white-space: nowrap; margin-left: .35rem; }
.ql-why { display: block; font-size: .72rem; color: var(--ink-3); }
.ql-empty { padding: .5rem .6rem; font-size: .8rem; color: var(--ink-2); }
.price-table td { vertical-align: top; }

/* ---------- Price list picker ---------- */
.type-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.type-tile { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: .9rem 1rem; text-align: left; display: flex; flex-direction: column; gap: .15rem; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.type-tile:hover { border-color: #c7b8f5; }
.type-tile.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 47, 214, .12); background: var(--brand-50); }
.type-tile .type-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.type-tile .type-sub { font-size: .8rem; color: var(--ink-3); }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.chip:hover { border-color: #c7b8f5; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .chip-sub { font-size: .72rem; opacity: .75; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .75rem; }
.price-card { display: flex; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: .85rem 1rem; box-shadow: var(--shadow); }
.price-card-name { font-weight: 700; color: var(--ink); line-height: 1.25; }
.price-card-desc { font-size: .78rem; color: var(--ink-3); margin-top: .25rem; line-height: 1.35; }
.price-card-price { text-align: right; flex: 0 0 auto; }
.price-main { font-size: 1.45rem; font-weight: 800; color: var(--brand-600); line-height: 1.1; }
.price-base { font-size: .74rem; color: var(--ink-3); }
.price-finance { font-size: .82rem; font-weight: 700; color: var(--good); white-space: nowrap; margin-top: .15rem; }
.price-finance span { font-weight: 500; font-size: .7rem; color: var(--ink-3); }
.addons { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: .6rem 1rem; }
.addons summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.addons summary::before { content: "▸ "; color: var(--ink-3); }
.addons[open] summary::before { content: "▾ "; }
.price-notes-list { margin: .5rem 0 .2rem; padding-left: 1.2rem; font-size: .92rem; }
.price-notes-list li { padding: .12rem 0; }
.price-notes-list li.head { list-style: none; margin: .5rem 0 0 -1.2rem; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .4rem 1.5rem; margin-top: .6rem; }
.addon { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.addon-price { font-weight: 700; white-space: nowrap; }
.price-card.clickable { cursor: pointer; transition: border-color .12s, transform .12s; }
.price-card.clickable:hover { border-color: var(--brand); transform: translateY(-1px); }
.price-card-more { font-size: .72rem; color: var(--brand); margin-top: .3rem; font-weight: 600; }
.detail-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 1150; }
.detail-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; background: #fff; z-index: 1160; box-shadow: -12px 0 40px rgba(15, 23, 42, .2); padding: 1.25rem 1.5rem; overflow-y: auto; animation: panel-in .2s ease-out; }
@keyframes panel-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .5rem; }
.detail-price { margin-bottom: 1rem; }
.detail-price .price-main { font-size: 1.9rem; }
.unit-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.unit-table td { padding: .5rem .4rem; }
.report-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; vertical-align: bottom; }
.report-table th.group { border-bottom: 1px solid var(--line); color: var(--ink-2); }
.report-table td { white-space: nowrap; }
.report-table tfoot td { border-top: 2px solid var(--line); }
.report-table td.wrap, .report-table th.wrap { white-space: normal; min-width: 200px; max-width: 360px; }
.address-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--ink-3); }
.address-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
.address-link svg { width: 11px; height: 11px; margin-left: .25rem; vertical-align: baseline; opacity: .6; }
.address-search { color: var(--ink-3); margin-left: .3rem; }
.address-search:hover { color: var(--brand); }
.address-search svg { width: 14px; height: 14px; vertical-align: -2px; }
.address-link svg { display: none; }
/* Wide tables: always show a scrollbar so people can see there is more to the right, and add nudge buttons. */
.leads-scroll { position: relative; }
.leads-scroll .table-responsive { overflow-x: scroll; scrollbar-width: thin; scroll-behavior: smooth; }
.leads-scroll .table-responsive::-webkit-scrollbar { height: 10px; }
.leads-scroll .table-responsive::-webkit-scrollbar-thumb { background: #c7cbe0; border-radius: 6px; }
.scroll-nudge { position: sticky; display: flex; justify-content: space-between; align-items: center; padding: .25rem 0; gap: .5rem; }
.scroll-nudge button { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.scroll-nudge button:hover { color: var(--brand); border-color: var(--brand); }
.scroll-nudge button svg { width: 16px; height: 16px; }
/* Bulk upload: three numbered steps. */
.bulk-step { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.1rem; }
.bulk-num { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--good); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .85rem; }

/* Jobs: product codes, the step-by-step track and the payment status. */
.job-code { display: inline-block; font-weight: 800; font-size: .74rem; letter-spacing: .04em; border-radius: 7px; padding: .15rem .45rem; color: #fff; margin-right: .2rem; background: #64748b; }
.job-code.c-MUL { background: #5b2fd6; } .job-code.c-DUC { background: #0284c7; } .job-code.c-SS { background: #7c3aed; } .job-code.c-AC { background: #4f46e5; }
.job-code.c-HWS { background: #d97706; } .job-code.c-WFS { background: #0d9488; } .job-code.c-SOL { background: #ca8a04; } .job-code.c-BAT { background: #16a34a; }
.job-steps { display: grid; gap: 0; }
.job-step { position: relative; padding-right: .6rem; min-width: 0; }
.job-step .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: #e2e8f0; color: #475569; position: relative; z-index: 1; }
.job-step::before { content: ""; position: absolute; top: 12px; left: 26px; right: 0; height: 2px; background: #e2e8f0; }
.job-step:last-child::before { display: none; }
.job-step.done .dot { background: var(--good); color: #fff; }
.job-step.done::before { background: var(--good); }
.job-step.now .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.job-step .t { font-weight: 600; font-size: .8rem; margin-top: .4rem; }
.job-step .d { font-size: .74rem; color: var(--ink-2); line-height: 1.3; overflow-wrap: anywhere; }
.pay-status { font-weight: 700; border-radius: 999px; padding: .2rem .7rem; font-size: .78rem; white-space: nowrap; }
.pay-green { background: var(--good); color: #fff; }
.pay-amber { background: var(--warn-bg); color: #92400e; }
.pay-grey { background: #e2e8f0; color: #475569; }
.yn-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border: 1px dashed var(--line); border-radius: 10px; padding: .45rem .75rem; margin-bottom: .4rem; font-weight: 500; }
.yn-row.on { background: #f0fdf4; border: 1px solid #86efac; }
@media (max-width: 900px) { .job-steps { grid-template-columns: 1fr 1fr !important; row-gap: .9rem; } .job-step::before { display: none; } }

/* ---------- Text messages on a lead ---------- */
.collapse-head { cursor: pointer; user-select: none; }
.collapse-head:hover { background: var(--brand-50); }
.collapse-arrow { display: inline-block; width: 1rem; color: var(--ink-3); }
.sms-thread { display: flex; flex-direction: column; gap: .45rem; max-height: 420px; overflow-y: auto; padding: .9rem 1rem; }
.sms { max-width: 78%; border-radius: 14px; padding: .45rem .7rem; font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.sms-body { white-space: pre-wrap; }
.sms.in { align-self: flex-start; background: #eef0f6; color: var(--ink); border-bottom-left-radius: 4px; }
.sms.out { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.sms-meta { font-size: .68rem; opacity: .75; margin-top: .15rem; }
.sms-day { align-self: center; font-size: .7rem; color: var(--ink-3); margin: .2rem 0; }

/* ---------- Qualification info ---------- */
.qual-table { table-layout: fixed; min-width: 980px; }
.qual-table th, .qual-table td { vertical-align: top; border-right: 1px solid var(--line); padding: .7rem .8rem; }
.qual-table th:last-child, .qual-table td:last-child { border-right: 0; }
.qual-table thead th { background: var(--brand-50); color: var(--ink); font-weight: 700; font-size: .88rem; line-height: 1.3; text-transform: none; letter-spacing: 0; }
.qual-table .qual-label { width: 150px; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); background: #fafbff; }
.qual-line { font-size: .9rem; padding: .18rem .3rem; margin: .1rem -.3rem; border-radius: 6px; }
.qual-key { font-weight: 800; color: var(--brand-600); background: var(--brand-50); border-radius: 5px; padding: 0 .22rem; white-space: nowrap; }
.qual-new .qual-key { background: transparent; color: #713f12; }
.qual-new { background: #fef08a; box-shadow: 0 0 0 1px #facc15 inset; border-radius: 6px; }
th .qual-new { padding: .1rem .3rem; margin-left: -.3rem; }
.qual-alert { background: #fefce8; border: 1px solid #fde047; color: #713f12; }

/* ---------- Attendance ---------- */
.pill-good { background: #dcfce7; color: #166534; }
.att-grid th, .att-grid td { padding: .3rem .25rem; font-size: .82rem; }
.att-grid th:first-child, .att-grid td:first-child { padding-left: .75rem; position: sticky; left: 0; background: #fff; z-index: 1; }
.att-dow { font-size: .65rem; font-weight: 500; color: #8a93a3; }
.att-weekend { background: #f6f7fb; }
.att-dot { color: #15803d; font-weight: 700; }
.att-miss { color: #c5cbd6; }
.att-late { color: #b45309; font-weight: 700; }
.att-absent { color: #b91c1c; font-weight: 700; }
.att-leave { color: #1d4ed8; font-weight: 600; font-size: .75rem; }
.att-holiday { color: #7c3aed; font-weight: 600; }
.pay-table th, .pay-table td { font-size: .82rem; white-space: nowrap; }
.pay-table th { white-space: normal; vertical-align: bottom; }
.pill-late { background: #fef3c7; color: #92400e; }

/* ---------- Assistant ---------- */
.assistant-card { display: flex; flex-direction: column; height: calc(100vh - 250px); min-height: 380px; }
.assistant-thread { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.assistant-empty { margin: auto; text-align: center; max-width: 640px; color: #5b6472; }
.assistant-suggest { border-radius: 999px; }
.assistant-msg { display: flex; }
.assistant-msg.from-me { justify-content: flex-end; }
.assistant-bubble { max-width: min(820px, 92%); padding: .6rem .85rem; border-radius: 14px; background: #f1f4f9; overflow-wrap: anywhere; }
.assistant-msg.from-me .assistant-bubble { background: #1f5eff; color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.assistant-msg.from-ai .assistant-bubble { border-bottom-left-radius: 4px; }
.assistant-msg.is-error .assistant-bubble { background: #fdecec; color: #8a1f1f; }
.assistant-bubble p:last-child, .assistant-bubble ul:last-child, .assistant-bubble ol:last-child { margin-bottom: 0; }
.assistant-bubble table { font-size: .875rem; margin: .4rem 0; border-collapse: collapse; display: block; overflow-x: auto; }
.assistant-bubble th, .assistant-bubble td { border: 1px solid #d5dbe5; padding: .25rem .5rem; background: #fff; }
.assistant-bubble th { background: #e8edf5; }
.assistant-sources { margin-top: .4rem; font-size: .75rem; color: #6b7482; }
.assistant-working span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #7a8494; animation: assistant-dot 1.2s infinite ease-in-out; }
.assistant-working span:nth-child(2) { animation-delay: .15s; }
.assistant-working span:nth-child(3) { animation-delay: .3s; }
@keyframes assistant-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.assistant-ask { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid #e3e7ee; }
.assistant-note-preview { max-width: 620px; }
.assistant-pic { display: inline-block; margin: .35rem 0; text-decoration: none; color: inherit; }
.assistant-pic img { display: block; max-width: min(420px, 100%); max-height: 320px; border-radius: 8px; border: 1px solid #d5dbe5; background: #fff; }
.assistant-pic span { display: block; font-size: .78rem; color: #6b7482; margin-top: .2rem; }
.note-pics { display: flex; flex-wrap: wrap; gap: .75rem; }
.note-pdf { display: grid; place-items: center; align-content: center; gap: .25rem; width: 140px; height: 100px; border-radius: 8px; border: 1px solid #d5dbe5; background: #fff7f5; text-decoration: none; padding: .4rem; }
.note-pdf span { font-weight: 700; color: #b42318; letter-spacing: .05em; }
.note-pdf small { color: #6b7482; font-size: .7rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-read { font-size: .72rem; color: #166534; max-width: 220px; line-height: 1.25; margin-top: .15rem; }
.note-read.is-unread { color: #b42318; }
.assistant-doc { display: inline-flex; align-items: center; gap: .5rem; margin: .35rem 0; padding: .4rem .7rem; border-radius: 8px; border: 1px solid #d5dbe5; background: #fff; text-decoration: none; color: inherit; font-size: .9rem; }
.assistant-doc:hover { border-color: var(--brand); }
.assistant-doc-tag { font-size: .68rem; font-weight: 700; letter-spacing: .05em; color: #fff; background: #b42318; border-radius: 4px; padding: .1rem .35rem; }
.note-pic { width: 170px; }
.note-pic img { width: 170px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid #d5dbe5; display: block; }
.assistant-card.compact { height: auto; min-height: 0; flex: 1; overflow: hidden; }
.assistant-card.compact .assistant-thread { padding: .75rem; }
.assistant-card.compact .assistant-bubble { max-width: 94%; font-size: .9rem; }
.assistant-card.compact .assistant-ask { padding: .55rem; }

/* The floating bot. Sits above the closed Zoom dialer; an open dialer covers it. */
.bot-fab { position: fixed; right: 24px; bottom: 64px; z-index: 1040; width: 58px; height: 58px; padding: 0; border-radius: 50%; color: #fff; background: radial-gradient(circle at 30% 25%, #2a2470, #14113a); border: 2px solid #7c5cff; box-shadow: 0 8px 24px rgba(79, 70, 229, .5); display: flex; align-items: center; justify-content: center; animation: bot-float 3.2s ease-in-out infinite; transition: transform .15s; }
.bot-fab:hover { transform: scale(1.08); }
.bot-fab.is-open { animation: none; }
.bot-face { display: inline-flex; }
.bot-face img { width: 36px; height: 36px; object-fit: contain; }
.bot-face.sm { background: #14113a; border-radius: 50%; padding: 3px; }
.bot-face.sm img { width: 20px; height: 20px; }
.bot-hint { position: absolute; right: 66px; white-space: nowrap; background: #1e1b4b; color: #fff; font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(15, 23, 42, .25); }
@keyframes bot-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.bot-panel { position: fixed; right: 24px; bottom: 132px; z-index: 1040; width: 400px; height: min(560px, calc(100vh - 160px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(15, 23, 42, .28); overflow: hidden; }
.bot-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; color: #fff; font-weight: 600; background: linear-gradient(90deg, #6d3bff, #2d8cff); }
.bot-head-link { color: #fff; font-size: .78rem; font-weight: 500; opacity: .9; }
.bot-head-link:hover { color: #fff; opacity: 1; }
.bot-close { border: 0; background: transparent; color: #fff; font-size: .95rem; line-height: 1; padding: .15rem .3rem; }
@media (max-width: 640px) {
    .bot-fab { right: 14px; bottom: 56px; width: 50px; height: 50px; }
    .bot-face img { width: 30px; height: 30px; }
    .bot-hint { display: none; }
    .bot-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; z-index: 1060; }
}
@media (prefers-reduced-motion: reduce) { .bot-fab { animation: none; } }
@media print { .bot-fab, .bot-panel { display: none; } }

/* "Ask LIMI" in the top bar: sits on the left, lights up while the panel is open. */
.ask-limi { margin-right: auto; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem .3rem .5rem; border-radius: 999px; border: 1px solid #ddd6fe; background: #fff; color: #1e1b4b; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .12s, box-shadow .12s; }
.ask-limi img { width: 22px; height: 22px; object-fit: contain; }
.ask-limi:hover { background: #f5f3ff; box-shadow: 0 2px 10px rgba(91, 47, 214, .18); }
.ask-limi.is-open { background: linear-gradient(90deg, #6d3bff, #2d8cff); border-color: transparent; color: #fff; }
.ask-limi.is-open .limi-word { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.ask-limi.is-open .limi-tm { color: #fff; }
@media (max-width: 640.98px) { .ask-limi span { display: none; } .ask-limi { padding: .3rem .45rem; } }

/* The "log the outcome of your call" gate: covers everything except the lead's own page. */
.gate-overlay { position: fixed; inset: 0 0 0 240px; z-index: 1090; background: rgba(15, 23, 42, .62); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.gate-card { background: #fff; border-radius: 16px; padding: 1.4rem 1.6rem; max-width: 520px; width: 100%; box-shadow: 0 24px 64px rgba(15, 23, 42, .4); border-top: 5px solid #f59e0b; }
.gate-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.gate-banner { position: fixed; top: 3.5rem; left: 240px; right: 0; z-index: 1030; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1.5rem; background: linear-gradient(90deg, #f59e0b, #f97316); color: #1f1300; box-shadow: 0 6px 16px rgba(15, 23, 42, .18); }
@media (max-width: 1024.98px) { .gate-banner { left: 0; } .gate-overlay { inset: 0; } }   /* no fixed menu at the left on a tablet or phone */
@media (max-width: 640.98px) { .gate-banner { top: 2.9rem; padding: .6rem 1rem; } }
/* The box leaves the left menu uncovered, so a page can be opened (or right-clicked into a new tab) during a call (owner, 19 Oct 2026). */

/* "Refresh leads" (Google Sheet) button next to Import leads. */
.sheet-refresh-btn { display: inline-flex; align-items: center; gap: .35rem; }
.sheet-refresh-btn svg.spin-slow { animation: sheet-pulse 1s ease-in-out infinite; }
@keyframes sheet-pulse { 50% { opacity: .35; } }

/* Photos attached to a complaint. */
.complaint-photo { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Smart product search on the Products page. */
.product-search-box { position: relative; display: flex; align-items: center; max-width: 640px; }
.product-search-box svg { position: absolute; left: .7rem; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.product-search-box input { padding-left: 2.3rem; }
.product-search-box .btn-link { position: absolute; right: .3rem; }
.product-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .5rem; }
.product-suggest .chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: .15rem .65rem; font-size: .8rem; cursor: pointer; }
.product-suggest .chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-100); }

/* Notes on a lead: a plain card under Assign (same look as Assign), so the sheet's wording and typed notes are seen. */
.lead-notes-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: .92rem; line-height: 1.4; }

/* ---------- In-app chat about a lead ---------- */
.chat-btn { display: inline-flex; align-items: center; gap: .35rem; }
.chat-btn svg { width: 16px; height: 16px; }
.chat-badge { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: #e11d48; color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.4rem; text-align: center; }
/* Sits to the left of the LIMI button and above the Zoom Phone dock, so neither covers the Send button. */
.chat-panel { position: fixed; right: 96px; bottom: 64px; z-index: 1045; width: 430px; height: min(640px, calc(100vh - 88px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(15, 23, 42, .28); overflow: hidden; }
.chat-head { display: flex; align-items: flex-start; gap: .5rem; padding: .55rem .8rem; color: #fff; font-weight: 600; background: linear-gradient(90deg, #6d3bff, #2d8cff); flex: 0 0 auto; }
.chat-head { cursor: move; user-select: none; touch-action: none; }
.chat-head .bot-close { cursor: pointer; }
.chat-panel.is-moving { box-shadow: 0 24px 64px rgba(15, 23, 42, .4); }
.chat-panel.is-moving .chat-messages, .chat-panel.is-moving iframe { pointer-events: none; }
.chat-resize { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, rgba(109, 59, 255, .35) 50%, rgba(109, 59, 255, .35) 60%, transparent 60%, transparent 75%, rgba(109, 59, 255, .35) 75%, rgba(109, 59, 255, .35) 85%, transparent 85%); border-bottom-right-radius: 16px; }
@media (max-width: 640px) { .chat-resize { display: none; } .chat-head { cursor: default; } }
.chat-head-who { min-width: 0; }
.chat-head-name { font-size: 1rem; line-height: 1.3; }
.chat-head-sub { font-size: .78rem; font-weight: 500; opacity: .92; line-height: 1.3; display: flex; gap: .6rem; }
.chat-with { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; border-bottom: 1px solid var(--line); background: #f8f7fc; }
/* Who is in the chat, and the tick list for starting one or adding people (two or more people since 20 Oct 2026). */
.chat-members { font-size: .78rem; color: var(--ink-2); padding: .3rem .8rem; border-bottom: 1px solid var(--line); background: #fcfcfe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-people { padding: .6rem .8rem; border-bottom: 1px solid var(--line); background: #fff; }
.chat-people-list { display: flex; flex-wrap: wrap; gap: .25rem .9rem; max-height: 9rem; overflow-y: auto; }
.chat-person { display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; margin: 0; cursor: pointer; }
.chat-system { align-self: center; font-size: .74rem; color: var(--ink-2); font-style: italic; padding: .1rem .6rem; }
.chat-messages { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column-reverse; gap: .5rem; padding: .8rem; background: #fbfbfd; }
.chat-empty { color: var(--ink-2); font-size: .9rem; padding: 1rem; text-align: center; margin: auto 0; }
.chat-msg { display: flex; flex-direction: column; max-width: 85%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: .5rem .75rem; border-radius: 14px; font-size: .92rem; line-height: 1.35; overflow-wrap: anywhere; }
.chat-msg.mine .chat-bubble { background: #6d3bff; color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-text { white-space: pre-line; }
.chat-file { display: inline-block; margin-top: .25rem; font-size: .85rem; text-decoration: underline; }
.chat-msg.mine .chat-file, .chat-msg.mine .chat-file .text-muted { color: #fff !important; }
.chat-img { display: block; max-width: 240px; max-height: 200px; border-radius: 8px; margin: .25rem 0; }
.chat-meta { font-size: .72rem; color: var(--ink-2); margin-top: .15rem; }
.chat-compose { padding: .6rem .8rem; border-top: 1px solid var(--line); background: #fff; }
.chat-file-pick { max-width: 230px; }
.chat-hint { font-size: .7rem; color: var(--ink-3); margin-top: .3rem; }
/* Emoticons: a toggle beside the file picker and a wrap of big tap targets above the compose row. */
.chat-emoji-toggle { padding: .15rem .45rem; font-size: 1rem; line-height: 1; }
.chat-emoji { display: flex; flex-wrap: wrap; gap: .15rem; padding: .35rem; margin-bottom: .35rem; border: 1px solid var(--line); border-radius: 8px; background: #fbfbfd; max-height: 7.5rem; overflow-y: auto; }
.chat-emoji-btn { border: 0; background: transparent; font-size: 1.25rem; line-height: 1; width: 2rem; height: 2rem; border-radius: 6px; }
.chat-emoji-btn:hover { background: var(--brand-100); }
@media (max-width: 640px) { .chat-hint { display: none; } }
@media (max-width: 640px) {
    .chat-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; z-index: 1065; }
}
@media print { .chat-panel, .chat-btn { display: none; } }

/* Team list: roles wrap onto several lines so the whole table fits the screen. */
.team-roles { white-space: normal; min-width: 130px; max-width: 210px; font-size: .85rem; line-height: 1.3; }
.team-email { overflow-wrap: anywhere; max-width: 230px; }

/* ---------- Lost connection ---------- */
#offline-bar { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 3000; background: #b91c1c; color: #fff; text-align: center; font-weight: 600; font-size: .85rem; padding: .3rem .75rem; }
.is-offline #offline-bar { display: block; }
#components-reconnect-modal { display: none; position: fixed; inset: 0; z-index: 2990; background: rgba(15, 23, 42, .55); align-items: center; justify-content: center; padding: 16px; }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-failed, #components-reconnect-modal.components-reconnect-rejected { display: flex; }
/* A link that mends itself within two seconds (a phone coming back from a call, a lid opened) is never worth a box: the box fades in only after that. */
#components-reconnect-modal.components-reconnect-show { animation: lost-conn-appear .25s ease-out 2s both; }
@keyframes lost-conn-appear { from { opacity: 0; } to { opacity: 1; } }
.lost-conn-box { background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(15, 23, 42, .35); padding: 1.5rem; width: min(440px, 100%); text-align: center; }
.lost-conn-box img { width: 44px; height: 44px; object-fit: contain; background: #14113a; border-radius: 50%; padding: 7px; margin-bottom: .6rem; }
.lost-conn-box strong { display: block; font-size: 1.1rem; margin-bottom: .35rem; }
.lost-conn-box p { color: #5b6472; font-size: .92rem; margin-bottom: .9rem; }
/* Which message: no internet beats everything; otherwise "trying" while reconnecting ("Reconnecting" until the ERP is
   known not to answer, then "Updating") and "failed" once it gave up. */
.lost-conn-offline, .lost-conn-failed, .lost-conn-updating { display: none; }
.lost-conn-down .lost-conn-updating { display: block; }
.lost-conn-down .lost-conn-recon { display: none; }
.components-reconnect-failed .lost-conn-trying, .components-reconnect-rejected .lost-conn-trying { display: none; }
.components-reconnect-failed .lost-conn-failed, .components-reconnect-rejected .lost-conn-failed { display: block; }
.is-offline .lost-conn-offline { display: block; }
.is-offline .lost-conn-trying, .is-offline .lost-conn-failed { display: none; }
@media print { #offline-bar, #components-reconnect-modal { display: none !important; } }

/* ---------- Payslip ---------- */
.payslip { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 2rem; max-width: 860px; margin: 0 auto; }
.payslip-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #1e1b4b; padding-bottom: .75rem; margin-bottom: 1rem; }
.payslip-company { font-size: 1.35rem; font-weight: 700; color: #1e1b4b; }
.payslip-info { width: 100%; margin-bottom: 1rem; font-size: .9rem; }
.payslip-info th { font-weight: 600; color: #5b6472; padding: .2rem .5rem .2rem 0; white-space: nowrap; width: 1%; }
.payslip-info td { padding: .2rem 1.5rem .2rem 0; }
.payslip-table thead th { background: #eef2ff; }
.payslip-table tfoot th { border-top: 2px solid #c7cdd9; }
.payslip-net { display: flex; justify-content: space-between; align-items: center; background: #1e1b4b; color: #fff; border-radius: 8px; padding: .7rem 1rem; font-weight: 700; font-size: 1.15rem; }
@media print {
    .sidebar, .top-row, .zp-dock, .no-print, #blazor-error-ui { display: none !important; }
    main, .content { margin: 0 !important; padding: 0 !important; }
    .page { display: block; }
    body { background: #fff; }
    .payslip { border: 0; padding: 0; max-width: none; }
    .payslip-net, .payslip-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 640px) { .assistant-card { height: calc(100vh - 230px); } }

/* ---------- Phones ---------- */
.sim-number { color: inherit; }
.lead-cards { display: grid; gap: .7rem; }
.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .85rem 1rem; }
.lead-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.lead-card-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); line-height: 1.25; }
.lead-card-sub { font-size: .85rem; color: var(--ink-2); margin-top: .25rem; }
.lead-card-actions { display: flex; gap: .5rem; margin-top: .7rem; }
.lead-card-call { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 700; min-height: 46px; }
.lead-card-call svg { width: 18px; height: 18px; }
.lead-card-actions .btn-outline-secondary { min-height: 46px; display: inline-flex; align-items: center; }
.lead-card-foot { font-size: .75rem; color: var(--ink-3); margin-top: .45rem; }
@media (max-width: 640px) {
    /* iPhones zoom the whole page when a field's text is under 16px; keep every field at 16px so that never happens. */
    input, select, textarea, .form-control, .form-select, .form-control-sm, .form-select-sm { font-size: 16px !important; }
    /* Fingers need bigger targets than a mouse. */
    .btn, .form-control, .form-select { min-height: 42px; }
    .btn-sm { min-height: 38px; }
    .btn-link, .btn-close, .chip, .price-switch button { min-height: 0; }
    .nav-tabs .nav-link { padding: .6rem .75rem; }
    h1.h3 { font-size: 1.3rem; }
    .card-body { padding: .9rem; }
    .call-actions { width: 100%; }
    .call-actions .btn-call { flex: 1; justify-content: center; min-height: 52px; font-size: 1.05rem; }
    /* The lead page heading stacks: name and status, then the call button across the full width. */
    .lead-head-side { align-items: stretch !important; width: 100%; }
    .lead-head-side .text-end { text-align: left !important; }
    .table-responsive { -webkit-overflow-scrolling: touch; }
    .detail-panel { width: 100vw; padding: 1rem; }
    .notify-stack { position: fixed; right: 10px; left: 10px; width: auto; top: 60px; }
    /* Closed, the Zoom dialer is a small tab in the corner so it does not sit over the page. */
    .zp-dock.closed { width: 156px; left: auto; right: 10px; border-radius: 14px 14px 0 0; }
    .zp-dock.closed .zp-status { display: none; }
    .zp-dock.closed .zp-head { padding: .45rem .7rem; font-size: .85rem; justify-content: space-between; white-space: nowrap; }
    body { padding-bottom: env(safe-area-inset-bottom); }
    dl.row > dt { margin-top: .35rem; }
}

/* Install schedule report: wide like the sheet it replaces; long cells wrap. */
.schedule-table td.wrap { white-space: normal; min-width: 180px; max-width: 320px; }
.schedule-table th { white-space: normal; }
.schedule-table tr.schedule-edit td { background: var(--brand-50); white-space: normal; }

/* The calculator sheet fills the page below the heading. */
.calc-frame { display: block; overflow: hidden; height: calc(100vh - 220px); min-height: 520px; }
.calc-frame iframe { width: 100%; height: calc(100vh - 220px); min-height: 520px; border: 0; display: block; }

/* Calendar of scheduled jobs. */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: .4rem .5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbff; }
.cal-day { min-height: 104px; padding: .3rem .35rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .74rem; background: #fff; min-width: 0; }
.cal-day.out { background: #fafbfd; }
.cal-day.out .cal-num { color: var(--ink-3); }
.cal-day.today { background: var(--brand-50); }
.cal-day.week { min-height: 320px; }
.cal-num { font-weight: 600; color: var(--ink-2); margin-bottom: .2rem; }
.cal-job { display: block; border-radius: 6px; padding: .15rem .35rem; margin-bottom: .2rem; color: #fff !important; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; background: #64748b; }
.cal-job small { font-weight: 500; opacity: .92; }
.cal-job.c-MUL { background: #5b2fd6; } .cal-job.c-DUC { background: #0284c7; } .cal-job.c-SS { background: #7c3aed; } .cal-job.c-AC { background: #4f46e5; }
.cal-job.c-HWS { background: #d97706; } .cal-job.c-WFS { background: #0d9488; } .cal-job.c-SOL { background: #ca8a04; } .cal-job.c-BAT { background: #16a34a; }

/* Confirmation pop-up in the middle of the window, over a dimmed page. */
.modal-pop-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1900; }
.modal-pop { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1910; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  overflow-y: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(15, 23, 42, .35); animation: toast-in-center .18s ease-out; }
@keyframes toast-in-center { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal-pop.modal-pop-wide { width: min(1180px, calc(100vw - 32px)); }
.modal-pop-head { padding: 1rem 1.25rem .6rem; font-weight: 700; font-size: 1.05rem; }
.modal-pop-body { padding: 0 1.25rem .75rem; }
.modal-pop-foot { padding: .75rem 1.25rem 1rem; display: flex; justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--line); }
.check-row { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; margin-bottom: .4rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; }
.check-row:hover { border-color: var(--brand); }
.check-row.on { background: #f0fdf4; border-color: #86efac; }
.check-row .form-check-input { margin: 0; width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }

/* Pop-up messages: fixed to the top of the window so they are seen wherever the page is scrolled. */
.toast-pop { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; align-items: flex-start; gap: .75rem;
  min-width: 320px; max-width: min(560px, calc(100vw - 32px)); padding: .85rem 1rem; border-radius: 14px; background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28), 0 0 0 1px rgba(15, 23, 42, .06); animation: toast-in .22s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast-pop.is-error { border-left: 6px solid #dc2626; }
.toast-pop.is-ok { border-left: 6px solid #16a34a; }
.toast-pop-icon svg { width: 24px; height: 24px; display: block; margin-top: 1px; }
.toast-pop.is-error .toast-pop-icon { color: #dc2626; }
.toast-pop.is-ok .toast-pop-icon { color: #16a34a; }
.toast-pop-body { flex: 1; min-width: 0; }
.toast-pop-title { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.toast-pop.is-error .toast-pop-title { color: #991b1b; }
.toast-pop.is-ok .toast-pop-title { color: #166534; }
.toast-pop-text { font-size: .95rem; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.toast-pop-close { border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--ink-3); padding: 0 .2rem; cursor: pointer; }
.toast-pop-close:hover { color: var(--ink); }

/* Leads list: page buttons above and below the list */
.leads-pager-top { margin-bottom: .5rem; }
.leads-pager-bottom { margin: .5rem 0 1rem; padding-right: 150px; }   /* keeps Next clear of the assistant button */

/* Top bar: log out as an icon; notifications page */
.logout-btn { border: 0; background: transparent; height: 38px; padding: 0 .7rem; border-radius: 999px; display: inline-grid; place-items: center; color: var(--ink-2); cursor: pointer; vertical-align: middle; white-space: nowrap; }
.logout-btn:hover { background: #fdecec; color: #dc2626; }
.logout-btn svg { width: 20px; height: 20px; }
a.bell { text-decoration: none; }
.notif-list .bell-item:last-child { border-bottom: 0; }

/* Price approval request: the three figures that matter, in one strip under the price boxes */
.approval-summary { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; align-items: flex-start; background: #f6f7fb; border: 1px solid var(--line); border-left: 4px solid #cbd5e1; border-radius: 10px; padding: .55rem .85rem; font-size: .9rem; }
.approval-summary.ok { border-left-color: #16a34a; background: #f0fdf4; }
.approval-summary.no { border-left-color: #dc2626; background: #fef2f2; }
.approval-summary > div { display: flex; flex-direction: column; }
.approval-summary .grow { flex: 1; min-width: 220px; }
.approval-summary .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }

/* LIMI: the assistant's name, in a rounder display face with the word in colour and a small trade mark sign */
.limi { font-family: "Righteous", var(--bs-font-sans-serif); font-weight: 400; font-size: 1.12em; white-space: nowrap; letter-spacing: .06em; }
.limi-word { background: linear-gradient(90deg, #7c5cff, #2d8cff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.limi-tm { font-family: var(--bs-font-sans-serif); font-size: .5em; letter-spacing: 0; margin-left: .08em; top: -.75em; color: var(--ink-3); }
.sidebar .limi-word { background: linear-gradient(90deg, #c4b5fd, #7dd3fc); -webkit-background-clip: text; background-clip: text; }
.sidebar .limi-tm { color: #c4b5fd; }
.bot-head .limi-word, .bot-hint .limi-word { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.bot-head .limi-tm, .bot-hint .limi-tm { color: #fff; }

/* The floating button shows the Limitise mark */
.bot-coin { position: relative; width: 46px; height: 46px; }
.bot-side { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; overflow: hidden; }
.bot-front img { width: 36px; height: 36px; object-fit: contain; }
@media (max-width: 640.98px) { .bot-coin { width: 40px; height: 40px; } .bot-front img { width: 30px; height: 30px; } }

/* Check out for the day, in the top bar */
.checkout-done { font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.checkout-error { font-size: .8rem; color: #b91c1c; max-width: 280px; }
@media (max-width: 640.98px) { .checkout-error { display: none; } }

/* "Updating, back in a moment": a small spinner, and the reload link kept quiet because the page comes back by itself */
.lost-conn-spinner { width: 26px; height: 26px; margin: .25rem auto .5rem; border-radius: 50%; border: 3px solid #e4e7f2; border-top-color: var(--brand); animation: lost-conn-spin .9s linear infinite; }
@keyframes lost-conn-spin { to { transform: rotate(360deg); } }
.is-offline .lost-conn-spinner { display: none; }
.lost-conn-long { display: none; }
.lost-conn-slow .lost-conn-long { display: block; }
.lost-conn-reload { font-size: .8rem; }

/* A team member's documents: one row per document, with its file and the upload button */
.user-doc { display: grid; grid-template-columns: minmax(150px, 190px) 1fr auto; gap: .75rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.user-doc:last-child { border-bottom: 0; }
.user-doc-name { font-weight: 600; font-size: .9rem; }
.user-doc-file { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .user-doc { grid-template-columns: 1fr; gap: .25rem; } }

/* Permissions on the Team page: one small column per group */
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem 1.25rem; }
.perm-group-name { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; margin-bottom: .25rem; }
.perm-group .form-check { margin-bottom: .15rem; }
.perm-group .form-check-label { font-size: .9rem; line-height: 1.3; }

/* The follow-up flag beside a lead name (operations coordinator, 20 Oct 2026). */
.followup-flag { display: inline-flex; vertical-align: middle; margin-left: .3rem; line-height: 1; }
.followup-flag:hover { opacity: .75; }

/* ============================================================
   JSS CRM additions
   ============================================================ */
.pill-bad { background: var(--bad-bg); color: #991b1b; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; flex: 0 0 30px; background: linear-gradient(135deg, #1bb9b8, #04374c); }
.avatar { background: linear-gradient(135deg, #1bb9b8, #04374c); }
.login-title span { background: linear-gradient(90deg, #1bb9b8, #04374c, #1bb9b8); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; }
.login-page { background: linear-gradient(120deg, #f0fdfa, #eef2ff, #ecfeff, #f0fdfa); background-size: 300% 300%; }
.login-orb.one { background: #5eead4; } .login-orb.two { background: #a5b4fc; } .login-orb.three { background: #67e8f9; }
.login-logo { mix-blend-mode: normal; filter: drop-shadow(0 18px 22px rgba(4, 55, 76, .25)); }
.login-card { box-shadow: 0 30px 70px rgba(4, 55, 76, .18), 0 2px 6px rgba(15, 23, 42, .05); }

/* top bar widgets */
.timer-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem .35rem .2rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .85rem; }
.timer-chip.on { border-color: #99f6e4; background: #f0fdfa; }
.timer-dot { width: 8px; height: 8px; border-radius: 50%; background: #0f766e; animation: timer-blink 1.2s ease-in-out infinite; }
@keyframes timer-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.timer-time { font-variant-numeric: tabular-nums; font-weight: 700; color: #0f766e; }
.timer-what { color: var(--ink-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-btn { padding: .15rem .4rem; line-height: 1; border-radius: 999px; }
.timer-btn svg, .timer-start svg { width: 14px; height: 14px; }
.timer-start { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; }
.att-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ink-2); padding: .2rem .35rem .2rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.att-chip.on { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.att-dot-live { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.logout-btn { color: var(--ink-2); text-decoration: none; }

/* dashboard */
.stat-value small { font-size: 1rem; color: var(--ink-3); font-weight: 500; }
.score-ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; background: conic-gradient(var(--brand) calc(var(--score) * 1%), #e2e8f0 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.score-ring span { position: relative; z-index: 1; color: var(--ink); }
.progress { height: 8px; border-radius: 999px; background: #eef2f7; }
.progress-bar { background: var(--brand); }

/* project page */
.proj-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.member-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .7rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .85rem; margin: 0 .4rem .4rem 0; }
.member-chip .avatar { width: 26px; height: 26px; font-size: .65rem; flex: 0 0 26px; }
.member-chip small { color: var(--ink-3); }
.chat-box { display: flex; flex-direction: column; height: 520px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.chat-msg.internal .chat-bubble { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.chat-msg.mine .chat-bubble { background: #0f766e; }
.milestone { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.milestone:last-child { border-bottom: 0; }
.milestone.done .ms-title { text-decoration: line-through; color: var(--ink-3); }
.ms-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd5e1; display: grid; place-items: center; cursor: pointer; flex: 0 0 22px; background: #fff; color: #fff; }
.milestone.done .ms-check { background: var(--good); border-color: var(--good); }
.ms-check svg { width: 12px; height: 12px; }
.note-card { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; background: #fff; margin-bottom: .75rem; }
.note-card.internal { background: #fffbeb; border-color: #fde68a; }
.note-body { white-space: pre-wrap; font-size: .93rem; }
.comment { display: flex; gap: .75rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment.internal { background: #fffbeb; margin: 0 -1.1rem; padding-left: 1.1rem; padding-right: 1.1rem; }
.comment-body { white-space: pre-wrap; font-size: .93rem; }
.desc { white-space: pre-wrap; }
.ticket-row td { vertical-align: middle; }
.ticket-title a { color: var(--ink); font-weight: 600; }
.ticket-title a:hover { color: var(--brand); }
.rev-over { color: #991b1b; font-weight: 600; }
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { display: flex; gap: .6rem; padding: .35rem 0; font-size: .88rem; border-bottom: 1px dashed var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl .tl-when { color: var(--ink-3); white-space: nowrap; flex: 0 0 auto; }
.tl.internal-line { background: #fffbeb; }
.att-grid td.today { background: #ecfeff; }
.att-grid td.clickable { cursor: pointer; }
.att-grid td.clickable:hover { background: #f0fdfa; }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fff; }
.hero-welcome { background: linear-gradient(120deg, #04374c, #119c9b); color: #fff; border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.hero-welcome h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.3rem; }
.hero-welcome p { margin: 0; opacity: .9; }
.lost-conn-box { background: #fff; border-radius: 16px; padding: 1.5rem; max-width: 420px; margin: 20vh auto 0; text-align: center; box-shadow: 0 20px 60px rgba(15, 23, 42, .3); }
#components-reconnect-modal { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 3000; }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-failed, #components-reconnect-modal.components-reconnect-rejected { display: block; }
@media print { .sidebar, .top-row, #tenant-warning, .no-print { display: none !important; } article { padding: 0 !important; } }
/* JSS Devs logo */
.brand-tile { background: #fff; border-radius: 10px; padding: 6px 10px; display: inline-flex; align-items: center; }
.brand-tile img { height: 22px; width: auto; display: block; }
.login-wordmark { width: min(420px, 80vw); height: auto; display: block; margin: 0 auto 1rem; }
.payslip-logo { height: 28px; width: auto; display: block; margin-bottom: .35rem; }
/* scope checks */
.scope-result { border-left: 3px solid var(--brand); padding-left: .9rem; }
.scope-result code { color: #0b4f6c; background: #f1f5f9; padding: .05rem .3rem; border-radius: 4px; }
/* day timeline strips on the Activity page */
.day-strip { position: relative; height: 22px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.day-block { position: absolute; top: 0; height: 100%; }
.day-block.timer { background: #0f766e; border-radius: 3px; }
.day-block.timer.running { background: repeating-linear-gradient(45deg, #0f766e, #0f766e 6px, #14b8a6 6px, #14b8a6 12px); }
.day-block.active { background: #22c55e; }
.day-block.idle { background: #fbbf24; }
.day-mark { position: absolute; top: 0; height: 100%; width: 2px; background: #04374c; }
.day-block.code { background: #1bb9b8; }
.scope-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.scope-thumbs img { width: 84px; height: 56px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); background: #f8fafc; }
.scope-thumbs a:hover img { border-color: var(--brand); }

/* Team page: is a computer's tracker sending? */
.tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; margin-right: 4px; vertical-align: middle; }
.tdot.on { background: var(--good); }

/* ---------- Working strip (AI checks and other slow work) ---------- */
.working { border: 1px solid var(--brand-100); background: var(--brand-50); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .9rem; }
.working-row { display: flex; gap: .7rem; align-items: center; color: var(--brand-600); }
.working-bar { position: relative; height: 4px; border-radius: 2px; background: rgba(27, 185, 184, .18); overflow: hidden; margin-top: .6rem; }
.working-bar span { position: absolute; top: 0; bottom: 0; width: 35%; border-radius: 2px; background: linear-gradient(90deg, #1bb9b8, #04374c); animation: working-slide 1.4s ease-in-out infinite; }
@keyframes working-slide { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .working-bar span { animation: none; width: 100%; left: 0; opacity: .5; } }

/* ---------- Screen pictures from the tracker ---------- */
.screen-thumb img { width: 120px; height: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
.screen-thumb:hover img { border-color: var(--brand); }
.screen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; }
.screen-tile { display: block; text-decoration: none !important; color: var(--ink-2); font-size: .76rem; }
.screen-tile img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f1f5f9; display: block; margin-bottom: .2rem; }
.screen-tile:hover img { border-color: var(--brand); }
