:root {
  --nav: #1c2b3f;
  --nav-2: #24364e;
  --nav-text: #b8c4d6;
  --primary: #1a73e8;
  --primary-600: #1661c7;
  --primary-50: #eaf2fe;
  --bg: #f3f5f8;
  --panel: #ffffff;
  --side: #f8f9fb;
  --border: #e3e7ee;
  --border-2: #d3d9e3;
  --text: #1f2a37;
  --muted: #6b7789;
  --faint: #9aa5b5;
  --green: #18a058;
  --red: #e5484d;
  --orange: #f08c00;
  --purple: #7c5cff;
  --teal: #0fa3a3;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .22);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

/* ---------- Top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 4px;
  height: 56px; padding: 0 16px;
  background: linear-gradient(180deg, var(--nav-2), var(--nav));
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.01em;
  margin-right: 18px; white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3d8bfd, var(--primary));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.nav-links { display: flex; gap: 2px; height: 100%; }
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; height: 100%;
  color: var(--nav-text); font-weight: 500;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
  text-decoration: none !important; white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-link.active { color: #fff; border-bottom-color: #4c9bff; }
.nav-link .count {
  background: var(--red); color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 10px; padding: 1px 6px; line-height: 16px;
}
.nav-spacer { flex: 1; }
.search {
  position: relative; width: 280px;
}
.search input {
  width: 100%; height: 36px; padding: 0 12px 0 36px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.08); color: #fff; outline: none;
  transition: background .15s, border-color .15s;
}
.search input::placeholder { color: #8795aa; }
.search input:focus { background: rgba(255,255,255,.14); border-color: rgba(76,155,255,.6); }
.search svg { position: absolute; left: 11px; top: 10px; color: #8795aa; }
.search-results {
  position: absolute; top: 42px; left: 0; right: 0;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
  overflow: hidden; display: none; max-height: 380px; overflow-y: auto;
}
.search-results.open { display: block; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.search-item:hover, .search-item.hl { background: var(--primary-50); }
.search-item .sub { color: var(--muted); font-size: 12px; }
.nav-btn {
  margin-left: 10px; height: 36px; padding: 0 14px;
  border: 0; border-radius: 8px; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 600;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.nav-btn:hover { background: #2b80f0; }
.nav-icon-btn {
  margin-left: 6px; width: 36px; height: 36px; border-radius: 8px; border: 0;
  background: transparent; color: var(--nav-text); cursor: pointer;
  display: grid; place-items: center;
}
.nav-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---------- Layout ---------- */
.app { height: calc(100vh - 56px); }
.split { display: flex; height: 100%; }
.sidebar {
  width: 248px; flex-shrink: 0; overflow-y: auto;
  background: var(--side); border-right: 1px solid var(--border);
  padding: 16px 10px;
}
.side-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint); padding: 14px 10px 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.side-title:first-child { padding-top: 0; }
.side-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 7px; cursor: pointer;
  color: var(--text); font-weight: 500; text-decoration: none !important;
}
.side-item:hover { background: #eceff4; }
.side-item.active { background: var(--primary-50); color: var(--primary); }
.side-item .n { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.side-item.active .n { color: var(--primary); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.main { flex: 1; overflow-y: auto; min-width: 0; }
.page { padding: 22px 26px; }
.page-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h1 { font-size: 21px; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); }
.grow { flex: 1; }

/* ---------- Controls ---------- */
.btn {
  height: 34px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--border-2); background: #fff; cursor: pointer;
  font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.btn:hover { background: #f7f8fa; border-color: #c4ccd8; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.danger { color: var(--red); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn.ghost:hover { background: #eef1f5; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--border-2); border-radius: 8px; background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 88px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.15); }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

/* ---------- Card ---------- */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.card-head .grow { flex: 1; }
.card-body { padding: 14px 16px; }

/* ---------- Table ---------- */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 10px 12px; background: #fafbfc; border-bottom: 1px solid var(--border);
  white-space: nowrap; cursor: pointer; user-select: none;
}
.tbl th:hover { color: var(--text); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: #f6f9fe; }
.tbl tbody tr.sel { background: var(--primary-50); }
.tbl .chk { width: 36px; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell .nm { font-weight: 600; }
.name-cell .sub { color: var(--muted); font-size: 12px; }
.empty { padding: 48px; text-align: center; color: var(--muted); }
.empty svg { color: var(--faint); margin-bottom: 8px; }

.bulkbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--primary-50); border-bottom: 1px solid #cfe0fb;
}

/* ---------- Avatars, badges ---------- */
.av {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px;
}
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 5px; font-size: 12px;
  background: #eef1f5; color: #46536a; margin: 1px 3px 1px 0;
}
.tag button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--faint); line-height: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.overdue { color: var(--red); font-weight: 500; }

