/* Salespirit Sales — Mono Soft
   Soft, monochrome "neumorphic" look on top of style.css: surfaces share one grey, depth comes from
   a light and a dark shadow. White-label colours (--ink / --brand) keep working. */
:root {
  --bg: #e8e8e8;
  --card: #e8e8e8;
  --soft: #e0e0e0;
  --fg: #222224;
  --dim: #7a7a7f;
  --line: #d3d3d3;
  --inv: #222224;
  --invfg: #f2f2f2;
  --hi: #ffffff;
  --lo: #c4c4c4;
  --f: "Plus Jakarta Sans", Inter, ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 22px;
  --r-sm: 16px;
  --sh-out: 9px 9px 20px var(--lo), -9px -9px 20px var(--hi);
  --sh-out-sm: 4px 4px 10px var(--lo), -4px -4px 10px var(--hi);
  --sh-in: inset 4px 4px 9px var(--lo), inset -4px -4px 9px var(--hi);
  --sh-in-sm: inset 2px 2px 5px var(--lo), inset -2px -2px 5px var(--hi);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1f22; --card: #1f1f22; --soft: #1a1a1d; --fg: #ececee; --dim: #8e8e95; --line: #2d2d31;
    --inv: #ececee; --invfg: #1f1f22; --hi: #2a2a2e; --lo: #121214;
  }
}

body { background: var(--bg); letter-spacing: -.005em; }

/* ---------- Surfaces ---------- */
.glass, .card, .rail, .topbar, .panel, .chat { box-shadow: var(--sh-out); }
.col, .day, .content-item, .pw-item, .td-kpis, #tList > .task, .task-group .task { box-shadow: var(--sh-out-sm); }
@media (min-width: 821px) {
  .rail { padding: 20px 14px; height: calc(100vh - 40px); }
  .app { gap: 20px; padding: 20px; }
  .main-wrap { gap: 20px; }
  .rail, .topbar { top: 20px; }
}
@media (max-width: 820px) {
  .rail { box-shadow: 0 6px 16px var(--lo); }
  .menu-btn { background: var(--bg); box-shadow: var(--sh-out-sm); }
  .nav-open .rail-btn { background: var(--bg); box-shadow: var(--sh-out-sm); }
}
.overlay { background: rgba(40, 40, 44, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.panel { box-shadow: 18px 18px 40px rgba(0, 0, 0, .18), -10px -10px 30px var(--hi); }

/* Recessed areas */
.empty, .preview-table, .kb-preview, .pipe-bar, .md pre, .viewas, .tabs { background: var(--bg); box-shadow: var(--sh-in-sm); }
.md code { background: var(--soft); }

/* Raised list items */
.follow-list li, .activity, .task { background: var(--bg); box-shadow: var(--sh-out-sm); transition: box-shadow .18s, transform .12s; }
.follow-list li:hover { background: var(--bg); color: var(--fg); box-shadow: var(--sh-in-sm); }
.follow-list li:hover .muted { color: var(--dim); opacity: 1; }
.follow-list li:hover .btn.ghost { background: var(--bg); color: var(--fg); border-color: transparent; }
.msg.assistant { background: var(--bg); box-shadow: var(--sh-out-sm); }
.msg.user { box-shadow: 4px 4px 10px var(--lo); }

/* ---------- Navigation ---------- */
.nav { gap: 6px; }
.nav a { transition: box-shadow .18s, color .15s; }
.nav a:hover { background: transparent; color: var(--fg); box-shadow: var(--sh-out-sm); }
.nav a.active { background: var(--bg); color: var(--fg); box-shadow: var(--sh-in-sm); }
.nav a.active .count { background: var(--ink); color: var(--on-ink); }
.rail-btn:hover { background: transparent; box-shadow: var(--sh-out-sm); }
.me { background: var(--bg); box-shadow: var(--sh-out-sm); }
.me:hover { background: var(--bg); box-shadow: var(--sh-in-sm); }

/* ---------- Buttons ---------- */
.btn { box-shadow: 4px 4px 10px var(--lo), -4px -4px 10px var(--hi); transition: transform .12s ease, box-shadow .18s ease; }
.btn:active { transform: scale(.97); box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .35); }
.btn.ghost { background: var(--bg); border-color: transparent; }
.btn.ghost:active { box-shadow: var(--sh-in-sm); }
.btn.danger { background: transparent; box-shadow: none; }
.btn:disabled { box-shadow: none; }
.icon-btn:hover, .close:hover { background: var(--bg); color: var(--fg); box-shadow: var(--sh-out-sm); }
.close { background: var(--bg); box-shadow: var(--sh-out-sm); }
.close:active, .icon-btn:active { box-shadow: var(--sh-in-sm); }
.chip { border: 0; background: var(--bg); box-shadow: var(--sh-out-sm); }
.chip:hover { background: var(--bg); color: var(--fg); box-shadow: var(--sh-in-sm); }
.chip.active { background: var(--ink); color: var(--on-ink); }
.tabs { padding: 5px; gap: 4px; }
.tabs button { transition: box-shadow .18s, color .15s; }
.tabs button.active { background: var(--bg); color: var(--fg); box-shadow: var(--sh-out-sm); }

/* ---------- Fields ---------- */
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=tel], input[type=url], input[type=number], input[type=time], select, textarea {
  background: var(--bg); border-color: transparent; box-shadow: var(--sh-in-sm);
}
input:focus, select:focus, textarea:focus { background: var(--bg); border-color: transparent; box-shadow: var(--sh-in), 0 0 0 1.5px color-mix(in srgb, var(--fg) 35%, transparent); }
.toolbar input[type=search], .toolbar select { background: var(--bg); }
input[type=range] { accent-color: var(--fg); }

