/* S. D Enterprise CRM — phone-first (320-430 px), then tablet and desktop. System fonts only. */
:root {
  --ink: #1c2330;
  --bg: #f3f6fa; --card: #ffffff; --line: #e1e7ef; --line-2: #edf1f6; --field: #ccd6e2;
  --text: #0e1a2f; --muted: #56667e; --faint: #8796ab;
  --blue: #0a6fd0; --blue-d: #0759a8; --blue-bg: #eaf3fd; --cyan: #17a9e1;
  --brand: linear-gradient(135deg, #19b2e6 0%, #0a6fd0 62%, #0757b0 100%);
  --green: #15803d; --green-2: #16a34a; --amber: #c26a05; --red: #c81e1e; --violet: #6d3fd6; --teal: #0d8f8a; --slate: #8a97a8;
  --r: 14px; --r-s: 10px; --r-xs: 8px;
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .06);
  --sh-up: 0 -1px 0 rgba(16, 24, 40, .05), 0 -6px 18px rgba(16, 24, 40, .06);
  --gap: clamp(12px, 3.4vw, 18px);
  --pad: clamp(14px, 4vw, 20px);
  --side-w: 248px;
  --top-h: 56px;
  --bot-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
:where(svg) { width: 1em; height: 1em; flex: 0 0 auto; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text); min-width: 300px;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-wrap: anywhere;
}
body.locked { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(19px, 5.2vw, 24px); font-weight: 750; }
h2 { font-size: clamp(15.5px, 4.2vw, 17px); font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; color: var(--muted); }
p { margin: 0 0 8px; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* ---------- shell ---------- */
.app { min-height: 100svh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--side-w)); background: #fff; color: var(--text);
  display: flex; flex-direction: column; z-index: 50; transform: translateX(-102%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  overscroll-behavior: contain; padding-top: var(--safe-t); border-right: 1px solid var(--line);
}
.side.open { transform: none; box-shadow: 14px 0 44px rgba(16, 24, 40, .2); }
.side-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); background: radial-gradient(120% 140% at 0% 0%, #e8f5fd 0%, #fff 62%); }
.side-head img { display: block; height: 34px; width: auto; }
.side-head small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.side nav { flex: 1; overflow-y: auto; padding: 6px 10px 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.nav-group { margin-top: 10px; }
.nav-title { padding: 6px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: var(--r-s);
  color: #26354d; font-size: 14.5px; font-weight: 550;
}
.nav-link svg { width: 19px; height: 19px; color: var(--muted); }
.nav-link:hover { background: var(--line-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--blue-bg); color: var(--blue-d); font-weight: 680; box-shadow: inset 3px 0 0 var(--blue); }
.nav-link.active svg { color: var(--blue); }
.side-foot { padding: 12px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.side-foot a { color: var(--muted); font-weight: 600; }
.scrim { position: fixed; inset: 0; background: rgba(5, 10, 25, .42); z-index: 45; animation: fade .2s ease; }

.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 4px;
  height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 6px 0 4px;
  background: #fff; color: var(--text); border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 17.5px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 2px; }
.top .brandmark { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; color: inherit; cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn.accent { color: var(--blue); }

main { padding: var(--gap) var(--gap) calc(var(--bot-h) + var(--safe-b) + 28px); max-width: 1180px; margin: 0 auto; }

.bottom {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: calc(var(--bot-h) + var(--safe-b)); padding: 0 4px var(--safe-b); background: #fff; box-shadow: var(--sh-up);
}
.bottom a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--bot-h); color: var(--muted); font-size: 11px; font-weight: 650; text-decoration: none; min-width: 0;
}
.bottom a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom a svg { width: 23px; height: 23px; }
.bottom a.active { color: var(--blue); }
.bottom a.active::before { content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue); }
.bottom a.fab { justify-content: flex-end; padding-bottom: 7px; }
.bottom a.fab .fab-ic {
  display: grid; place-items: center; width: 50px; height: 50px; margin-top: -18px; border-radius: 50%;
  background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(10, 111, 208, .38), 0 0 0 4px #fff;
}
.bottom a.fab .fab-ic svg { width: 23px; height: 23px; }
.bottom a.fab.active::before { display: none; }
.bottom a.fab.active span:not(.fab-ic) { color: var(--blue); }

@media (min-width: 960px) {
  .side { transform: none; width: var(--side-w); }
  .scrim, .top .menu-btn, .bottom { display: none !important; }
  .shell { margin-left: var(--side-w); }
  .top { padding-left: 22px; }
  main { padding: 24px 28px 44px; }
}

/* ---------- building blocks ---------- */
.stack > * + * { margin-top: var(--gap); }
.stack-s > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.card-pad { padding: var(--pad); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px var(--pad); border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 15.5px; }
.card-head a { font-size: 13.5px; font-weight: 600; }
.card-body { padding: 13px var(--pad); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 2px 0; }
.section-title h2 { font-size: 15.5px; }
.lead-in { color: var(--muted); font-size: 14px; }

/* dashboard hero */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r); padding: clamp(16px, 4.6vw, 22px); color: #fff; background: var(--brand);
  box-shadow: 0 10px 28px rgba(10, 111, 208, .26);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); pointer-events: none; }
