/* Sales Hub 3.0 visual layer — appearance only. Loaded last; no element, text, control or handler
   is added, removed or renamed. Colours come from the existing theme variables so Day, Night and
   Automatic all apply. Selectors start with :root to outrank the older layered theme rules. */

:root{
  --sh-radius:16px;--sh-radius-sm:12px;--sh-radius-lg:20px;
  --sh-muted:#5d7480;--sh-soft:#eef5f5;--sh-soft-strong:#e2efee;--sh-focus:rgba(8,127,130,.28);
  --sh-shadow:0 1px 2px rgba(16,44,56,.05),0 4px 14px rgba(16,44,56,.05);
  --sh-shadow-raised:0 2px 6px rgba(16,44,56,.08),0 10px 28px rgba(16,44,56,.08);
  --sh-ease:cubic-bezier(.2,.7,.2,1);
}
:root[data-rt-theme=dark]{--sh-muted:#9db6c0;--sh-soft:#17323e;--sh-soft-strong:#1d3d4a;--sh-focus:rgba(36,198,196,.32);
  --sh-shadow:0 1px 2px rgba(0,0,0,.35);--sh-shadow-raised:0 6px 24px rgba(0,0,0,.45)}

/* ---------- Type ---------- */
:root body{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-size:16px;line-height:1.45}
:root .screen>.row h2,:root .home-dashboard-top h2{font-size:26px;line-height:1.15;letter-spacing:-.02em;font-weight:800}
:root .screen .card h2{font-size:19px;line-height:1.25;letter-spacing:-.01em;font-weight:750;margin-top:0}
:root .screen h3{font-size:16px;letter-spacing:-.005em}
:root .muted{color:var(--sh-muted)}
:root .eyebrow{font-size:11.5px;letter-spacing:.09em;font-weight:750;color:var(--rt-teal)}
:root .label,:root .screen .label{font-size:13px;font-weight:650;color:var(--sh-muted);letter-spacing:.005em}

/* ---------- Header ---------- */
:root header{position:sticky;top:0;z-index:20;padding:calc(10px + env(safe-area-inset-top)) 16px 10px!important;
  background:color-mix(in srgb,var(--rt-surface) 88%,transparent)!important;
  -webkit-backdrop-filter:saturate(1.6) blur(18px);backdrop-filter:saturate(1.6) blur(18px);
  border-bottom:1px solid color-mix(in srgb,var(--rt-border) 70%,transparent)!important}
:root header .head{gap:8px;align-items:center}
:root header .head>div:first-child{flex:1;min-width:0}
:root header .head h1{font-size:21px!important;letter-spacing:-.02em;margin:2px 0 0;font-weight:800}
:root header .iconbtn{min-height:40px;min-width:40px;padding:8px 12px;border-radius:999px!important;font-size:13px;font-weight:700;
  background:var(--sh-soft)!important;border:1px solid transparent!important;color:var(--rt-teal-dark)!important;transition:transform .12s var(--sh-ease),background .15s}
:root header .status{display:flex;align-items:center;gap:7px;margin-top:6px;font-size:12px;color:var(--sh-muted);min-width:0}
:root header .status #saveStatus{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
:root .dot{width:8px;height:8px;border-radius:50%;flex:none;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 0%,transparent)}

/* ---------- Page rhythm ---------- */
:root .main{padding-top:16px!important}
:root .screen>.row{align-items:center;gap:12px;margin-bottom:14px}
:root .screen>.row .btn{min-height:40px;padding:9px 14px;font-size:14px;border-radius:999px}

/* ---------- Cards ---------- */
:root .card,:root .screen .card{background:var(--rt-surface)!important;border:1px solid color-mix(in srgb,var(--rt-border) 75%,transparent)!important;
  border-radius:var(--sh-radius-lg)!important;box-shadow:var(--sh-shadow)!important;padding:18px}
:root .screen .card .card{background:color-mix(in srgb,var(--sh-soft) 55%,var(--rt-surface))!important;box-shadow:none!important;border-radius:var(--sh-radius)!important}
:root .note{background:var(--sh-soft);color:var(--sh-muted);border-radius:var(--sh-radius-sm);padding:12px 14px;line-height:1.45}