/* ---------- Person page ---------- */
.person { display: grid; grid-template-columns: 320px minmax(0, 1fr) 256px; height: 100%; }
.person.rc { grid-template-columns: 320px minmax(0, 1fr) 48px; }
.p-left, .p-right { overflow-y: auto; background: #fff; }
.p-left { border-right: 1px solid var(--border); }
.p-right { border-left: 1px solid var(--border); background: var(--side); }
.p-center { overflow-y: auto; padding: 20px 24px; }
.p-hero { padding: 16px 20px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.p-hero .av { margin: 0; }
.p-hero h2 { font-size: 19px; letter-spacing: -.01em; }
.p-actions { display: flex; justify-content: flex-start; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.circle-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-2);
  background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.circle-btn:hover { background: var(--primary-50); border-color: #b9d3fa; }
.p-sec { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.p-sec h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint);
  margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;
}
.kv { display: flex; gap: 10px; padding: 5px 0; align-items: flex-start; }
.kv .k { width: 92px; flex-shrink: 0; color: var(--muted); font-size: 13px; padding-top: 1px; }
.kv .v { flex: 1; min-width: 0; word-break: break-word; }
.stage-select {
  border: 0; font-weight: 600; padding: 4px 26px 4px 10px; border-radius: 999px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23555' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

.composer { margin-bottom: 20px; overflow: hidden; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--border); background: #fafbfc; padding: 0 6px; }
.tab {
  padding: 11px 14px; cursor: pointer; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px;
  white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.composer-body { padding: 14px 16px; }
.composer-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-2);
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.timeline { position: relative; }
.tl-filter { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 10px; }
.tl-item::before {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-icon.sb { box-shadow: none; }
.tl-card { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 11px; box-shadow: var(--shadow-sm); }
.tl-card.system { background: transparent; border: 0; box-shadow: none; padding: 8px 0 0; }
.tl-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tl-top .t { font-weight: 600; }
.tl-top .when { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.tl-body { margin-top: 3px; white-space: pre-wrap; line-height: 1.4; }
.tl-del { opacity: 0; border: 0; background: none; cursor: pointer; color: var(--faint); padding: 0 2px; }
.tl-card:hover .tl-del { opacity: 1; }
.tl-del:hover { color: var(--red); }

.mini-list .mi { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; border-bottom: 1px solid #eef1f5; }
.mini-list .mi:last-child { border-bottom: 0; }
.mini-list .mi .t { font-weight: 500; }

/* checkbox */
.cb {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #b8c1cf;
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0; background: #fff;
  margin-top: 1px;
}
.cb:hover { border-color: var(--primary); }
.cb.on { background: var(--green); border-color: var(--green); color: #fff; }
.done-txt { text-decoration: line-through; color: var(--faint); }

/* ---------- Tasks page ---------- */
.task-group { margin-bottom: 22px; }
.task-group h3 { font-size: 13px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.task-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-bottom: 1px solid #eef1f5; background: #fff;
}
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #fafcff; }
.task-type { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-h { padding: 9px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; background: #fafbfc; border-bottom: 1px solid var(--border); }
.cal-d { min-height: 112px; border-right: 1px solid #eef1f5; border-bottom: 1px solid #eef1f5; padding: 6px; cursor: pointer; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d:hover { background: #fafcff; }
.cal-d.other { background: #fbfbfc; }
.cal-d.other .num { color: var(--faint); }
.cal-d .num { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-d.today .num { background: var(--primary); color: #fff; }
.cal-ev {
  font-size: 12px; padding: 2px 6px; border-radius: 5px; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid;
}

/* ---------- Deals board ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col { width: 270px; flex-shrink: 0; background: #e9edf2; border-radius: var(--radius); padding: 10px; }
.col.drop { background: #dde8f9; outline: 2px dashed #8db8f5; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 600; }
.col-h .n { color: var(--muted); font-weight: 500; }
.col-h .sum { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.deal {
  background: #fff; border-radius: 8px; padding: 11px 12px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); cursor: grab;
}
.deal:hover { box-shadow: var(--shadow); }
.deal .t { font-weight: 600; margin-bottom: 4px; }
.deal .price { font-weight: 600; color: var(--green); }
.deal.dragging { opacity: .4; }

/* ---------- Reports ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat .l { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.bar-row .lbl { width: 120px; flex-shrink: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { flex: 1; height: 10px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 99px; }
.bar-row .val { width: 40px; text-align: right; font-weight: 600; font-size: 13px; }

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 70px 16px 16px;
  animation: fade .15s ease;
}
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: calc(100vh - 100px); display: flex; flex-direction: column;
  animation: pop .18s ease;
}
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-h h3 { font-size: 16px; flex: 1; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98) } }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #1f2a37; color: #fff; padding: 10px 16px; border-radius: 9px;
  box-shadow: var(--shadow-lg); z-index: 200; font-weight: 500;
  animation: pop .18s ease;
}

/* inbox */
.inbox-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #eef1f5; cursor: pointer; background: #fff; }
.inbox-item:hover { background: #fafcff; }
.inbox-item .preview { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1200px) {
  .person { grid-template-columns: 290px minmax(0,1fr) 232px; }
  .person.rc { grid-template-columns: 290px minmax(0,1fr) 48px; }
}
@media (max-width: 960px) {
  .person { grid-template-columns: 250px minmax(0,1fr) 210px; }
  .person.rc { grid-template-columns: 250px minmax(0,1fr) 48px; }
  .p-center { padding: 16px; }
}
@media (max-width: 720px) {
  .person { grid-template-columns: 220px minmax(0,1fr) 48px; }
  .person:not(.rc) .pr-body { display: none; }
  .person:not(.rc) .pr-rail { display: flex; }
  .p-sec, .p-hero { padding-left: 12px; padding-right: 12px; }
  .kv .k { width: 76px; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
}
@media (max-width: 900px) {
  .search { width: 160px; }
  .nav-link span.lbl { display: none; }
}
@media (max-width: 560px) {
  .person, .person.rc { grid-template-columns: 1fr; height: auto; }
  .p-left { border-right: 0; }
  .p-right { display: none; }
  .app { height: auto; }
}

/* ---------- Save status + single light theme ---------- */
:root { color-scheme: light; }
[hidden] { display: none !important; }
.sync {
  font-size: 12px; font-weight: 500; color: var(--nav-text); margin-right: 12px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sync.busy::before { background: var(--orange); }
.sync.err { color: #ffb4b6; }
.sync.err::before { background: var(--red); }
@media (max-width: 1100px) { .sync { display: none; } }

/* ---------- Pinned notes ---------- */
.pinned { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pin-card { background: #fff8e1; border: 1px solid #f3d98b; border-radius: var(--radius); padding: 10px 14px 12px; box-shadow: var(--shadow-sm); }
.pin-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #94650a; text-transform: uppercase; letter-spacing: .06em; }
.pin-head .when { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; color: #a8946a; font-size: 12px; }
.pin-head .btn { height: 24px; color: #94650a; font-size: 12px; }
.pin-head .btn:hover { background: #fbecc0; }
.pin-card .tl-body { margin-top: 4px; }
.tl-pin.on { opacity: 1; color: #d49a00; }
.tl-pin:hover { color: #d49a00; }

/* ---------- Prev / next lead ---------- */
.p-hero { position: relative; }
.p-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -8px -6px 10px; }
.nav-arrow {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border-2); background: #fff; color: var(--text);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background .12s, color .12s, border-color .12s;
}
.nav-arrow:hover:not(:disabled) { background: var(--primary-50); color: var(--primary); border-color: #b9d3fa; }
.nav-arrow:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-arrow:disabled { opacity: .35; cursor: default; box-shadow: none; }
.p-nav-mid { min-width: 0; text-align: center; line-height: 1.35; }
.p-nav-mid a { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-nav-mid .small { font-variant-numeric: tabular-nums; }

/* ---------- Filters ---------- */
.btn-on { border-color: #b9d3fa; background: var(--primary-50); color: var(--primary); }
.btn .badge-n { background: var(--primary); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 600; padding: 0 6px; line-height: 17px; }
.filter-panel { margin-bottom: 14px; padding: 16px 18px; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 16px; }
.fp-sec { min-width: 0; }
.fp-sec.wide { grid-column: 1 / -1; }
.fp-l { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.fp-foot { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.chip.sm { padding: 3px 10px; font-size: 12px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.fchip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px;
  background: var(--primary-50); color: var(--primary); border: 1px solid #cfe0fb;
  border-radius: 999px; font-size: 12px; font-weight: 500;
}
.fchip button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; padding: 0; }
.fchip button:hover { background: #d5e5fd; }
.side-item.custom .side-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-x { display: none; border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 4px; margin-left: 2px; }
.side-item.custom:hover .side-x { display: grid; }
.side-item.custom:hover .n { display: none; }
.side-x:hover { color: var(--red); background: #fde8e8; }

/* ---------- Person header: always top-left ---------- */
.p-nav { justify-content: flex-start; margin: -4px 0 14px; }
.p-nav .p-nav-mid { text-align: left; flex: 1; }
.p-id { display: flex; align-items: center; gap: 14px; }
.p-id-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.p-id-text h2 { font-size: 19px; line-height: 1.2; word-break: break-word; }
.p-hero .stage-select { margin: 0; }
@media (max-width: 560px) {
  .p-left { border-bottom: 1px solid var(--border); }
  .p-sec, .p-hero { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Small shared helpers ---------- */
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .m0 { margin: 0 !important; }
.mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; }
.row.wrap { flex-wrap: wrap; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--primary); cursor: pointer; font: inherit; }
.linkbtn:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #eef1f5; color: #46536a; white-space: nowrap; }
.pill.ok { background: #e6f6ee; color: #12804a; }
.pill.wait { background: #fff4e0; color: #9a5b00; }
.pill.bad { background: #fdeaea; color: #c4282d; }
.card-head .pill { margin-left: auto; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--primary-50); color: #1d4f91; border: 1px solid #cfe0fb; margin-bottom: 16px; line-height: 1.45; text-align: left; }
.notice svg { flex-shrink: 0; margin-top: 2px; }
.fchip.plain { padding-right: 11px; }
.tbl.static tbody tr { cursor: default; }
.tbl td.num { font-variant-numeric: tabular-nums; }
.modal-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 6px 0 10px; }
.tl-card.inbound { border-left: 3px solid var(--primary); }
.task-msg { margin-top: 4px; font-size: 12px; color: var(--muted); background: #f6f8fb; border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; white-space: pre-wrap; max-width: 620px; }

/* segmented control (call / text direction) */
.seg { display: inline-flex; background: #eef1f5; border-radius: 8px; padding: 3px; gap: 2px; margin-bottom: 10px; flex-wrap: wrap; }
.seg-b { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg-b:hover { color: var(--text); }
.seg-b.on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* switch */
.switch { width: 38px; height: 22px; border-radius: 999px; border: 0; background: #cdd4df; position: relative; cursor: pointer; padding: 0; flex-shrink: 0; transition: background .15s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch.on { background: var(--green); }
.switch.on span { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch-l { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

/* ---------- Tasks: Actions + Hail Mary ---------- */
.ops { margin-bottom: 22px; overflow: hidden; }
.ops-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ops-tabs { display: flex; gap: 2px; }
.ops-tab { border: 0; background: none; padding: 9px 12px 11px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ops-tab:hover { color: var(--text); }
.ops-tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.ops-tab[data-ops="hail"].on { color: #c2410c; border-bottom-color: #c2410c; }
.ops-n { background: #eef1f5; color: var(--muted); border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.ops-tab.on .ops-n { background: var(--primary); color: #fff; }
.ops-tab[data-ops="hail"].on .ops-n { background: #c2410c; }
.ops-sub { padding-bottom: 8px; margin-left: auto; }
.ops-list { list-style: none; margin: 0; padding: 0; }
.op { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid #eef1f5; }
.op:last-child { border-bottom: 0; }
.op-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.op-main { flex: 1; min-width: 0; }
.op-t { font-weight: 600; }
.op-why { font-size: 13px; color: var(--muted); margin-top: 2px; }
.op-msg { margin-top: 6px; font-size: 13px; color: #33415a; background: #f6f8fb; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; display: flex; gap: 7px; align-items: flex-start; }
.op-msg svg { flex-shrink: 0; margin-top: 3px; color: var(--faint); }
.op-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; flex-shrink: 0; max-width: 380px; }
.ops-empty { padding: 18px 16px; color: var(--green); font-weight: 500; display: flex; gap: 8px; align-items: center; }
.ops-more { display: block; padding: 10px 14px; border-top: 1px solid #eef1f5; width: 100%; text-align: left; }
.tasks-h { font-size: 15px; margin: 0 0 12px; }
@media (max-width: 760px) { .op { flex-wrap: wrap; } .op-acts { max-width: none; justify-content: flex-start; padding-left: 40px; } .ops-sub { margin-left: 0; } }

/* ---------- Settings pages ---------- */
.settings-page { max-width: 1040px; }
.sec-card { margin-bottom: 16px; }
.sec-h { font-size: 15px; margin: 24px 0 12px; }
.checks { display: flex; flex-direction: column; gap: 9px; }
.checks label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; line-height: 1.4; cursor: pointer; }
.inline-num { width: 70px; height: 30px; display: inline-block; }
.inline-check { display: flex; gap: 6px; align-items: center; }
.key-show { display: flex; gap: 8px; }
.key-show .input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; }

/* workflows */
.wf-tbl td { vertical-align: top; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tpl { text-align: left; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
.tpl:hover { border-color: #b9d3fa; box-shadow: var(--shadow); }
.tpl-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.tpl-n { font-weight: 600; }
.wf-head { gap: 10px; }
.wf-name { flex: 1 1 260px; min-width: 0; font-size: 21px; font-weight: 600; letter-spacing: -.01em; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; background: transparent; outline: none; }
.wf-name:hover { border-color: var(--border); }
.wf-name:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,.15); }
.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.wf-main { min-width: 0; }
.wf-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.wf-block { margin-bottom: 22px; }
.wf-label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; flex-wrap: wrap; }
.wf-sub { font-weight: 500; font-size: 13px; }
.wf-num { width: 22px; height: 22px; border-radius: 50%; background: var(--nav); color: #fff; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; }
.steps { display: flex; flex-direction: column; }
.step { overflow: hidden; }
.step-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; border-bottom: 1px solid #eef1f5; background: #fafbfc; }
.step-n { font-size: 12px; font-weight: 600; color: var(--faint); width: 16px; font-variant-numeric: tabular-nums; }
.step-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; }
.step-b { padding: 12px 14px; }
.step-join { width: 2px; height: 14px; background: var(--border-2); margin-left: 30px; }
.add-step { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.add-step .chip { display: inline-flex; align-items: center; gap: 5px; }
.wf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.wf-stats div { background: #f6f8fb; border-radius: 8px; padding: 8px 4px; display: flex; flex-direction: column; }
.wf-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.wf-stats span { font-size: 11px; color: var(--muted); }
.vars code { background: #eef1f5; border-radius: 4px; padding: 1px 5px; font-size: 12px; display: inline-block; margin: 0 2px 4px 0; }
@media (max-width: 1100px) { .wf-layout { grid-template-columns: 1fr; } .wf-side { position: static; } }

/* ---------- Agent ---------- */
.agent { display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.agent-scroll { flex: 1; overflow-y: auto; padding: 24px 16px 8px; }
.agent-col { max-width: 820px; margin: 0 auto; }
.agent-dock { padding: 8px 16px 14px; }
.agent-empty { text-align: center; padding: 48px 8px 16px; }
.agent-empty h2 { font-size: 22px; margin: 12px 0 6px; letter-spacing: -.01em; }
.agent-empty p { max-width: 520px; margin: 0 auto 20px; line-height: 1.5; }
.ae-mark { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3d8bfd, var(--primary)); box-shadow: var(--shadow); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sugg { border: 1px solid var(--border-2); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; box-shadow: var(--shadow-sm); }
.sugg:hover { border-color: #b9d3fa; background: var(--primary-50); color: var(--primary); }
.msg { display: flex; gap: 12px; margin-bottom: 18px; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--nav); color: #fff; padding: 10px 14px; border-radius: 14px 14px 4px 14px; max-width: 78%; white-space: pre-wrap; line-height: 1.45; }
.ai-av { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3d8bfd, var(--primary)); }
.ai-av.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.ai-body { flex: 1; min-width: 0; padding-top: 4px; }
.md { line-height: 1.55; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.md li { margin-bottom: 3px; }
.md .md-h { font-weight: 700; margin-top: 10px; }
.md code { background: #eef1f5; border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.act { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; background: #e6f6ee; color: #12804a; border-radius: 999px; padding: 3px 10px; }
.ai-note { font-size: 12px; color: #9a5b00; margin-top: 4px; }
.ai-meta { font-size: 11px; color: var(--faint); margin-top: 4px; }
.thinking { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; padding: 4px 0; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
.thinking span { margin-left: 6px; }
@keyframes blink { 50% { opacity: .25; } }
.composer-box { background: #fff; border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 10px 8px 14px; transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.12), var(--shadow); }
.composer-box textarea { width: 100%; border: 0; outline: none; resize: none; font: inherit; line-height: 1.5; min-height: 26px; max-height: 220px; background: transparent; padding: 4px 0; }
.cb-row { display: flex; align-items: center; gap: 8px; }
.picker-wrap { position: relative; }
.picker-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #f6f8fb; color: var(--text); border-radius: 8px; height: 30px; padding: 0 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.picker-btn:hover { background: #eef1f5; }
.send-btn { width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.send-btn:hover { background: var(--primary-600); }
.send-btn:disabled { background: #b8c4d6; cursor: default; }
.send-btn.stop { background: var(--text); }
.agent-foot { font-size: 12px; color: var(--faint); text-align: center; margin-top: 8px; }
.picker { position: absolute; right: 0; bottom: 38px; width: 300px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; animation: pop .14s ease; }
.pk-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 10px 4px; }
.pk-item { display: grid; grid-template-columns: 1fr 18px; grid-template-areas: "main check" "sub check"; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.pk-item:hover { background: #f3f6fa; }
.pk-item.on { background: var(--primary-50); }
.pk-item.disabled { cursor: default; opacity: .6; }
.pk-item.disabled:hover { background: none; }
.pk-main { grid-area: main; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.pk-sub { grid-area: sub; font-size: 12px; color: var(--muted); }
.pk-check { grid-area: check; align-self: center; color: var(--primary); }
.pk-def { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #eef1f5; color: var(--muted); border-radius: 4px; padding: 1px 5px; }
.pk-empty { font-size: 12px; color: var(--muted); padding: 4px 10px 8px; }
.pk-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); margin-top: 4px; padding: 8px 6px 2px; }
@media (max-width: 600px) { .picker { width: min(300px, calc(100vw - 32px)); } .cb-row > .small { display: none; } }
@media (prefers-reduced-motion: reduce) { .ai-av.pulse, .thinking i, .modal, .modal-bg, .toast, .picker { animation: none; } }
@media (max-width: 560px) { .agent { height: calc(100vh - 56px); } }

/* ---------- Move the Line + Claude Sales AI ---------- */
.tab[data-ctab="mtl"] { color: #8a4b12; }
.tab[data-ctab="mtl"].active { color: #b45309; border-bottom-color: #b45309; }
.circle-btn.mtl-btn { color: #b45309; }
.circle-btn.mtl-btn:hover { background: #fff4e0; border-color: #f3cf96; }
.mtl { display: flex; flex-direction: column; gap: 12px; }
.mtl-head { display: flex; gap: 12px; align-items: flex-start; }
.mtl-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.mtl-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #b45309; }
.mtl-headline { font-size: 16px; font-weight: 700; margin-top: 2px; line-height: 1.3; }
.mtl-why { color: var(--muted); margin-top: 4px; line-height: 1.45; }
.mtl-notice { margin: 0; }
.mtl-points { margin: 0; padding-left: 20px; line-height: 1.5; }
.mtl-task { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 500; }
.mtl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.mtl-foot { font-size: 12px; color: var(--faint); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; border-top: 1px solid #eef1f5; padding-top: 10px; }
.mtl-loading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; }
.mtl-done { display: flex; align-items: center; gap: 10px; color: var(--green); font-weight: 600; flex-wrap: wrap; }
.mtl-done span { flex: 1; min-width: 180px; }
.op-tip { margin-top: 6px; font-size: 13px; color: #8a4b12; display: flex; gap: 6px; align-items: flex-start; }
.op-tip svg { flex-shrink: 0; margin-top: 3px; }
.ai-badge { margin-left: auto; flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); background: var(--primary-50); border-radius: 4px; padding: 1px 5px; align-self: center; }
.ops-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 6px; }
.ops-engine { display: inline-flex; align-items: center; gap: 6px; }
.ops-engine select { height: 28px; border: 1px solid var(--border-2); border-radius: 7px; padding: 0 6px; background: #fff; font-size: 12px; }
.ops-sub { flex-basis: 100%; margin-left: 0; padding: 0 0 8px; }
.ai-busy svg { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Sidebar: recommended actions / hail mary ---------- */
.side-ops { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 4px; overflow: hidden; box-shadow: var(--shadow-sm); }
.side-ops-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.side-ops-tabs button { border: 0; background: #fafbfc; padding: 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-bottom: 2px solid transparent; }
.side-ops-tabs button span { background: #eef1f5; border-radius: 999px; padding: 0 6px; font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; }
.side-ops-tabs button.on { background: #fff; color: var(--primary); border-bottom-color: var(--primary); }
.side-ops-tabs button.on span { background: var(--primary); color: #fff; }
.side-ops-tabs button.hail.on { color: #c2410c; border-bottom-color: #c2410c; }
.side-ops-tabs button.hail.on span { background: #c2410c; }
.side-ops-list { list-style: none; margin: 0; padding: 4px; max-height: 340px; overflow-y: auto; }
.side-ops-list a { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 7px; color: var(--text); text-decoration: none !important; }
.side-ops-list a:hover { background: #eef3fb; }
.side-ops-list .dot { margin-top: 6px; }
.so-txt { display: flex; flex-direction: column; min-width: 0; }
.so-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-why { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-ops-empty { padding: 12px; font-size: 12px; color: var(--green); font-weight: 500; }
.side-ops-more { display: block; padding: 7px 12px; font-size: 12px; font-weight: 600; border-top: 1px solid #eef1f5; }
.mtl-ok { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-weight: 600; font-size: 13px; padding: 0 6px; }

/* ---------- Follow-up grade badge ---------- */
.brand { margin-right: 8px; }
.grade { position: relative; width: 40px; height: 40px; border: 0; background: none; padding: 1px; margin-right: 12px; cursor: pointer; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; }
.grade:hover { background: rgba(255,255,255,.07); }
.grade:focus-visible { outline: 2px solid #4c9bff; outline-offset: 1px; }
.grade svg { display: block; }
.grade-letter { position: absolute; right: -2px; bottom: -1px; min-width: 16px; height: 16px; border-radius: 8px; font-size: 10px; font-weight: 800; color: #1c2b3f; display: grid; place-items: center; padding: 0 3px; box-shadow: 0 0 0 2px var(--nav); }
.grade-master svg { filter: drop-shadow(0 0 4px rgba(226,230,238,.45)); }
.grade-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.grade-big { position: relative; width: 76px; height: 76px; border-radius: 50%; background: var(--nav); display: grid; place-items: center; flex-shrink: 0; }
.grade-big svg { width: 70px; height: 70px; }
.grade-big .grade-letter { right: 0; bottom: 2px; min-width: 22px; height: 22px; border-radius: 11px; font-size: 12px; }
.grade-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.grade-rows { display: flex; flex-direction: column; gap: 12px; }
.grade-row .track { height: 8px; background: #eef1f5; border-radius: 99px; overflow: hidden; margin: 5px 0 4px; }
.grade-row .fill { height: 100%; border-radius: 99px; }
.grade-row-h { display: flex; justify-content: space-between; }
.grade-row .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.grade-tips { margin-top: 16px; background: #f6f8fb; border-radius: 10px; padding: 12px 14px; }
.grade-tips ul { margin: 0; padding-left: 18px; line-height: 1.5; }
@media (max-width: 900px) { .brand { font-size: 0; gap: 0; margin-right: 6px; } .grade { margin-right: 4px; } }

/* settings section tabs (shown when the sidebar is hidden) */
.settings-tabs { display: none; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.settings-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-2); background: #fff; color: var(--text); font-weight: 500; font-size: 13px; text-decoration: none !important; }
.settings-tabs a.on { background: var(--primary-50); border-color: #b9d3fa; color: var(--primary); }
@media (max-width: 760px) { .settings-tabs { display: flex; } }
.mtl-from { display: flex; gap: 8px; align-items: flex-start; background: #fff7e6; border: 1px solid #f3d9a8; color: #6b4a12; border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; font-size: 13px; line-height: 1.45; }
.mtl-from svg { flex-shrink: 0; margin-top: 3px; color: #b45309; }

/* editable Loan size / Home value / Address on the lead page */
.ikv .v { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ikv-v { border: 1px dashed transparent; background: none; padding: 1px 6px; margin: -2px -6px; border-radius: 6px; font: inherit; color: inherit; text-align: left; cursor: text; max-width: 100%; word-break: break-word; }
.ikv-v:hover { border-color: var(--border-2); background: #f6f8fb; }
.ikv-v:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.ikv-add { color: var(--primary); font-weight: 500; }
.ikv-input { height: 30px; padding: 0 8px; margin: -4px 0; }
.ltv { font-size: 11px; font-weight: 600; color: var(--muted); background: #eef1f5; border-radius: 999px; padding: 1px 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* collapsible right panel on the lead page */
.p-right .p-sec { padding: 12px 14px; }
.pr-top { display: flex; justify-content: flex-end; padding: 6px 8px 0; }
.pr-toggle { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pr-toggle:hover { color: var(--primary); border-color: #b9d3fa; background: var(--primary-50); }
.pr-rail { display: none; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.person.rc .pr-rail { display: flex; }
.person.rc .pr-body { display: none; }
.rail-i { position: relative; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.rail-i:hover { background: #eef1f5; color: var(--text); }
.rail-i span { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }

/* phone-size top bar: no sideways page scroll */
@media (max-width: 560px) {
  .topnav { padding: 0 8px; gap: 2px; }
  .search, .nav-spacer, #syncStatus { display: none !important; }
  .nav-links { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { padding: 0 9px; }
  .nav-btn { font-size: 0; gap: 0; padding: 0 10px; margin-left: 4px; }
  .nav-icon-btn { margin-left: 2px; }
}
.p-id-text { flex: 1; }
.p-id-text .stage-select { max-width: 100%; }

/* ---------- Hosted sign-in ---------- */
body.signed-out .nav-links, body.signed-out .search, body.signed-out #addPersonBtn, body.signed-out #gradeBtn, body.signed-out .nav-icon-btn, body.signed-out #syncStatus { display: none !important; }
.auth-wrap { min-height: calc(100vh - 56px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; padding: 28px 28px 22px; text-align: left; }
.auth-card .ae-mark { margin: 0 0 14px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card > p { margin: 0 0 18px; }
.auth-go { width: 100%; justify-content: center; height: 40px; margin-top: 4px; }
.auth-msg { min-height: 20px; font-size: 13px; color: var(--red); margin-bottom: 8px; }
.auth-msg.ok { color: var(--green); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; font-size: 13px; }

/* ---------- PropertyRadar ---------- */
.pr-page { max-width: 1400px; }
.pr-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.pr-filters { padding: 14px; position: sticky; top: 0; max-height: calc(100vh - 120px); overflow-y: auto; }
.pr-sec { border-top: 1px solid #eef1f5; padding-top: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pr-chks { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.pr-chk { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; cursor: pointer; }
.pr-inline { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 13px; }
.pr-inline > span { color: var(--muted); }
.pr-inline .row { gap: 6px; }
.pr-filters .input { height: 32px; font-size: 13px; }
.pr-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pr-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.pr-count { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-count strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.pr-lim { width: 80px; height: 32px; display: inline-block; margin-left: 4px; }
.pr-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pr-tabs .seg-b { border: 1px solid var(--border); background: #fff; }
.pr-tabs .seg-b.on { border-color: #b9d3fa; background: var(--primary-50); color: var(--primary); }
.pr-map { height: 360px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: #e9edf2; }
.pr-map.short { height: 220px; }
.pr-table td { vertical-align: top; }
.pr-acts { white-space: nowrap; text-align: right; }
.pr-acts .btn { margin-left: 4px; }
@media (max-width: 900px) { .pr-layout { grid-template-columns: 1fr; } .pr-filters { position: static; max-height: none; } }

/* keep search usable with the extra PropertyRadar tab */
.search { flex-shrink: 0; }
@media (max-width: 1640px) { .nav-link { padding: 0 9px; gap: 6px; } .search { width: 200px; } .sync { font-size: 0; gap: 0; margin-right: 8px; } }
@media (max-width: 1480px) { .search { width: 150px; } }
@media (max-width: 1300px) { .nav-link span.lbl { display: none; } .nav-link { padding: 0 11px; } }

/* ---------- Connekt AI brand ---------- */
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand-by { font-size: 10.5px; font-weight: 400; font-style: italic; color: #b8c4d6; letter-spacing: .01em; margin-top: 2px; white-space: nowrap; }
@media (max-width: 900px) { .brand-text { display: none; } }
.steps-ol { margin: 0 0 12px; padding-left: 20px; line-height: 1.6; }
.steps-ol code { background: #eef1f5; border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* ---------- grade ring + outbound effort meter ---------- */
.grade { width: 46px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; }
.grade-ring { position: relative; width: 34px; height: 34px; display: block; }
.grade-ring svg { width: 34px; height: 34px; }
.grade-ring .grade-letter { right: -5px; bottom: -3px; }

.obm { display: block; }
.obm-track { position: relative; display: block; overflow: hidden; border-radius: 999px;
  background: linear-gradient(180deg, rgba(225,242,255,.32), rgba(150,195,230,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(190,225,255,.32); }
.obm-mini .obm-track { width: 38px; height: 7px; }
.obm-big .obm-track { width: 100%; height: 20px; margin: 6px 0 10px; background: linear-gradient(180deg, #e8f4fc, #cfe2f0); box-shadow: inset 0 1px 2px rgba(20,60,100,.18), inset 0 0 0 1px rgba(120,170,210,.45); }
.obm-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; overflow: hidden; }
.obm-galaxy, .obm-silver, .obm-glint, .obm-frost { position: absolute; inset: 0; }
/* deep space: dark violet-blue with a few stars */
.obm-galaxy { opacity: var(--g);
  background:
    radial-gradient(1px 1px at 12% 35%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 70%, #dfe6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 28%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 62%, #f3e9ff 50%, transparent 51%),
    radial-gradient(ellipse 60% 120% at 30% 50%, rgba(98,64,170,.55), transparent 70%),
    radial-gradient(ellipse 50% 120% at 75% 50%, rgba(40,70,150,.5), transparent 70%),
    linear-gradient(90deg, #05050c, #120c2a 55%, #0a1430); }
/* polished silver */
.obm-silver { opacity: var(--s); background: linear-gradient(180deg, #ffffff 0%, #e4e7ec 30%, #a7aeb9 52%, #eef1f5 78%, #c2c7cf 100%); }
/* gold glisten sweep (80+) */
.obm-glint { background: linear-gradient(105deg, transparent 32%, rgba(232,170,40,0) 38%, rgba(232,170,40,.5) 46%, rgba(255,226,140,.85) 50%, rgba(214,150,30,.45) 54%, transparent 63%); background-size: 260% 100%; animation: obm-glint 2.8s ease-in-out infinite; }
.obm-gold .obm-fill { box-shadow: 0 0 6px rgba(255,205,90,.55); }
@keyframes obm-glint { 0% { background-position: 140% 0; } 60%, 100% { background-position: -40% 0; } }
/* glacier frost: faint sparkles over the whole track */
.obm-frost { background: radial-gradient(1px 1px at 18% 30%, rgba(255,255,255,.9) 50%, transparent 51%), radial-gradient(1px 1px at 46% 72%, rgba(255,255,255,.75) 50%, transparent 51%), radial-gradient(1px 1px at 71% 36%, rgba(255,255,255,.85) 50%, transparent 51%), radial-gradient(1px 1px at 92% 66%, rgba(255,255,255,.7) 50%, transparent 51%); animation: obm-twinkle 3.2s ease-in-out infinite alternate; pointer-events: none; }
@keyframes obm-twinkle { from { opacity: .25; } to { opacity: .85; } }
/* 20 or below: light blue ice with a translucent :( */
.obm-ice .obm-track { background: linear-gradient(180deg, rgba(214,240,255,.95), rgba(160,212,242,.9)); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(150,205,240,.95); }
.obm-ice .obm-fill { background: linear-gradient(180deg, rgba(150,205,240,.9), rgba(105,170,220,.85)); }
.obm-ice .obm-galaxy, .obm-ice .obm-silver { display: none; }
.obm-sad { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: rgba(25,85,135,.42); letter-spacing: .5px; line-height: 1; }
.obm-mini .obm-sad { font-size: 7px; }
.obm-big .obm-sad { font-size: 15px; }
.obm-none .obm-track { opacity: .35; }
@media (prefers-reduced-motion: reduce) { .obm-glint, .obm-frost { animation: none; } }

.ob-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ob-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ob-stats div { background: #f6f8fb; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.ob-stats strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.ob-stats span { font-size: 11px; color: var(--muted); }
.ob-tips { margin: 0 0 8px; padding-left: 18px; line-height: 1.5; font-size: 13px; }
@media (max-width: 560px) { .ob-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* choice list (e.g. no-phone prompt) */
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 1px solid var(--border-2); background: #fff; border-radius: 10px; padding: 11px 13px; cursor: pointer; }
.choice:hover { border-color: #b9d3fa; background: var(--primary-50); }
.choice svg { flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.choice > span { display: flex; flex-direction: column; gap: 2px; }
.choice.warn svg { color: var(--orange); }
.choice.warn:hover { border-color: #f3cf96; background: #fff7e6; }

/* ================= Style settings page ================= */
.st-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.st-theme { text-align: left; padding: 0; border: 2px solid var(--border); border-radius: 14px; background: var(--panel); cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.st-theme:hover { border-color: var(--border-2); }
.st-theme.on { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.st-t { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; }
.st-prev { height: 120px; display: flex; flex-direction: column; }
.st-prev .n { height: 18px; display: block; }
.st-prev .b { flex: 1; display: flex; gap: 8px; padding: 10px; }
.st-prev .s { width: 28%; border-radius: 6px; display: block; }
.st-prev .m { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.st-prev .m i { display: block; height: 18px; border-radius: 5px; }
.st-prev.classic { background: #f3f5f8; }
.st-prev.classic .n { background: #1c2b3f; }
.st-prev.classic .s { background: #fff; border: 1px solid #e3e7ee; }
.st-prev.classic .m i { background: #fff; border: 1px solid #e3e7ee; }
.st-prev.modern { background: radial-gradient(160px 90px at 10% 10%, rgba(99,102,241,.45), transparent 70%), radial-gradient(160px 100px at 100% 100%, rgba(20,184,166,.4), transparent 70%), radial-gradient(140px 90px at 90% 0%, rgba(236,72,153,.3), transparent 70%), #eef1f7; }
.st-prev.modern .n { background: rgba(15,23,42,.72); margin: 6px 6px 0; border-radius: 7px; }
.st-prev.modern .s, .st-prev.modern .m i { background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.st-prev.modern .m i { border-radius: 8px; }
.st-opts { display: flex; flex-direction: column; gap: 4px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.st-row.dis { opacity: .5; }
.st-row .switch:disabled { cursor: not-allowed; }
.st-acc { display: flex; gap: 8px; }
.st-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px var(--border-2); }
.st-dot.on { box-shadow: 0 0 0 2px var(--c); }

/* ================= Compact density (any style) ================= */
html[data-density="compact"] body { font-size: 13px; }
html[data-density="compact"] .tbl td { padding-top: 6px; padding-bottom: 6px; }
html[data-density="compact"] .tbl th { padding-top: 7px; padding-bottom: 7px; }
html[data-density="compact"] .card-body { padding: 12px 14px; }
html[data-density="compact"] .task-row, html[data-density="compact"] .inbox-item { padding-top: 8px; padding-bottom: 8px; }
html[data-density="compact"] .tl-card { padding: 6px 9px; }

/* ================= Smooth motion (any style) ================= */
html[data-motion="on"] .btn, html[data-motion="on"] .chip, html[data-motion="on"] .card, html[data-motion="on"] .tl-card,
html[data-motion="on"] .nav-link, html[data-motion="on"] .tbl tbody tr, html[data-motion="on"] .choice, html[data-motion="on"] .sugg {
  transition: background-color .2s ease, border-color .2s ease, box-shadow .25s ease, transform .25s cubic-bezier(.2,.8,.2,1), color .2s ease;
}
html[data-motion="on"] #app > * { animation: st-in .32s cubic-bezier(.2,.8,.2,1); }
@keyframes st-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html[data-motion="on"] #app > * { animation: none; } }

/* ================= Hyper Modern ================= */
html[data-style="modern"] {
  --bg: #eef1f7;
  --panel: rgba(255,255,255,.7);
  --side: rgba(250,251,253,.55);
  --border: rgba(15,23,42,.07);
  --border-2: rgba(15,23,42,.12);
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
  --shadow: 0 10px 30px -8px rgba(15,23,42,.12);
  --shadow-lg: 0 30px 80px -12px rgba(15,23,42,.28);
  --radius: 14px;
  --glass: rgba(255,255,255,.62);
  --glass-hi: rgba(255,255,255,.8);
  --glass-edge: rgba(255,255,255,.75);
  --blur: blur(22px) saturate(170%);
}
html[data-style="modern"][data-glass="off"] { --glass: #fff; --glass-hi: #fff; --glass-edge: rgba(15,23,42,.07); --blur: none; --panel: #fff; --side: #f8fafc; }
html[data-style="modern"] body { letter-spacing: -.006em; }
html[data-style="modern"][data-glow="on"] body {
  background:
    radial-gradient(1100px 620px at 6% -8%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 62%),
    radial-gradient(900px 600px at 102% 4%, rgba(168,85,247,.14), transparent 60%),
    radial-gradient(1000px 700px at 55% 112%, rgba(20,184,166,.13), transparent 60%),
    #eef1f7;
  background-attachment: fixed;
}
/* frosted nav */
html[data-style="modern"] .topnav {
  background: rgba(15,23,42,.74); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 8px 30px -10px rgba(15,23,42,.4);
}
html[data-style="modern"][data-glass="off"] .topnav { background: #0f172a; }
html[data-style="modern"] .nav-link.active { border-bottom-color: transparent; background: rgba(255,255,255,.1); border-radius: 9px; }
html[data-style="modern"] .nav-link { border-radius: 9px; }
html[data-style="modern"] .brand-mark { border-radius: 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 70%, #fff), var(--primary)); box-shadow: 0 6px 18px -4px var(--primary); }
/* glass surfaces */
html[data-style="modern"] :is(.card, .table-wrap, .tl-card, .cal, .side-ops, .composer-box, .tpl, .task-row, .col-h .sum, .p-left) {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-color: var(--glass-edge); box-shadow: var(--shadow);
}
html[data-style="modern"] :is(.card, .table-wrap, .cal, .side-ops, .composer-box) { border-radius: 16px; }
html[data-style="modern"] .tl-card { border-radius: 14px; box-shadow: 0 4px 14px -6px rgba(15,23,42,.1); }
html[data-style="modern"] :is(.sidebar, .p-right) { background: var(--side); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-color: var(--glass-edge); }
html[data-style="modern"] :is(.modal, .picker, .search-results) {
  background: var(--glass-hi); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-edge); border-radius: 18px;
}
html[data-style="modern"] .modal-bg { background: rgba(15,23,42,.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* controls */
html[data-style="modern"] .btn { border-radius: 10px; background: rgba(255,255,255,.7); border-color: rgba(15,23,42,.09); box-shadow: 0 1px 2px rgba(15,23,42,.05); }
html[data-style="modern"] .btn:hover { background: #fff; border-color: rgba(15,23,42,.14); }
html[data-style="modern"] .btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary)); border-color: transparent; box-shadow: 0 6px 16px -6px var(--primary), inset 0 1px 0 rgba(255,255,255,.25); }
html[data-style="modern"] .btn.primary:hover { background: var(--primary-600); }
html[data-style="modern"] .btn.ghost { background: transparent; box-shadow: none; }
html[data-style="modern"] :is(.input, select.input, textarea.input) { border-radius: 10px; background: rgba(255,255,255,.75); border-color: rgba(15,23,42,.1); }
html[data-style="modern"] :is(.input, select.input, textarea.input):focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); outline: none; }
html[data-style="modern"] :is(.chip:not(.on), .sugg, .circle-btn, .nav-arrow) { background: rgba(255,255,255,.7); border-color: rgba(15,23,42,.08); }
html[data-style="modern"] :is(.chip:not(.on), .sugg, .circle-btn, .nav-arrow):hover:not(:disabled) { background: var(--primary-50); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
html[data-style="modern"] .chip.on { box-shadow: 0 4px 12px -4px var(--primary); }
html[data-style="modern"] .pill { border-radius: 999px; }
html[data-style="modern"] .seg-b.on { background: rgba(255,255,255,.9); box-shadow: 0 2px 8px -2px rgba(15,23,42,.15); }
html[data-style="modern"] .tbl th { background: transparent; }
html[data-style="modern"] .tbl td { border-bottom-color: rgba(15,23,42,.05); }
html[data-style="modern"] .tbl tbody tr:hover td { background: rgba(255,255,255,.55); }
html[data-style="modern"] .task-row, html[data-style="modern"] .inbox-item { border-bottom-color: rgba(15,23,42,.05); }
html[data-style="modern"] .settings-tabs a.on, html[data-style="modern"] .settings-tabs a.active { border-radius: 10px; }
html[data-style="modern"] .toast { border-radius: 14px; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
html[data-style="modern"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-style="modern"] ::-webkit-scrollbar-thumb { background: rgba(15,23,42,.14); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
/* smooth lift on hover */
html[data-style="modern"][data-motion="on"] :is(.card, .tl-card, .choice, .tpl):hover { transform: translateY(-1px); box-shadow: 0 16px 36px -14px rgba(15,23,42,.22); }
html[data-style="modern"][data-motion="on"] .btn:active { transform: scale(.98); }

/* ================= Hyper Modern 2 (more translucent, color schemes) ================= */
.st-prev.modern2 { background: radial-gradient(150px 100px at 0% 0%, var(--m2a), transparent 70%), radial-gradient(170px 110px at 100% 100%, var(--m2b), transparent 70%), radial-gradient(130px 90px at 85% 5%, var(--m2c), transparent 70%), var(--m2base); }
.st-prev.modern2 .n { background: color-mix(in srgb, var(--m2nav) 55%, transparent); margin: 6px 6px 0; border-radius: 7px; }
.st-prev.modern2 .s, .st-prev.modern2 .m i { background: rgba(255,255,255,.36); border: 1px solid rgba(255,255,255,.65); border-radius: 8px; }
.st-row.st-col { flex-direction: column; align-items: stretch; }
.st-schemes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.st-scheme { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; border: 2px solid var(--border); background: var(--panel); cursor: pointer; text-align: left; font-weight: 600; font-size: 12.5px; }
.st-scheme i { display: block; height: 46px; border-radius: 8px; background: radial-gradient(60px 40px at 0% 0%, var(--a), transparent 75%), radial-gradient(70px 44px at 100% 100%, var(--b), transparent 75%), radial-gradient(50px 34px at 90% 0%, var(--c), transparent 75%), var(--base); box-shadow: inset 0 0 0 1px rgba(15,23,42,.06); }
.st-scheme span { padding: 0 4px 2px; display: flex; align-items: center; gap: 6px; }
.st-scheme span::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }
.st-scheme.on { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }

html[data-m2] {
  --panel: rgba(255,255,255,.42);
  --side: rgba(255,255,255,.3);
  --glass: rgba(255,255,255,.4);
  --glass-hi: rgba(255,255,255,.66);
  --glass-edge: rgba(255,255,255,.6);
  --blur: blur(30px) saturate(190%);
  --border: rgba(255,255,255,.5);
  --border-2: rgba(15,23,42,.1);
  --shadow: 0 12px 34px -10px color-mix(in srgb, var(--m2nav) 22%, transparent);
}
html[data-style="modern"][data-m2] body {
  background:
    radial-gradient(1000px 700px at 0% -5%, color-mix(in srgb, var(--m2a) 55%, transparent), transparent 62%),
    radial-gradient(900px 650px at 105% 105%, color-mix(in srgb, var(--m2b) 50%, transparent), transparent 60%),
    radial-gradient(800px 560px at 85% -8%, color-mix(in srgb, var(--m2c) 38%, transparent), transparent 60%),
    radial-gradient(700px 500px at 20% 110%, color-mix(in srgb, var(--m2c) 22%, transparent), transparent 60%),
    var(--m2base);
  background-attachment: fixed;
}
html[data-style="modern"][data-m2][data-glow="off"] body { background: linear-gradient(160deg, color-mix(in srgb, var(--m2a) 18%, var(--m2base)), var(--m2base) 55%, color-mix(in srgb, var(--m2b) 14%, var(--m2base))); background-attachment: fixed; }
html[data-style="modern"][data-m2] .topnav { background: color-mix(in srgb, var(--m2nav) 58%, transparent); box-shadow: 0 1px 0 rgba(255,255,255,.12), 0 10px 30px -12px color-mix(in srgb, var(--m2nav) 60%, transparent); }
html[data-style="modern"][data-m2][data-glass="off"] .topnav { background: var(--m2nav); }
html[data-style="modern"][data-m2] :is(.card, .table-wrap, .tl-card, .cal, .side-ops, .composer-box, .tpl, .task-row, .col-h .sum, .p-left) { box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, var(--shadow); }
html[data-style="modern"][data-m2] :is(.btn, .chip:not(.on), .sugg, .circle-btn, .nav-arrow, .input, select.input, textarea.input) { background: rgba(255,255,255,.5); border-color: rgba(255,255,255,.7); }
html[data-style="modern"][data-m2] .btn.primary { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 80%, var(--m2c)), var(--primary)); color: #fff; }
html[data-style="modern"][data-m2] .tbl tbody tr:hover td { background: rgba(255,255,255,.4); }
html[data-style="modern"][data-m2] .tbl td { border-bottom-color: rgba(255,255,255,.45); }
html[data-style="modern"][data-m2] .modal-bg { background: color-mix(in srgb, var(--m2nav) 22%, transparent); }
html[data-style="modern"][data-m2] .brand-mark { background: linear-gradient(135deg, var(--m2a), var(--primary)); }

/* ================= Studio (Apple-inspired: airy, light frosted bar, pill buttons, big type) ================= */
.st-prev.studio { background: #f5f5f7; }
.st-prev.studio .n { height: 14px; background: rgba(251,251,253,.9); border-bottom: 1px solid #e5e5ea; }
.st-prev.studio .b { padding: 14px 18px; }
.st-prev.studio .m { gap: 8px; }
.st-prev.studio .m b { display: block; height: 14px; width: 55%; border-radius: 4px; background: #1d1d1f; }
.st-prev.studio .m i { background: #fff; border-radius: 12px; height: 20px; }

html[data-style="studio"] {
  --bg: #f5f5f7; --panel: #fff; --side: #f5f5f7;
  --border: #e8e8ed; --border-2: #d2d2d7;
  --text: #1d1d1f; --muted: #6e6e73; --faint: #86868b;
  --shadow-sm: none; --shadow: 0 2px 12px rgba(0,0,0,.04); --shadow-lg: 0 24px 64px rgba(0,0,0,.18);
  --radius: 18px;
  --nav: rgba(251,251,253,.8); --nav-2: rgba(251,251,253,.8); --nav-text: #1d1d1f;
}
html[data-style="studio"] body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter", Arial, sans-serif; letter-spacing: -.01em; background: #f5f5f7; }
html[data-style="studio"] :is(h1, h2, .page-head h1, .brand-name) { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Inter", Arial, sans-serif; }
/* light frosted bar */
html[data-style="studio"] .topnav { height: 52px; background: rgba(251,251,253,.8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
html[data-style="studio"][data-glass="off"] .topnav { background: #fbfbfd; }
html[data-style="studio"] .brand { color: #1d1d1f; }
html[data-style="studio"] .brand-mark { background: #1d1d1f; box-shadow: none; border-radius: 9px; }
html[data-style="studio"] .brand-by { color: #6e6e73; }
html[data-style="studio"] .nav-links { margin: 0 auto; }
html[data-style="studio"] .nav-link { color: rgba(0,0,0,.8); font-size: 12.5px; font-weight: 400; border-bottom: 0; letter-spacing: -.005em; }
html[data-style="studio"] .nav-link:hover { color: #000; background: transparent; }
html[data-style="studio"] .nav-link.active { color: #000; font-weight: 600; border-bottom: 0; }
html[data-style="studio"] .nav-link svg { opacity: .75; }
html[data-style="studio"] .nav-spacer { flex: 0; }
html[data-style="studio"] .search input { background: rgba(0,0,0,.05); border-color: transparent; color: #1d1d1f; border-radius: 999px; }
html[data-style="studio"] .search input::placeholder, html[data-style="studio"] .search svg { color: #86868b; }
html[data-style="studio"] .search input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,113,227,.15); }
html[data-style="studio"] .nav-btn { border-radius: 999px; font-weight: 400; font-size: 13px; height: 30px; padding: 0 14px; }
html[data-style="studio"] .nav-icon-btn { color: rgba(0,0,0,.7); }
html[data-style="studio"] .nav-icon-btn:hover { background: rgba(0,0,0,.05); color: #000; }
html[data-style="studio"] .sync { color: #6e6e73; }
html[data-style="studio"] .grade:hover { background: rgba(0,0,0,.05); }
html[data-style="studio"] .grade-ring { background: #1d1d1f; border-radius: 50%; }
/* airy layout and big type */
html[data-style="studio"] .page { padding-top: 34px; }
html[data-style="studio"] .page-head { margin-bottom: 22px; }
html[data-style="studio"] .page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -.025em; }
html[data-style="studio"] .sidebar { background: #f5f5f7; border-right: 0; }
html[data-style="studio"] .side-title { color: #86868b; letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 600; }
html[data-style="studio"] .side-item { border-radius: 10px; }
html[data-style="studio"] .side-item:hover { background: rgba(0,0,0,.04); }
html[data-style="studio"] .side-item.active { background: #fff; color: #1d1d1f; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
html[data-style="studio"] .side-item.active .n { color: #1d1d1f; }
/* cards: white, borderless, big radius */
html[data-style="studio"] :is(.card, .table-wrap, .cal, .side-ops, .composer-box, .tpl) { border: 0; border-radius: 18px; box-shadow: var(--shadow); }
html[data-style="studio"] .tl-card { border: 0; border-radius: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
html[data-style="studio"] .p-left { background: #fff; border-right: 0; }
html[data-style="studio"] .p-right { background: #f5f5f7; border-left: 0; }
html[data-style="studio"] .tbl th { color: #86868b; font-weight: 500; text-transform: none; letter-spacing: 0; background: transparent; }
html[data-style="studio"] .tbl td { border-bottom-color: #f0f0f2; }
html[data-style="studio"] .tbl tbody tr:hover td { background: #fafafc; }
/* pill buttons and inputs */
html[data-style="studio"] .btn { border-radius: 999px; border-color: transparent; background: rgba(0,0,0,.05); color: #1d1d1f; box-shadow: none; font-weight: 500; }
html[data-style="studio"] .btn:hover { background: rgba(0,0,0,.08); border-color: transparent; }
html[data-style="studio"] .btn.primary { background: var(--primary); color: #fff; }
html[data-style="studio"] .btn.primary:hover { background: var(--primary-600); }
html[data-style="studio"] .btn.ghost { background: transparent; }
html[data-style="studio"] .btn.danger { color: #e30000; }
html[data-style="studio"] :is(.input, select.input, textarea.input) { border-radius: 12px; border-color: #d2d2d7; background: #fff; }
html[data-style="studio"] :is(.input, select.input, textarea.input):focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,113,227,.15); outline: none; }
html[data-style="studio"] .chip { border-radius: 999px; border-color: #d2d2d7; background: #fff; }
html[data-style="studio"] .chip.on { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
html[data-style="studio"] .seg-b.on { box-shadow: 0 1px 4px rgba(0,0,0,.1); border-radius: 8px; }
html[data-style="studio"] :is(.side-item, .side-ops a) { color: #1d1d1f; }
html[data-style="studio"] .switch.on { background: #34c759; }
html[data-style="studio"] :is(.modal, .picker, .search-results) { border-radius: 20px; border: 0; }
html[data-style="studio"] :is(.picker, .search-results) { background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
html[data-style="studio"][data-glass="off"] :is(.picker, .search-results) { background: #fff; }
html[data-style="studio"] .modal-bg { background: rgba(0,0,0,.32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html[data-style="studio"] .settings-tabs a { border-radius: 999px; }

/* ================= Weekly report card ================= */
.pill.err { background: #fde8e8; color: #b42318; }
.rc-page .page-head { flex-wrap: wrap; gap: 10px; }
.rc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .rc-grid { grid-template-columns: 1fr; } }
.rc-side { display: flex; flex-direction: column; gap: 16px; }
.rc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .rc-stats { grid-template-columns: repeat(2, 1fr); } }
.rc-stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-stat .l { font-size: 12px; color: var(--muted); }
.rc-funnel { display: flex; flex-direction: column; gap: 9px; }
.rc-f { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; }
.rc-f .bar { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.rc-f .bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.rc-f strong { text-align: right; font-variant-numeric: tabular-nums; }
.rc-ai .card-head { display: flex; align-items: center; gap: 8px; }
.rc-ai .md { line-height: 1.55; }
.rc-list { margin-bottom: 16px; }
.rc-list .card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rc-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none !important; background: var(--panel); }
.rc-chip:hover { border-color: var(--primary); }
.rc-chip > span:last-child { display: flex; flex-direction: column; }
.rc-g { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #1c2b3f; }
.cal-ev.rc-ev { font-weight: 600; }
.thinking.inline { display: inline-flex; vertical-align: middle; margin-right: 4px; }
/* call summaries and transcripts */
.call-tx { margin: 0 0 10px; }
.call-tx summary { cursor: pointer; font-size: 13px; color: var(--primary); margin-bottom: 6px; }
.call-tx textarea { margin-bottom: 6px; }
.tl-sum { margin-top: 8px; padding: 8px 10px; background: var(--primary-50); border-radius: 8px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.tl-sum-l { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); margin-bottom: 3px; }
.tl-tx { margin-top: 6px; font-size: 13px; }
.tl-tx summary { cursor: pointer; color: var(--muted); }
.tl-tx > div { margin-top: 6px; max-height: 260px; overflow: auto; white-space: pre-wrap; line-height: 1.45; color: var(--text); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.add-agent2 { border-top: 1px solid var(--border); padding-top: 14px; }

/* ================= Studio, glass edition: translucent layers, specular edges, capsules ================= */
.st-prev.studio { background: radial-gradient(120px 80px at 15% 10%, #dbeafe, transparent 70%), radial-gradient(140px 90px at 95% 100%, #fce7f3, transparent 70%), #f2f2f7; }
.st-prev.studio .n { background: rgba(255,255,255,.55); border-bottom: 1px solid rgba(255,255,255,.8); }
.st-prev.studio .m i { background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(0,0,0,.05); }
html[data-style="studio"] {
  --sg: rgba(255,255,255,.62);
  --sg-hi: rgba(255,255,255,.78);
  --sg-edge: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.55);
  --sg-blur: blur(28px) saturate(200%);
  --shadow: 0 1px 1px rgba(0,0,0,.02), 0 8px 28px rgba(0,0,0,.06);
  --panel: rgba(255,255,255,.62); --side: rgba(255,255,255,.4);
  --border: rgba(0,0,0,.06);
}
html[data-style="studio"][data-glass="off"] { --sg: #fff; --sg-hi: #fff; --sg-blur: none; --panel: #fff; --side: #f5f5f7; }
html[data-style="studio"] body { background: #f2f2f7; }
html[data-style="studio"][data-glow="on"] body {
  background:
    radial-gradient(900px 600px at 0% 0%, rgba(147,197,253,.35), transparent 60%),
    radial-gradient(800px 600px at 100% 10%, rgba(244,184,228,.28), transparent 60%),
    radial-gradient(900px 700px at 70% 110%, rgba(167,243,208,.28), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgba(253,230,138,.22), transparent 60%),
    #f2f2f7;
  background-attachment: fixed;
}
html[data-style="studio"] .topnav { background: rgba(255,255,255,.5); backdrop-filter: blur(30px) saturate(210%); -webkit-backdrop-filter: blur(30px) saturate(210%); box-shadow: inset 0 -1px 0 rgba(255,255,255,.7), 0 1px 0 rgba(0,0,0,.06); }
html[data-style="studio"] .nav-links { gap: 2px; align-items: center; }
html[data-style="studio"] .nav-link { height: 32px; padding: 0 12px; border-radius: 999px; align-self: center; }
html[data-style="studio"] .nav-link.active { background: rgba(255,255,255,.75); box-shadow: inset 0 1px 0 #fff, 0 1px 6px rgba(0,0,0,.08); }
html[data-style="studio"] .nav-link:hover:not(.active) { background: rgba(0,0,0,.04); }
html[data-style="studio"] .search input { background: rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(0,0,0,.05); }
html[data-style="studio"] .nav-btn { box-shadow: 0 4px 14px -4px rgba(0,113,227,.55), inset 0 1px 0 rgba(255,255,255,.3); }
/* glass layers */
html[data-style="studio"] :is(.card, .table-wrap, .cal, .side-ops, .composer-box, .tpl, .tl-card, .task-row, .col-h .sum, .st-theme, .st-scheme, .rc-chip) {
  background: var(--sg); backdrop-filter: var(--sg-blur); -webkit-backdrop-filter: var(--sg-blur); box-shadow: var(--sg-edge), var(--shadow);
}
html[data-style="studio"] .st-theme.on { box-shadow: var(--sg-edge), 0 0 0 3px var(--primary); }
html[data-style="studio"] :is(.sidebar, .p-right) { background: var(--side); backdrop-filter: var(--sg-blur); -webkit-backdrop-filter: var(--sg-blur); box-shadow: inset -1px 0 0 rgba(255,255,255,.6); }
html[data-style="studio"] .p-left { background: var(--sg); backdrop-filter: var(--sg-blur); -webkit-backdrop-filter: var(--sg-blur); box-shadow: inset -1px 0 0 rgba(255,255,255,.7); }
html[data-style="studio"] .side-item.active { background: rgba(255,255,255,.8); box-shadow: inset 0 1px 0 #fff, 0 1px 6px rgba(0,0,0,.07); }
html[data-style="studio"] .tbl th { background: transparent; }
html[data-style="studio"] .tbl td { border-bottom-color: rgba(0,0,0,.04); }
html[data-style="studio"] .tbl tbody tr:hover td { background: rgba(255,255,255,.55); }
html[data-style="studio"] :is(.modal, .picker, .search-results) { background: var(--sg-hi); backdrop-filter: blur(40px) saturate(200%); -webkit-backdrop-filter: blur(40px) saturate(200%); box-shadow: var(--sg-edge), 0 30px 80px rgba(0,0,0,.2); }
html[data-style="studio"] .modal-bg { background: rgba(0,0,0,.18); }
/* capsule controls with a glass sheen */
html[data-style="studio"] .btn { background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.05); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
html[data-style="studio"] .btn:hover { background: rgba(255,255,255,.85); }
html[data-style="studio"] .btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 82%, #fff), var(--primary)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px -6px var(--primary); color: #fff; }
html[data-style="studio"] .btn.ghost { background: transparent; box-shadow: none; backdrop-filter: none; }
html[data-style="studio"] :is(.input, select.input, textarea.input) { background: rgba(255,255,255,.7); border-color: rgba(0,0,0,.1); }
html[data-style="studio"] .chip:not(.on) { background: rgba(255,255,255,.6); border-color: rgba(0,0,0,.08); box-shadow: inset 0 1px 0 #fff; }
html[data-style="studio"] .seg { background: rgba(118,118,128,.12); border-radius: 10px; }
html[data-style="studio"] .seg-b.on { background: rgba(255,255,255,.95); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
html[data-style="studio"] .switch { background: rgba(120,120,128,.2); }
html[data-style="studio"] .switch.on { background: #34c759; }
html[data-style="studio"][data-motion="on"] :is(.card, .tl-card, .btn, .nav-link, .chip) { transition: background-color .25s ease, box-shadow .3s ease, transform .3s cubic-bezier(.2,.8,.2,1); }
html[data-style="studio"][data-motion="on"] .btn:active { transform: scale(.97); }

/* ================= Generate Leads menu ================= */
.nav-dd { position: relative; display: flex; align-items: stretch; }
.nav-dd > .nav-link { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font: inherit; }
.nav-dd > .nav-link svg:last-child { opacity: .7; margin-left: 2px; transition: transform .15s; }
.nav-dd.open > .nav-link svg:last-child { transform: rotate(180deg); }
.nav-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; border: 1px solid var(--border); }
.nav-dd.open .nav-menu { display: block; }
.nav-mi { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.nav-mi:hover, .nav-mi.on { background: var(--primary-50); }
.nav-mi svg { color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.nav-mi > span { display: flex; flex-direction: column; gap: 2px; }
html[data-style="modern"] .nav-menu, html[data-style="studio"] .nav-menu { background: rgba(255,255,255,.82); backdrop-filter: blur(30px) saturate(200%); -webkit-backdrop-filter: blur(30px) saturate(200%); border-color: rgba(255,255,255,.8); }

/* ================= MMI ================= */
.mmi-note { margin-bottom: 14px; }
.mmi-search { margin-bottom: 16px; }
.mmi-search .card-body { display: flex; flex-direction: column; gap: 12px; }
.mmi-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.mmi-q { position: relative; flex: 1 1 320px; }
.mmi-q svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.mmi-q .input { padding-left: 38px; height: 42px; font-size: 15px; width: 100%; }
.mmi-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 520px; margin: 40px auto; text-align: center; }
.mmi-sample { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #9a5b00; background: #fff4e0; border-radius: 6px; padding: 4px 8px; margin-bottom: 10px; }
.mmi-profile { margin-bottom: 16px; }
.mmi-id { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.mmi-id h2 { font-size: 22px; letter-spacing: -.01em; }
.mmi-av { width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.mmi-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 2fr); gap: 12px; }
@media (max-width: 900px) { .mmi-kpis { grid-template-columns: repeat(3, 1fr); } .mmi-kpi.wide { grid-column: 1 / -1; } }
.mmi-kpi { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.mmi-kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mmi-kpi .l { font-size: 12px; color: var(--muted); }
.mmi-spark { display: flex; align-items: flex-end; gap: 4px; height: 40px; margin-top: 6px; }
.mmi-spark i { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; opacity: .85; min-height: 3px; }
.mmi-cols { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .mmi-cols { grid-template-columns: 1fr; } }
.mmi-side { display: flex; flex-direction: column; gap: 16px; }
.mmi-mix { display: grid; grid-template-columns: 96px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.mmi-mix .bar { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.mmi-mix .bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.mmi-mix strong { text-align: right; }
.table-wrap.flat { border: 0; box-shadow: none; border-radius: 0; background: transparent; }

/* ================= Studio: more white glass around everything ================= */
html[data-style="studio"] { --sg: rgba(255,255,255,.72); --sg-hi: rgba(255,255,255,.86); --side: rgba(255,255,255,.58); --panel: rgba(255,255,255,.72);
  --sg-edge: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255,255,255,.85), 0 0 0 5px rgba(255,255,255,.38); }
html[data-style="studio"] :is(.card, .table-wrap:not(.flat), .cal, .side-ops, .composer-box, .tpl, .rc-chip, .st-theme, .st-scheme, .mmi-kpi) { border: 1px solid rgba(255,255,255,.9); }
html[data-style="studio"] .tl-card { box-shadow: inset 0 1px 0 #fff, 0 0 0 4px rgba(255,255,255,.4), 0 6px 18px rgba(0,0,0,.05); border: 1px solid rgba(255,255,255,.9); }
html[data-style="studio"] .topnav { background: rgba(255,255,255,.66); box-shadow: inset 0 -1px 0 rgba(255,255,255,.95), 0 6px 24px rgba(0,0,0,.04); }
html[data-style="studio"] .p-left, html[data-style="studio"] .p-right, html[data-style="studio"] .sidebar { box-shadow: inset -1px 0 0 rgba(255,255,255,.95), 0 0 30px rgba(255,255,255,.5); }
html[data-style="studio"] .btn:not(.primary):not(.ghost) { background: rgba(255,255,255,.78); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255,255,255,.9), 0 0 0 3px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.05); }
html[data-style="studio"] .btn.primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 3px rgba(255,255,255,.55), 0 6px 16px -6px var(--primary); }
html[data-style="studio"] :is(.input, select.input, textarea.input) { background: rgba(255,255,255,.82); border-color: rgba(255,255,255,.95); box-shadow: inset 0 1px 2px rgba(0,0,0,.04), 0 0 0 3px rgba(255,255,255,.4); }
html[data-style="studio"] .chip:not(.on), html[data-style="studio"] .circle-btn, html[data-style="studio"] .nav-arrow { background: rgba(255,255,255,.8); border-color: rgba(255,255,255,.95); box-shadow: 0 0 0 3px rgba(255,255,255,.4), 0 1px 3px rgba(0,0,0,.05); }
html[data-style="studio"] .side-item.active, html[data-style="studio"] .nav-link.active { background: rgba(255,255,255,.9); box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(255,255,255,.45), 0 2px 8px rgba(0,0,0,.07); }
html[data-style="studio"] .mmi-kpi { background: rgba(255,255,255,.6); }
html[data-style="studio"][data-glass="off"] { --sg-edge: inset 0 0 0 1px rgba(0,0,0,.05); }

/* ================= People paging ================= */
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager-size { display: inline-flex; align-items: center; gap: 6px; }
.pager-size .input, .pager-n .input { height: 28px; padding: 0 6px; width: auto; font-size: 13px; }
.pager-n { display: inline-flex; align-items: center; gap: 6px; }
.pager-n .input { width: 56px; text-align: center; }

/* ================= Build a Quote ================= */
.q-page .page-head h1 { display: flex; align-items: center; gap: 8px; }
.q-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .q-cols { grid-template-columns: 1fr; } }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.q-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.q-f > span { color: var(--muted); font-weight: 500; }
.q-f small { font-size: 11.5px; line-height: 1.3; }
.q-wide { grid-column: 1 / -1; }
.q-in { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: 8px; background: #fff; overflow: hidden; }
.q-in .input { border: 0; flex: 1; min-width: 0; background: transparent; }
.q-in .input:focus { box-shadow: none; outline: none; }
.q-in:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.15); }
.q-in i { font-style: normal; color: var(--muted); padding: 0 9px; font-size: 13px; background: var(--bg); align-self: stretch; display: grid; place-items: center; }
.q-inline { flex: 1; }
.q-check { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }
.q-check span { color: var(--text); }
.q-formula { font-size: 14px; padding: 10px 12px; background: var(--bg); border-radius: 8px; line-height: 1.5; }
.q-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .q-kpis { grid-template-columns: 1fr; } }
.q-kpi { border-radius: 14px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.q-kpi .l { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.q-kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.q-kpi .s { font-size: 12.5px; color: var(--muted); }
.q-kpi.good { background: linear-gradient(135deg, #ecfdf5, #fff); border-color: #a7f3d0; } .q-kpi.good .v { color: #047857; }
.q-kpi.bad { background: linear-gradient(135deg, #fef2f2, #fff); border-color: #fecaca; } .q-kpi.bad .v { color: #b91c1c; }
.q-kpi.star { background: linear-gradient(135deg, #fffbeb, #fff); border-color: #fde68a; } .q-kpi.star .v { color: #b45309; font-size: 24px; }
.q-table .q-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.q-table .q-row span:not(:first-child) { text-align: right; }
.q-table .q-row.strong { border-bottom: 0; border-top: 2px solid var(--border-2); padding-top: 9px; font-size: 14.5px; }
.q-table .good { color: #047857; font-weight: 600; }
.q-same { border-color: #fde68a; }
.q-same-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 12px; }
@media (max-width: 900px) { .q-same-grid { grid-template-columns: repeat(2, 1fr); } }
.q-same-grid .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.q-same-grid .v { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.q-same-grid .s { font-size: 12px; color: var(--muted); }
.q-same .ob-tips { margin: 0; line-height: 1.5; }
.q-empty { max-width: 520px; margin: 30px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
html[data-style="modern"] .q-in, html[data-style="studio"] .q-in { background: rgba(255,255,255,.7); }

/* ================= Quick Quote drafts ================= */
.dr-page .page-head { flex-wrap: wrap; gap: 10px 14px; }
.dr-page .page-head h1 { display: flex; align-items: center; gap: 8px; }
.dr-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.dr-ctl .input { height: 30px; padding: 0 8px; width: auto; }
.dr-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .dr-layout { grid-template-columns: 1fr; } }
.dr-list { padding-bottom: 6px; max-height: calc(100vh - 170px); overflow: auto; }
.dr-list .card-head { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; background: inherit; z-index: 1; }
.dr-lead { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 14px; border: 0; border-left: 3px solid transparent; background: transparent; cursor: pointer; font: inherit; color: var(--text); }
.dr-lead:hover { background: var(--primary-50); }
.dr-lead.on { background: var(--primary-50); border-left-color: var(--primary); }
.dr-lead-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dr-lead-t strong { font-size: 13.5px; }
.dr-lead .good, .dr-nums .good { color: #047857; font-weight: 600; }
.dr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dr-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dr-name a { color: var(--text); }
.dr-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 12.5px; }
.dr-facts em { font-style: normal; color: var(--muted); }
.dr-nums { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dr-nums em { font-style: normal; color: var(--muted); font-size: 12px; display: block; }
.dr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 10px; }
@media (max-width: 1200px) { .dr-cols { grid-template-columns: 1fr; } }
.dr-cols .card-head { display: flex; align-items: center; gap: 8px; }
.dr-ta { width: 100%; resize: vertical; line-height: 1.5; font-size: 13.5px; }

.q-tag { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #047857; background: #ecfdf5; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.q-solved .q-in { border-color: #a7f3d0; }
.dr-cols .row .btn { flex: 0 0 auto; white-space: nowrap; }

/* ================= People: View (columns) ================= */
.view-panel { margin-bottom: 12px; }
.view-panel .card-head { display: flex; align-items: center; gap: 8px; }
.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; }
.view-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

/* ================= People: resizable columns ================= */
.tbl.resizable { table-layout: fixed; }
.tbl th[data-col] { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: col-resize; }
.col-grip:hover { background: linear-gradient(90deg, transparent, var(--primary-50)); }

/* ================= Undo bar (People page) ================= */
.undo-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: #fff7e6; border: 1px solid #f3cf96; font-size: 13px; }
.undo-bar > span { flex: 1; }
.undo-x { font-size: 18px; line-height: 1; padding: 0 6px; }

/* ================= Browser dialer (lead page) ================= */
.dialer { position: fixed; right: 20px; top: 110px; width: 300px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(15,23,42,.25); padding: 14px; z-index: 60; display: grid; gap: 10px; }
.dl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; cursor: move; touch-action: none; user-select: none; }
.dl-name { font-weight: 700; }
.dl-status { font-size: 14px; font-weight: 600; color: var(--primary); }
.dl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-audio { width: 100%; margin-top: 8px; }
.tl-sum-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ================= Klaude (Claude-style) ================= */
html[data-style="klaude"] {
  --bg: #f5f1ea; --panel: #fffdf8; --side: #efe9df;
  --border: #e4dccf; --border-2: #d3c8b6;
  --text: #2b2622; --muted: #6b625a; --faint: #958b80;
  --nav: #2b2622;
}
html[data-style="klaude"] body { background: var(--bg); color: var(--text); }
html[data-style="klaude"] .card, html[data-style="klaude"] .tl-card, html[data-style="klaude"] .table-wrap { background: var(--panel); border-color: var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(43,38,34,.06); }
html[data-style="klaude"] .btn { border-radius: 10px; }
html[data-style="klaude"] .btn.primary { background: #c96442; border-color: #c96442; color: #fff; }
html[data-style="klaude"] .btn.primary:hover { background: #b25536; border-color: #b25536; }
html[data-style="klaude"] .st-prev.klaude { background: #f5f1ea; border: 1px solid #e4dccf; }
html[data-style="klaude"] .st-prev.klaude .b { background: #fffdf8; }
html[data-style="klaude"] .st-prev.klaude .s { background: #c96442; }

/* ================= Dark mode (any style) ================= */
html[data-mode="dark"] {
  --bg: #15171c; --panel: #1d2026; --side: #1a1d23;
  --border: #2c313b; --border-2: #3a404c;
  --text: #eceef3; --muted: #a3abba; --faint: #7a8292;
  color-scheme: dark;
}
html[data-mode="dark"] body { background: var(--bg); color: var(--text); }
html[data-mode="dark"] :is(.card, .tl-card, .table-wrap, .modal, .input, .tbl th, .side-ops, .composer-box) { background: var(--panel); color: var(--text); border-color: var(--border); }
html[data-mode="dark"] .tl-card.system { background: transparent; border: 0; }
html[data-mode="dark"] .tbl th { background: #23272f; }
html[data-mode="dark"] :is(.btn:not(.primary):not(.danger), .seg-b) { background: #23272f; color: var(--text); border-color: var(--border-2); }
html[data-mode="dark"] .seg-b.on { background: var(--primary, #1a73e8); color: #fff; }

/* ================= Top bar: long names shorten instead of pushing the settings gear off screen ================= */
.topnav > .brand { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.topnav > * { flex-shrink: 0; }
.topnav > .brand { flex-shrink: 1; }
.brand-text { min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; max-width: 240px; }

/* ================= Lead score ================= */
.lead-score { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--sc, #6b7280); font-variant-numeric: tabular-nums; }

/* ================= Connekt AI: daily brief ================= */
.brief-bar { margin-bottom: 12px; }
.brief { margin-bottom: 14px; }
.brief-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.brief-row { display: block; padding: 6px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); line-height: 1.35; }
.brief-row:hover strong { color: var(--primary); }
.brief-ai { margin-top: 12px; padding: 10px 12px; background: var(--primary-50, #f5f8ff); border-radius: 10px; font-size: 13px; line-height: 1.5; }
.brief-foot { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .brief-cols { grid-template-columns: 1fr; } }

/* ================= Sales Skills page (under Agent) ================= */
.ss-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ss-card { margin: 0; }
.ss-wide { grid-column: 1 / -1; }
.ss-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ss-sum { margin-top: 2px; }
@media (max-width: 900px) { .ss-grid { grid-template-columns: 1fr; } .ss-wide { grid-column: auto; } }

/* Top-tier leads (75 and up): fiery badge with a glowing edge */
/* Top-tier leads (75 and up): shiny platinum with a sparkle sweep */
.lead-score.hot { position: relative; overflow: hidden; background: linear-gradient(135deg, #f7f9fc 0%, #c3cedb 32%, #ffffff 50%, #a9b6c7 68%, #e8eef6 100%); color: #1d2a3a; box-shadow: 0 0 0 1px #ffffff inset, 0 0 0 1px #8fa0b5, 0 0 12px 2px rgba(190, 220, 255, .85); text-shadow: 0 1px 0 rgba(255, 255, 255, .9); font-weight: 800; }
.lead-score.hot::after { content: ""; position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .95) 50%, transparent 100%); transform: skewX(-18deg); animation: lead-shine 2.8s ease-in-out infinite; pointer-events: none; }
@keyframes lead-shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
html[data-motion="off"] .lead-score.hot::after { animation: none; display: none; }

/* ================= Sales Arrow dashboard ================= */
.sa-setup { margin-bottom: 16px; }
.sa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sa-card { margin: 0; }
@media (max-width: 900px) { .sa-grid { grid-template-columns: 1fr; } }

/* Sales Arrow: lead side panel and daily brief */
.pa-sec .pa-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-sec .pa-btn { font-size: 12px; }
.sa-daily-text { font-size: 14px; line-height: 1.5; }
.sa-daily-text h1, .sa-daily-text h2, .sa-daily-text h3 { font-size: 15px; margin: 12px 0 4px; }
.sa-daily-text p, .sa-daily-text ul, .sa-daily-text ol { margin: 6px 0; }

/* Sign-in page: warm landing look (cream, terracotta accent, feature cards) */
body.signed-out { background: #f5f1ea; }
html[data-mode="dark"] body.signed-out { background: var(--bg); }
.auth-wrap { display: block; min-height: auto; max-width: 900px; margin: 0 auto; padding: 44px 18px 60px; }
.auth-hero { text-align: center; max-width: 680px; margin: 0 auto 28px; }
.auth-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #fbeee8; color: #c4623f; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #3f9a5f; box-shadow: 0 0 0 3px rgba(63,154,95,.2); }
.auth-hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.12; letter-spacing: -.02em; margin: 18px 0 12px; color: #1f1b17; }
.auth-hero h1 .accent { color: #c96442; }
.auth-hero p { color: #6b645c; font-size: 17px; line-height: 1.5; margin: 0 auto; max-width: 560px; }
.auth-card { max-width: 420px; margin: 0 auto; background: #fffdf8; border: 1px solid #e4dccf; border-radius: 16px; box-shadow: 0 1px 2px rgba(43,38,34,.06); }
.auth-card h2 { font-size: 20px; margin: 0 0 4px; color: #1f1b17; }
.auth-card .btn.primary { background: #c96442; border-color: #c96442; color: #fff; border-radius: 10px; font-size: 15px; }
.auth-card .btn.primary:hover { background: #b25536; border-color: #b25536; }
.auth-card .linkbtn { color: #c4623f; }
.auth-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 820px; margin: 30px auto 0; }
.auth-feat { background: #fffdf8; border: 1px solid #e4dccf; border-radius: 14px; padding: 18px; }
.auth-feat b { display: block; margin-bottom: 6px; color: #1f1b17; font-size: 15px; }
.auth-feat span { color: #6b645c; font-size: 13px; line-height: 1.5; }
html[data-mode="dark"] .auth-hero h1 { color: var(--text); }
html[data-mode="dark"] .auth-card, html[data-mode="dark"] .auth-feat { background: var(--panel); border-color: var(--border); }
html[data-mode="dark"] .auth-card h2, html[data-mode="dark"] .auth-feat b { color: var(--text); }
@media (max-width: 760px) { .auth-feats { grid-template-columns: 1fr; } }

/* Public demo (/demo): view-only banner */
.demo-banner { position: relative; z-index: 60; background: #c96442; color: #fff; font-size: 13px; font-weight: 600; text-align: center; padding: 7px 12px; cursor: default; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
/* Demo: Agent page showcase (view only) */
.demo-sugg-top { padding: 12px 18px 10px; border-bottom: 1px solid var(--border); background: var(--panel, #fffdf8); }
.demo-sugg-top .suggest { justify-content: flex-start; margin-top: 6px; }
.demo-sugg-top .sugg { cursor: default; opacity: .9; }
.nav-link.demo-off { opacity: .45; cursor: default; pointer-events: none; }
