/* WTT CRM design system
   Palette drawn from treated water and process piping.
   Type: Bricolage Grotesque (titles, figures) + Instrument Sans (interface). */
:root {
  --canvas: #EEF3F4;
  --surface: #FFFFFF;
  --surface-2: #F6F9F9;
  --line: #D5E0E3;
  --line-soft: #E6EDEF;
  --ink: #123139;
  --ink-2: #3D5961;
  --ink-3: #6B848B;
  --teal: #0B6E79;
  --teal-600: #095B64;
  --teal-50: #E3F1F2;
  --teal-100: #C7E4E6;
  --blue: #2F5D9E;
  --blue-50: #E7EEF8;
  --red: #C2453F;  --red-50: #FBEAE9;
  --amber: #B98A1E; --amber-50: #FBF3DE;
  --yellow: #D99A00;
  --green: #2E9E6A; --green-50: #E4F4EC;
  --cold: #5B8DB8; --cold-50: #E8F0F8;
  --side: #123139;
  --side-2: #0E2930;
  --side-ink: #B9CDD2;
  --radius-lg: 12px;
  --radius: 8px;
  --radius-sm: 6px;
  --f-ui: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-display: "Bricolage Grotesque", "Instrument Sans", "Segoe UI", sans-serif;
  --shadow-pop: 0 12px 32px -8px rgba(18, 49, 57, .28), 0 2px 6px rgba(18, 49, 57, .08);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--f-ui); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--canvas); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 650; line-height: 1.15; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .6em; }