.hero .hello { font-size: 13px; opacity: .9; font-weight: 600; }
.hero h1 { color: #fff; font-size: clamp(20px, 5.8vw, 26px); margin-top: 2px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13.5px; opacity: .95; }
.hero .facts b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hero .hero-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
@media (min-width: 380px) { .hero .hero-actions { grid-template-columns: 1fr 1fr; } .hero .btn { padding: 0 10px; font-size: 14.5px; } }
.hero .btn { border: 0; }
.hero .btn.light { background: #fff; color: var(--blue-d); }
.hero .btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }

/* stat grid: 3 across on phones, 2 on the narrowest */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 339px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .stats { gap: 10px; } }
@media (min-width: 1100px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 84px;
  padding: 11px 10px 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh);
  color: var(--text); text-decoration: none; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--blue)); }
.stat:hover { text-decoration: none; border-color: var(--c, var(--blue)); }
.stat .label { font-size: 12px; line-height: 1.25; color: var(--muted); font-weight: 650; }
.stat .value { font-size: clamp(21px, 6.4vw, 28px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }

.grid2 { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2.wide-left { grid-template-columns: 1.35fr 1fr; } }

/* status: plain text with a small colour dot (no pill chips) */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--slate)); flex: 0 0 auto; }
.s-new { --dot: var(--blue); } .s-called { --dot: var(--violet); } .s-profile { --dot: var(--teal); }
.s-due { --dot: var(--amber); } .s-req { --dot: var(--green-2); } .s-quote { --dot: var(--cyan); }
.s-conv { --dot: var(--green); } .s-notrel { --dot: var(--slate); }
.c-new { --c: var(--blue); } .c-called { --c: var(--violet); } .c-profile { --c: var(--teal); } .c-due { --c: var(--amber); }
.c-req { --c: var(--green-2); } .c-quote { --c: var(--cyan); } .c-conv { --c: var(--green); } .c-notrel { --c: var(--slate); } .c-total { --c: var(--ink); }
.c-overdue { --c: var(--red); } .c-mail { --c: var(--blue); }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 13px var(--pad); border-top: 1px solid var(--line-2); }
.item:first-child { border-top: 0; }
a.item { color: var(--text); text-decoration: none; }
a.item:hover, .item.tap:hover { background: #f8fafd; }
.item .title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.item .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.item .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); align-items: center; }
.item .side-actions { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.item input[type=checkbox] { margin-top: 3px; width: 20px; height: 20px; flex: 0 0 auto; }
.item .lead-link { color: inherit; text-decoration: none; }
.qa {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--blue); text-decoration: none;
}
.qa svg { width: 19px; height: 19px; }
.qa:hover { background: var(--blue-bg); text-decoration: none; }
.qa.wa { color: #128c4b; }
.qa.call { color: var(--green); }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px;
  border-radius: var(--r-s); border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-weight: 650; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn:hover { text-decoration: none; border-color: #b9c6d6; background: #f8fafc; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn.brand { background: var(--brand); border: 0; color: #fff; box-shadow: 0 4px 12px rgba(10, 111, 208, .25); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); border-color: #f0c4c4; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.fill > .btn { flex: 1 1 140px; }

/* lead record: action tiles (icon over label), 3 across on a phone */
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.actions .btn { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px 4px; font-size: 13px; border-radius: 12px; }
.actions .btn svg { width: 21px; height: 21px; }
.actions .btn.green svg, .actions .btn.primary svg { color: #fff; }
@media (min-width: 700px) { .actions { grid-template-columns: repeat(6, 1fr); } }

/* forms */
.field { display: block; min-width: 0; }
.field > span { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=time], input[type=number], input[type=tel], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--field); border-radius: var(--r-s); background: #fff;
  font-size: 16px; color: var(--text); appearance: none; -webkit-appearance: none;
}
select {
  padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2356667e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type=file] { width: 100%; font-size: 14px; }
textarea { min-height: 120px; line-height: 1.55; resize: vertical; }
textarea.tall { min-height: 320px; font-size: 15px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(10, 111, 208, .25); outline-offset: 1px; border-color: var(--blue); }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: 1 / -1; } }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14.5px; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--blue); }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px var(--pad) var(--pad); margin: 0; background: #fff; }
legend { padding: 0 6px; font-weight: 700; font-size: 14px; }