/* ---------- Stats ---------- */
.stat.glow { box-shadow: 8px 8px 18px var(--lo), -6px -6px 16px var(--hi); }

/* ---------- Toast: a soft pill with an icon ---------- */
.toast.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 20px 7px 7px; border-radius: 99px;
  background: var(--bg); color: var(--fg);
  box-shadow: 10px 10px 24px rgba(0, 0, 0, .16), -8px -8px 20px var(--hi), inset 0 0 0 1px color-mix(in srgb, var(--hi) 60%, transparent);
  animation: toastIn .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.toast[hidden] { display: none; }
.toast-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--on-ink); }
.toast-ic .ti { font-size: 16px; vertical-align: 0; }
.toast.is-err .toast-ic { background: var(--bg); color: var(--fg); box-shadow: var(--sh-in-sm); }
.toast.is-info .toast-ic { background: var(--bg); color: var(--fg); box-shadow: var(--sh-out-sm); }
.toast-tx { min-width: 0; }
@keyframes toastIn { from { opacity: 0; translate: 0 18px; scale: .85; } }
@media (max-width: 760px) { .toast.toast { justify-content: center; } }

/* ---------- Sound picker (Settings › Profile) ---------- */
.snd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin-bottom: 18px; }
.snd-opt {
  display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 14px;
  border: 0; border-radius: 99px; background: var(--bg); color: var(--dim);
  font-weight: 700; font-size: 13.5px; text-align: left;
  box-shadow: var(--sh-out-sm); transition: box-shadow .18s, color .15s;
}
.snd-opt em { font-style: normal; font-size: 11px; opacity: .55; font-variant-numeric: tabular-nums; }
.snd-opt:hover { color: var(--fg); }
.snd-opt.on { color: var(--fg); box-shadow: var(--sh-in-sm); }
.snd-opt .ti { font-size: 16px; vertical-align: 0; }
.snd-eq { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.snd-eq b { width: 3px; height: 40%; border-radius: 2px; background: currentColor; opacity: .35; }
.snd-opt.on .snd-eq b { opacity: 1; animation: sndEq .9s ease-in-out infinite; }
.snd-opt.on .snd-eq b:nth-child(2) { animation-delay: .15s; }
.snd-opt.on .snd-eq b:nth-child(3) { animation-delay: .3s; }
.snd-opt.playing .snd-eq b { animation-duration: .32s; }
@keyframes sndEq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.snd-vol { display: flex; align-items: center; gap: 12px; max-width: 420px; font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.snd-vol input { flex: 1; }
.snd-vol span { width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); }

/* ---------- First paint while the app script starts ---------- */
.boot-splash { min-height: 100vh; display: grid; place-items: center; }
.boot-splash span { width: 54px; height: 54px; border-radius: 50%; background: var(--bg); box-shadow: var(--sh-out); animation: bootPulse 1.1s ease-in-out infinite; }
@keyframes bootPulse { 50% { box-shadow: var(--sh-in); } }

@media (max-width: 760px) {
  .snd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .toast.toast, .snd-opt.on .snd-eq b, .boot-splash span { animation: none; }
}

/* ---------- Client portal (client panel) ---------- */
.portal-box { display: grid; gap: 10px; }
.portal-box .section-sub { margin: 0; }
.portal-box .section-title .status-pill { vertical-align: 3px; margin-left: 6px; }
.portal-link { display: flex; gap: 8px; align-items: center; }
.portal-link input { flex: 1; font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.portal-thread { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding: 12px; border-radius: var(--r-sm); box-shadow: var(--sh-in-sm); }
.portal-thread .msg { font-size: 14px; }
.portal-meta { display: block; font-size: 11px; opacity: .65; margin-top: 3px; }
.portal-reply { display: flex !important; gap: 8px; align-items: flex-end; }
.portal-reply textarea { min-height: 46px; height: 46px; border-radius: 22px; padding: 12px 16px; }
.portal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); vertical-align: 2px; margin-left: 4px; opacity: .5; }

/* ---------- Light / dark chosen by hand (public/theme.js sets data-theme on <html>) ---------- */
:root[data-theme="light"] {
  --bg: #e8e8e8; --card: #e8e8e8; --soft: #e0e0e0; --fg: #222224; --dim: #7a7a7f; --line: #d3d3d3;
  --inv: #222224; --invfg: #f2f2f2; --hi: #ffffff; --lo: #c4c4c4; --td-meet: #121417; color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1f1f22; --card: #1f1f22; --soft: #1a1a1d; --fg: #ececee; --dim: #8e8e95; --line: #2d2d31;
  --inv: #ececee; --invfg: #1f1f22; --hi: #2a2a2e; --lo: #121214; --td-meet: #e8eaed; color-scheme: dark;
}
.theme-btn { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--fg); box-shadow: var(--sh-out-sm); transition: box-shadow .18s, transform .2s; }
.theme-btn:hover { box-shadow: 6px 6px 14px var(--lo), -6px -6px 14px var(--hi); }
.theme-btn:active { box-shadow: var(--sh-in-sm); transform: rotate(-20deg); }
.theme-btn .ti { font-size: 19px; vertical-align: 0; }
.theme-btn.m-only { display: none; }
@media (max-width: 820px) { .theme-btn.m-only { display: grid; } }
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 12px; }
.theme-pick .snd-opt { justify-content: center; }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .35s ease, color .35s ease, box-shadow .35s ease, border-color .35s ease !important; }
.auth { position: relative; }
.auth-theme { position: absolute; top: 20px; right: 20px; }