small, .muted { color: var(--ink-3); }
.mono-id { font-weight: 600; color: var(--ink-2); font-size: 12.5px; letter-spacing: .01em; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
i[data-lucide], svg.lucide { width: 16px; height: 16px; stroke-width: 1.9; flex: none; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2b4a52 transparent;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; color: #fff; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--f-display); font-size: 18px; font-weight: 650; letter-spacing: -.01em; line-height: 1.1; }
.brand-co { font-size: 11.5px; color: #8FAAB1; }
.nav { padding: 6px 12px 20px; flex: 1; }
.nav-group { margin-top: 16px; }
.nav-title { font-size: 12px; color: #7E9AA1; padding: 0 10px 6px; font-weight: 500; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--side-ink); font-weight: 500; font-size: 13.5px; text-decoration: none; position: relative;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(120, 205, 212, .14); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #6FCBD3; }
.nav .count { margin-left: auto; font-size: 11.5px; padding: 0 7px; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; }
.nav .count.alert { background: var(--red); }
.side-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #7E9AA1; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(238, 243, 244, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft);
}
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 0 12px 0 36px; font: inherit; color: var(--ink); }
.search > i, .search > svg { position: absolute; left: 12px; top: 11px; color: var(--ink-3); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); display: none; overflow: hidden; z-index: 40; }
.search-results.open { display: block; }
.search-results a { display: block; padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--line-soft); text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--teal-50); }
.search-results .sub { font-size: 12px; color: var(--ink-3); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: #bccbcf; text-decoration: none; }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--canvas); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.user-chip .nm { font-weight: 600; font-size: 13px; line-height: 1.1; text-align: left; }
.user-chip .rl { font-size: 11.5px; color: var(--ink-3); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--teal); flex: none; letter-spacing: .02em; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

.content { padding: 26px 28px 60px; max-width: 1560px; width: 100%; }

/* ---------- Dropdown ---------- */
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; display: none; z-index: 50; max-height: 70vh; overflow: auto; }
.dd.open .dd-menu { display: block; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 6px; color: var(--ink); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--surface-2); }
.dd-menu .sep { height: 1px; background: var(--line-soft); margin: 6px 0; }
.dd-menu .hdr { font-size: 12px; color: var(--ink-3); padding: 6px 10px 4px; }
.dd-menu .cur { background: var(--teal-50); }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 6px; font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13.5px var(--f-ui); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #b4c5ca; text-decoration: none; background: var(--surface-2); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-600); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(18,49,57,.05); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.btn-group a, .btn-group button { padding: 0 12px; height: 34px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 13px; border: 0; background: none; border-right: 1px solid var(--line); cursor: pointer; text-decoration: none; }
.btn-group a:last-child, .btn-group button:last-child { border-right: 0; }
.btn-group .on { background: var(--ink); color: #fff; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 15px 18px 12px; flex-wrap: wrap; }
.panel-h .hint { font-size: 12.5px; color: var(--ink-3); font-weight: 400; font-family: var(--f-ui); }
.panel-b { padding: 0 18px 18px; }
.panel-b.flush { padding: 0; }
.panel + .panel, .stack > * + * { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 360px; }
.g-side-main { grid-template-columns: 320px minmax(0, 1fr); }
.g-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.mt { margin-top: 18px; } .mt-s { margin-top: 10px; } .mb { margin-bottom: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.kpi { background: var(--surface); padding: 15px 16px 14px; display: block; color: var(--ink); text-decoration: none; position: relative; min-height: 96px; box-shadow: 1px 0 0 var(--line-soft), 0 1px 0 var(--line-soft); }
@media (min-width: 1380px) { .kpis.k7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
a.kpi:hover { background: var(--surface-2); text-decoration: none; }
a.kpi:hover .kpi-l::after { content: " ›"; color: var(--teal); }
.kpi-l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi-v { font-family: var(--f-display); font-size: 28px; font-weight: 600; line-height: 1.1; margin-top: 8px; letter-spacing: -.02em; }
.kpi-v.sm { font-size: 22px; }
.kpi-v.txt { font-size: 16px; line-height: 1.3; letter-spacing: 0; }
.kpi-s { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.kpi .tick { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kpi.warn .kpi-v { color: var(--red); }
.kpi.good .kpi-v { color: var(--green); }
.kpis.big .kpi-v { font-size: 32px; }

/* ---------- The pipeline: stage tanks connected by a pipe ---------- */
.flow { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); gap: 0; padding: 6px 4px 2px; overflow-x: auto; }
.flow::before { content: ""; position: absolute; left: 34px; right: 34px; top: 102px; height: 10px; border-radius: 6px; background: linear-gradient(180deg, #d5e3e6, #c3d6da); box-shadow: inset 0 1px 2px rgba(18,49,57,.18); }
.flow-node { position: relative; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); padding: 0 6px; }
.flow-node:hover { text-decoration: none; }
.tank { position: relative; width: 58px; height: 92px; border: 2px solid #9EB7BE; border-top-width: 0; border-radius: 0 0 14px 14px; background: #F7FAFA; overflow: hidden; z-index: 1; }
.tank::before { content: ""; position: absolute; left: -2px; right: -2px; top: 0; height: 2px; background: #9EB7BE; }
.tank .water { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c, var(--teal)); opacity: .85; transition: height .9s cubic-bezier(.2,.8,.2,1); }
.tank .water::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 8px; background: inherit; border-radius: 50%; opacity: .6; }
.flow-node:hover .tank { border-color: var(--ink-2); }
.flow-node .joint { position: absolute; top: 96px; width: 14px; height: 22px; border-radius: 3px; background: #9EB7BE; z-index: 2; }
.flow-count { font-family: var(--f-display); font-size: 22px; font-weight: 650; margin-top: 12px; line-height: 1; }
.flow-name { font-size: 12px; color: var(--ink-2); text-align: center; line-height: 1.25; margin-top: 5px; max-width: 110px; min-height: 30px; }
.flow-val { font-size: 11.5px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .tank .water { transition: none; } }

/* Lead stage track (lead detail) */
.track { display: flex; align-items: flex-start; position: relative; padding: 4px 0 0; overflow-x: auto; }
.track-step { flex: 1; min-width: 92px; text-align: center; position: relative; font-size: 12px; color: var(--ink-3); }
.track-step::before { content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 6px; background: var(--line); z-index: 0; }
.track-step:first-child::before { display: none; }
.track-step.done::before, .track-step.cur::before { background: var(--teal); }
.track-dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 6px; background: var(--surface); border: 3px solid var(--line); display: grid; place-items: center; }
.track-step.done .track-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.track-step.cur .track-dot { border-color: var(--teal); box-shadow: 0 0 0 5px var(--teal-100); }
.track-step.cur { color: var(--ink); font-weight: 600; }
.track-step .days { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.track-step.won .track-dot { background: var(--green); border-color: var(--green); color: #fff; }
.track-step.lost .track-dot { background: var(--red); border-color: var(--red); color: #fff; }
.track-dot svg { width: 13px; height: 13px; }
button.track-step { border: 0; background: none; font: inherit; cursor: pointer; padding: 0; }
button.track-step:hover .track-dot { border-color: var(--teal); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #F8FBFB; }
.tbl .num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl .ctr { text-align: center; }
.tbl .nowrap { white-space: nowrap; }
.tbl .strong { font-weight: 600; }
.tbl .cell-main { font-weight: 600; color: var(--ink); }
.tbl .cell-sub { font-size: 12.5px; color: var(--ink-3); }
.tbl tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tbl tr.due-today td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); }
.tbl.compact td { padding: 8px 12px; }
.tbl a.rowlink { color: var(--ink); font-weight: 600; }

/* ---------- Pills, flags, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-soft); }
.pill.hot { background: var(--red-50); color: #9E2F2A; border-color: #F2CFCC; }
.pill.warm { background: var(--amber-50); color: #8A6510; border-color: #F0DFAF; }
.pill.cold { background: var(--cold-50); color: #3B6A93; border-color: #CFDEEE; }
.pill.st-open { background: #EEF1F2; color: var(--ink-2); }
.pill.st-in-progress { background: var(--blue-50); color: var(--blue); border-color: #D1DDEF; }
.pill.st-awarded, .pill.ok { background: var(--green-50); color: #1F7550; border-color: #C5E6D5; }
.pill.st-not-awarded, .pill.st-lost, .pill.bad { background: var(--red-50); color: #9E2F2A; border-color: #F2CFCC; }
.pill.st-on-hold { background: var(--amber-50); color: #8A6510; border-color: #F0DFAF; }
.pill.teal { background: var(--teal-50); color: var(--teal-600); border-color: var(--teal-100); }
.pill.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.flag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--fc, #999); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc, #999) 20%, transparent); }
.flag.Red { --fc: #D64545; } .flag.Yellow { --fc: #D99A00; } .flag.Green { --fc: #2E9E6A; } .flag.Blue { --fc: #2F6FD6; }
.flag.dot-only { font-size: 0; gap: 0; }
.stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.stage::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--sc, var(--teal)); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 7px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2); white-space: nowrap; }
.due { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.due.over { color: var(--red); } .due.today { color: #A57300; } .due.later { color: var(--ink-2); }
.src { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.src b { font-weight: 600; color: var(--ink); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.c12 { grid-column: span 12; } .c5 { grid-column: span 5; } .c7 { grid-column: span 7; } .c2 { grid-column: span 2; } .c8 { grid-column: span 8; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c9 { grid-column: span 9; }
.field label, .lbl { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field label .req { color: var(--red); margin-left: 2px; }
.field .help { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.field .err { font-size: 12.5px; color: var(--red); margin-top: 5px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; font: inherit; color: var(--ink);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B848B' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
select.input[multiple] { height: auto; min-height: 110px; padding: 6px; background-image: none; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); }
.field.has-err .input { border-color: var(--red); }
.input.sm { height: 32px; font-size: 13px; }
.input-color { width: 60px; height: 38px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--teal); }
.form-sec { padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.form-sec:last-child { border-bottom: 0; }
.form-sec-h { display: flex; gap: 14px; margin-bottom: 16px; }
.form-sec-h .n { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-50); color: var(--teal-600); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; flex: none; }
.form-sec-h p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; background: var(--surface-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); position: sticky; bottom: 0; z-index: 5; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--surface-2); gap: 3px; flex-wrap: wrap; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18,49,57,.15), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 2px solid var(--teal); }
.source-card { border: 1px dashed var(--teal-100); background: #F4FAFA; border-radius: 10px; padding: 16px; }
.alert-box { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: 13.5px; }
.alert-box.warn { background: var(--amber-50); border-color: #EBD69B; color: #6B4E0A; }
.alert-box.err { background: var(--red-50); border-color: #F2CFCC; color: #8A2722; }
.alert-box.info { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-600); }
.comp-row { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1.4fr 36px; gap: 8px; margin-bottom: 8px; }

/* ---------- Filters ---------- */
.filterbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.filterbar .input { width: auto; min-width: 140px; height: 34px; font-size: 13px; }
.filterbar .search-in { min-width: 240px; flex: 1; max-width: 340px; }
.filters-more { display: none; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.filters-more.open { display: grid; }
.filters-more .lbl { font-size: 12px; margin-bottom: 4px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 0; }
.chip-x { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 6px 0 10px; border-radius: 13px; background: var(--teal-50); color: var(--teal-600); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.chip-x:hover { text-decoration: none; background: var(--teal-100); }
.listmeta { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; gap: 10px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { padding: 11px 14px 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-3); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-family: inherit; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .on { color: var(--ink); border-bottom-color: var(--teal); }
.tabs .n { font-size: 11.5px; padding: 0 7px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2); }
.tabs .n.red { background: var(--red); color: #fff; border-color: var(--red); }
.tab-pane { display: none; } .tab-pane.on { display: block; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list.scroll { max-height: 520px; overflow-y: auto; border-top: 1px solid var(--line-soft); }
.list > li { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line-soft); }
.list > li:first-child { border-top: 0; }
.list .meta { font-size: 12.5px; color: var(--ink-3); }
.list a.title { color: var(--ink); font-weight: 600; }
.agenda-time { width: 54px; flex: none; text-align: right; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

.bar { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.barrow { display: grid; grid-template-columns: 140px 1fr 70px; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; }
.barrow .bar { height: 10px; }

/* ---------- Detail ---------- */
.lead-hero { padding: 22px 24px 20px; }
.lead-hero h1 { font-size: 24px; }
.lead-hero .facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; }
.fact .k { font-size: 12px; color: var(--ink-3); }
.fact .v { font-weight: 600; font-size: 14px; }
.fact .v.big { font-family: var(--f-display); font-size: 20px; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 9px 16px; font-size: 13.5px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 4px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line-soft); }
.timeline li { position: relative; padding: 0 0 18px 46px; }
.timeline .ic { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.timeline .ic.followup { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal); }
.timeline .ic.proposal { background: var(--blue-50); border-color: #D1DDEF; color: var(--blue); }
.timeline .ic.stage { background: #F1EEF8; border-color: #DCD5EE; color: #5B4B8A; }
.timeline .ic.awarded { background: var(--green-50); border-color: #C5E6D5; color: var(--green); }
.timeline .ic.lost { background: var(--red-50); border-color: #F2CFCC; color: var(--red); }
.timeline .ic.created { background: var(--ink); color: #fff; border-color: var(--ink); }
.timeline .ic.assign, .timeline .ic.priority { background: var(--amber-50); border-color: #F0DFAF; color: var(--amber); }
.timeline .t { font-weight: 600; }
.timeline .m { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.timeline .b { margin-top: 6px; color: var(--ink-2); font-size: 13.5px; }
.fu-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.fu-card + .fu-card { margin-top: 10px; }
.fu-card .hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fu-card .body { margin-top: 10px; color: var(--ink-2); }
.fu-card .nx { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Kanban ---------- */
/* At desktop sizes, all five priorities (including Inactive) fit in the available
   content width. Below that, the board wraps into rows instead of scrolling sideways.
   Container queries account for the actual width left by the CRM sidebar. */
.kanban-layout { width: 100%; max-width: 100%; min-width: 0; container-type: inline-size; }
.board { display: grid; grid-template-columns: repeat(var(--board-columns, 5), minmax(0, 1fr));
         gap: 10px; width: 100%; max-width: 100%; min-width: 0;
         padding-bottom: 16px; align-items: start; min-height: 60vh; }
.board > .col { min-width: 0; width: 100%; box-sizing: border-box; background: #E3EBED;
                border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.board .col-h { min-height: 58px; box-sizing: border-box; }
.board .col-h .nm { gap: 6px; flex-wrap: wrap; }
.board .col-b { min-width: 0; }
.board .kcard { width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.board .k-acts { flex-wrap: wrap; }
@container (max-width: 980px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 640px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 420px) { .board { grid-template-columns: minmax(0, 1fr); } }
/* Fallback for browsers without container queries. */
@supports not (container-type: inline-size) {
  @media (max-width: 1200px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 760px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 480px) { .board { grid-template-columns: minmax(0, 1fr); } }
}
.col-h { padding: 12px 14px 10px; border-top: 4px solid var(--sc); border-radius: 12px 12px 0 0; }
.col-h .nm { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; }
.col-h .vl { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.col-b { padding: 4px 8px 10px; overflow-y: auto; flex: 1; min-height: 80px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; margin-bottom: 8px; cursor: grab; position: relative; }
.kcard:hover { border-color: #a9bec4; }
.kcard.locked { cursor: default; }
.kcard .co { font-weight: 650; font-size: 13.5px; line-height: 1.3; color: var(--ink); padding-right: 16px; }
.kcard .pr { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.kcard .ft { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.kcard .flag { position: absolute; top: 12px; right: 10px; }
.kcard.overdue { box-shadow: inset 3px 0 0 var(--red); }
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: var(--shadow-pop); }

/* ---------- Trello cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; }
.lcard-top { padding: 14px 16px 12px; border-top: 4px solid var(--sc); border-radius: 12px 12px 0 0; }
.lcard-top .co { font-family: var(--f-display); font-weight: 650; font-size: 16px; color: var(--ink); line-height: 1.25; }
.lcard-top .pr { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.lcard-mid { padding: 0 16px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 12.5px; }
.lcard-mid .k { color: var(--ink-3); font-size: 11.5px; }
.lcard-mid .v { font-weight: 600; color: var(--ink); }
.lcard-q { padding: 10px 16px; border-top: 1px solid var(--line-soft); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lcard-q select { height: 28px; font-size: 12px; border-radius: 6px; padding: 0 24px 0 8px; background-position: right 7px center; width: auto; }
.lcard-b { padding: 10px 16px; border-top: 1px solid var(--line-soft); display: flex; gap: 6px; background: var(--surface-2); border-radius: 0 0 12px 12px; }

/* ---------- Calendar ---------- */
#calendar { --fc-border-color: var(--line-soft); --fc-today-bg-color: #F0F8F8; --fc-button-bg-color: var(--surface); --fc-button-border-color: var(--line); --fc-button-text-color: var(--ink); --fc-button-hover-bg-color: var(--surface-2); --fc-button-hover-border-color: #b4c5ca; --fc-button-active-bg-color: var(--ink); --fc-button-active-border-color: var(--ink); --fc-event-border-color: transparent; font-size: 13px; }
#calendar .fc-toolbar-title { font-family: var(--f-display); font-size: 20px; }
#calendar .fc-button { font-weight: 600; text-transform: none; box-shadow: none !important; font-size: 13px; }
#calendar .fc-button-active { color: #fff; }
#calendar .fc-event { cursor: pointer; padding: 1px 4px; font-weight: 600; border-radius: 5px; }
#calendar .fc-daygrid-day-number, #calendar .fc-col-header-cell-cushion { color: var(--ink-2); font-weight: 600; }

/* ---------- Dialog / drawer ---------- */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, 94vw); box-shadow: var(--shadow-pop); color: var(--ink); }
dialog.wide { width: min(820px, 96vw); }
dialog::backdrop { background: rgba(14, 41, 48, .45); }
.dlg-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 6px; }
.dlg-b { padding: 10px 22px 18px; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; background: var(--surface-2); border-top: 1px solid var(--line-soft); }
dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow-pop); font-size: 13.5px; animation: pop .2s ease-out; }
.toast.error { background: #7F2420; }
.toast.success i, .toast.success svg { color: #7FE0B0; }
.toast button { background: none; border: 0; color: #9FB8BE; cursor: pointer; margin-left: auto; padding: 0; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.empty i, .empty svg { width: 28px; height: 28px; color: #9EB7BE; margin-bottom: 8px; }
.pager { display: flex; gap: 4px; align-items: center; }
.pager a, .pager span { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13px; padding: 0 8px; text-decoration: none; }
.pager .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .gap { border: 0; background: none; }
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 200px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photos figure { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 4/3; position: relative; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-ph { display: grid; place-items: center; aspect-ratio: 4/3; border: 1px dashed var(--line); border-radius: 8px; color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; color: var(--ink); margin: 0 6px 6px 0; }
.score { font-family: var(--f-display); font-size: 15px; font-weight: 650; }
.rank { width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line-soft); }
.rank.r1 { background: var(--ink); color: #fff; border-color: var(--ink); }
.perm-yes { color: var(--green); } .perm-no { color: #C4D1D4; }
.split-title { display: flex; align-items: baseline; gap: 10px; }
.hide-sm { }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-art { background: var(--side); color: #DCE9EC; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { color: #fff; font-size: 40px; line-height: 1.08; max-width: 14ch; font-weight: 650; letter-spacing: -.02em; }
.login-art p { color: #9FB8BE; max-width: 46ch; font-size: 15px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: min(420px, 100%); }
.demo-list { display: grid; gap: 6px; margin-top: 10px; max-height: 330px; overflow-y: auto; }
.demo-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--ink); width: 100%; }
.demo-user:hover { border-color: var(--teal); background: var(--teal-50); }
.demo-user .r { font-size: 12px; color: var(--ink-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main-side { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1080px) {
  .g-main-side, .g-side-main, .g-7-5, .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(14,41,48,.4); z-index: 55; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 14px; }
  .content { padding: 18px 14px 50px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .c6, .c4, .c3, .c8, .c9, .c5, .c7, .c2 { grid-column: span 12; }
  .user-chip .nm, .user-chip .rl { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 32px 26px; }
  .login-art h1 { font-size: 30px; }
  .comp-row { grid-template-columns: 1fr 1fr; }
  .dl { grid-template-columns: 120px 1fr; }
  .hide-sm { display: none !important; }
  .panel-h .hint { display: block; margin-top: 2px; }
}
@media print {
  .sidebar, .topbar, .actions, .filterbar, .btn { display: none !important; }
  .shell { display: block; } .panel { break-inside: avoid; }
}

/* ---------- Enquiry form ---------- */
.ic-tile { width: 36px; height: 36px; border-radius: 10px; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; flex: none; }
.ic-tile.violet { background: #EFEAF8; color: #6B54A3; }
.ic-tile svg { width: 18px; height: 18px; }
.form-sec-h { align-items: flex-start; }
.scan-btn { background: var(--ink); border-color: var(--ink); color: #fff; height: 42px; padding: 0 18px; }
.scan-btn:hover { background: #1C4550; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { margin: 0; position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--ink-2); user-select: none; transition: border-color .12s, background .12s; }
.chips .chip:hover { border-color: #a9bec4; }
.chips .chip input { position: absolute; opacity: 0; pointer-events: none; }
.chips .chip .box { width: 16px; height: 16px; border: 1.5px solid #9EB7BE; border-radius: 4px; background: #fff; display: grid; place-items: center; flex: none; }
.chips .chip.single .box { border-radius: 50%; }
.chips .chip input:checked ~ .box { background: var(--teal); border-color: var(--teal); }
.chips .chip input:checked ~ .box::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.chips .chip.single input:checked ~ .box::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.chips .chip:has(input:checked) { border-color: var(--teal); background: var(--teal-50); color: var(--ink); }
.chips .chip:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.group { padding-top: 10px; border-top: 1px solid var(--line-soft); }
details.more summary { cursor: pointer; font-weight: 600; color: var(--teal); font-size: 13.5px; }
.wq-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.wq { border-collapse: collapse; width: 100%; min-width: 560px; }
.wq th { background: var(--ink); color: #fff; text-align: left; font-size: 12.5px; padding: 10px 12px; font-weight: 600; white-space: nowrap; }
.wq th.sc { min-width: 160px; }
.wq td { padding: 6px 12px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.wq td:first-child { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.wq tbody tr:nth-child(even) td { background: var(--surface-2); }
.wq .name-row td { background: var(--teal-50) !important; }
.wq td input { min-width: 130px; text-align: right; }
.wq .name-row input { text-align: center; }
.wq-x { background: none; border: 0; color: #9FB8BE; cursor: pointer; margin-left: 6px; vertical-align: middle; padding: 0; }
.wq-x:hover { color: #fff; }
.unit { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--teal-50); color: var(--teal-600); font-size: 12px; font-weight: 600; white-space: nowrap; }
.scan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; }
.scan-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); max-height: 360px; object-fit: contain; background: var(--surface-2); display: block; }
.raw { white-space: pre-wrap; font-size: 12px; background: var(--surface-2); padding: 10px; border-radius: 8px; max-height: 180px; overflow: auto; margin: 6px 0 0; }
.map-box { height: 420px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
#maps-link { display: inline-flex; gap: 5px; align-items: center; margin-top: 10px; }
.flash-field { animation: flashf 1.4s ease-out; }
@keyframes flashf { 0% { box-shadow: 0 0 0 3px rgba(217, 154, 0, .55); } 100% { box-shadow: 0 0 0 0 rgba(217, 154, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .flash-field { animation: none; } }
@media (max-width: 900px) { .scan-grid { grid-template-columns: 1fr; } .map-box { height: 320px; } }

/* =================== Compact layout (more on one screen) =================== */
body { font-size: 13px; }
.content { padding: 16px 20px 40px; max-width: 1680px; }
.topbar { height: 52px; padding: 0 20px; }
h1 { font-size: 21px; } h2 { font-size: 15px; } h3 { font-size: 14px; }
.page-head { margin-bottom: 12px; gap: 12px; } .page-head .sub { margin-top: 3px; font-size: 13px; }
.panel-h { padding: 9px 14px 8px; } .panel-b { padding: 0 14px 12px; }
.panel + .panel, .stack > * + * { margin-top: 12px; } .grid { gap: 12px; } .mt { margin-top: 12px; } .mb { margin-bottom: 12px; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.kpi { padding: 9px 12px 8px; min-height: 66px; } .kpi-l { font-size: 12px; } .kpi-v { font-size: 21px; margin-top: 3px; } .kpi-v.sm { font-size: 17px; } .kpi-s { font-size: 11.5px; margin-top: 1px; }
.kpis.big .kpi-v { font-size: 24px; }
.tbl { font-size: 12.5px; } .tbl th { padding: 6px 9px; font-size: 12px; } .tbl td { padding: 5px 9px; line-height: 1.35; }
.tbl.compact td { padding: 4px 9px; } .tbl .cell-sub { font-size: 11.5px; }
.pill { height: 20px; padding: 0 7px; font-size: 11.5px; } .tag { font-size: 11.5px; padding: 0 6px; }
.btn { height: 32px; padding: 0 11px; font-size: 13px; } .btn.sm { height: 28px; } .btn.xs { height: 24px; font-size: 11.5px; }
.btn-group a, .btn-group button { height: 30px; padding: 0 10px; font-size: 12.5px; }
.input, select.input { height: 32px; font-size: 13px; padding: 0 9px; } textarea.input { min-height: 60px; padding: 6px 9px; }
select.input { padding-right: 26px; } .input.sm { height: 28px; font-size: 12.5px; }
.field label, .lbl { font-size: 12px; margin-bottom: 3px; } .field .help, .field .err { font-size: 11.5px; margin-top: 3px; }
.form-sec { padding: 12px 16px; } .form-sec-h { margin-bottom: 10px; gap: 10px; } .form-sec-h p { font-size: 12px; margin: 0; }
.ic-tile { width: 30px; height: 30px; border-radius: 8px; }
.form-foot { padding: 10px 16px; }
.chips .chip { min-height: 32px; padding: 0 11px; font-size: 12.5px; gap: 7px; } .chips { gap: 6px; }
.filterbar { padding: 8px 12px; gap: 6px; } .filterbar .input { height: 30px; min-width: 120px; font-size: 12.5px; }
.filters-more { padding: 10px 12px; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.list > li { padding: 7px 14px; } .lead-hero { padding: 14px 18px 12px; } .lead-hero h1 { font-size: 20px; } .lead-hero .facts { gap: 18px; margin-top: 10px; }
.fact .v.big { font-size: 17px; } .dl { gap: 5px 14px; font-size: 13px; grid-template-columns: 140px 1fr; }
.tabs a, .tabs button { padding: 8px 12px 7px; font-size: 13px; }
.lcard-top { padding: 10px 12px 8px; } .lcard-mid { padding: 0 12px 8px; gap: 5px 10px; } .lcard-q, .lcard-b { padding: 7px 12px; }
 .kcard { padding: 8px 10px; margin-bottom: 6px; }
.wq td { padding: 3px 10px; } .wq th { padding: 7px 10px; }
.flow-count { font-size: 19px; margin-top: 8px; } .tank { height: 74px; width: 50px; } .flow::before { top: 84px; } .flow-node .joint { top: 78px; }

/* 60-column form grid: five fields per row */
.form-grid { grid-template-columns: repeat(60, minmax(0, 1fr)); gap: 9px 12px; }
.form-grid > .c12 { grid-column: span 60; } .form-grid > .c9 { grid-column: span 45; } .form-grid > .c8 { grid-column: span 40; }
.form-grid > .c7 { grid-column: span 35; } .form-grid > .c6 { grid-column: span 30; } .form-grid > .c5 { grid-column: span 25; }
.form-grid > .c4 { grid-column: span 20; } .form-grid > .c3 { grid-column: span 15; } .form-grid > .c2 { grid-column: span 10; }
.cf { grid-column: span 12; } .c2f { grid-column: span 24; } .c3f { grid-column: span 36; } .c4f { grid-column: span 48; }

/* Table sorting */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable::after { content: "↕"; opacity: .3; margin-left: 4px; font-size: 10px; }
th[aria-sort="ascending"]::after { content: "▲"; opacity: .8; } th[aria-sort="descending"]::after { content: "▼"; opacity: .8; }

/* Logo */
.logo-chip { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; position: relative; }
.logo-chip img { max-width: 34px; max-height: 34px; object-fit: contain; }
.logo-chip .logo-fb { display: none; font: 700 12px var(--f-display); color: var(--ink); }
.logo-chip.fallback img { display: none; } .logo-chip.fallback .logo-fb { display: block; }
.logo-chip.lg { width: 52px; height: 52px; } .logo-chip.lg img { max-width: 46px; max-height: 46px; }
.brand { padding: 16px 18px 14px; }

/* Stage board */
.stage-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.stage-tab { flex: 0 0 auto; min-width: 128px; padding: 7px 10px; border: 1px solid var(--line); border-top: 3px solid var(--sc); border-radius: 9px; background: var(--surface); color: var(--ink); text-decoration: none; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; }
.stage-tab:hover { text-decoration: none; background: var(--surface-2); }
.stage-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); border-top-color: var(--sc); }
.stage-tab .nm { font-weight: 600; font-size: 12.5px; } .stage-tab .ct { font: 700 16px var(--f-display); grid-row: span 2; align-self: center; }
.stage-tab .vl { font-size: 11.5px; opacity: .7; }

/* Gantt */
.gantt { display: grid; grid-template-columns: 230px 1fr; }
.g-left { border-right: 1px solid var(--line); background: var(--surface); position: relative; z-index: 2; }
.g-right { overflow-x: auto; }
.g-head { height: 34px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--ink-3); padding: 9px 10px; }
.g-row { height: 34px; border-bottom: 1px solid var(--line-soft); position: relative; }
.g-lbl { padding: 3px 10px; display: flex; flex-direction: column; justify-content: center; font-size: 12.5px; line-height: 1.15; }
.g-axis { position: relative; padding: 0; }
.g-tick { position: absolute; top: 0; height: 34px; border-left: 1px solid var(--line-soft); font-size: 10.5px; color: var(--ink-3); padding: 2px 3px; line-height: 1.2; white-space: nowrap; }
.g-tick.major { border-left-color: var(--line); color: var(--ink-2); } .g-tick b { display: block; font-weight: 700; }
.g-seg { position: absolute; top: 10px; height: 14px; border-radius: 3px; opacity: .9; }
.g-seg.ms { width: 12px !important; height: 12px; top: 11px; border-radius: 2px; transform: rotate(45deg); }
.g-today { position: absolute; top: 34px; bottom: 0; border-left: 2px dashed var(--red); z-index: 1; }

/* Progress timeline */
.tl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.tl { position: relative; height: 210px; min-width: 100%; }
.tl-axis { position: absolute; left: 0; right: 0; top: 94px; height: 4px; background: #C9D7DB; border-radius: 2px; }
.tl-done { position: absolute; top: 94px; height: 4px; background: var(--teal); border-radius: 2px; }
.tl-tick { position: absolute; top: 102px; font-size: 10.5px; color: var(--ink-3); transform: translateX(-50%); white-space: nowrap; }
.tl-tick::before { content: ""; position: absolute; left: 50%; top: -8px; height: 6px; border-left: 1px solid #9EB7BE; }
.tl-tick.major { color: var(--ink-2); font-weight: 600; }
.tl-m { position: absolute; top: 88px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--c); z-index: 2; }
.tl-m.today { background: #fff; border: 2px dashed var(--ink-3); box-shadow: none; }
.tl-lab { position: absolute; transform: translateX(-50%); font-size: 11.5px; text-align: center; white-space: nowrap; line-height: 1.25; }
.tl-lab b { display: block; color: var(--ink); } .tl-lab span { color: var(--ink-3); }
.tl-lab { background: var(--surface-2); padding: 0 3px; z-index: 1; }
.tl-con { position: absolute; border-left: 1px dotted #9EB7BE; }

/* Comments */
.cmt-form { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--surface); margin-bottom: 10px; }
.cmt-form textarea { border: 0; box-shadow: none; padding: 4px; min-height: 44px; }
.cmt-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.cmt-tool { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-weight: 500; color: var(--ink-3); }
.cmt-tool select { width: 150px; } .cmt-tool select[multiple] { height: 28px; overflow: hidden; }
.cmt-tool select[multiple]:focus { height: 120px; position: relative; z-index: 5; overflow: auto; }
.cmt { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.cmt.reply { margin-left: 34px; padding-top: 7px; border-top-style: dashed; }
.cmt.done .cmt-b { color: var(--ink-3); }
.cmt-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.cmt-b { margin: 3px 0; white-space: pre-line; }
.cmt-a { display: flex; gap: 12px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal); font: 600 12px var(--f-ui); cursor: pointer; }
.linkbtn.danger { color: var(--red); }
.reply-form { margin: 4px 0 10px 34px; }

/* Diary */
.dayboard { overflow-x: auto; min-width: 0; }
.db-hours, .db-row { display: grid; grid-template-columns: 170px 1fr; min-width: 860px; }
.db-hours { font-size: 11px; color: var(--ink-3); } .db-hours > span:not(:first-child) { display: inline-block; }
.db-hours { grid-template-columns: 170px repeat(13, 1fr); }
.db-row { border-top: 1px solid var(--line-soft); min-height: 46px; align-items: center; }
.db-who { display: flex; gap: 7px; align-items: center; font-weight: 600; font-size: 12.5px; }
.db-track { position: relative; height: 40px; background: repeating-linear-gradient(90deg, transparent 0 calc(100%/13 - 1px), var(--line-soft) calc(100%/13 - 1px) calc(100%/13)); }
.db-ev { position: absolute; top: 4px; height: 32px; border-radius: 6px; padding: 2px 6px; font-size: 11px; line-height: 1.25; color: #fff; overflow: hidden; text-decoration: none; background: var(--teal); }
.db-ev:hover { text-decoration: none; filter: brightness(1.1); }
.db-back { position: absolute; top: 10px; color: var(--ink-2); margin-left: -8px; }
.o-positive, .db-ev.o-positive { background: #2E9E6A; } .o-follow-up-needed, .db-ev.o-follow-up-needed { background: #D99A00; }
.o-proposal-requested, .db-ev.o-proposal-requested { background: #2F5D9E; } .o-order-received, .db-ev.o-order-received { background: #0B6E79; }
.o-negative, .db-ev.o-negative { background: #C2453F; } .o-new-enquiry, .db-ev.o-new-enquiry { background: #7C5BA6; }
.o-none, .db-ev.o-none { background: #9AAAB0; }
.pill.o-pill { color: #fff; border-color: transparent; }

/* Lost reasons / competitor bars */
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line-soft); margin-top: 3px; }
.pricebar { height: 7px; background: var(--line-soft); border-radius: 4px; margin: 2px 0; overflow: hidden; }
.pricebar span { display: block; height: 100%; border-radius: 4px; }
.pricebar .us, .lg.us { background: var(--teal); } .pricebar .them, .lg.them { background: var(--red); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: middle; }

/* Expos */
.expo-card { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 12.5px; }
.expo-card:hover { text-decoration: none; border-color: var(--teal); }
.expo-logo { width: 36px; height: 36px; object-fit: contain; flex: none; }
.cal-logo { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; margin-right: 4px; }
.expo-pin { display: flex; align-items: center; gap: 4px; padding: 1px 4px; overflow: hidden; white-space: nowrap; font-size: 11.5px; }
#expo-cal .fc-event.expo-ev { background: var(--teal-50); border: 1px solid var(--teal-100); color: var(--ink); }
#expo-cal .fc-event.att-not-attended { background: #F1F3F4; border-color: #D5DDE0; color: var(--ink-3); }
#expo-cal .fc-event.att-planned { background: #FFF6DE; border-color: #EBD69B; }
#expo-cal { --fc-border-color: var(--line-soft); --fc-today-bg-color: #F0F8F8; font-size: 12.5px; }
#expo-cal .fc-button { background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 600; box-shadow: none; text-transform: none; }
#expo-cal .fc-button-active { background: var(--ink) !important; color: #fff !important; }
#expo-cal .fc-toolbar-title { font-family: var(--f-display); font-size: 18px; }
.plat-linkedin { background: #E7EEF8; color: #1D5A9E; } .plat-pinterest { background: #FBEAE9; color: #B0262B; }
.plat-facebook { background: #E8EEFB; color: #2F5DB8; } .plat-instagram { background: #F8E9F3; color: #A23C7E; } .plat-youtube { background: #FBEAE9; color: #C2453F; }

@media (max-width: 900px) {
  .form-grid > *, .cf, .c2f, .c3f, .c4f { grid-column: span 60 !important; }
  .gantt { grid-template-columns: 140px 1fr; }
}

/* =================== Release 5 =================== */
/* Grey WTT logo for expos not attended, and a text badge when the logo can't load */
img.gray { filter: grayscale(1) opacity(.5); }
.logo-badge { display: inline-grid; place-items: center; min-width: 26px; height: 16px; padding: 0 3px; border-radius: 4px; background: var(--teal); color: #fff; font: 700 9px var(--f-ui); vertical-align: middle; margin-right: 4px; }
.logo-badge.gray { background: #B7C3C7; }
.expo-card .logo-badge { width: 36px; height: 36px; font-size: 11px; border-radius: 8px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }

/* Stage bar in list rows (same look as the lead page) */
.sbar-wrap { min-width: 170px; }
.sbar { display: flex; align-items: center; }
.sbar .sd { position: relative; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #C6D3D7; background: var(--surface); padding: 0; cursor: pointer; flex: none; display: grid; place-items: center; color: #fff; }
.sbar .sd + .sd { margin-left: 8px; }
.sbar .sd + .sd::before { content: ""; position: absolute; right: 100%; top: 50%; width: 10px; height: 3px; margin-top: -1.5px; margin-right: 1px; background: #C6D3D7; }
.sbar .sd.done { background: var(--teal); border-color: var(--teal); }
.sbar .sd.done + .sd::before, .sbar .sd.cur::before { background: var(--teal); }
.sbar .sd.cur { border-color: var(--sc, var(--teal)); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc, var(--teal)) 25%, transparent); }
.sbar .sd.cur::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sc, var(--teal)); }
.sbar .sd:not([disabled]):hover { transform: scale(1.2); border-color: var(--ink-2); }
.sbar .sd[disabled] { cursor: default; }
.sbar .sd.out { width: 18px; height: 18px; border-style: dashed; color: var(--ink-3); }
.sbar .sd.out svg { width: 10px; height: 10px; }
.sbar .sd.out.won { background: var(--green); border: 2px solid var(--green); color: #fff; } .sbar .sd.out.lost { background: var(--red); border: 2px solid var(--red); color: #fff; }
.sbar .sd.out.hold { background: var(--amber); border: 2px solid var(--amber); color: #fff; }
.sbar-lbl { font-size: 11.5px; margin-top: 3px; white-space: nowrap; } .sbar-lbl .nm { font-weight: 600; }

/* Stage board picker: the lead-page track with counts */
.sb-track { padding-top: 4px; }
.sb-track .track-step { text-decoration: none; color: var(--ink-2); font-size: 12px; min-width: 108px; }
.sb-track .track-step::before { top: 16px; height: 4px; background: var(--line); }
.sb-track .track-dot { width: 36px; height: 36px; font: 700 13px var(--f-display); color: var(--ink); border: 3px solid var(--sc); background: var(--surface); margin-bottom: 5px; }
.sb-track .track-step:hover .track-dot { background: var(--surface-2); transform: scale(1.06); }
.sb-track .track-step.cur { color: var(--ink); }
.sb-track .track-step.cur .track-dot { background: var(--sc); color: #fff; border-color: var(--sc); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sc) 22%, transparent); }
.sb-track .track-step:hover { text-decoration: none; }

/* Grouped list tables (reports, master data) */
.tbl tr.grp-row td { background: var(--surface-2); font: 600 12px var(--f-ui); color: var(--teal-600); padding: 7px 9px; border-top: 1px solid var(--line); }

/* Comments drawer */
dialog.drawer { margin: 0 0 0 auto; width: min(560px, 100vw); height: 100vh; max-height: 100vh; border-radius: 14px 0 0 14px; display: none; flex-direction: column; padding: 0; }
dialog.drawer[open] { display: flex; animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.drawer[open] { animation: none; } }
.drawer-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-b { flex: 1; overflow-y: auto; padding: 14px 16px; background: var(--surface-2); }
.cmt-compose { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 8px; margin-bottom: 14px; }
.cmt-compose:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); }
.cc-row { display: flex; gap: 9px; align-items: flex-start; }
.cc-text { flex: 1; border: 0; resize: vertical; font: inherit; color: var(--ink); min-height: 42px; padding: 4px 2px; background: transparent; }
.cc-text:focus { outline: none; }
.cc-chosen { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 0 39px; }
.cc-chosen:empty { display: none; }
.cc-bar { display: flex; gap: 4px; align-items: center; margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.reply-form .cc-chosen { margin-left: 0; }
details.pop { position: relative; }
details.pop > summary { list-style: none; }
details.pop > summary::-webkit-details-marker { display: none; }
.pop-menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 260px; max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; }
.pop-search { width: 100%; margin-bottom: 4px; }
.pop-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 12.5px; margin: 0; }
.pop-item:hover { background: var(--surface-2); }
.pop-item input { accent-color: var(--teal); }
.pop-item small { display: block; color: var(--ink-3); font-weight: 400; font-size: 11px; }
.chip-at, .chip-file, .chip-task { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; text-decoration: none; }
.chip-at { background: #EFEAF8; color: #5B4B8A; }
.chip-file { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); } .chip-file:hover { text-decoration: none; border-color: var(--teal); }
.chip-task { background: var(--amber-50); color: #8A6510; }
.chip-file svg, .chip-task svg { width: 12px; height: 12px; }
.cmt-thread { display: flex; flex-direction: column; gap: 12px; }
.cb { display: flex; gap: 9px; align-items: flex-start; }
.cb-main { flex: 1; min-width: 0; }
.cb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 8px 11px 9px; }
.cb.is-done .cb-text { color: var(--ink-3); }
.cb-h { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; } .cb-h span { color: var(--ink-3); font-size: 11.5px; }
.cb-text { margin-top: 3px; white-space: pre-line; color: var(--ink); }
.cb-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cb-task { display: flex; align-items: center; gap: 7px; width: 100%; margin-top: 8px; padding: 6px 8px; border: 1px dashed #EBD69B; background: var(--amber-50); border-radius: 8px; font: 500 12px var(--f-ui); color: #6B4E0A; cursor: pointer; text-align: left; }
.cb-task .tick { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #C9A64A; display: grid; place-items: center; color: transparent; background: #fff; }
.cb-task .tick svg { width: 11px; height: 11px; }
.cb-task.done { background: var(--green-50); border-color: #C5E6D5; color: #1F7550; } .cb-task.done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.cb-a { display: flex; gap: 14px; margin: 4px 0 0 4px; }
.linkbtn.muted-link { color: var(--ink-3); } .linkbtn.muted-link:hover { color: var(--red); }
.cb-replies { margin: 8px 0 0 38px; padding-left: 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cb.reply .cb-card { border-radius: 4px 10px 10px 10px; padding: 6px 10px; }
.reply-form { margin: 8px 0 0 38px; }
#comments .cmt-wrap { max-width: 860px; }

/* =================== Release 6 =================== */
/* Expo calendar: readable text; grey for planned / not attended */
#expo-cal .fc-event.expo-ev { --fc-event-text-color: #123139; background: #E3F1F2 !important; border: 1px solid #9FCFD3 !important; }
#expo-cal .fc-event.att-not-attended, #expo-cal .fc-event.att-planned { --fc-event-text-color: #4A5A60; background: #ECEFF0 !important; border: 1px solid #C9D1D4 !important; }
#expo-cal .fc-event.att-planned { border-style: dashed !important; }
#expo-cal .fc-event .fc-event-main, #expo-cal .fc-event .fc-event-title, #expo-cal .expo-pin, #expo-cal .fc-list-event-title a { color: var(--fc-event-text-color, #123139) !important; }
#expo-cal .fc-daygrid-event-dot { display: none; }
.legend .lg-ev { padding: 1px 7px 1px 3px; border-radius: 5px; border: 1px solid; }
.lg-ev.att { background: #E3F1F2; border-color: #9FCFD3; color: #123139; }
.lg-ev.not, .lg-ev.plan { background: #ECEFF0; border-color: #C9D1D4; color: #4A5A60; } .lg-ev.plan { border-style: dashed; }
/* Confirmations */
.conf-item { padding: 7px 9px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; margin-bottom: 6px; font-size: 12.5px; }
.conf-item.pending { border-left-color: var(--yellow); } .conf-item.accepted { border-left-color: var(--green); } .conf-item.declined { border-left-color: var(--red); }
/* Portal */
body.portal { background: var(--canvas); }
.p-top { background: var(--side); color: #DCE9EC; position: sticky; top: 0; z-index: 30; }
.p-top-in { max-width: 1240px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.p-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.p-brand:hover { text-decoration: none; } .p-brand b { display: block; font-family: var(--f-display); font-size: 15px; } .p-brand small { color: #8FAAB1; font-size: 12px; }
.p-nav { display: flex; gap: 4px; flex: 1; }
.p-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 7px; color: var(--side-ink); font-weight: 600; text-decoration: none; }
.p-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; } .p-nav a.on { background: rgba(120,205,212,.16); color: #fff; }
.p-nav .count { margin-left: 2px; font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--red); color: #fff; }
.p-user { display: flex; align-items: center; gap: 9px; } .p-user b { display: block; color: #fff; font-size: 13px; } .p-user small { color: #8FAAB1; font-size: 11.5px; }
.p-main { max-width: 1240px; margin: 0 auto; padding: 18px 20px 40px; }
.p-foot { max-width: 1240px; margin: 0 auto; padding: 14px 20px 30px; color: var(--ink-3); font-size: 12px; }
.panel.attention { border-color: #EBD69B; } .panel.attention .panel-h h2 { color: #8A6510; display: flex; gap: 6px; align-items: center; }
.req-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 10px; padding: 12px 14px; }
.req-card.accepted { border-left-color: var(--green); } .req-card.declined { border-left-color: var(--red); }
.req-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; } .req-form .input { flex: 1; min-width: 220px; }
.req-done { display: flex; gap: 7px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.p-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; padding: 12px; }
.p-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.p-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; font-size: 12.5px; }
.p-grid .k { color: var(--ink-3); font-size: 11.5px; } .p-grid .v { font-weight: 600; }
@media (max-width: 700px) { .p-nav { order: 3; width: 100%; } .p-grid { grid-template-columns: 1fr; } .p-cards { grid-template-columns: 1fr; } }


/* =================== Release 7 =================== */
/* Frozen table headers: tables scroll inside their own box, the header row stays visible */
.tbl-wrap { max-height: max(340px, calc(100vh - 230px)); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.tbl thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--line); border-bottom: 0; }
.tbl tfoot td { position: sticky; bottom: 0; z-index: 2; box-shadow: inset 0 1px 0 var(--line); }
.tbl tr.grp-row td { position: sticky; top: 30px; z-index: 2; }
.aside-tbl .tbl-wrap, aside .tbl-wrap { max-height: 360px; }
.tbl-wrap::-webkit-scrollbar { width: 9px; height: 9px; } .tbl-wrap::-webkit-scrollbar-thumb { background: #C6D3D7; border-radius: 5px; }
/* Marketing expenses */
.exp-tabs .n.money { font-weight: 700; }
.exp-cat { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.exp-cat svg { width: 13px; height: 13px; }
.cat-Lead { color: #2F5D9E; } .cat-Customer { color: #7C5BA6; } .cat-Expo { color: #0B6E79; } .cat-Travel { color: #B98A1E; } .cat-Other { color: #6B848B; }
.pill.st-submitted { background: var(--amber-50); color: #8A6510; border-color: #F0DFAF; } .pill.st-approved { background: var(--blue-50); color: var(--blue); border-color: #D1DDEF; }
.pill.st-rejected { background: var(--red-50); color: #9E2F2A; border-color: #F2CFCC; } .pill.st-reimbursed { background: var(--green-50); color: #1F7550; border-color: #C5E6D5; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }

/* =================== ERPNext connection page =================== */
body.setup-page { background: var(--canvas); }
.setup-wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 60px; }
.setup-wrap .panel-h h2 { display: flex; align-items: center; gap: 7px; }
.erp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); background: var(--teal-50); border: 1px solid var(--teal-100); padding: 4px 9px; border-radius: 14px; }
.erp-badge svg { width: 13px; height: 13px; color: var(--teal); }

.kmore { display: block; text-align: center; padding: 8px; font-size: 12.5px; font-weight: 600; border: 1px dashed var(--line); border-radius: 8px; margin-top: 4px; }

/* =================== Expense Hub =================== */
.hub-tabs { margin-top: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.hub-st { white-space: nowrap; }
.hub-st-draft { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.hub-st-submitted { background: var(--amber-50); color: #8A6510; border-color: #F0DFAF; }
.hub-st-approved { background: var(--green-50); color: #1F7550; border-color: #C5E6D5; }
.hub-st-rejected { background: var(--red-50); color: #9E2F2A; border-color: #F2CFCC; }
a.kpi { text-decoration: none; color: inherit; } a.kpi:hover { background: var(--surface-2); }
.hub-kpi-submitted .k-v { color: #8A6510; } .hub-kpi-approved .k-v { color: var(--green); } .hub-kpi-rejected .k-v { color: var(--red); }
.hub-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.hub-bar { height: 7px; background: var(--surface-2); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.hub-bar span { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.hub-narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.hub-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; border: 2px dashed var(--line); border-radius: 14px;
  background: var(--surface); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.hub-drop:hover, .hub-drop.dragover { border-color: var(--teal); background: var(--teal-50); }
.hub-drop .ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal); }
.hub-drop .ic svg { width: 28px; height: 28px; } .hub-drop .t { font: 600 16px var(--f-display); }
.hub-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.hub-picked { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.hub-picked img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.hub-picked-ic { width: 64px; height: 64px; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; color: var(--ink-3); }
.hub-busy { position: fixed; inset: 0; background: rgba(15, 30, 35, .45); display: grid; place-items: center; z-index: 80; }
.hub-busy[hidden] { display: none; }
.hub-busy-card { background: var(--surface); border-radius: 14px; padding: 24px 30px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.hub-spin { width: 34px; height: 34px; border: 3px solid var(--teal-100); border-top-color: var(--teal); border-radius: 50%; animation: hubspin .8s linear infinite; }
.hub-spin.sm { width: 13px; height: 13px; border-width: 2px; display: inline-block; vertical-align: -2px; }
@keyframes hubspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hub-spin { animation-duration: 2s; } }
.hub-layout { display: grid; grid-template-columns: 1fr; gap: 14px; padding-bottom: 76px; }
.hub-layout.has-preview { grid-template-columns: minmax(280px, 400px) 1fr; align-items: start; }
.hub-preview { position: sticky; top: 70px; }
.hub-receipt { background: var(--surface-2); display: grid; place-items: center; min-height: 240px; max-height: 72vh; overflow: auto; }
.hub-receipt img { max-width: 100%; display: block; } .hub-receipt iframe { width: 100%; height: 70vh; border: 0; }
.hub-hint { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #6B5A1E; background: #FFF4D6; padding: 1px 6px; border-radius: 9px; margin-left: 4px; }
.hub-hint svg { width: 11px; height: 11px; }
.hub-from-bill .input { background: #FFFCF2; border-color: #EBD69B; }
.items { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1.3fr 2fr .6fr .9fr .9fr 32px; gap: 8px; align-items: end; padding: 8px; border: 1px solid var(--line-soft); border-radius: 10px; }
.item-row .field { margin: 0; } .item-row label { font-size: 11px; }
.item-row.row-error { border-color: var(--red); background: var(--red-50); }
.item-row .row-remove[disabled] { opacity: .3; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.hub-totals .t-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; }
.hub-totals .t-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font: 700 18px var(--f-display); }
.hub-tax { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; margin-right: 12px; } .hub-tax .input { width: 80px; }
.hub-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding-bottom: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 3px 10px; font: 600 12px var(--f-ui); cursor: pointer; color: var(--ink-2); }
.chip-btn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.hub-actionbar { position: fixed; left: var(--sidebar-w, 236px); right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 22px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(15, 30, 35, .06); }
.hub-actionbar .num { font-size: 18px; }
.hub-pre { white-space: pre-wrap; font-size: 11.5px; max-height: 320px; overflow: auto; margin: 0; }
form.inline { display: inline; }
@media (max-width: 900px) {
  .hub-layout.has-preview { grid-template-columns: 1fr; } .hub-preview { position: static; }
  .item-row { grid-template-columns: 1fr 1fr; } .item-row .field:nth-child(2) { grid-column: 1 / -1; }
  .hub-actionbar { left: 0; padding: 10px 14px; }
}
.otp-input { font: 600 24px var(--f-display); letter-spacing: 8px; text-align: center; height: 52px; }

/* =================== Visiting card scanner =================== */
.cs-page .hidden { display: none !important; }
.cs-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 12px; margin-right: 4px; }
.cs-scan { border: 1px solid var(--teal-100); background: var(--teal-50); border-radius: 12px; padding: 12px 14px; }
.cs-scan-title { font: 700 12px var(--f-ui); letter-spacing: .08em; color: var(--teal-600); }
.cs-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.cs-btn { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; color: var(--ink); }
.cs-btn:hover { border-color: var(--teal); } .cs-btn svg { width: 26px; height: 26px; color: var(--teal); flex: none; }
.cs-btn strong { display: block; font-size: 13.5px; } .cs-btn small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.cs-btn:disabled { opacity: .55; cursor: wait; }
.cs-preview { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.cs-preview img { width: 150px; max-height: 100px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.cs-progress { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--teal-600); }
.cs-result { margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.scan-result-success { background: var(--green-50); color: #1F7550; } .scan-result-warning { background: var(--amber-50); color: #8A6510; } .scan-result-error { background: var(--red-50); color: #9E2F2A; }
.cs-page .input.invalid { border-color: var(--red); background: var(--red-50); }
.cs-qr { position: fixed; inset: 0; z-index: 90; background: rgba(8, 20, 24, .7); display: grid; place-items: center; padding: 14px; }
.cs-qr-panel { background: var(--surface); border-radius: 14px; padding: 14px; width: min(460px, 100%); }
.cs-qr-video { position: relative; margin-top: 10px; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.cs-qr-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-qr-target { position: absolute; inset: 14%; }
.cs-qr-target .c { position: absolute; width: 28px; height: 28px; border: 4px solid #6FE0C0; }
.cs-qr-target .tl { left: 0; top: 0; border-right: 0; border-bottom: 0; } .cs-qr-target .tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.cs-qr-target .bl { left: 0; bottom: 0; border-right: 0; border-top: 0; } .cs-qr-target .br { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.cs-qr-target .line { position: absolute; left: 6%; right: 6%; height: 2px; background: #6FE0C0; top: 50%; animation: csline 1.8s ease-in-out infinite; }
@keyframes csline { 0%, 100% { top: 8%; } 50% { top: 92%; } }
@media (prefers-reduced-motion: reduce) { .cs-qr-target .line { animation: none; } }
.cs-qr-status { margin-top: 10px; text-align: center; font-size: 13px; color: var(--ink-2); }
.cs-qr-status.success { color: var(--green); } .cs-qr-status.error { color: var(--red); }
@media (max-width: 700px) { .cs-buttons { grid-template-columns: 1fr; } }

/* =====================================================================================
   RESPONSIVE (applies to every tab). Tablet <= 1024px, phone <= 760px, small phone <= 420px
   ===================================================================================== */
/* nothing may push a page wider than the screen */
html, body { max-width: 100%; overflow-x: hidden; }
.main, .content, .panel, .panel-b, .stack, .grid > *, .form-grid > *, .field, .kpis, .page-head > div { min-width: 0; }
.input, select.input, textarea.input { max-width: 100%; }
img, svg, canvas, video, iframe { max-width: 100%; }

@media (max-width: 1024px) {
  .g2, .g3, .g4, .g-main-side, .g-side-main, .g-7-5 { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px 12px; }
  .form-grid > * { grid-column: span 2 !important; }
  .form-grid > .cf, .form-grid > .c2, .form-grid > .c3, .form-grid > .c4, .form-grid > .c5, .form-grid > .c6 { grid-column: span 1 !important; }
  .hub-layout.has-preview { grid-template-columns: minmax(0, 1fr); }
  .hub-preview { position: static; }
}

@media (max-width: 900px) {
  .topbar { gap: 8px; padding: 0 10px; height: 54px; }
  .topbar .search { max-width: none; flex: 1 1 auto; min-width: 0; }
  .topbar .search input { padding-right: 8px; font-size: 14px; }
  .topbar .btn .lbl, .topbar .btn span:not(.count):not(.dot) { display: none; }
  .content { padding: 14px 12px 70px; }
  .page-head { gap: 10px; margin-bottom: 14px; align-items: flex-start; }
  .page-head h1 { font-size: 22px; line-height: 1.2; }
  .page-head .sub { font-size: 13px; }
  .page-head .actions { width: 100%; }
  .page-head .actions > .btn, .page-head .actions > form, .page-head .actions > .dd { flex: 1 1 auto; }
  .page-head .actions > .btn, .page-head .actions > form .btn, .page-head .actions > .dd > .btn { justify-content: center; width: 100%; }
  .panel-h { padding: 12px 12px 10px; }
  .panel-b { padding: 12px; }
  .filterbar { padding: 10px; gap: 6px; }
  .filterbar > .input, .filterbar > select, .filterbar > .search-in, .filterbar > input { flex: 1 1 calc(50% - 6px); min-width: 0 !important; max-width: none !important; width: auto; }
  .filterbar > .search-in, .filterbar > input[type=search] { flex-basis: 100%; }
  .filterbar > .btn, .filterbar > .dd, .filterbar > button { flex: 0 0 auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .kpi { padding: 12px; } .kpi-v, .k-v { font-size: 22px; }
  .tabs { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a, .tabs button { padding: 10px 11px 9px; font-size: 13px; }
  .tbl-wrap { max-height: 70vh; -webkit-overflow-scrolling: touch; }
  .tbl th, .tbl td { padding: 8px 9px; font-size: 12.5px; }
  .listmeta { justify-content: center; text-align: center; }
  .crumbs { flex-wrap: wrap; row-gap: 2px; }
  .dl { grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) !important; }
  .dl dd { word-break: break-word; }
  .seg { display: flex; width: 100%; } .seg label { flex: 1 1 auto; } .seg span { justify-content: center; width: 100%; }
  /* dialogs and drawers */
  dialog { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; max-height: calc(100vh - 24px); margin: auto; }
  dialog .dlg-b { max-height: calc(100vh - 160px); overflow-y: auto; }
  dialog.drawer { width: 100vw !important; max-width: 100vw !important; border-radius: 0; }
  .dlg-f { flex-wrap: wrap; } .dlg-f .btn { flex: 1 1 auto; justify-content: center; }
  /* forms */
  .form-sec { padding: 12px; } .form-sec-h { gap: 10px; }
  .form-foot { position: sticky; bottom: 0; z-index: 5; background: var(--surface); flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .form-foot .btn { flex: 1 1 auto; justify-content: center; }
  /* dashboard pieces */
  .flow { grid-auto-columns: minmax(86px, 1fr); max-width: 100%; }
  .chart-box { height: 220px !important; } .chart-box.short { height: 180px !important; }
  /* lead page */
  .track { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lead-head, .detail-head { flex-wrap: wrap; }
  /* calendar */
  .fc .fc-toolbar { flex-wrap: wrap; gap: 6px; } .fc .fc-toolbar-title { font-size: 16px !important; }
  .fc .fc-toolbar-chunk { display: flex; flex-wrap: wrap; gap: 4px; }
  .fc .fc-button { padding: 4px 8px; font-size: 12px; }
  /* kanban / gantt scroll sideways inside their box */
  .kanban { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .kanban .col { min-width: 260px; scroll-snap-align: start; }
  .gantt { grid-template-columns: 110px 1fr !important; overflow-x: auto; }
  /* Expense Hub */
  .hub-actionbar { left: 0 !important; padding: 8px 12px; flex-wrap: wrap; }
  .hub-actionbar > .row { flex: 1 1 auto; justify-content: flex-end; }
  .hub-totals .t-line { font-size: 13.5px; } .hub-tax .input { width: 64px; }
  .hub-chips { justify-content: flex-start; }
  .hub-receipt { max-height: 46vh; } .hub-receipt iframe { height: 46vh; }
  /* toasts */
  .toasts { left: 8px; right: 8px; } .toast { max-width: none; }
}

@media (max-width: 760px) {
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid > * { grid-column: 1 / -1 !important; }
  .item-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 32px !important; }
  .item-row .field:nth-child(1), .item-row .field:nth-child(2) { grid-column: 1 / -1; }
  .item-row .row-remove { grid-column: 4; grid-row: 1; align-self: end; }
  .item-row .field:nth-child(1) { grid-column: 1 / 4; }
  .user-chip .nm, .user-chip .rl, .user-chip svg:last-child { display: none; }
  .hub-picks { grid-template-columns: 1fr 1fr; }
  .p-top-in { padding: 8px 12px; gap: 10px; } .p-user b, .p-user small { display: none; }
  .p-main { padding: 14px 12px 40px; }
  .login-art { display: none; }
  .login-form { padding: 24px 16px; }
  .setup-wrap { padding: 18px 12px 40px; }
  .empty { padding: 26px 12px; }
}

@media (max-width: 420px) {
  .kpis { grid-template-columns: minmax(0, 1fr) 1fr !important; }
  .kpi-v, .k-v { font-size: 20px; }
  .page-head h1 { font-size: 20px; }
  .topbar .btn.primary { padding: 0 10px; }
  .filterbar > .input, .filterbar > select, .filterbar > input { flex-basis: 100%; }
  .tbl th, .tbl td { padding: 7px 8px; }
}
@media (max-width: 900px) {
  .gantt { grid-template-columns: 150px minmax(520px, 1fr) !important; overflow: visible; }
  .gantt-scroll, .panel:has(> .gantt), .panel-b:has(> .gantt) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .g-lbl a, .g-lbl .cell-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .g-lbl { padding: 3px 8px; }
}
.gantt-scroll { overflow-x: auto; max-width: 100%; }

.pill.red-hot { background: #8E1B16; color: #fff; border-color: #8E1B16; }

/* Main menu: Lead list with its views */
.nav-main { background: rgba(255,255,255,.04); border-radius: 10px; padding: 4px 4px 6px; margin: 4px 6px 8px; }
.nav-row { display: flex; align-items: center; }
.nav-row > a { flex: 1; min-width: 0; }
.nav-tog { background: none; border: 0; color: var(--side-ink); width: 30px; height: 30px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; flex: none; }
.nav-tog:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-tog svg { width: 15px; height: 15px; transition: transform .15s; }
.nav-sub.open .nav-tog svg { transform: rotate(180deg); }
.nav-kids { display: none; margin-left: 14px; border-left: 1px solid rgba(255,255,255,.12); padding-left: 4px; }
.nav-sub.open .nav-kids { display: block; }
.nav-kids a { font-size: 13px; padding-top: 6px; padding-bottom: 6px; }

/* Data period chip */
.dw-chip { position: relative; display: inline-block; margin: 0 0 10px; z-index: 20; }
.dw-chip > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.dw-chip > summary::-webkit-details-marker { display: none; }
.dw-chip > summary svg { width: 13px; height: 13px; }
.dw-chip.dw-override > summary { background: var(--amber-50); border-color: #F0DFAF; color: #8A6510; }
.dw-menu { position: absolute; top: calc(100% + 4px); left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-pop); padding: 6px; min-width: 250px; display: flex; flex-direction: column; }
.dw-menu button { text-align: left; background: none; border: 0; padding: 7px 9px; border-radius: 6px; font: 500 13px var(--f-ui); color: var(--ink); cursor: pointer; }
.dw-menu button:hover { background: var(--surface-2); } .dw-menu button.on { background: var(--teal-50); color: var(--teal-600); font-weight: 600; }
.dw-menu .dw-reset { border-top: 1px solid var(--line-soft); margin-top: 4px; color: var(--teal-600); }

/* Follow-up cadence on Today's hot leads */
.cad-cell { min-width: 220px; }
.cad-dots { display: flex; gap: 4px; margin: 5px 0 3px; }
.cad-dots i { width: 10px; height: 10px; border-radius: 50%; background: #B7C3C7; display: inline-block; }
.cad-dots .cd-green { background: var(--green); } .cad-dots .cd-yellow { background: #D99A00; } .cad-dots .cd-red { background: var(--red); } .cad-dots .cd-blue { background: #2F6FD6; }
.cad-k.on { outline: 2px solid var(--teal); outline-offset: -2px; }
.cad-good .k-v { color: var(--green); } .cad-slipping .k-v { color: #B98A1E; } .cad-poor .k-v, .cad-none .k-v { color: var(--red); }
.input.from-doc, select.input.from-doc, textarea.input.from-doc { background: #FFFCF2; border-color: #EBD69B; }
/* Table tools: count + clear sort, top right of each list */
.tbl-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 6px 12px; font-size: 12px; color: var(--ink-3);
  border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.tbl-tools .tt-count { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tbl-tools .btn svg { width: 12px; height: 12px; }
.sel-all { font-weight: 500; font-size: 11px; margin-top: 2px; } .sel-all .linkbtn { font-size: 11px; }
/* Type-to-filter selects */
.ta { position: relative; min-width: 0; }
.ta .ta-native { display: none !important; }
.ta > .input { width: 100%; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.ta-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 3px); max-height: 280px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-pop); min-width: 220px; }
.ta-list li { padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1.3; }
.ta-list li.act, .ta-list li:hover { background: var(--teal-50); color: var(--teal-600); }
.ta-list li[data-new] { font-weight: 600; color: var(--teal-600); border-top: 1px solid var(--line-soft); }
.ta-list .ta-none { color: var(--ink-3); cursor: default; }
.ta-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.ta-chips:empty { display: none; }
.ta-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--teal-50); color: var(--teal-600); border: 1px solid var(--teal-100);
  border-radius: 12px; padding: 2px 4px 2px 9px; font-size: 12px; font-weight: 600; }
.ta-chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; padding: 0 3px; }
.filterbar .ta { flex: 0 1 200px; } .filterbar .ta.ta-sm { flex-basis: 170px; }

/* =================== Release 14: polish, assistant, recorder, quote =================== */
:root { --radius: 12px; --shadow-card: 0 1px 2px rgba(16, 40, 46, .05), 0 4px 14px rgba(16, 40, 46, .04); }
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--canvas) 86%, transparent); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line-soft); }
.panel, .kpis, .kpi-card { border-radius: var(--radius); box-shadow: var(--shadow-card); }
.panel-h h2 { letter-spacing: -.01em; }
.page-head h1 { letter-spacing: -.02em; }
.btn:focus-visible, .input:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.kpi { transition: background .15s; } a.kpi:hover { background: var(--teal-50); }
.tbl tbody tr { transition: background .12s; }
.content { max-width: 1680px; }
.tab-action { margin-left: auto; color: var(--teal-600) !important; font-weight: 700; }
/* quote next to the user */
.quote { display: flex; align-items: center; gap: 7px; max-width: 420px; min-width: 0; font-size: 12px; color: var(--ink-2); padding: 5px 10px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); }
.quote svg { width: 14px; height: 14px; color: #B98A1E; flex: none; }
.quote span { min-width: 0; display: flex; gap: 6px; align-items: baseline; }
.quote q { font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.quote b { white-space: nowrap; font-weight: 600; color: var(--ink-3); } .quote b::before { content: "- "; }
@media (max-width: 1200px) { .quote { max-width: 260px; } }
@media (max-width: 900px) { .quote { display: none; } }
/* recording badge */
.rec-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #F2CFCC; background: var(--red-50); color: #9E2F2A; border-radius: 14px;
  padding: 4px 10px; font: 600 12px var(--f-ui); cursor: pointer; }
.rec-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .25; } }
/* recorder window */
body.rec-page { background: var(--canvas); } .rec-wrap { max-width: 520px; margin: 0 auto; padding: 16px; }
.rec-state { font: 600 12px var(--f-ui); padding: 3px 10px; border-radius: 12px; background: var(--surface-2); }
body.recording .rec-state { background: var(--red-50); color: #9E2F2A; }
.rec-meta { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.rec-controls { display: grid; gap: 8px; justify-items: center; padding: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); margin-bottom: 12px; }
.rec-time { font: 700 36px var(--f-display); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
body.recording .rec-time { color: var(--red); }
.rec-level { width: 100%; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; } .rec-level span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .1s; }
.rec-btn { width: 100%; height: 44px; justify-content: center; font-size: 15px; }
.rec-live .panel-b { max-height: 38vh; overflow-y: auto; line-height: 1.55; font-size: 13.5px; } .rec-live p { margin: 0 0 8px; }
.rec-summary { white-space: pre-wrap; font: 13.5px/1.55 var(--f-ui); margin: 0; background: var(--surface-2); padding: 12px; border-radius: 9px; }
/* assistant */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #0B6E79, #2F6FD6); box-shadow: 0 8px 24px rgba(11, 110, 121, .35); display: grid; place-items: center; transition: transform .15s; }
.ai-fab:hover { transform: scale(1.06); } .ai-fab svg { width: 24px; height: 24px; } .ai-fab.on { transform: rotate(-12deg); }
.ai-panel { position: fixed; right: 22px; bottom: 88px; z-index: 70; width: min(420px, calc(100vw - 24px)); height: min(620px, calc(100vh - 120px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(16, 40, 46, .22); display: flex; flex-direction: column; overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(135deg, var(--teal-50), #EEF3FD); }
.ai-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.ai-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; line-height: 1.5; }
.ai-msg.user { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.ai-msg p { margin: 0 0 6px; } .ai-msg ul { margin: 4px 0 6px; padding-left: 18px; } .ai-msg a { font-weight: 600; }
.ai-tbl { overflow-x: auto; margin: 6px 0; } .ai-tbl table { border-collapse: collapse; font-size: 12px; width: 100%; }
.ai-tbl th, .ai-tbl td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; white-space: nowrap; } .ai-tbl th { color: var(--ink-3); }
.ai-note { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.ai-hello { margin: auto; text-align: center; color: var(--ink-2); } .ai-hello p { margin: 4px 0 0; }
.ai-typing { display: flex; gap: 4px; } .ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: recblink 1s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; } .ai-typing span:nth-child(3) { animation-delay: .4s; }
.ai-chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px; scrollbar-width: none; }
.ai-chips button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 4px 10px; font: 600 12px var(--f-ui); color: var(--teal-600); cursor: pointer; }
.ai-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-soft); }
.ai-form textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: 13.5px var(--f-ui); max-height: 120px; }
.ai-form .btn { width: 42px; justify-content: center; padding: 0; }
@media (max-width: 760px) { .ai-fab { right: 14px; bottom: 74px; } .ai-panel { right: 12px; bottom: 136px; } }
@media (prefers-reduced-motion: reduce) { .rec-pill i, .ai-typing span { animation: none; } }

/* =================== Release 15 =================== */
/* quote: two tidy lines, same height as the other top-bar controls */
.quote { height: 38px; padding: 0 12px; gap: 9px; border-radius: 10px; max-width: 380px; }
.quote span { display: flex; flex-direction: column; gap: 0; line-height: 1.2; align-items: flex-start; }
.quote q { display: block; max-width: 330px; font-size: 12px; color: var(--ink-2); quotes: "\201C" "\201D"; }
.quote b { font-size: 11px; font-weight: 600; color: var(--ink-3); } .quote b::before { content: "\2014\00a0"; }
/* recorder inside the diary entry */
.mrec { margin: 0 0 14px; padding: 12px 14px; border: 1px dashed var(--teal-100); border-radius: 12px; background: var(--teal-50); }
.mrec.on { border-style: solid; border-color: #F2CFCC; background: var(--red-50); }
.mrec-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mrec-time { font: 700 20px var(--f-display); font-variant-numeric: tabular-nums; min-width: 60px; } .mrec.on .mrec-time { color: var(--red); }
.mrec-level { width: 90px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; } .mrec-level span { display: block; height: 100%; width: 0; background: var(--teal); }
.mrec-state { font-size: 12.5px; } .mrec-lang { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); } .mrec-lang select { width: auto; }
.mrec-msg { margin-top: 10px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--surface); } .mrec-msg.bad { color: #9E2F2A; }
.mrec-live { margin-top: 10px; background: var(--surface); border-radius: 9px; padding: 8px 10px; }
.mrec-live-h { font: 600 12px var(--f-ui); color: var(--ink-3); margin-bottom: 4px; } .mrec-text { max-height: 180px; overflow-y: auto; font-size: 13px; line-height: 1.5; } .mrec-text p { margin: 0 0 6px; }
.mrec-help { font-size: 12px; margin: 8px 0 0; } .mrec-saved { margin-top: 8px; font-size: 13px; display: flex; gap: 6px; align-items: center; }
/* assistant: voice + lead card */
.ai-mic { width: 42px; justify-content: center; padding: 0; } .ai-mic.on { background: var(--red); color: #fff; border-color: var(--red); animation: recblink 1.2s infinite; }
.ai-mic.busy { opacity: .6; pointer-events: none; }
.ai-card { align-self: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.ai-card.ok { flex-direction: row; align-items: center; gap: 8px; background: var(--green-50, #EAF7F0); border-color: #BFE5CF; }
.ai-card-h { font-weight: 700; display: flex; gap: 6px; align-items: center; color: var(--teal-600); }
.ai-f { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; } .ai-f > span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.ai-f.has-err .input { border-color: var(--red); } .ai-f .req { color: var(--red); }
.ai-row { display: flex; gap: 8px; } .ai-row > .ai-f[hidden] { display: none; }
.ai-err { color: #9E2F2A; font-size: 12.5px; background: var(--red-50); padding: 6px 8px; border-radius: 7px; }
.ai-card-f { display: flex; gap: 8px; align-items: center; }
@media (max-width: 480px) { .ai-row { flex-direction: column; } }

/* =================== Release 16 =================== */
/* loading screen */
.busy-ov { position: fixed; inset: 0; z-index: 200; background: rgba(14, 41, 48, .28); backdrop-filter: blur(2px); display: grid; place-items: center; }
.busy-ov[hidden], .busy-pill[hidden] { display: none; }
.busy-card { background: var(--surface); border-radius: 14px; padding: 18px 24px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-pop); font-size: 14.5px; color: var(--ink); }
.busy-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--teal-100); border-top-color: var(--teal); animation: busyspin .7s linear infinite; flex: none; }
.busy-spin.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes busyspin { to { transform: rotate(360deg); } }
.busy-pill { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 190; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 6px 12px; display: flex; gap: 8px; align-items: center; font: 600 12.5px var(--f-ui); box-shadow: var(--shadow-pop); }
/* sidebar collapses to icons on a computer */
.menu-btn { display: inline-grid; }
@media (min-width: 901px) {
  html.nav-collapsed { --sidebar-w: 72px; }
  html.nav-collapsed .sidebar .brand > span, html.nav-collapsed .sidebar .nav-title, html.nav-collapsed .sidebar .side-foot,
  html.nav-collapsed .sidebar .count, html.nav-collapsed .sidebar .nav-tog { display: none; }
  html.nav-collapsed .sidebar .brand { justify-content: center; padding: 18px 0; }
  html.nav-collapsed .sidebar .nav { padding: 6px 8px 20px; }
  html.nav-collapsed .sidebar .nav a { font-size: 0; justify-content: center; padding: 9px 0; gap: 0; }
  html.nav-collapsed .sidebar .nav a svg { width: 19px; height: 19px; }
  html.nav-collapsed .sidebar .nav-main { margin: 4px 4px 8px; padding: 4px 2px; }
  html.nav-collapsed .sidebar .nav-kids { margin-left: 0; padding-left: 0; border-left: 0; display: block; }
  html.nav-collapsed .sidebar .nav-group { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.07); padding-top: 8px; }
  .shell, .sidebar { transition: grid-template-columns .18s ease, width .18s ease; }
}
/* quote on phones: a slim line under the top bar */
.quote-m { display: none; }
@media (max-width: 900px) {
  .quote-m { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface);
    border: 1px solid var(--line-soft); font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
  .quote-m svg { width: 14px; height: 14px; color: #B98A1E; flex: none; margin-top: 2px; }
  .quote-m q { font-style: italic; } .quote-m b { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
}

/* theme colours */
html[data-accent="blue"]   { --teal: #1F5FBF; --teal-600: #184C99; --teal-50: #E6EEFA; --teal-100: #CCDDF5; --side: #14284A; --side-2: #0F1F3A; }
html[data-accent="indigo"] { --teal: #4F46E5; --teal-600: #4338CA; --teal-50: #EEF0FE; --teal-100: #DADDFC; --side: #1E1B4B; --side-2: #17143A; }
html[data-accent="green"]  { --teal: #15803D; --teal-600: #116A33; --teal-50: #E5F4EA; --teal-100: #C9E9D3; --side: #12301F; --side-2: #0D2617; }
html[data-accent="purple"] { --teal: #7E3AF2; --teal-600: #6A2BD6; --teal-50: #F1EAFE; --teal-100: #E2D5FD; --side: #2A1650; --side-2: #20103E; }
html[data-accent="maroon"] { --teal: #9F1239; --teal-600: #86102F; --teal-50: #FBE8EE; --teal-100: #F5CFDB; --side: #3B0D1C; --side-2: #2E0915; }
html[data-accent="orange"] { --teal: #C2410C; --teal-600: #A3360A; --teal-50: #FDEDE4; --teal-100: #FAD8C6; --side: #3A1A0B; --side-2: #2C1308; }
html[data-accent="slate"]  { --teal: #334155; --teal-600: #1E293B; --teal-50: #EEF1F5; --teal-100: #DCE2EA; --side: #0F172A; --side-2: #0B1120; }
/* dark mode */
html[data-mode="dark"] { color-scheme: dark; --canvas: #0E171A; --surface: #152126; --surface-2: #1A2930; --line: #2A3C43; --line-soft: #213239;
  --ink: #E3EDEF; --ink-2: #B5C7CB; --ink-3: #8AA2A8; --teal-50: color-mix(in srgb, var(--teal) 18%, #152126); --teal-100: color-mix(in srgb, var(--teal) 35%, #152126);
  --red-50: #3A1F1F; --amber-50: #3A321C; --green-50: #18352A; --blue-50: #1B2A40; --cold-50: #1C2B3A; --side: #0A1215; --side-2: #070D10;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4); --shadow-pop: 0 12px 32px -8px rgba(0,0,0,.6); }
html[data-mode="dark"] body { background: var(--canvas); color: var(--ink); }
html[data-mode="dark"] .input, html[data-mode="dark"] select, html[data-mode="dark"] textarea { background-color: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-mode="dark"] .tbl thead th, html[data-mode="dark"] .tbl-tools { background: var(--surface-2); }
html[data-mode="dark"] .tbl tbody tr:hover { background: #1D2E34; }
html[data-mode="dark"] .btn:not(.primary):not(.danger) { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-mode="dark"] .ai-h { background: linear-gradient(135deg, #17323A, #1A2640); }
html[data-mode="dark"] a { color: color-mix(in srgb, var(--teal) 55%, #ffffff); }
html[data-mode="dark"] .nav a, html[data-mode="dark"] .btn.primary, html[data-mode="dark"] .pill, html[data-mode="dark"] .swatch { color: inherit; }
html[data-mode="dark"] .btn.primary { color: #fff; }
/* theme & language menu */
.prefs { min-width: 260px; padding: 10px 12px 12px; }
.prefs-h { font: 600 11.5px var(--f-ui); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 6px; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.swatch.on { box-shadow: 0 0 0 2px var(--c); }
.seg-mini { display: flex; gap: 4px; } .seg-mini button { flex: 1; display: flex; gap: 5px; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 6px 4px; font: 600 12px var(--f-ui); color: var(--ink-2); cursor: pointer; } .seg-mini button svg { width: 14px; height: 14px; }
.seg-mini button.on { border-color: var(--teal); color: var(--teal-600); background: var(--teal-50); }
.prefs .lang-reset { width: 100%; margin-top: 8px; justify-content: center; font-size: 12px; }
/* hide Google's translate banner */
.goog-te-banner-frame, .skiptranslate > iframe, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; } .goog-text-highlight { background: none !important; box-shadow: none !important; }
/* chat voice bar */
.ai-voice { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--red-50); color: #9E2F2A; font-size: 12.5px; font-weight: 600; }
.ai-voice[hidden] { display: none; }
.ai-voice[data-mode="busy"] { background: var(--teal-50); color: var(--teal-600); } .ai-voice[data-mode="err"] { background: var(--amber-50); color: #8A6510; }
.ai-voice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: recblink 1s infinite; flex: none; }
.ai-voice[data-mode="busy"] .ai-voice-dot { background: var(--teal); animation: busyspin .8s linear infinite; border-radius: 2px; }
.ai-voice[data-mode="err"] .ai-voice-dot { display: none; }

/* From - To date filters */
.dranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.drange { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px 3px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.drange.on { border-color: var(--teal); background: var(--teal-50); }
.drange > span { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--f-ui); color: var(--ink-2); white-space: nowrap; } .drange > span svg { width: 13px; height: 13px; }
.drange em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.drange .input { width: 132px; height: 28px; padding: 2px 6px; }
.dr-x { font-size: 16px; line-height: 1; padding: 0 4px; color: var(--ink-3); text-decoration: none; }
@media (max-width: 760px) { .dranges { width: 100%; } .drange { flex: 1 1 100%; flex-wrap: wrap; } .drange .input { flex: 1; width: auto; min-width: 0; } }
/* =================== sign-in pages =================== */
body.auth-page { margin: 0; background: var(--canvas); }
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; color: #E6F2F4; padding: 44px 56px 120px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at 0% 0%, color-mix(in srgb, var(--teal) 70%, #000) 0%, transparent 60%),
              linear-gradient(150deg, var(--side) 0%, color-mix(in srgb, var(--teal) 55%, var(--side-2)) 55%, var(--side-2) 100%); }
.auth-hero-grid { position: absolute; inset: 0; opacity: .08; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, #000 0%, transparent 75%); }
.auth-brand { position: relative; display: flex; align-items: center; gap: 14px; }
.auth-app { font: 650 21px var(--f-display); color: #fff; letter-spacing: -.01em; } .auth-co { font-size: 13px; color: #9FC0C7; }
.auth-copy { position: relative; max-width: 560px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px var(--f-ui); color: #BFE3E8; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14); padding: 5px 11px; border-radius: 20px; } .auth-kicker svg { width: 14px; height: 14px; }
.auth-copy h1 { font: 650 clamp(30px, 3.2vw, 44px)/1.08 var(--f-display); letter-spacing: -.025em; color: #fff; margin: 18px 0 14px; }
.auth-copy > p { font-size: 15.5px; line-height: 1.6; color: #B9D3D8; margin: 0 0 26px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 13px; align-items: flex-start; font-size: 14px; color: #B9D3D8; line-height: 1.45; }
.auth-points li > span { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.auth-points li > span svg { width: 17px; height: 17px; color: #fff; } .auth-points b { display: block; color: #fff; font-weight: 600; font-size: 14.5px; }
.auth-foot { position: relative; z-index: 1; font-size: 12px; color: #8FB1B8; }
.auth-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 160px; }
.auth-waves path { transform-origin: center; } .auth-waves .w1 { fill: rgba(255,255,255,.05); animation: wave 14s ease-in-out infinite alternate; }
.auth-waves .w2 { fill: rgba(255,255,255,.07); animation: wave 10s ease-in-out infinite alternate-reverse; } .auth-waves .w3 { fill: rgba(255,255,255,.09); animation: wave 18s ease-in-out infinite alternate; }
@keyframes wave { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 28px; gap: 18px; }
.auth-card { width: 100%; max-width: 410px; background: var(--surface); border-radius: 18px; padding: 32px 30px; border: 1px solid var(--line-soft);
  box-shadow: 0 1px 2px rgba(16,40,46,.05), 0 24px 48px -24px rgba(16,40,46,.28); display: flex; flex-direction: column; gap: 14px; }
.auth-card h2, .auth-card h1 { font: 650 27px var(--f-display); letter-spacing: -.02em; margin: 0; color: var(--ink); }
.auth-sub { margin: -6px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.auth-card .erp-badge { align-self: flex-start; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.auth-field > span { display: block; font: 600 13px var(--f-ui); color: var(--ink-2); margin-bottom: 6px; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > svg { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.auth-input input { width: 100%; height: 46px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 44px 0 40px;
  font: 500 15px var(--f-ui); color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.auth-input input:focus { outline: none; border-color: var(--teal); background: var(--surface); box-shadow: 0 0 0 4px var(--teal-50); }
.auth-eye { position: absolute; right: 6px; width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.auth-eye:hover { background: var(--surface); color: var(--ink); } .auth-eye svg { width: 17px; height: 17px; }
.auth-btn { height: 48px; border-radius: 11px; justify-content: center; font-size: 15.5px; gap: 8px; margin-top: 4px;
  background: linear-gradient(135deg, var(--teal), color-mix(in srgb, var(--teal) 70%, #1F5FBF)); border: 0; box-shadow: 0 8px 20px -10px var(--teal); }
.auth-btn svg { width: 18px; height: 18px; transition: transform .15s; } .auth-btn:hover svg { transform: translateX(3px); }
.auth-btn.loading svg { display: none; } .auth-btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: busyspin .7s linear infinite; }
.auth-note { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 12.5px; color: var(--ink-3); } .auth-note svg { width: 15px; height: 15px; }
.auth-demo { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.auth-demo summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font: 600 13px var(--f-ui); color: var(--teal-600); }
.auth-demo summary::-webkit-details-marker { display: none; } .auth-demo summary svg { width: 15px; height: 15px; } .auth-demo summary svg:last-child { margin-left: auto; transition: transform .15s; }
.auth-demo[open] summary svg:last-child { transform: rotate(180deg); } .auth-demo .lbl { margin: 12px 0 6px; } .auth-demo .demo-list { max-height: 260px; overflow-y: auto; }
.auth-help { font-size: 12.5px; color: var(--ink-3); }
.auth-mobile-brand { display: none; }
.auth-form.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.auth-card .otp-input, .auth-card input[name="otp"] { height: 52px; font-size: 22px; letter-spacing: .4em; text-align: center; }
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-main { justify-content: flex-start; padding: 0 16px 28px; background: linear-gradient(180deg, var(--side) 0, var(--side) 150px, var(--canvas) 150px); }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; color: #fff; font: 650 18px var(--f-display); align-self: stretch; padding: 22px 6px 26px; }
  .auth-card .auth-mobile-brand { display: none; }
  .auth-card { padding: 24px 20px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { .auth-waves path { animation: none; } }

/* =================== Release 17 =================== */
/* theme swatches: not affected by the menu's button style */
.prefs .swatches .swatch { width: 26px !important; height: 26px; padding: 0 !important; border-radius: 50% !important; background: var(--c) !important;
  border: 2px solid var(--surface) !important; box-shadow: 0 0 0 1px var(--line); display: block; flex: none; }
.prefs .swatches .swatch:hover { transform: scale(1.1); background: var(--c) !important; }
.prefs .swatches .swatch.on { box-shadow: 0 0 0 2px var(--c), 0 0 0 4px var(--surface); }
.prefs .seg-mini button { width: auto; }
/* content uses the full width (also when the sidebar is collapsed) */
.content { max-width: none; }
/* lead source chips: the radio stays inside its chip, so tapping it never scrolls the page away */
.seg label { position: relative; } .seg label > input[type=radio] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin-top: -2px; }
.auth-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.auth-check input { width: 17px; height: 17px; accent-color: var(--teal); }
.sync-row button span { display: flex; flex-direction: column; } .sync-row small { font-size: 11px; color: var(--ink-3); }
.mrec-caption { margin-top: 6px; padding: 6px 8px; border-radius: 7px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); min-height: 1.4em; }
.mrec-caption:empty { display: none; } .mrec-caption i { color: var(--ink-3); } .mrec-work { color: var(--teal-600); font-weight: 600; }
/* =================== Email =================== */
.mail { display: grid; grid-template-columns: 220px minmax(300px, 420px) minmax(0, 1fr); gap: 14px; height: calc(100vh - 150px); min-height: 520px; }
.mail-side { display: flex; flex-direction: column; gap: 10px; }
.mail-compose-btn { height: 46px; border-radius: 14px; justify-content: center; font-size: 15px; box-shadow: 0 6px 18px -8px var(--teal); }
.mail-folders a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 0 18px 18px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.mail-folders a:hover { background: var(--surface-2); } .mail-folders a.on { background: var(--teal-50); color: var(--teal-600); font-weight: 700; }
.mail-folders a span { flex: 1; } .mail-folders a b { font-size: 12px; } .mail-folders svg { width: 17px; height: 17px; }
.mail-sig-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink-2); padding: 8px 12px; cursor: pointer; font: 500 13.5px var(--f-ui); }
.mail-sig-btn svg { width: 16px; height: 16px; }
.mail-note { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 6px; margin-top: auto; } .mail-note svg { width: 14px; height: 14px; flex: none; }
.mail-list, .mail-read { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.mail-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.mail-search input { flex: 1; border: 0; background: var(--surface-2); border-radius: 18px; padding: 8px 12px; font: 14px var(--f-ui); color: var(--ink); }
.mail-search svg { width: 16px; height: 16px; color: var(--ink-3); }
.mail-rows { overflow-y: auto; flex: 1; }
.mail-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; grid-template-areas: "star who clip date" "star subj subj subj"; gap: 2px 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.mail-row:hover { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--line); } .mail-row.on { background: var(--teal-50); box-shadow: inset 3px 0 0 var(--teal); }
.mail-row.unread .mail-who, .mail-row.unread .mail-date { font-weight: 700; color: var(--ink); } .mail-row.unread { background: color-mix(in srgb, var(--surface) 70%, var(--teal-50)); }
.mail-star { grid-area: star; background: none; border: 0; padding: 0; color: var(--ink-3); cursor: pointer; align-self: start; } .mail-star svg { width: 17px; height: 17px; }
.mail-star.on, [data-star].on { color: #E2A100; } .mail-star.on svg, [data-star].on svg { fill: #F4B400; }
.mail-who { grid-area: who; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-subj { grid-area: subj; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mail-subj b { font-weight: 600; color: var(--ink); }
.mail-row:not(.unread) .mail-subj b { font-weight: 500; }
.mail-clip { grid-area: clip; width: 14px; height: 14px; color: var(--ink-3); } .mail-date { grid-area: date; font-size: 12px; white-space: nowrap; }
.mail-read { padding: 0 0 14px; overflow-y: auto; }
.mail-read-h { display: flex; align-items: flex-start; gap: 10px; padding: 16px 20px 6px; } .mail-read-h h1 { font: 600 20px/1.3 var(--f-display); margin: 4px 0 0; flex: 1; }
.mail-read-h form { display: flex; gap: 4px; } .mail-back { display: none; }
.mail-meta { display: flex; align-items: center; gap: 12px; padding: 8px 20px; }
.mail-lead { margin: 2px 20px 0; align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; font: 600 12.5px var(--f-ui); color: var(--teal-600);
  background: var(--teal-50); border-radius: 14px; padding: 4px 10px; text-decoration: none; } .mail-lead svg { width: 14px; height: 14px; }
.mail-body { padding: 14px 20px; font-size: 14.5px; line-height: 1.6; color: var(--ink); } .mail-body blockquote { margin: 10px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--ink-2); }
.mail-atts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 6px; }
.mail-att { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; text-decoration: none; color: var(--ink); }
.mail-att svg { width: 20px; height: 20px; color: var(--red); } .mail-att span { display: flex; flex-direction: column; font-size: 12.5px; } .mail-att small { color: var(--ink-3); }
.mail-actions { display: flex; gap: 8px; padding: 10px 20px; flex-wrap: wrap; } .mail-empty { margin: auto; }
/* compose window (bottom right, like Gmail) */
.compose { position: fixed; right: 24px; bottom: 0; z-index: 80; width: min(560px, calc(100vw - 16px)); height: min(560px, calc(100vh - 70px)); background: var(--surface);
  border-radius: 12px 12px 0 0; box-shadow: 0 10px 40px rgba(16,40,46,.32); display: flex; flex-direction: column; border: 1px solid var(--line); }
.compose[hidden] { display: none; } .compose.min { height: 44px; } .compose.min .compose-b { display: none; }
.compose.max { right: 50%; transform: translateX(50%); bottom: 4vh; height: 88vh; width: min(980px, 94vw); border-radius: 12px; }
.compose-h { display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 16px; background: var(--side); color: #fff; border-radius: 12px 12px 0 0; cursor: pointer; }
.compose-h .icon-btn { color: #cfe; width: 30px; height: 30px; background: none; border: 0; }
.compose-b { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cmp-line { display: flex; align-items: center; gap: 8px; padding: 4px 14px; border-bottom: 1px solid var(--line-soft); min-height: 38px; } .cmp-line > span { color: var(--ink-3); font-size: 13.5px; width: 32px; }
.cmp-line input[name="subject"] { flex: 1; border: 0; background: none; font: 500 14px var(--f-ui); color: var(--ink); outline: none; padding: 6px 0; }
.cmp-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: text; } .cmp-chips input { flex: 1; min-width: 120px; border: 0; background: none; outline: none; font: 14px var(--f-ui); color: var(--ink); padding: 5px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 12.5px; }
.chip.bad { border-color: var(--red); color: var(--red); } .chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 4px; }
.chip svg { width: 12px; height: 12px; } .chip small { color: var(--ink-3); }
.cmp-tools { display: flex; align-items: center; gap: 2px; padding: 4px 10px; border-bottom: 1px solid var(--line-soft); }
.cmp-tools > button { width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.cmp-tools > button:hover { background: var(--surface-2); } .cmp-tools svg { width: 16px; height: 16px; } .cmp-tools .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.cmp-ai { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--teal-100); background: var(--teal-50); color: var(--teal-600); border-radius: 14px; padding: 4px 10px; font: 600 12.5px var(--f-ui); cursor: pointer; }
.cmp-ai.busy { opacity: .6; } .cmp-ai svg { width: 14px; height: 14px; }
.cmp-body { flex: 1; overflow-y: auto; padding: 12px 16px; font-size: 14.5px; line-height: 1.55; outline: none; color: var(--ink); min-height: 120px; }
.cmp-body blockquote { margin: 8px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--ink-2); } .cmp-body [data-sig] { color: var(--ink-2); }
.cmp-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; } .cmp-atts:empty { display: none; }
.cmp-err { margin: 6px 14px 0; color: #9E2F2A; background: var(--red-50); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.cmp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.cmp-foot [data-send] { border-radius: 18px; padding: 0 18px; } .cmp-sig { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.sig-edit { border: 1px solid var(--line); border-radius: 8px; min-height: 120px; }
@media (max-width: 1100px) { .mail { grid-template-columns: 190px minmax(0, 1fr); } .mail-read { display: none; } .mail.reading .mail-list { display: none; } .mail.reading .mail-read { display: flex; } .mail-back { display: inline-grid; } }
@media (max-width: 760px) {
  .mail { grid-template-columns: 1fr; height: auto; } .mail-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .mail-folders { display: flex; overflow-x: auto; gap: 4px; width: 100%; } .mail-folders a { border-radius: 16px; white-space: nowrap; padding: 6px 12px; }
  .mail-note, .mail-sig-btn { display: none; } .mail-compose-btn { position: fixed; right: 16px; bottom: 140px; z-index: 60; border-radius: 16px; }
  .mail-list { min-height: 60vh; } .compose { right: 0; width: 100vw; height: 100vh; border-radius: 0; } .compose-h { border-radius: 0; }
}

/* Customer email templates */
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; }
.tpl-body { font: 13.5px/1.55 var(--f-ui); min-height: 260px; }
.tpl-ph { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; } .tpl-ph .chip-btn { font: 600 11.5px ui-monospace, monospace; padding: 2px 7px; }
.tpl-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .tpl-atts .chip input { margin: 0 2px 0 6px; }
.tpl-preview .tpl-mail { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); font-size: 14px; line-height: 1.55; }
.tpl-subj { font-weight: 700; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.switch { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--f-ui); color: var(--ink-2); cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--teal); } .switch input:checked::after { left: 18px; }
@media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr; } }
.mail-status { display: inline-block; font: 600 11.5px var(--f-ui); padding: 2px 8px; border-radius: 10px; background: var(--amber-50); color: #8A6510; margin-left: 6px; }
.mail-status.ok { background: var(--green-50); color: #1F7A50; }
.cust-mails { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.mail-sug { position: fixed; z-index: 120; list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-pop); max-width: 420px; } .mail-sug[hidden] { display: none; }
.mail-sug li { padding: 6px 10px; border-radius: 7px; cursor: pointer; display: flex; flex-direction: column; font-size: 13px; }
.mail-sug li span { font-size: 12px; color: var(--ink-3); } .mail-sug li.act, .mail-sug li:hover { background: var(--teal-50); }
.mail-body img, .cmp-body img { max-width: 100%; height: auto; } .mail-body table td, .cmp-body table td { padding: 0; }

/* Call logs */
.calls-tl { display: flex; flex-direction: column; gap: 10px; }
.call { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.call-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--teal-50); color: var(--teal-600); }
.call-ic.incoming { background: var(--blue-50); color: var(--blue); } .call.missed .call-ic { background: var(--red-50); color: var(--red); } .call-ic svg { width: 16px; height: 16px; }
.call-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.call-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.call-sum { font-size: 13.5px; line-height: 1.55; color: var(--ink); } .call-sum p { margin: 0 0 4px; }
.call-audio { width: 100%; max-width: 420px; height: 36px; }
.call-tr summary { cursor: pointer; font: 600 12.5px var(--f-ui); color: var(--teal-600); } .call-tr > div { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--ink-2);
  background: var(--surface-2); padding: 10px 12px; border-radius: 9px; max-height: 320px; overflow-y: auto; }
.call-final { background: var(--teal-50); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; } .call-final p { margin: 4px 0 0; }
.call-mini { width: 16px; height: 16px; color: var(--teal); } .call-mini.bad { color: var(--red); }

/* =================== Release 20: phones and quote =================== */
/* quote: two lines, more room (full text on hover) */
.quote { height: auto; min-height: 38px; max-width: 520px; padding: 4px 12px; }
.quote q { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 470px; line-height: 1.3; font-size: 11.8px; }
@media (max-width: 1280px) { .quote { max-width: 380px; } .quote q { max-width: 330px; } }
@media (max-width: 1080px) { .quote { max-width: 280px; } .quote q { max-width: 240px; } }
.btn { max-width: 100%; }
@media (max-width: 760px) {
  /* Email: columns can't be pushed wider than the screen */
  .mail { display: grid; grid-template-columns: minmax(0, 1fr) !important; gap: 10px; height: auto; min-height: 0; }
  .mail-side { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 0; min-width: 0; }
  .mail-folders { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .mail-folders::-webkit-scrollbar { display: none; }
  .mail-folders a { flex: none; border-radius: 16px; padding: 6px 12px; border: 1px solid var(--line); background: var(--surface); }
  .mail-folders a.on { border-color: var(--teal); }
  .mail-list, .mail-read { min-width: 0; width: 100%; }
  .mail-list { min-height: 0; max-height: none; } .mail-rows { overflow: visible; }
  .mail-row { grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-areas: "star who date" "star subj subj"; padding: 11px 12px; }
  .mail-clip { display: none; }
  .mail-read { overflow: visible; }
  .mail-read-h { flex-wrap: wrap; padding: 12px 14px 4px; gap: 8px; } .mail-read-h h1 { font-size: 17px; flex: 1 1 calc(100% - 60px); min-width: 0; overflow-wrap: anywhere; }
  .mail-read-h > .row { width: 100%; justify-content: flex-end; }
  .mail-meta { padding: 8px 14px; flex-wrap: wrap; } .mail-meta .grow { min-width: 0; overflow-wrap: anywhere; }
  .mail-body { padding: 12px 14px; overflow-wrap: anywhere; } .mail-body table { max-width: 100%; display: block; overflow-x: auto; }
  .mail-atts, .mail-actions { padding-left: 14px; padding-right: 14px; } .mail-actions .btn { flex: 1 1 auto; justify-content: center; }
  .mail-att { max-width: 100%; } .mail-att b { overflow-wrap: anywhere; }
  .mail-compose-btn { right: 14px; bottom: 132px; height: 44px; box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); }
  /* date ranges: label on its own line, the two dates share the row */
  .drange { flex-wrap: wrap; row-gap: 4px; padding: 6px 8px; } .drange > span { flex-basis: 100%; }
  .drange .input { flex: 1 1 0; min-width: 0; width: auto; }
  /* filter dropdowns share the row evenly */
  .filterbar > .ta, .filterbar .ta { flex: 1 1 calc(50% - 6px) !important; min-width: 0; max-width: none !important; }
  .filterbar > .ta > .input { width: 100%; }
  /* floating assistant button: smaller, out of the way */
  .ai-fab { width: 46px; height: 46px; right: 12px; bottom: 76px; } .ai-fab svg { width: 20px; height: 20px; }
  .content { padding-bottom: 96px; }
}
@media (max-width: 420px) { .filterbar > .ta, .filterbar .ta { flex-basis: 100% !important; } }
@media (max-width: 760px) { .lcard-b { flex-wrap: wrap; row-gap: 6px; } .lcard-b > * { min-width: 0; } .lcard { min-width: 0; } }

/* =================== Release 21 =================== */
.pill.inactive { background: #EEF1F2; color: #5E6A6F; border-color: #D6DCDE; }
html[data-mode="dark"] .pill.inactive { background: #26343A; color: #A9B7BB; border-color: #33454B; }
.cs-mean { font-weight: 500; opacity: .8; font-size: .86em; }
.call-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 12px 10px; font-size: 12px; color: var(--ink-3); }
.call-legend span { display: inline-flex; align-items: center; gap: 5px; } .call-legend .flag.dot-only { margin: 0; }
.k-acts { display: flex; gap: 4px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line-soft); flex-wrap: wrap; }
.k-acts .btn { height: 26px; padding: 0 7px; font-size: 11.5px; } .k-acts .btn svg { width: 13px; height: 13px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.ev-meeting, .fc .ev-meeting { background: var(--teal) !important; border-color: var(--teal) !important; }
.ev-calls, .fc .ev-calls { background: #2F6FD6 !important; border-color: #2F6FD6 !important; }
.ev-fu, .fc .ev-fu { background: #D99A00 !important; border-color: #D99A00 !important; }
.ev-bill, .fc .ev-bill { background: #8E5BD6 !important; border-color: #8E5BD6 !important; }
.fc .ev-calls .fc-event-title, .fc .ev-fu .fc-event-title, .fc .ev-bill .fc-event-title, .fc .ev-meeting .fc-event-title { color: #fff; }
/* Lead / Enquiry */
form[data-lead-form]:not(.show-enq) [data-enq], form[data-lead-form]:not(.show-enq) .enq-only { display: none !important; }
form[data-lead-form]:not(.is-textile) [data-textile] { display: none !important; }
.enq-btn { border-style: dashed; color: var(--teal-600); } .enq-btn.on { border-style: solid; background: var(--teal-50); }
.wq th.sc-add, .wq td.sc-add { background: transparent; border: 0; min-width: 120px; }
.wq-add { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--teal); background: var(--teal-50); color: var(--teal-600);
  border-radius: 8px; padding: 6px 10px; font: 600 12.5px var(--f-ui); cursor: pointer; white-space: nowrap; } .wq-add svg { width: 14px; height: 14px; }
form.at-base-on .travel-f { display: none !important; }
.at-base { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px dashed var(--teal-100); border-radius: 10px; background: var(--teal-50); cursor: pointer; }
.at-base input { width: 17px; height: 17px; accent-color: var(--teal); }

/* Dashboard: today first */
.today3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 14px; margin-bottom: 14px; align-items: stretch; }
/* Global .panel + .panel spacing is for stacked panels, not grid siblings. */
.today3 > .panel + .panel { margin-top: 0; }
.today3 > .panel { min-width: 0; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }
.today3 > .panel > .t3-list { flex: 1; }
/* Keep the KPI rows precisely aligned even when labels wrap. */
.kpis.k7 > .kpi { min-width: 0; height: 100%; box-sizing: border-box; }
.kpis.k7 > .kpi .kpi-l { min-width: 0; flex-wrap: wrap; }

.t3 .panel-h h2 { display: flex; align-items: center; gap: 7px; font-size: 15px; } .t3 .panel-h h2 svg { width: 17px; height: 17px; color: var(--teal); }
.t3 .panel-h .n { background: var(--teal-50); color: var(--teal-600); border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.t3-list { list-style: none; margin: 0; padding: 4px 8px 10px; }
.t3-list li { display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 8px; }
.t3-list li:hover { background: var(--surface-2); }
.t3-list a.grow { min-width: 0; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.t3-list a.grow b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t3-list a.grow span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t3-time { font: 700 12.5px var(--f-ui); color: var(--teal-600); background: var(--teal-50); border-radius: 6px; padding: 3px 6px; flex: none; }
.t3-due { font-size: 12px; color: var(--ink-2); white-space: nowrap; } .t3-due.bad { color: var(--red); font-weight: 600; }
.t3-empty { color: var(--ink-3); font-size: 13px; } .t3-empty svg { width: 16px; height: 16px; }
@media (max-width: 1100px) { .today3 { grid-template-columns: minmax(0, 1fr); } }
/* =================== Google Calendar style =================== */
.gcal-wrap { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 16px; background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-card); }
.gcal-side { display: flex; flex-direction: column; gap: 18px; }
.gcal-create { display: inline-flex; align-items: center; gap: 12px; height: 54px; padding: 0 22px 0 14px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--ink); font: 600 14.5px var(--f-ui); box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); transition: box-shadow .15s; }
.gcal-create:hover { box-shadow: 0 2px 4px rgba(60,64,67,.3), 0 8px 12px 6px rgba(60,64,67,.15); background: var(--teal-50); }
.gcal-create .gplus svg { width: 26px; height: 26px; color: var(--teal); stroke-width: 2.5; } .gcal-create .cdn { width: 15px; height: 15px; color: var(--ink-3); }
.mini { font-size: 12px; user-select: none; }
.mini-h { display: flex; align-items: center; gap: 4px; padding: 0 4px 6px; } .mini-h b { font-size: 13.5px; font-weight: 600; }
.mini-h button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--ink-2); }
.mini-h button:hover { background: var(--surface-2); }
.mini-g { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.mini-g .mw { font-size: 10.5px; color: var(--ink-3); font-weight: 600; padding: 4px 0; }
.mini-g .md { width: 28px; height: 28px; margin: auto; border-radius: 50%; border: 0; background: none; cursor: pointer; font: 500 11.5px var(--f-ui); color: var(--ink); }
.mini-g .md:hover { background: var(--surface-2); } .mini-g .md.out { color: var(--ink-3); }
.mini-g .md.sel { background: var(--teal-50); color: var(--teal-600); font-weight: 700; } .mini-g .md.today { background: var(--teal); color: #fff; font-weight: 700; }
.gcal-cals-h { font: 600 13px var(--f-ui); color: var(--ink); margin: 0 4px 6px; }
.gcal-cal { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.gcal-cal:hover { background: var(--surface-2); }
.gcal-cal input { appearance: none; width: 18px; height: 18px; border-radius: 3px; border: 2px solid var(--c); margin: 0; position: relative; cursor: pointer; flex: none; }
.gcal-cal input:checked { background: var(--c); } .gcal-cal input:checked::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.gcal-main { min-width: 0; display: flex; flex-direction: column; }
.gcal-bar { display: flex; align-items: center; gap: 6px; padding: 2px 4px 12px; flex-wrap: wrap; }
.gbtn-out { height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font: 600 13.5px var(--f-ui); color: var(--ink); cursor: pointer; margin-right: 6px; }
.gbtn-out:hover { background: var(--surface-2); }
.gbtn-ic { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.gbtn-ic:hover { background: var(--surface-2); } .gbtn-ic svg { width: 20px; height: 20px; }
.gcal-title { font: 400 22px var(--f-display); margin: 0 0 0 8px; color: var(--ink); letter-spacing: -.01em; }
.gseg { display: inline-flex; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.gseg button { border: 0; background: var(--surface); padding: 0 14px; height: 34px; font: 600 13px var(--f-ui); color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line); }
.gseg button:last-child { border-right: 0; } .gseg button.on { background: var(--teal-50); color: var(--teal-600); }
/* FullCalendar, Google look (diary and lead calendars) */
.gcal.fc, .gcal .fc, #calendar.fc, .fc { --fc-border-color: var(--line-soft); --fc-today-bg-color: transparent; --fc-page-bg-color: var(--surface);
  --fc-now-indicator-color: #EA4335; --fc-neutral-bg-color: var(--surface-2); font-family: var(--f-ui); }
.fc .fc-col-header-cell { border-left: 0; border-right: 0; } .fc .fc-col-header-cell-cushion { padding: 8px 2px 6px; text-decoration: none; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gdh-w { font: 600 11px var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.gdh-d { font: 400 24px/1 var(--f-display); color: var(--ink); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.gdh-d.today { background: var(--teal); color: #fff; }
.fc .fc-daygrid-day-number { font: 500 12px var(--f-ui); color: var(--ink); text-decoration: none; padding: 6px; }
.fc .fc-day-today .fc-daygrid-day-number { background: var(--teal); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; margin: 4px; }
.fc .fc-timegrid-slot { height: 2.6em; } .fc .fc-timegrid-slot-label-cushion { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; }
.fc .fc-timegrid-slot-minor { border-top-style: none; }
.fc .fc-event { border-radius: 6px; border: 0; padding: 1px 4px; font-size: 12px; box-shadow: none; }
.fc .fc-daygrid-event { margin-top: 2px; } .fc .fc-daygrid-dot-event .fc-event-title { font-weight: 600; }
.fc .fc-timegrid-event .fc-event-main { padding: 2px 4px; } .fc .fc-event-title { font-weight: 600; }
.fc-direction-ltr .fc-timegrid-now-indicator-arrow { border-color: #EA4335; } .fc .fc-timegrid-now-indicator-line { border-width: 2px 0 0; }
.fc .fc-timegrid-now-indicator-line::before { content: ""; position: absolute; left: -6px; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: #EA4335; }
.fc .fc-list-day-cushion { background: var(--surface-2); } .fc .fc-list-event:hover td { background: var(--teal-50); }
.fc .fc-more-link { font-weight: 600; color: var(--ink-2); } .fc .fc-scrollgrid { border-radius: 10px; overflow: hidden; }
.fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-number { color: var(--ink-3); }
@media (max-width: 900px) { .gcal-wrap { grid-template-columns: minmax(0, 1fr); padding: 10px; } .gcal-side { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .mini { display: none; } .gcal-cals { display: flex; flex-wrap: wrap; gap: 4px; } .gcal-cals-h { width: 100%; } .gcal-title { font-size: 18px; } .gseg button { padding: 0 9px; } }
.quick-dlg { width: min(640px, calc(100vw - 16px)); } .quick-dlg .err { color: var(--red); font-size: 12px; }
.linkbtn svg { width: 13px; height: 13px; vertical-align: -2px; }
.quick-dlg { padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 60px rgba(16,40,46,.3); }
.quick-dlg::backdrop { background: rgba(14,41,48,.35); }
.quick-dlg .dlg-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.quick-dlg .dlg-h h3 { margin: 0; font: 650 17px var(--f-display); }
.quick-dlg .dlg-b { padding: 16px 18px; max-height: calc(100vh - 200px); overflow-y: auto; }
.quick-dlg .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px 14px; }
.quick-dlg .form-grid > .field { grid-column: span 1 !important; } .quick-dlg .form-grid > .field.c12 { grid-column: 1 / -1 !important; }
.quick-dlg .field .input { width: 100%; } .quick-dlg .field label { display: block; font: 600 12.5px var(--f-ui); margin-bottom: 4px; color: var(--ink-2); }
.quick-dlg .dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-soft); background: var(--surface-2); }
@media (max-width: 560px) { .quick-dlg .form-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* Expense Hub: customer/general switch and multiple receipt review. */
.hub-category-switch{display:flex;gap:10px;flex-wrap:wrap}
.hub-category-switch label{position:relative;flex:1 1 145px;cursor:pointer}
.hub-category-switch input{position:absolute;opacity:0;pointer-events:none}
.hub-category-switch label span{display:flex;align-items:center;justify-content:center;gap:10px;min-height:42px;padding:10px;border:1px solid var(--line,#d5e2e6);border-radius:10px;color:var(--ink,#1a3c47);font-weight:650;background:var(--surface,#fff)}
.hub-category-switch input:checked+span{border-color:var(--primary,#117486);background:#e8f5f6;color:#0b6471}
.hub-category-switch input:focus-visible+span{outline:2px solid #0b6471;outline-offset:2px}
.hub-bulk-bill{min-width:0}
.hub-bulk-item{display:grid;grid-template-columns:minmax(120px,1.1fr) minmax(160px,2.4fr) minmax(65px,.65fr) minmax(90px,.85fr) minmax(100px,.95fr) 36px;gap:8px;align-items:center;margin-bottom:8px}
.hub-bulk-item>.input{min-width:0;width:100%}
.hub-bulk-total{font-variant-numeric:tabular-nums;color:var(--ink,#163c45)}
.hub-bulk-actionbar{position:sticky;bottom:0;z-index:4;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;background:var(--surface,#fff);padding:14px 18px;border:1px solid var(--line,#d5e2e6);border-radius:12px;box-shadow:0 3px 15px rgba(0,0,0,.05)}
@media(max-width:820px){.hub-bulk-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(65px,.65fr)}.hub-bulk-item>.hub-bulk-item-name{grid-column:span 2}.hub-bulk-item>.hub-bulk-delete{grid-column:3}}
@media(max-width:480px){.hub-bulk-item{grid-template-columns:repeat(2,minmax(0,1fr))}.hub-bulk-item>.hub-bulk-item-name{grid-column:span 2}.hub-bulk-item>.hub-bulk-delete{grid-column:2;justify-self:end}}

/* WTT 2026-11-12: prevent accidental duplicate expense submissions. */
.hub-save-overlay { position: fixed; inset: 0; z-index: 30000; display: flex; align-items: center; justify-content: center;
 background: rgba(14,34,42,.45); backdrop-filter: blur(3px); padding: 16px; }
.hub-save-dialog { width: min(420px, 100%); background: var(--surface, #fff); color: var(--ink,#123139);
 border: 1px solid var(--line,#d8e3e5); border-radius: 16px; text-align: center;
 box-shadow: 0 18px 60px rgba(0,0,0,.25); padding: 32px 25px; }
.hub-save-dialog h2 { margin: 12px 0; font-size: 20px; }
.hub-save-dialog p { line-height: 1.5; color: var(--ink-2,#4b6771); font-size: 14px; }
.hub-save-dialog small { display:block; margin-top: 10px; color: var(--ink-3,#718d92); }
.hub-save-spinner { display: inline-block; width: 42px; height: 42px; border: 4px solid #daecec;
 border-top-color: #0b6e79; border-radius: 50%; animation: hub-save-spin .7s linear infinite; }
@keyframes hub-save-spin { to { transform: rotate(360deg); } }

/* Sales conversion and lead health: compact and responsive across desktop/mobile. */
.dashboard-insights > .panel + .panel { margin-top: 0; }
.dashboard-insights .panel-h h2 { display: inline-flex; align-items: center; gap: 7px; }
.dashboard-insights .panel-h h2 svg { width: 17px; height: 17px; color: var(--teal); }
.dashboard-caption { margin: 0 0 15px; font-size: 12.5px; line-height: 1.5; }
.sales-funnel { display: flex; flex-direction: column; gap: 13px; }
.sales-funnel-row { display: grid; grid-template-columns: minmax(135px,190px) minmax(0,1fr) 42px 44px;
  gap: 11px; align-items: center; min-width: 0; }
.sales-funnel-label { font-size: 12.5px; color: var(--ink-2); line-height: 1.2; }
.sales-funnel-track { width: 100%; height: 22px; background: var(--surface-2,#edf4f4); border-radius: 6px; overflow: hidden; }
.sales-funnel-fill { min-width: 0; height: 100%; border-radius: 6px; transition: width .3s ease; }
.sales-funnel-count { font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; }
.sales-funnel-percent { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-3); text-align: right; }
.dashboard-mini-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px;
 margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.dashboard-mini-stats > div { min-width: 0; }
.dashboard-mini-stats span { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.2; }
.dashboard-mini-stats strong { display: block; font: 700 19px var(--f-display); margin-top: 5px; }
.dashboard-coverage > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.dashboard-coverage strong { font: 700 30px var(--f-display); }
.dashboard-coverage span { color: var(--ink-3); font-size: 12px; }
.dashboard-coverage-track { background: var(--surface-2,#e7eeee); border-radius: 9px; height: 9px; overflow: hidden; margin-top: 7px; }
.dashboard-coverage-track > span { display: block; height: 100%; background: #0B6E79; border-radius: 9px; }
.dashboard-health-chart { height: 170px; margin-top: 13px; }
.dashboard-stages-chart { height: 280px; }
.dashboard-outcome-chart { height: 230px; }
.dashboard-empty { font-size: 12px; }
@media (max-width: 1100px) { .dashboard-insights { grid-template-columns: minmax(0,1fr); }
 .dashboard-insights > .panel + .panel { margin-top: 0; } }
@media (max-width: 600px) { .sales-funnel-row { grid-template-columns: minmax(92px,115px) minmax(0,1fr) 28px 31px; gap: 5px; }
 .sales-funnel-label { font-size: 11px; } .sales-funnel-count, .sales-funnel-percent { font-size: 11px; }
 .dashboard-mini-stats strong { font-size: 16px; } }

/* 2026-11-17: Day Entry is ONE responsive three-tab row, not the CRM diary toolbar. */
.day-entry-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
    min-width: 0; margin: 12px 0 16px; padding: 9px; border: 1px solid var(--line);
    border-radius: 13px; background: var(--surface); }
.day-entry-nav__item { display: flex; align-items: center; justify-content: center; gap: 10px;
    min-width: 0; min-height: 46px; padding: 9px 12px; border: 1px solid transparent;
    border-radius: 9px; background: var(--surface-2); color: var(--ink-2);
    font-size: 14px; font-weight: 650; text-decoration: none; transition: background .15s, border-color .15s; }
.day-entry-nav__item:hover { color: var(--teal); border-color: var(--line); text-decoration: none; }
.day-entry-nav__item.on { background: var(--teal-50); color: var(--teal-600); border-color: var(--teal-100); }
.day-entry-nav__item svg { width: 18px; height: 18px; flex: none; }
.day-entry-nav__count { flex: none; display: inline-flex; align-items: center; justify-content: center;
    padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--ink-2);
    font-size: 12px; line-height: 18px; min-width: 25px; }
.day-entry-nav__item.on .day-entry-nav__count { color: var(--teal-600); background: var(--surface); }
.day-entry-nav__item:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 700px) {
    .day-entry-nav { gap: 5px; padding: 5px; }
    .day-entry-nav__item { gap: 5px; font-size: 12px; min-height: 44px; padding: 8px 3px; }
    .day-entry-nav__item svg { width: 15px; height: 15px; }
    .day-entry-nav__count { font-size: 11px; padding: 1px 5px; min-width: 20px; }
}
/* Browser print is disabled on sensitive lead and lead-report views only. */
@media print {
    body.sensitive-leads .shell, body.sensitive-leads .toasts, body.sensitive-leads .ai-panel,
    body.sensitive-leads .ai-fab { display: none !important; }
    body.sensitive-leads::after { content: "Printing confidential CRM Lead data is disabled.";
       display: block; margin: 24pt; color: #222; font-size: 14pt; }
}
.sensitive-watermark { position: fixed; right: 18px; bottom: 12px; z-index: 7; pointer-events: none;
   max-width: calc(100vw - 36px); padding: 3px 7px; border-radius: 5px;
   background: var(--surface); color: var(--ink-3); border: 1px solid var(--line-soft);
   opacity: .70; font-size: 10px; line-height: 1.3; user-select: none; }