/* ---------- Buttons ---------- */
:root .btn{border-radius:14px;min-height:48px;font-weight:750;letter-spacing:.005em;
  transition:transform .12s var(--sh-ease),box-shadow .15s,background-color .15s,opacity .15s;-webkit-tap-highlight-color:transparent}
:root .btn:not(.secondary):not(.outline){box-shadow:0 1px 0 rgba(255,255,255,.35) inset,0 2px 8px color-mix(in srgb,var(--rt-orange) 30%,transparent)}
:root .btn.outline{background:transparent!important;border:1.5px solid var(--rt-border)!important;color:var(--rt-teal-dark)!important;box-shadow:none}
:root .btn:active:not(:disabled),:root .iconbtn:active,:root .choice:active,:root .bottom button:active{transform:scale(.97)}
:root .btn:disabled,:root button:disabled{opacity:.45;box-shadow:none!important}
:root :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--sh-focus)!important;outline-offset:2px}
:root .choice{border-radius:var(--sh-radius-lg);border:1px solid var(--rt-border);background:var(--rt-surface);box-shadow:var(--sh-shadow);color:var(--rt-ink);transition:transform .12s var(--sh-ease)}

/* ---------- Form fields ---------- */
:root .field,:root .screen .field{min-height:50px;border-radius:var(--sh-radius-sm);border:1px solid var(--rt-border)!important;background:var(--rt-surface);
  color:var(--rt-ink);font-size:16px;padding:13px 14px;transition:border-color .15s,box-shadow .15s}
:root .field::placeholder{color:color-mix(in srgb,var(--sh-muted) 75%,transparent)}
:root .field:focus{outline:none;border-color:var(--rt-teal)!important;box-shadow:0 0 0 4px var(--sh-focus)}
:root select.field{-webkit-appearance:none;appearance:none;padding-right:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23668089' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;background-size:14px}
:root textarea.field{line-height:1.5;min-height:96px}
:root input[type=checkbox],:root input[type=radio]{accent-color:var(--rt-teal);width:20px;height:20px}
:root input[type=file]{font-size:14px;color:var(--sh-muted)}
:root input[type=file]::file-selector-button{border:0;border-radius:999px;padding:10px 16px;margin-right:12px;font-weight:700;background:var(--sh-soft-strong);color:var(--rt-teal-dark)}

/* ---------- Disclosure sections ---------- */
:root .screen details:not(.customer-advanced)>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;font-weight:700;padding:10px 0}
:root .screen details:not(.customer-advanced)>summary::-webkit-details-marker{display:none}
:root .screen details:not(.customer-advanced)>summary::before{content:"";flex:none;width:18px;height:18px;border-radius:50%;background:var(--sh-soft-strong) 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='%23087f82' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center/10px no-repeat;transition:transform .2s var(--sh-ease)}
:root .screen details[open]:not(.customer-advanced)>summary::before{transform:rotate(90deg)}

/* ---------- Pills, badges, progress ---------- */
:root .pill,:root .customer-status-badge{border-radius:999px;font-size:11.5px;font-weight:750;letter-spacing:.02em;padding:4px 10px}
:root .progress{gap:6px}
:root .progress span{height:4px;border-radius:4px;background:var(--rt-border)}
:root .progress span.on{background:var(--rt-teal)}

/* ---------- Appointment stage navigation ---------- */
:root #hybridWorkspace{background:color-mix(in srgb,var(--rt-page) 92%,transparent)!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);top:calc(env(safe-area-inset-top) + 74px)}
:root .hybrid-stages{background:var(--sh-soft);padding:4px;border-radius:14px;gap:4px}
:root .hybrid-stages button{border:0!important;background:transparent!important;border-radius:10px;min-height:38px;color:var(--sh-muted)!important;font-weight:750}
:root .hybrid-stages button.active{background:var(--rt-surface)!important;color:var(--rt-teal-dark)!important;box-shadow:0 1px 3px rgba(16,44,56,.12)}
:root .hybrid-links button{border-radius:999px;font-weight:700;background:transparent!important;border:1px solid var(--rt-border)!important;color:var(--sh-muted)!important}
:root .hybrid-links button.active{background:var(--sh-soft-strong)!important;color:var(--rt-teal-dark)!important;border-color:transparent!important}
:root .hybrid-foot button{border-radius:12px}