.filters { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .filters { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .filters { grid-template-columns: repeat(3, 1fr); } }
.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; min-width: 0; }
.searchbar .btn { flex: 0 0 auto; }
.sticky-tools { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 20; margin: calc(var(--gap) * -1) calc(var(--gap) * -1) 0; padding: 10px var(--gap); background: rgba(243, 246, 250, .97); border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .sticky-tools { margin: -24px -28px 0; padding: 12px 28px; } }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.active-filters b { color: var(--text); font-weight: 650; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 650; font-size: 13px; cursor: pointer; }

/* tabs: underline style, scroll sideways on a phone */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: 0 0 auto; padding: 11px 13px; border: 0; background: none; color: var(--muted); font-weight: 650; font-size: 14px; white-space: nowrap;
  border-bottom: 3px solid transparent; cursor: pointer; text-decoration: none;
}
.tabs .on { color: var(--blue); border-bottom-color: var(--blue); }

/* key/value details: stacked on a phone, two columns when there is room */
.kv { display: grid; grid-template-columns: 1fr; gap: 2px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 12.5px; font-weight: 650; margin-top: 8px; }
.kv dt:first-child { margin-top: 0; }
.kv dd { margin: 0; word-break: break-word; }
@media (min-width: 520px) { .kv { grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 14px; } .kv dt { margin-top: 0; font-size: 13.5px; font-weight: 500; } }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 15px 24px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--dot, var(--slate)); box-shadow: 0 0 0 3px #fff; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 19px; bottom: 0; width: 2px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline .t-title { font-weight: 650; font-size: 14px; }
.timeline .t-detail { color: var(--muted); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.timeline .t-when { color: var(--faint); font-size: 12px; }
.ev-email { --dot: var(--blue); } .ev-reply { --dot: var(--green-2); } .ev-bounce { --dot: var(--red); } .ev-status { --dot: var(--violet); }
.ev-note { --dot: var(--amber); } .ev-task { --dot: var(--teal); } .ev-sequence { --dot: var(--ink); } .ev-delivery { --dot: var(--cyan); } .ev-test { --dot: #b07ce8; }

/* notices */
.notice { padding: 11px 13px; border-radius: var(--r-s); border: 1px solid #c9dcf2; background: var(--blue-bg); font-size: 14px; line-height: 1.45; }
.notice.warn { border-color: #f1d3a7; background: #fff6e8; }
.notice.bad { border-color: #f1c0c0; background: #fdf0f0; }
.notice.ok { border-color: #bfe3cb; background: #eefaf2; }
.notice strong { font-weight: 750; }
.notice.with-ic { display: flex; gap: 10px; align-items: flex-start; }
.notice.with-ic > svg { width: 20px; height: 20px; margin-top: 1px; color: var(--blue); }
.notice.warn.with-ic > svg { color: var(--amber); }

.progress { height: 10px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.simple { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.simple th, table.simple td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.simple th { color: var(--muted); font-weight: 650; background: #f7f9fc; }

.preview-frame { display: block; width: 100%; min-height: 320px; height: 480px; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row button { border: 1px solid var(--line); background: #fff; border-radius: 8px; min-height: 36px; padding: 5px 9px; font-size: 12.5px; cursor: pointer; color: var(--blue-d); }

/* expandable box (details/summary) */
details.more > summary {
  display: flex; align-items: center; gap: 8px; min-height: 46px; cursor: pointer; list-style: none; font-weight: 700; color: var(--blue-d);
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary svg { width: 18px; height: 18px; transition: transform .18s; }
details.more[open] > summary svg { transform: rotate(90deg); }
details.more.card > summary { padding: 4px var(--pad); }
details.more.card[open] > summary { border-bottom: 1px solid var(--line-2); }
details.more .more-body { padding: 14px var(--pad) var(--pad); }

/* numbered steps (how-to cards) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 10px; }
.steps li { counter-increment: st; position: relative; padding-left: 38px; font-size: 14.5px; line-height: 1.5; }
.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--blue-bg);
  color: var(--blue-d); font-weight: 800; font-size: 13.5px; display: grid; place-items: center;
}

/* test addresses */
.addr { display: flex; align-items: center; gap: 10px; padding: 11px var(--pad); border-top: 1px solid var(--line-2); }
.addr:first-child { border-top: 0; }
.addr .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-bg); color: var(--blue); flex: 0 0 auto; }
.addr .ic svg { width: 18px; height: 18px; }
.addr .grow { font-weight: 600; font-size: 14.5px; }
.addr .grow small { display: block; font-weight: 500; font-size: 12.5px; }
.addr-pick { display: grid; gap: 2px; }
.addr-pick .check { padding: 4px 2px; border-top: 1px solid var(--line-2); }
.addr-pick .check:first-child { border-top: 0; }

/* bottom sheet (filters) */
.sheet-back { position: fixed; inset: 0; background: rgba(5, 10, 25, .42); z-index: 60; animation: fade .18s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 86svh; display: flex; flex-direction: column;
  background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(5, 10, 25, .2); animation: rise .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 9px auto 2px; flex: 0 0 auto; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px var(--pad) 10px; border-bottom: 1px solid var(--line-2); }
.sheet .sheet-body { padding: 14px var(--pad); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet .sheet-foot { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; padding: 12px var(--pad) calc(12px + var(--safe-b)); border-top: 1px solid var(--line-2); }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw); transform: translate(-50%, -50%); border-radius: 18px; animation: fade .18s ease; } .sheet .grab { display: none; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* login */
.login-wrap { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 60% at 50% 0%, #d9ecfb 0%, var(--bg) 60%); }
.login { width: 100%; max-width: 390px; }
.login .card { padding: 26px 22px 22px; }
.login img { display: block; height: 44px; width: auto; margin: 0 auto 16px; }
.login h1 { text-align: center; font-size: 20px; margin-bottom: 4px; }
.login p { text-align: center; color: var(--muted); font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bot-h) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .22); animation: fade .16s ease;
}
.toast.bad { background: var(--red); }
@media (min-width: 960px) { .toast { bottom: 24px; } }

.foot { margin-top: 28px; text-align: center; font-size: 12.5px; color: var(--faint); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--blue); }
.loading { padding: 32px; text-align: center; color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: var(--gap); }
.hide-sm { display: none; }
@media (min-width: 760px) { .hide-sm { display: initial; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- activity tracker (admin only) ---------- */
.pres { width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; background: var(--slate); flex: 0 0 auto; }
.pres.on { background: var(--green-2); }
.ok-text { color: var(--green); font-weight: 700; }
.item .meta svg, details.sess .meta svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; color: var(--faint); }
.item .num { font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); }
.sec-title { font-size: 15.5px; margin: 0 2px 8px; }
details.sess > summary { list-style: none; display: flex; gap: 12px; align-items: flex-start; padding: 13px var(--pad); cursor: pointer; }
details.sess > summary::-webkit-details-marker { display: none; }
details.sess > summary > svg { width: 18px; height: 18px; margin-top: 2px; color: var(--faint); transition: transform .18s; }
details.sess[open] > summary > svg { transform: rotate(90deg); }
details.sess .title { font-weight: 700; font-size: 15px; line-height: 1.3; }
details.sess .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
details.sess .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.tl { list-style: none; margin: 0; padding: 2px var(--pad) 10px; border-top: 1px solid var(--line-2); }
.tl li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line-2); font-size: 13.5px; }
.tl li:first-child { border-top: 0; }
.tl .t { flex: 0 0 66px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl .w { font-weight: 650; line-height: 1.35; }
.tl .d { color: var(--muted); font-size: 12.5px; }
.tl .s { flex: 0 0 auto; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl .k-action .w { color: var(--blue-d); }
.tl .k-signin .w, .tl .k-signout .w { color: var(--green); }
.ac-mini { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.ac-mini:hover { text-decoration: none; border-color: var(--blue); }
.ac-mini .title { font-weight: 700; font-size: 15px; }
.ac-mini .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ac-mini > svg { width: 18px; height: 18px; color: var(--faint); }
.side-foot .who { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.side-foot .who b { color: var(--text); font-weight: 650; }
/* /tracker: the tracker on its own page */
.shell.solo { margin-left: 0 !important; }
.shell.solo .top { padding-left: 12px; gap: 10px; }
.shell.solo .solo-logo { display: block; height: 25px; width: auto; flex: 0 0 auto; }
.shell.solo main { padding-bottom: calc(28px + var(--safe-b)); max-width: 860px; }