/* ---------- Bottom navigation ---------- */
:root .bottom{background:color-mix(in srgb,var(--rt-surface) 86%,transparent)!important;-webkit-backdrop-filter:saturate(1.6) blur(20px);backdrop-filter:saturate(1.6) blur(20px);
  border-top:1px solid color-mix(in srgb,var(--rt-border) 70%,transparent)!important;box-shadow:none!important;padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom))}
:root .bottom button{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px;border-radius:12px;font-size:10.5px!important;font-weight:700;color:var(--sh-muted)!important;letter-spacing:.01em}
:root .bottom button b{font-size:0!important;line-height:0;display:block;width:24px;height:24px;background:currentColor;
  -webkit-mask:var(--sh-icon) center/24px no-repeat;mask:var(--sh-icon) center/24px no-repeat}
:root .bottom button.selected{color:var(--rt-teal)!important}
:root .bottom button.selected b{color:var(--rt-teal)!important}
#navHome{--sh-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V20a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1V9.5'/%3E%3C/svg%3E")}
#navCustomers{--sh-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0'/%3E%3Cpath d='M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14.2a6.5 6.5 0 0 1 3.5 5.8'/%3E%3C/svg%3E")}
#navOpportunities{--sh-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z'/%3E%3C/svg%3E")}
#navFollowups{--sh-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E")}
#navCampaigns{--sh-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='m3.5 7 8.5 6 8.5-6'/%3E%3C/svg%3E")}

/* ---------- Home ---------- */
:root .home-stats{border-radius:var(--sh-radius-lg);box-shadow:var(--sh-shadow);border-color:color-mix(in srgb,var(--rt-border) 75%,transparent)}
:root .home-stats strong{font-size:26px;letter-spacing:-.02em;font-weight:800;font-variant-numeric:tabular-nums}
:root .home-stats span{font-size:11px;letter-spacing:.08em;font-weight:750;color:var(--sh-muted)}
:root .home-new-appointment{border-radius:999px;min-height:48px;padding:10px 20px}

/* ---------- Customers list ---------- */
:root .customer-count-tile{border-radius:var(--sh-radius)!important;box-shadow:var(--sh-shadow)}
:root .customer-card-refined{border-radius:var(--sh-radius-lg)!important}
:root .customer-card-refined .customer-action{border-radius:14px;border-color:transparent;background:var(--sh-soft)}
:root .contact-action{border-radius:14px!important;font-weight:750}
:root .syncStrip{border-radius:999px!important;box-shadow:var(--sh-shadow);padding:10px 14px}

/* ---------- Settings ---------- */
:root #settings>.card,:root #settings>section.card{margin-bottom:14px}
:root .rt-theme-options{background:var(--sh-soft);padding:4px;border-radius:14px;gap:4px}
:root .rt-theme-options button{border:0!important;background:transparent!important;border-radius:10px;min-height:44px}
:root .rt-theme-options button[aria-pressed=true]{background:var(--rt-surface)!important;box-shadow:0 1px 3px rgba(16,44,56,.12);color:var(--rt-teal-dark)!important}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion:no-preference){
  :root main.main>section.screen.active{animation:shFadeIn .22s var(--sh-ease)}
  @keyframes shFadeIn{from{opacity:.0;transform:translateY(4px)}to{opacity:1;transform:none}}
}
@media (prefers-reduced-motion:reduce){:root *{transition:none!important;animation:none!important}}

/* ---------- Wider screens (tablet/desktop) ---------- */
@media (min-width:820px){:root .shell{margin:0 auto}:root .bottom{max-width:800px;margin:0 auto;border-radius:20px 20px 0 0}}

/* ---------- Refinements ---------- */
:root .screen>.row{flex-wrap:nowrap}
:root .screen>.row h2{font-size:24px;min-width:0}
:root .screen>.row .btn{white-space:nowrap;flex:none}
:root .home-due-card{border:1px solid color-mix(in srgb,var(--rt-orange) 45%,var(--rt-border))!important}
:root .home-due-actions .btn,:root .home-due-actions a,:root .home-due-actions button{border:0!important;border-radius:12px!important;min-height:44px;
  background:var(--sh-soft)!important;color:var(--rt-teal-dark)!important;font-weight:750;box-shadow:none}
:root .home-due-actions .done{background:var(--rt-orange)!important;color:#172c35!important;box-shadow:0 2px 8px color-mix(in srgb,var(--rt-orange) 30%,transparent)}

/* Customer list: each customer is its own card (no card-inside-a-card). */
:root :is(#customerList,#monthNotSoldList,#monthSalesList){background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
:root :is(#customerList,#monthNotSoldList,#monthSalesList)>.customer{background:var(--rt-surface)!important;border:1px solid color-mix(in srgb,var(--rt-border) 75%,transparent)!important;
  border-radius:var(--sh-radius-lg)!important;box-shadow:var(--sh-shadow)!important;margin:0 0 12px!important}
:root .customer-advanced{border-radius:var(--sh-radius)!important}

/* ---------- Night mode: replace hard-coded light colours (pre-existing contrast problems) ---------- */
:root[data-rt-theme=dark] .home-stats strong,
:root[data-rt-theme=dark] .home-mtd-stat strong,
:root[data-rt-theme=dark] #home strong[id^=homeCalls],
:root[data-rt-theme=dark] #home strong[id^=homeTexts]{color:var(--rt-ink)!important}
:root[data-rt-theme=dark] .home-mtd-action{background:var(--sh-soft)!important;color:var(--rt-teal)!important}
:root[data-rt-theme=dark] .customer-advanced,:root[data-rt-theme=dark] .customer-count-tile{background:var(--rt-surface)!important;color:var(--rt-ink)}
:root[data-rt-theme=dark] .customer-advanced>summary{color:var(--rt-teal)!important}
:root[data-rt-theme=dark] .customer-card-refined .customer-action{background:var(--sh-soft)!important;color:var(--rt-teal-dark)!important;border-color:transparent!important}
:root[data-rt-theme=dark] .hybrid-foot button:not(.primary){background:var(--sh-soft)!important;color:var(--rt-teal-dark)!important}
:root[data-rt-theme=dark] .screen [style*="background:#eef6fb"],
:root[data-rt-theme=dark] .screen [style*="background:#f8fbfc"]{background:var(--sh-soft)!important;border-color:var(--rt-border)!important;color:var(--rt-ink)}
/* The condenser diagram is a drawing: keep it on paper in both modes. */
:root[data-rt-theme=dark] #hubDiagram{background:#f4f8f8;border-radius:12px}
:root[data-rt-theme=dark] #hubDiagram,:root[data-rt-theme=dark] #hubDiagram text{fill:#142c39;color:#142c39}
:root .mobile-home-option{border-color:var(--rt-border)!important;color:var(--rt-ink)!important;background:var(--rt-surface);border-radius:var(--sh-radius)}
:root .mobile-home-option input{accent-color:var(--rt-teal)}

/* ---------- In-app dialogs (assets/hub-dialogs.js) ---------- */
.hub-dialog{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-end;justify-content:center;
  background:rgba(8,24,32,.42);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:hubFade .16s ease-out}
.hub-dialog-sheet{width:100%;max-width:520px;max-height:85vh;overflow:auto;background:var(--rt-surface,#fff);color:var(--rt-ink,#142c39);
  border-radius:22px 22px 0 0;padding:22px 18px calc(16px + env(safe-area-inset-bottom));box-shadow:0 -8px 32px rgba(8,24,32,.22);
  animation:hubSlide .22s cubic-bezier(.2,.7,.2,1)}
.hub-dialog-message{margin:0 0 16px;font-size:16px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.hub-dialog-input{margin:0 0 14px}
.hub-dialog-actions{display:grid;gap:10px}
.hub-dialog-actions .btn{width:100%;min-height:50px;font-size:16px}
:root .hub-dialog-danger{background:#c8412f!important;border-color:#c8412f!important;color:#fff!important;box-shadow:0 2px 8px rgba(200,65,47,.3)!important}
html.hub-dialog-open,html.hub-dialog-open body{overflow:hidden}
@media (min-width:600px){.hub-dialog{align-items:center}.hub-dialog-sheet{border-radius:22px;padding-bottom:20px}}
@keyframes hubFade{from{opacity:0}to{opacity:1}}
@keyframes hubSlide{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.hub-dialog,.hub-dialog-sheet{animation:none}}

/* ---------- Icons (step C): one line-icon set, sprite in index.html ---------- */
svg.ico{width:1.15em;height:1.15em;flex:none;vertical-align:-.2em;margin-right:.4em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
svg.ico.ico-only{margin:0}
:root header .iconbtn svg.ico-only{width:20px;height:20px;vertical-align:-5px}
:root .choice .emoji{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 10px;border-radius:16px;background:var(--sh-soft);color:var(--rt-teal-dark)}
:root .choice .emoji svg.ico{width:26px;height:26px;margin:0}
:root .home-contact-icon svg.ico{width:20px;height:20px;margin:0;vertical-align:-4px}
:root .customer-action-icon svg.ico{width:20px;height:20px}
/* Call / Text / Email get icons by position (labels unchanged). */
:root .contact-actions .contact-action::before{content:"";display:block;width:20px;height:20px;margin:0 auto 4px;background:currentColor;
  -webkit-mask:var(--sh-ci) center/20px no-repeat;mask:var(--sh-ci) center/20px no-repeat}
:root .contact-actions .contact-action:nth-child(1){--sh-ci:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E")}
:root .contact-actions .contact-action:nth-child(2){--sh-ci:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.7 7.1L4 20.5l1.4-4.9A8 8 0 1 1 21 12z'/%3E%3C/svg%3E")}
:root .contact-actions .contact-action:nth-child(3){--sh-ci:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='m3.5 7 8.5 6 8.5-6'/%3E%3C/svg%3E")}
:root .contact-actions .contact-action{flex-direction:column;font-size:12.5px}

/* ---------- Compact customer cards: Call · Text · Email · View · Campaign in one row ---------- */
:root .customer-card-refined{display:grid!important;grid-template-columns:3fr 2fr;column-gap:8px;padding:16px 14px!important}
:root .customer-card-refined>*{grid-column:1/-1}
:root .customer-card-refined .customer-contact-row{grid-column:1;margin-top:12px!important}
:root .customer-card-refined .customer-primary-actions{grid-column:2;margin-top:12px!important;padding-top:0!important;border-top:0!important;gap:8px!important}
:root .customer-card-refined .customer-contact-row .contact-actions{gap:8px!important;margin:0}
:root .customer-card-refined .contact-action,:root .customer-card-refined .customer-action{min-height:60px!important;padding:8px 2px!important;border-radius:14px!important;
  font-size:11.5px!important;line-height:1.15;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px!important;text-align:center}
:root .customer-card-refined .customer-action-icon{font-size:0!important;line-height:0}
:root .customer-card-refined .contact-action,:root .customer-card-refined .customer-action{height:64px!important;min-height:64px!important;box-sizing:border-box}
:root .customer-card-refined .customer-contact-row .contact-actions{margin:0!important}

/* ---------- Settings groups (step D) ---------- */
:root .settings-group{margin:22px 0 0}
:root .settings-group-title{margin:0 4px 10px;font-size:12px!important;letter-spacing:.09em;text-transform:uppercase;font-weight:800;color:var(--sh-muted)}
:root .settings-group>.card,:root .settings-group>section.card,:root .settings-group>div.card{margin:0 0 12px!important}
:root details.settings-tools{border:1px solid color-mix(in srgb,var(--rt-border) 75%,transparent);border-radius:var(--sh-radius-lg);background:var(--rt-surface);padding:4px 14px;box-shadow:var(--sh-shadow)}
:root details.settings-tools>summary.settings-group-title{margin:0;padding:14px 0!important;color:var(--rt-ink)}
:root details.settings-tools[open]{padding-bottom:14px}
:root details.settings-tools>.card{box-shadow:none!important;border-color:var(--rt-border)!important}
:root .settings-sub{margin:12px 0;border-top:1px solid color-mix(in srgb,var(--rt-border) 70%,transparent);padding-top:4px}
:root .settings-sub>summary{font-size:15px;color:var(--rt-teal-dark)}
:root #settings .rt-theme-panel{margin-top:6px}

/* 3.0: compact F-number and market status rows inside the customer card */
#customerOverview .customer-facts{margin-top:12px;border-top:1px solid var(--rt-border,#d7e5e5);padding-top:8px}
#customerOverview .fact-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px}
#customerOverview .fact-label{font-size:13px;font-weight:700;letter-spacing:.02em;color:var(--rt-ink,#142c39);opacity:.75}
#customerOverview .fact-value{font-weight:700;font-variant-numeric:tabular-nums}
#customerOverview .fact-value.muted{font-weight:500}
#customerOverview .market-select{appearance:auto;-webkit-appearance:menulist;font:inherit;font-size:15px;font-weight:600;padding:6px 10px;border-radius:10px;border:1px solid var(--rt-border,#d7e5e5);background:var(--rt-surface,#fff);color:var(--rt-ink,#142c39);max-width:60%}
#customerOverview .customer-facts.out .market-select{border-color:#d98a2b;color:#a85a00}
#customerOverview .market-out-note{margin:2px 0 0}

/* 3.0: the notes section keeps one full-width Add note button */
#customerOverview .overview-note-actions{grid-template-columns:1fr}

/* R3.0.1: press-and-hold on buttons, labels and cards no longer starts a text selection or the iOS link preview.
   Typing fields keep normal selection so copy and paste still work there. */
html,body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,select,[contenteditable],[contenteditable] *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}

/* R3.0.3: Import my leads report preview */
#leadsReportPanel .lr-sec{border:1px solid var(--rt-border,#d7e5e5);border-radius:12px;padding:10px 12px;margin:10px 0;background:var(--rt-surface,#fff)}
#leadsReportPanel .lr-sec>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}
#leadsReportPanel .lr-list{list-style:none;margin:8px 0 0;padding:0;max-height:340px;overflow:auto}
#leadsReportPanel .lr-list li{padding:7px 0;border-top:1px solid var(--rt-border,#d7e5e5);font-size:14px;line-height:1.35}
#leadsReportPanel .lr-check{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
#leadsReportPanel .lr-check input{margin-top:3px;width:20px;height:20px;flex:0 0 auto}
#leadsReportPanel .lr-actions{display:flex;gap:8px;margin:6px 0}
#leadsReportPanel .lr-actions .btn{flex:1;min-height:38px;font-size:14px}
#customerOverview .record-tools{flex-wrap:wrap}
.lr-hint{color:var(--warn,#b45309);font-weight:600}
/* R3.0.15 Performance & tracking */
#performance .perf-chips{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
#performance .perf-chip{border:1px solid var(--rt-border,#dae5ed);background:var(--sh-soft,#eef5f5);color:var(--rt-teal,#087275);border-radius:999px;padding:8px 14px;font-weight:800;font-size:14px;min-height:40px}
#performance .perf-chip.on{background:var(--rt-teal,#087275);color:#fff;border-color:transparent}
#performance .perf-card{margin-top:12px}
#performance .perf-card h3{margin:0 0 10px}
#performance .perf-hero{margin:-4px -4px 12px;padding:16px;border-radius:14px;background:linear-gradient(135deg,#087f82,#0d6f72);color:#fff}
#performance .perf-hero .perf-label,#performance .perf-hero .perf-sub{color:#d8f3f1}
#performance .perf-big{display:block;font-size:34px;line-height:1.15;margin:4px 0}
#performance .perf-label{display:block;color:var(--sh-muted,#5d7480);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
#performance .perf-sub{display:block;color:var(--sh-muted,#5d7480);font-size:12px;font-weight:600;margin-top:2px}
#performance .perf-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#performance .perf-kpi{padding:12px;border:1px solid var(--rt-border,#dae5ed);border-radius:12px}
#performance .perf-kpi strong{display:block;font-size:22px;margin-top:4px}
#performance .perf-goal-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
#performance .perf-goal-row .field{max-width:150px;text-align:right}
#performance .perf-bar{height:12px;border-radius:999px;background:var(--sh-soft,#eef5f5);overflow:hidden;margin-top:12px}
#performance .perf-bar span{display:block;height:100%;background:linear-gradient(90deg,#0d8a8c,#f0913a);border-radius:999px}
#performance .perf-note{color:var(--sh-muted,#5d7480);font-size:13px;margin:8px 0 10px}
#performance .perf-table{display:grid}
#performance .perf-tr{display:grid;grid-template-columns:1.1fr .7fr 1.4fr 1fr;gap:6px;align-items:center;padding:10px 6px;border:0;border-top:1px solid var(--rt-border,#dae5ed);background:none;color:inherit;font:inherit;text-align:left;width:100%}
#performance .perf-tr span:not(:first-child){text-align:right}
#performance .perf-th{border-top:0;color:var(--sh-muted,#5d7480);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
#performance .perf-total{font-weight:800}
#performance button.perf-tr{cursor:pointer}
#performance .perf-sales{list-style:none;margin:0;padding:0}
#performance .perf-sales button{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:11px 2px;border:0;border-top:1px solid var(--rt-border,#dae5ed);background:none;color:inherit;font:inherit;text-align:left;min-height:48px}
#performance .perf-amt{font-weight:800;white-space:nowrap}
#performance .perf-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
/* R3.0.23 list cards: flat rows with a theme-coloured divider (the rounded rows + light top border drew arcs),
   compact tag pill that follows light/dark, and the contact row without the empty Email button. */
#customerList .customer,#opportunityList .customer{border-radius:0!important;border-top:1px solid rgba(120,150,160,.22)!important;border-bottom:0!important;padding:16px 2px!important;grid-template-columns:1fr 1fr!important;column-gap:8px!important}
#customerList .customer>*,#opportunityList .customer>*{grid-column:1/-1}
#customerList .customer>.customer-contact-row,#opportunityList .customer>.customer-contact-row{grid-column:1!important}
#customerList .customer>.customer-primary-actions,#opportunityList .customer>.customer-primary-actions{grid-column:2!important}
#customerList .customer:first-child,#opportunityList .customer:first-child{border-top:0!important;padding-top:4px!important}
#customerList .customer .pill,#opportunityList .customer .pill{display:inline-block;justify-self:start;width:auto;max-width:100%;background:var(--sh-soft,#eef5f5)!important;color:var(--rt-teal,#087275)!important;font-size:11.5px;margin-bottom:6px;white-space:normal}
#customerList .contact-action.unavailable,#opportunityList .contact-action.unavailable{display:none!important}
#customerList .customer-contact-row .contact-actions,#opportunityList .customer-contact-row .contact-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
/* R3.0.24: pop-up cards (call note, text templates) follow night mode — the card was always white. */
:root[data-rt-theme=dark] .text-modal-card{background:var(--rt-surface,#132630)!important;color:var(--rt-ink,#e6f1f4)!important;box-shadow:0 16px 50px rgba(0,0,0,.6)!important;border:1px solid rgba(120,150,160,.22)}
:root[data-rt-theme=dark] .text-modal-card h2,:root[data-rt-theme=dark] .text-modal-card h3,:root[data-rt-theme=dark] .text-modal-card strong{color:var(--rt-ink,#e6f1f4)!important}

/* R3.0.26: no double-tap zoom (taps stay fast; pinch zoom is unaffected where iOS allows it). */
html,body{touch-action:manipulation}
